DABC (Data Acquisition Backbone Core)  2.9.9
Factory.cxx
Go to the documentation of this file.
1 /********************************************************************
2  * The Data Acquisition Backbone Core (DABC)
3  ********************************************************************
4  * Copyright (C) 2009-
5  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
6  * Planckstr. 1
7  * 64291 Darmstadt
8  * Germany
9  * Contact: http://dabc.gsi.de
10  ********************************************************************
11  * This software can be used under the GPL license agreements as stated
12  * in LICENSE.txt file which is part of the distribution.
13  ********************************************************************/
14 #include "user/Factory.h"
15 #include "user/Input.h"
16 //#include "user/Transport.h"
17 //#include "user/Device.h"
18 //#include "user/Player.h"
19 
20 #include "dabc/Command.h"
21 #include "dabc/logging.h"
22 #include "dabc/Manager.h"
23 #include "dabc/Url.h"
24 
26 
28 {
29 
30 
31 }
32 
33 dabc::DataInput* user::Factory::CreateDataInput(const std::string& typ)
34 {
35  dabc::Url url(typ);
36  DOUT1("user::Factory::CreateDataInput is called with type:%s, url %s\n", typ.c_str(), url.GetFullName().c_str());
37  if ((url.GetProtocol()!="user") || url.GetFullName().empty())
39  user::Input* dinput = new user::Input (url);
40  return dinput;
41 }
42 
43 
44 
Interface for implementing any kind of data input.
Definition: DataIO.h:61
Small helper class to correctly instantiate user-specific factories.
Definition: Factory.h:106
virtual DataInput * CreateDataInput(const std::string &typ)
Factory method to create data input.
Definition: Factory.h:73
Uniform Resource Locator interpreter.
Definition: Url.h:33
virtual void Initialize()
Method called by the manager during application start.
Definition: Factory.cxx:27
virtual dabc::DataInput * CreateDataInput(const std::string &typ)
Factory method to create data input.
Definition: Factory.cxx:33
#define DOUT1(args ...)
Definition: logging.h:162
dabc::FactoryPlugin userfactory(new user::Factory("user"))