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 32 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 {}

Member Function Documentation

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

Definition at line 34 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().

34  {
35  GenLogic* (*createlogic)();
36  bool status(true);
37 
39  //...
40  std::string key = std::string("ChamberORLogic");
41  createlogic = (GenLogic * (*)()) & createChamberORLogic;
42  status = rbclogic.Register(key, createlogic);
43 
44  key = std::string("TestLogic");
45  createlogic = (GenLogic * (*)()) & createTestLogic;
46  status = rbclogic.Register(key, createlogic);
47 
48  key = std::string("PatternLogic");
49  createlogic = (GenLogic * (*)()) & createPatternLogic;
50  status = rbclogic.Register(key, createlogic);
51  //...
52 
53  key = std::string("TrackingAlg");
54  createlogic = (GenLogic * (*)()) & createTrackingAlg;
55  status = rbclogic.Register(key, createlogic);
56 
57  key = std::string("SectorORLogic");
58  createlogic = (GenLogic * (*)()) & createSectorORLogic;
59  status = rbclogic.Register(key, createlogic);
60 
61  key = std::string("TwoORLogic");
62  createlogic = (GenLogic * (*)()) & createTwoORLogic;
63  status = rbclogic.Register(key, createlogic);
64 
65  key = std::string("WedgeORLogic");
66  createlogic = (GenLogic * (*)()) & createWedgeORLogic;
67  status = rbclogic.Register(key, createlogic);
68 
69  key = std::string("PointingLogic");
70  createlogic = (GenLogic * (*)()) & createPointingLogic;
71  status = rbclogic.Register(key, createlogic);
72 
73  assert(status);
74  return rbclogic;
75  };
TTUWedgeORLogic * createWedgeORLogic()
Definition: LogicImp.cc:18
RBCChamberORLogic * createChamberORLogic()
Definition: LogicImp.cc:13
TTUSectorORLogic * createSectorORLogic()
Definition: LogicImp.cc:16
RBCTestLogic * createTestLogic()
Definition: LogicImp.cc:12
TTUPointingLogic * createPointingLogic()
Definition: LogicImp.cc:19
TTUTwoORLogic * createTwoORLogic()
Definition: LogicImp.cc:17
LogicFactory< GenLogic, std::string > RBCLogicType
Definition: LogicTool.h:32
static RBCLogicType const & rbclogic()
Definition: LogicTool.h:77
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 77 of file LogicTool.h.

References LogicTool< GenLogic >::initialise().

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

77  {
78  static const RBCLogicType s_rbclogic = initialise();
79  return s_rbclogic;
80  }
static RBCLogicType initialise()
Definition: LogicTool.h:34
LogicFactory< GenLogic, std::string > RBCLogicType
Definition: LogicTool.h:32
template<class GenLogic>
std::unique_ptr<GenLogic> LogicTool< GenLogic >::retrieve ( const std::string &  _logic_name)
inline

...

Definition at line 28 of file LogicTool.h.

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

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

28 { return rbclogic().CreateObject(_logic_name); };
std::unique_ptr< Ilogic > CreateObject(const Identifier &id) const
Definition: LogicFactory.h:28
static RBCLogicType const & rbclogic()
Definition: LogicTool.h:77