CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TTULogicUnit Class Reference

#include <TTULogicUnit.h>

Inheritance diagram for TTULogicUnit:
RPCLogicUnit

Public Member Functions

bool initialise ()
 
bool isTriggered ()
 
void run (const TTUInput &)
 
void run (const TTUInput &, int)
 
void setBoardSpecs (const TTUBoardSpecs::TTUBoardConfig &)
 
void setlogic (const char *)
 
 TTULogicUnit ()
 Standard constructor. More...
 
 TTULogicUnit (const char *)
 
virtual ~TTULogicUnit ()
 Destructor. More...
 
- Public Member Functions inherited from RPCLogicUnit
 RPCLogicUnit ()
 Standard constructor. More...
 
 RPCLogicUnit (int, int, int)
 
virtual ~RPCLogicUnit ()
 Destructor. More...
 

Private Attributes

bool m_debug
 
TTULogicm_logic
 
LogicTool< TTULogic > * m_logtool
 
std::string m_logtype
 

Additional Inherited Members

- Public Attributes inherited from RPCLogicUnit
int m_propA
 
int m_propB
 
int m_propC
 

Detailed Description

Author
Andres Osorio
Date
2008-10-25

Definition at line 21 of file TTULogicUnit.h.

Constructor & Destructor Documentation

TTULogicUnit::TTULogicUnit ( )

Standard constructor.

Definition at line 17 of file TTULogicUnit.cc.

References m_debug, and m_logtool.

17  : RPCLogicUnit () {
18 
20  m_debug = false;
21 
22 }
LogicTool< TTULogic > * m_logtool
Definition: TTULogicUnit.h:52
RPCLogicUnit()
Standard constructor.
Definition: RPCLogicUnit.h:16
TTULogicUnit::TTULogicUnit ( const char *  logic_type)

Definition at line 24 of file TTULogicUnit.cc.

References m_debug, m_logtool, m_logtype, and AlCaHLTBitMon_QueryRunRegistry::string.

24  : RPCLogicUnit () {
25 
27  m_logtype = std::string( logic_type );
28  m_debug = false;
29 
30 }
std::string m_logtype
Definition: TTULogicUnit.h:42
LogicTool< TTULogic > * m_logtool
Definition: TTULogicUnit.h:52
RPCLogicUnit()
Standard constructor.
Definition: RPCLogicUnit.h:16
TTULogicUnit::~TTULogicUnit ( )
virtual

Destructor.

Definition at line 34 of file TTULogicUnit.cc.

References LogicTool< GenLogic >::endjob(), and m_logtool.

34  {
35 
36  if (m_logtool) {
37  if ( m_logtool->endjob() )
38  delete m_logtool;
39  }
40 
41 }
LogicTool< TTULogic > * m_logtool
Definition: TTULogicUnit.h:52
bool endjob()
Definition: LogicTool.h:104

Member Function Documentation

bool TTULogicUnit::initialise ( )

Definition at line 44 of file TTULogicUnit.cc.

References gather_cfg::cout, LogicTool< GenLogic >::initialise(), m_debug, m_logic, m_logtool, m_logtype, LogicTool< GenLogic >::retrieve(), and ntuplemaker::status.

Referenced by TTUBasicConfig::initialise().

45 {
46 
47  bool status(true);
48 
50  if ( !status ) {
51  if( m_debug ) std::cout << "TTULogicUnit> Problem initialising LogicTool \n";
52  return 0; };
53 
54  m_logic = dynamic_cast<TTULogic*> ( m_logtool->retrieve(m_logtype) );
55 
56  if ( ! m_logic ) {
57  if( m_debug ) std::cout << "TTULogicUnit> No logic found \n";
58  return 0; };
59 
60  return 1;
61 
62 }
std::string m_logtype
Definition: TTULogicUnit.h:42
TTULogic * m_logic
Definition: TTULogicUnit.h:50
GenLogic * retrieve(const std::string &_logic_name)
Definition: LogicTool.h:97
LogicTool< TTULogic > * m_logtool
Definition: TTULogicUnit.h:52
bool initialise()
Definition: LogicTool.h:38
tuple cout
Definition: gather_cfg.py:121
tuple status
Definition: ntuplemaker.py:245
bool TTULogicUnit::isTriggered ( )
inline

Definition at line 40 of file TTULogicUnit.h.

References m_logic, and TTULogic::m_triggersignal.

Referenced by TTUEmulator::processTtu().

40  {
41  return m_logic->m_triggersignal;
42  };
TTULogic * m_logic
Definition: TTULogicUnit.h:50
bool m_triggersignal
Definition: TTULogic.h:34
void TTULogicUnit::run ( const TTUInput input)

Definition at line 78 of file TTULogicUnit.cc.

References m_logic, and TTULogic::process().

Referenced by TTUEmulator::processTtu().

79 {
80 
81  //... check the thresholds
82 
83  //... by Sector
84 
85  //... by Tower
86 
87  //... by Wheel
88 
89  m_logic->process( input );
90 
91  //m_logic->m_triggersignal = false;
92 
93 
94 }
TTULogic * m_logic
Definition: TTULogicUnit.h:50
virtual bool process(const TTUInput &)=0
void TTULogicUnit::run ( const TTUInput input,
int  option 
)

Definition at line 96 of file TTULogicUnit.cc.

References m_logic, TTULogic::process(), and TTULogic::setOption().

97 {
98 
99  m_logic->setOption( option );
100  m_logic->process( input );
101 
102  //m_logic->m_triggersignal = false;
103 
104 }
virtual void setOption(int option)
Definition: TTULogic.h:28
TTULogic * m_logic
Definition: TTULogicUnit.h:50
virtual bool process(const TTUInput &)=0
void TTULogicUnit::setBoardSpecs ( const TTUBoardSpecs::TTUBoardConfig boardSpcs)

Definition at line 71 of file TTULogicUnit.cc.

References m_logic, and TTULogic::setBoardSpecs().

Referenced by TTUBasicConfig::initialise().

72 {
73 
74  m_logic->setBoardSpecs ( boardSpcs );
75 
76 }
TTULogic * m_logic
Definition: TTULogicUnit.h:50
virtual void setBoardSpecs(const TTUBoardSpecs::TTUBoardConfig &)=0
void TTULogicUnit::setlogic ( const char *  logic)

Definition at line 64 of file TTULogicUnit.cc.

References m_logtype, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by TTUBasicConfig::initialise().

65 {
66 
67  m_logtype = std::string( logic );
68 
69 }
std::string m_logtype
Definition: TTULogicUnit.h:42

Member Data Documentation

bool TTULogicUnit::m_debug
private

Definition at line 54 of file TTULogicUnit.h.

Referenced by initialise(), and TTULogicUnit().

TTULogic* TTULogicUnit::m_logic
private

Definition at line 50 of file TTULogicUnit.h.

Referenced by initialise(), isTriggered(), run(), and setBoardSpecs().

LogicTool<TTULogic>* TTULogicUnit::m_logtool
private

Definition at line 52 of file TTULogicUnit.h.

Referenced by initialise(), TTULogicUnit(), and ~TTULogicUnit().

std::string TTULogicUnit::m_logtype
private

Definition at line 42 of file TTULogicUnit.h.

Referenced by initialise(), setlogic(), and TTULogicUnit().