CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Static Private Member Functions
LogicTool< GenLogic > Class Template Reference

#include <LogicTool.h>

Public Member Functions

 LogicTool ()
 Standard constructor. More...
 
std::unique_ptr< GenLogic > retrieve (const std::string &_logic_name)
 ... More...
 

Private Types

using RBCLogicType = LogicFactory< GenLogic, std::string >
 

Static Private Member Functions

static RBCLogicType initialise ()
 
static RBCLogicType const & rbclogic ()
 

Detailed Description

template<class GenLogic>
class LogicTool< GenLogic >

Author
Andres Osorio

email: aosor.nosp@m.io@u.nosp@m.niand.nosp@m.es.e.nosp@m.du.co

Date
2008-10-12

Definition at line 21 of file LogicTool.h.

Member Typedef Documentation

template<class GenLogic>
using LogicTool< GenLogic >::RBCLogicType = LogicFactory< GenLogic, std::string>
private

Definition at line 37 of file LogicTool.h.

Constructor & Destructor Documentation

template<class GenLogic>
LogicTool< GenLogic >::LogicTool ( )
inline

Standard constructor.

Definition at line 24 of file LogicTool.h.

24  {
25  }

Member Function Documentation

template<class GenLogic>
static RBCLogicType LogicTool< GenLogic >::initialise ( )
inlinestaticprivate

Definition at line 39 of file LogicTool.h.

References createChamberORLogic(), createPatternLogic(), createPointingLogic(), createSectorORLogic(), createTestLogic(), createTrackingAlg(), createTwoORLogic(), createWedgeORLogic(), crabWrapper::key, LogicTool< GenLogic >::rbclogic(), LogicFactory< Ilogic, Identifier, LogicCreator >::Register(), mps_update::status, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by LogicTool< GenLogic >::rbclogic().

40  {
41  GenLogic * (*createlogic) ();
42  bool status(true);
43 
45  //...
46  std::string key = std::string("ChamberORLogic");
47  createlogic = (GenLogic * (*)()) &createChamberORLogic;
48  status = rbclogic.Register( key , createlogic );
49 
50  key = std::string("TestLogic");
51  createlogic = (GenLogic * (*)()) &createTestLogic;
52  status = rbclogic.Register( key , createlogic );
53 
54  key = std::string("PatternLogic");
55  createlogic = (GenLogic * (*)()) &createPatternLogic;
56  status = rbclogic.Register( key , createlogic );
57  //...
58 
59  key = std::string("TrackingAlg");
60  createlogic = (GenLogic * (*)()) &createTrackingAlg;
61  status = rbclogic.Register( key , createlogic );
62 
63  key = std::string("SectorORLogic");
64  createlogic = (GenLogic * (*)()) &createSectorORLogic;
65  status = rbclogic.Register( key , createlogic );
66 
67  key = std::string("TwoORLogic");
68  createlogic = (GenLogic * (*)()) &createTwoORLogic;
69  status = rbclogic.Register( key , createlogic );
70 
71  key = std::string("WedgeORLogic");
72  createlogic = (GenLogic * (*)()) &createWedgeORLogic;
73  status = rbclogic.Register( key , createlogic );
74 
75  key = std::string("PointingLogic");
76  createlogic = (GenLogic * (*)()) &createPointingLogic;
77  status = rbclogic.Register( key , createlogic );
78 
79  assert(status);
80  return rbclogic;
81 
82  };
TTUWedgeORLogic * createWedgeORLogic()
Definition: LogicImp.cc:18
RBCChamberORLogic * createChamberORLogic()
Definition: LogicImp.cc:13
TTUSectorORLogic * createSectorORLogic()
Definition: LogicImp.cc:16
LogicFactory< GenLogic, std::string > RBCLogicType
Definition: LogicTool.h:37
RBCTestLogic * createTestLogic()
Definition: LogicImp.cc:12
TTUPointingLogic * createPointingLogic()
Definition: LogicImp.cc:19
TTUTwoORLogic * createTwoORLogic()
Definition: LogicImp.cc:17
static RBCLogicType const & rbclogic()
Definition: LogicTool.h:84
TTUTrackingAlg * createTrackingAlg()
Definition: LogicImp.cc:15
RBCPatternLogic * createPatternLogic()
Definition: LogicImp.cc:14
template<class GenLogic>
static RBCLogicType const& LogicTool< GenLogic >::rbclogic ( )
inlinestaticprivate

Definition at line 84 of file LogicTool.h.

References LogicTool< GenLogic >::initialise().

Referenced by LogicTool< GenLogic >::initialise(), and LogicTool< GenLogic >::retrieve().

84  {
85  static const RBCLogicType s_rbclogic = initialise();
86  return s_rbclogic;
87  }
LogicFactory< GenLogic, std::string > RBCLogicType
Definition: LogicTool.h:37
static RBCLogicType initialise()
Definition: LogicTool.h:39
template<class GenLogic>
std::unique_ptr<GenLogic> LogicTool< GenLogic >::retrieve ( const std::string &  _logic_name)
inline

...

Definition at line 29 of file LogicTool.h.

References LogicFactory< Ilogic, Identifier, LogicCreator >::CreateObject(), and LogicTool< GenLogic >::rbclogic().

Referenced by RBCLogicUnit::initialise(), and TTULogicUnit::initialise().

30  {
31  return rbclogic().CreateObject( _logic_name );
32  };
std::unique_ptr< Ilogic > CreateObject(const Identifier &id) const
Definition: LogicFactory.h:33
static RBCLogicType const & rbclogic()
Definition: LogicTool.h:84