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 20 of file RBCLogicUnit.h.

Constructor & Destructor Documentation

RBCLogicUnit::RBCLogicUnit ( )

Standard constructor.

Definition at line 18 of file RBCLogicUnit.cc.

References m_debug, and m_logtool.

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

Definition at line 25 of file RBCLogicUnit.cc.

References m_debug, m_logtool, and m_logtype.

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

Destructor.

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

Member Function Documentation

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

Definition at line 37 of file RBCLogicUnit.h.

References m_layersignal.

Referenced by RBCEmulator::emulate().

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

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

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

Definition at line 39 of file RBCLogicUnit.h.

References m_logic, and RBCLogic::m_triggersignal.

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

Definition at line 77 of file RBCLogicUnit.cc.

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

Referenced by RBCEmulator::emulate().

78 {
79 
80  m_logic->process( _input , _decision );
83 
84 }
RBCLogic * m_logic
Definition: RBCLogicUnit.h:51
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:49
void RBCLogicUnit::setBoardSpecs ( const RBCBoardSpecs::RBCBoardConfig specs)

Definition at line 70 of file RBCLogicUnit.cc.

References m_logic, and RBCLogic::setBoardSpecs().

Referenced by RBCBasicConfig::initialise().

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

Definition at line 65 of file RBCLogicUnit.cc.

References m_logtype.

Referenced by RBCBasicConfig::initialise().

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

Member Data Documentation

bool RBCLogicUnit::m_debug
private

Definition at line 55 of file RBCLogicUnit.h.

Referenced by initialise(), and RBCLogicUnit().

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

Definition at line 49 of file RBCLogicUnit.h.

Referenced by getlayersignal(), and run().

RBCLogic* RBCLogicUnit::m_logic
private

Definition at line 51 of file RBCLogicUnit.h.

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

LogicTool<RBCLogic>* RBCLogicUnit::m_logtool
private

Definition at line 53 of file RBCLogicUnit.h.

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

std::string RBCLogicUnit::m_logtype
private

Definition at line 41 of file RBCLogicUnit.h.

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