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
RBCLogicUnit Class Reference

#include <RBCLogicUnit.h>

Inheritance diagram for RBCLogicUnit:
RPCLogicUnit

Public Member Functions

std::bitset< 6 > * getlayersignal (int _idx)
 
bool initialise ()
 
bool isTriggered ()
 
 RBCLogicUnit ()
 Standard constructor. More...
 
 RBCLogicUnit (const char *)
 
void run (const RBCInput &, std::bitset< 2 > &)
 
void setBoardSpecs (const RBCBoardSpecs::RBCBoardConfig &)
 
void setlogic (const char *)
 
virtual ~RBCLogicUnit ()
 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
 
std::bitset< 6 > * m_layersignal [2]
 
RBCLogicm_logic
 
LogicTool< RBCLogic > * 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 19 of file RBCLogicUnit.h.

Constructor & Destructor Documentation

RBCLogicUnit::RBCLogicUnit ( )

Standard constructor.

Definition at line 17 of file RBCLogicUnit.cc.

References m_debug, and m_logtool.

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

Definition at line 24 of file RBCLogicUnit.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 }
RPCLogicUnit()
Standard constructor.
Definition: RPCLogicUnit.h:16
std::string m_logtype
Definition: RBCLogicUnit.h:40
LogicTool< RBCLogic > * m_logtool
Definition: RBCLogicUnit.h:52
RBCLogicUnit::~RBCLogicUnit ( )
virtual

Destructor.

Definition at line 34 of file RBCLogicUnit.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 }
bool endjob()
Definition: LogicTool.h:104
LogicTool< RBCLogic > * m_logtool
Definition: RBCLogicUnit.h:52

Member Function Documentation

std::bitset<6>* RBCLogicUnit::getlayersignal ( int  _idx)
inline

Definition at line 36 of file RBCLogicUnit.h.

References m_layersignal.

Referenced by RBCEmulator::emulate().

36 { return m_layersignal[_idx]; };
std::bitset< 6 > * m_layersignal[2]
Definition: RBCLogicUnit.h:48
bool RBCLogicUnit::initialise ( )

Definition at line 44 of file RBCLogicUnit.cc.

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

Referenced by RBCBasicConfig::initialise().

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

Definition at line 38 of file RBCLogicUnit.h.

References m_logic, and RBCLogic::m_triggersignal.

38  {
39  return m_logic->m_triggersignal;
40  };
RBCLogic * m_logic
Definition: RBCLogicUnit.h:50
bool m_triggersignal
Definition: RBCLogic.h:31
void RBCLogicUnit::run ( const RBCInput _input,
std::bitset< 2 > &  _decision 
)

Definition at line 76 of file RBCLogicUnit.cc.

References RBCLogic::getlayersignal(), m_layersignal, m_logic, and RBCLogic::process().

Referenced by RBCEmulator::emulate().

77 {
78 
79  m_logic->process( _input , _decision );
82 
83 }
RBCLogic * m_logic
Definition: RBCLogicUnit.h:50
virtual std::bitset< 6 > * getlayersignal(int)=0
virtual void process(const RBCInput &, std::bitset< 2 > &)=0
std::bitset< 6 > * m_layersignal[2]
Definition: RBCLogicUnit.h:48
void RBCLogicUnit::setBoardSpecs ( const RBCBoardSpecs::RBCBoardConfig specs)

Definition at line 69 of file RBCLogicUnit.cc.

References m_logic, and RBCLogic::setBoardSpecs().

Referenced by RBCBasicConfig::initialise().

70 {
71 
72  m_logic->setBoardSpecs( specs );
73 
74 }
RBCLogic * m_logic
Definition: RBCLogicUnit.h:50
virtual void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig &)=0
void RBCLogicUnit::setlogic ( const char *  _logic)

Definition at line 64 of file RBCLogicUnit.cc.

References m_logtype, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by RBCBasicConfig::initialise().

65 {
66  m_logtype = std::string(_logic);
67 }
std::string m_logtype
Definition: RBCLogicUnit.h:40

Member Data Documentation

bool RBCLogicUnit::m_debug
private

Definition at line 54 of file RBCLogicUnit.h.

Referenced by initialise(), and RBCLogicUnit().

std::bitset<6>* RBCLogicUnit::m_layersignal[2]
private

Definition at line 48 of file RBCLogicUnit.h.

Referenced by getlayersignal(), and run().

RBCLogic* RBCLogicUnit::m_logic
private

Definition at line 50 of file RBCLogicUnit.h.

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

LogicTool<RBCLogic>* RBCLogicUnit::m_logtool
private

Definition at line 52 of file RBCLogicUnit.h.

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

std::string RBCLogicUnit::m_logtype
private

Definition at line 40 of file RBCLogicUnit.h.

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