CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 33 of file LogicTool.h.

Constructor & Destructor Documentation

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

Standard constructor.

Definition at line 25 of file LogicTool.h.

25 {}

Member Function Documentation

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

Definition at line 35 of file LogicTool.h.

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

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

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  };
TTUWedgeORLogic * createWedgeORLogic()
Definition: LogicImp.cc:18
RBCChamberORLogic * createChamberORLogic()
Definition: LogicImp.cc:13
TTUSectorORLogic * createSectorORLogic()
Definition: LogicImp.cc:16
list status
Definition: mps_update.py:107
assert(be >=bs)
RBCTestLogic * createTestLogic()
Definition: LogicImp.cc:12
tuple key
prepare the HTCondor submission files and eventually submit them
TTUPointingLogic * createPointingLogic()
Definition: LogicImp.cc:19
TTUTwoORLogic * createTwoORLogic()
Definition: LogicImp.cc:17
LogicFactory< GenLogic, std::string > RBCLogicType
Definition: LogicTool.h:33
static RBCLogicType const & rbclogic()
Definition: LogicTool.h:78
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 78 of file LogicTool.h.

References LogicTool< GenLogic >::initialise().

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

78  {
79  static const RBCLogicType s_rbclogic = initialise();
80  return s_rbclogic;
81  }
static RBCLogicType initialise()
Definition: LogicTool.h:35
LogicFactory< GenLogic, std::string > RBCLogicType
Definition: LogicTool.h:33
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().

29 { 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:78