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 22 of file LogicTool.h.

Member Typedef Documentation

◆ RBCLogicType

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

Definition at line 33 of file LogicTool.h.

Constructor & Destructor Documentation

◆ LogicTool()

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

Standard constructor.

Definition at line 25 of file LogicTool.h.

25 {}

Member Function Documentation

◆ initialise()

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

Definition at line 35 of file LogicTool.h.

35  {
36  GenLogic* (*createlogic)();
37  bool status(true);
38 
40  //...
41  std::string key = std::string("ChamberORLogic");
42  createlogic = (GenLogic * (*)()) & createChamberORLogic;
43  status = rbclogic.Register(key, createlogic);
44 
45  key = std::string("TestLogic");
46  createlogic = (GenLogic * (*)()) & createTestLogic;
47  status = rbclogic.Register(key, createlogic);
48 
49  key = std::string("PatternLogic");
50  createlogic = (GenLogic * (*)()) & createPatternLogic;
51  status = rbclogic.Register(key, createlogic);
52  //...
53 
54  key = std::string("TrackingAlg");
55  createlogic = (GenLogic * (*)()) & createTrackingAlg;
56  status = rbclogic.Register(key, createlogic);
57 
58  key = std::string("SectorORLogic");
59  createlogic = (GenLogic * (*)()) & createSectorORLogic;
60  status = rbclogic.Register(key, createlogic);
61 
62  key = std::string("TwoORLogic");
63  createlogic = (GenLogic * (*)()) & createTwoORLogic;
64  status = rbclogic.Register(key, createlogic);
65 
66  key = std::string("WedgeORLogic");
67  createlogic = (GenLogic * (*)()) & createWedgeORLogic;
68  status = rbclogic.Register(key, createlogic);
69 
70  key = std::string("PointingLogic");
71  createlogic = (GenLogic * (*)()) & createPointingLogic;
72  status = rbclogic.Register(key, createlogic);
73 
74  assert(status);
75  return rbclogic;
76  };

References cms::cuda::assert(), 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().

◆ rbclogic()

template<class GenLogic>
static RBCLogicType const& LogicTool< GenLogic >::rbclogic ( )
inlinestaticprivate

Definition at line 78 of file LogicTool.h.

78  {
79  static const RBCLogicType s_rbclogic = initialise();
80  return s_rbclogic;
81  }

References LogicTool< GenLogic >::initialise().

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

◆ retrieve()

template<class GenLogic>
std::unique_ptr<GenLogic> LogicTool< GenLogic >::retrieve ( const std::string &  _logic_name)
inline
LogicTool::rbclogic
static RBCLogicType const & rbclogic()
Definition: LogicTool.h:78
createTrackingAlg
TTUTrackingAlg * createTrackingAlg()
Definition: LogicImp.cc:15
mps_update.status
status
Definition: mps_update.py:68
cms::cuda::assert
assert(be >=bs)
createTestLogic
RBCTestLogic * createTestLogic()
Definition: LogicImp.cc:12
LogicTool::initialise
static RBCLogicType initialise()
Definition: LogicTool.h:35
LogicFactory::CreateObject
std::unique_ptr< Ilogic > CreateObject(const Identifier &id) const
Definition: LogicFactory.h:28
createPatternLogic
RBCPatternLogic * createPatternLogic()
Definition: LogicImp.cc:14
createChamberORLogic
RBCChamberORLogic * createChamberORLogic()
Definition: LogicImp.cc:13
LogicTool::RBCLogicType
LogicFactory< GenLogic, std::string > RBCLogicType
Definition: LogicTool.h:33
LogicFactory::Register
bool Register(const Identifier &id, LogicCreator creator)
Definition: LogicFactory.h:22
createTwoORLogic
TTUTwoORLogic * createTwoORLogic()
Definition: LogicImp.cc:17
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
createPointingLogic
TTUPointingLogic * createPointingLogic()
Definition: LogicImp.cc:19
createSectorORLogic
TTUSectorORLogic * createSectorORLogic()
Definition: LogicImp.cc:16
createWedgeORLogic
TTUWedgeORLogic * createWedgeORLogic()
Definition: LogicImp.cc:18
crabWrapper.key
key
Definition: crabWrapper.py:19