#include <RBCLogicUnit.h>
Public Member Functions | |
std::bitset< 6 > * | getlayersignal (int _idx) |
bool | initialise () |
bool | isTriggered () |
RBCLogicUnit (const char *) | |
RBCLogicUnit () | |
Standard constructor. | |
void | run (const RBCInput &, std::bitset< 2 > &) |
void | setBoardSpecs (const RBCBoardSpecs::RBCBoardConfig &) |
void | setlogic (const char *) |
virtual | ~RBCLogicUnit () |
Destructor. | |
Private Attributes | |
bool | m_debug |
std::bitset< 6 > * | m_layersignal [2] |
RBCLogic * | m_logic |
LogicTool< RBCLogic > * | m_logtool |
std::string | m_logtype |
Definition at line 20 of file RBCLogicUnit.h.
RBCLogicUnit::RBCLogicUnit | ( | ) |
Standard constructor.
Definition at line 18 of file RBCLogicUnit.cc.
References m_debug, and m_logtool.
: RPCLogicUnit() { m_logtool = new LogicTool<RBCLogic>(); m_debug = false; }
RBCLogicUnit::RBCLogicUnit | ( | const char * | logic_type | ) |
Definition at line 25 of file RBCLogicUnit.cc.
References m_debug, m_logtool, m_logtype, and AlCaHLTBitMon_QueryRunRegistry::string.
: RPCLogicUnit() { m_logtool = new LogicTool<RBCLogic>(); m_logtype = std::string( logic_type ); m_debug = false; }
RBCLogicUnit::~RBCLogicUnit | ( | ) | [virtual] |
Destructor.
Definition at line 35 of file RBCLogicUnit.cc.
References LogicTool< GenLogic >::endjob(), and m_logtool.
std::bitset<6>* RBCLogicUnit::getlayersignal | ( | int | _idx | ) | [inline] |
Definition at line 37 of file RBCLogicUnit.h.
References m_layersignal.
Referenced by RBCEmulator::emulate().
{ return m_layersignal[_idx]; };
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().
{ bool status(false); status = m_logtool->initialise(); if ( !status ) { if( m_debug ) std::cout << "RBCLogicUnit> Problem initialising LogicTool \n"; return 0; }; m_logic = dynamic_cast<RBCLogic*> ( m_logtool->retrieve(m_logtype) ); if ( ! m_logic ) { if( m_debug ) std::cout << "RBCLogicUnit> No logic found \n"; return 0; }; return 1; }
bool RBCLogicUnit::isTriggered | ( | ) | [inline] |
Definition at line 39 of file RBCLogicUnit.h.
References m_logic, and RBCLogic::m_triggersignal.
{ return m_logic->m_triggersignal; };
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().
{ m_logic->process( _input , _decision ); m_layersignal[0] = m_logic->getlayersignal( 0 ); m_layersignal[1] = m_logic->getlayersignal( 1 ); }
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().
{ m_logic->setBoardSpecs( specs ); }
void RBCLogicUnit::setlogic | ( | const char * | _logic | ) |
Definition at line 65 of file RBCLogicUnit.cc.
References m_logtype, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by RBCBasicConfig::initialise().
{ m_logtype = std::string(_logic); }
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().