CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Private Attributes
LogicTool< GenLogic > Class Template Reference

#include <LogicTool.h>

Public Types

typedef LogicFactory< GenLogic,
std::string > 
RBCLogicType
 Destructor. More...
 

Public Member Functions

bool endjob ()
 
bool initialise ()
 
 LogicTool ()
 Standard constructor. More...
 
GenLogic * retrieve (const std::string &_logic_name)
 
virtual ~LogicTool ()
 

Public Attributes

GenLogic *(* createlogic )()
 
RBCLogicType m_rbclogic
 

Private Attributes

std::vector< std::string > m_logkeys
 

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>
typedef LogicFactory< GenLogic, std::string> LogicTool< GenLogic >::RBCLogicType

Destructor.

...

Definition at line 28 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 { };
template<class GenLogic>
virtual LogicTool< GenLogic >::~LogicTool ( )
inlinevirtual

Definition at line 26 of file LogicTool.h.

26  {
27  m_logkeys.clear();
28  };
std::vector< std::string > m_logkeys
Definition: LogicTool.h:115

Member Function Documentation

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

Definition at line 104 of file LogicTool.h.

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

105  {
106  bool status(true);
107  typename std::vector<std::string>::iterator itr = m_logkeys.begin();
108  while ( itr != m_logkeys.end() )
109  {
110  status = status && ( m_rbclogic.Unregister( (*itr) ) );
111  ++itr;
112  }
113  return status;
114 
115  };
bool Unregister(const Identifier &id)
Definition: LogicFactory.h:28
std::vector< std::string > m_logkeys
Definition: LogicTool.h:115
tuple status
Definition: ntuplemaker.py:245
RBCLogicType m_rbclogic
Definition: LogicTool.h:36
template<class GenLogic>
bool LogicTool< GenLogic >::initialise ( )
inline

Definition at line 38 of file LogicTool.h.

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

39  {
40  bool status(true);
41 
42  //...
43  std::string key = std::string("ChamberORLogic");
44  createlogic = (GenLogic * (*)()) &createChamberORLogic;
46 
47  m_logkeys.push_back( key );
48 
49  key = std::string("TestLogic");
50  createlogic = (GenLogic * (*)()) &createTestLogic;
52 
53  m_logkeys.push_back( key );
54 
55  key = std::string("PatternLogic");
56  createlogic = (GenLogic * (*)()) &createPatternLogic;
58  //...
59 
60  m_logkeys.push_back( key );
61 
62  key = std::string("TrackingAlg");
63  createlogic = (GenLogic * (*)()) &createTrackingAlg;
65 
66  m_logkeys.push_back( key );
67 
68  key = std::string("SectorORLogic");
69  createlogic = (GenLogic * (*)()) &createSectorORLogic;
71 
72  m_logkeys.push_back( key );
73 
74  key = std::string("TwoORLogic");
75  createlogic = (GenLogic * (*)()) &createTwoORLogic;
77 
78  m_logkeys.push_back( key );
79 
80  key = std::string("WedgeORLogic");
81  createlogic = (GenLogic * (*)()) &createWedgeORLogic;
83 
84  m_logkeys.push_back( key );
85 
86  key = std::string("PointingLogic");
87  createlogic = (GenLogic * (*)()) &createPointingLogic;
89 
90  m_logkeys.push_back( key );
91 
92  return status;
93 
94  };
TTUWedgeORLogic * createWedgeORLogic()
Definition: LogicImp.cc:18
RBCChamberORLogic * createChamberORLogic()
Definition: LogicImp.cc:13
TTUSectorORLogic * createSectorORLogic()
Definition: LogicImp.cc:16
bool Register(const Identifier &id, LogicCreator creator)
Definition: LogicFactory.h:23
GenLogic *(* createlogic)()
Definition: LogicTool.h:34
RBCTestLogic * createTestLogic()
Definition: LogicImp.cc:12
TTUPointingLogic * createPointingLogic()
Definition: LogicImp.cc:19
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
TTUTwoORLogic * createTwoORLogic()
Definition: LogicImp.cc:17
std::vector< std::string > m_logkeys
Definition: LogicTool.h:115
TTUTrackingAlg * createTrackingAlg()
Definition: LogicImp.cc:15
RBCPatternLogic * createPatternLogic()
Definition: LogicImp.cc:14
tuple status
Definition: ntuplemaker.py:245
RBCLogicType m_rbclogic
Definition: LogicTool.h:36
template<class GenLogic>
GenLogic* LogicTool< GenLogic >::retrieve ( const std::string &  _logic_name)
inline

Definition at line 97 of file LogicTool.h.

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

98  {
99  GenLogic * _obj;
100  _obj = m_rbclogic.CreateObject( _logic_name );
101  return _obj;
102  };
Ilogic * CreateObject(const Identifier &id)
Definition: LogicFactory.h:38
RBCLogicType m_rbclogic
Definition: LogicTool.h:36

Member Data Documentation

template<class GenLogic>
GenLogic*(* LogicTool< GenLogic >::createlogic)()

Definition at line 34 of file LogicTool.h.

Referenced by LogicTool< RBCLogic >::initialise().

template<class GenLogic>
std::vector<std::string> LogicTool< GenLogic >::m_logkeys
private
template<class GenLogic>
RBCLogicType LogicTool< GenLogic >::m_rbclogic