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

Constructor & Destructor Documentation

TTULogicUnit::TTULogicUnit ( )

Standard constructor.

Definition at line 18 of file TTULogicUnit.cc.

References m_debug, and m_logtool.

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

Definition at line 25 of file TTULogicUnit.cc.

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

25  : RPCLogicUnit () {
26 
28  m_logtype = std::string( logic_type );
29  m_debug = false;
30 
31 }
std::string m_logtype
Definition: TTULogicUnit.h:43
LogicTool< TTULogic > * m_logtool
Definition: TTULogicUnit.h:53
RPCLogicUnit()
Standard constructor.
Definition: RPCLogicUnit.h:17
TTULogicUnit::~TTULogicUnit ( )
virtual

Destructor.

Definition at line 35 of file TTULogicUnit.cc.

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

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

Member Function Documentation

bool TTULogicUnit::initialise ( )

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

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

Definition at line 41 of file TTULogicUnit.h.

References m_logic, and TTULogic::m_triggersignal.

Referenced by TTUEmulator::processTtu().

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

Definition at line 79 of file TTULogicUnit.cc.

References m_logic, and TTULogic::process().

Referenced by TTUEmulator::processTtu().

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

Definition at line 97 of file TTULogicUnit.cc.

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

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

Definition at line 72 of file TTULogicUnit.cc.

References m_logic, and TTULogic::setBoardSpecs().

Referenced by TTUBasicConfig::initialise().

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

Definition at line 65 of file TTULogicUnit.cc.

References m_logtype, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by TTUBasicConfig::initialise().

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

Member Data Documentation

bool TTULogicUnit::m_debug
private

Definition at line 55 of file TTULogicUnit.h.

Referenced by initialise(), and TTULogicUnit().

TTULogic* TTULogicUnit::m_logic
private

Definition at line 51 of file TTULogicUnit.h.

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

LogicTool<TTULogic>* TTULogicUnit::m_logtool
private

Definition at line 53 of file TTULogicUnit.h.

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

std::string TTULogicUnit::m_logtype
private

Definition at line 43 of file TTULogicUnit.h.

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