Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:30:34

0001 // Include files
0002 
0003 // local
0004 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCLogicUnit.h"
0005 
0006 //-----------------------------------------------------------------------------
0007 // Implementation file for class : RBCLogicUnit
0008 //
0009 // 2008-10-25 : Andres Osorio
0010 //-----------------------------------------------------------------------------
0011 
0012 //=============================================================================
0013 // Standard constructor, initializes variables
0014 //=============================================================================
0015 RBCLogicUnit::RBCLogicUnit() : RPCLogicUnit(), m_debug{false} {}
0016 
0017 RBCLogicUnit::RBCLogicUnit(const char* logic_type) : RPCLogicUnit(), m_logtype{logic_type}, m_debug{false} {}
0018 //=============================================================================
0019 // Destructor
0020 //=============================================================================
0021 RBCLogicUnit::~RBCLogicUnit() {}
0022 
0023 //=============================================================================
0024 bool RBCLogicUnit::initialise() {
0025   LogicTool<RBCLogic> logtool;
0026 
0027   m_logic = logtool.retrieve(m_logtype);
0028 
0029   if (!m_logic) {
0030     if (m_debug)
0031       std::cout << "RBCLogicUnit> No logic found \n";
0032     return false;
0033   };
0034 
0035   return true;
0036 }
0037 
0038 void RBCLogicUnit::setlogic(const char* _logic) { m_logtype = std::string(_logic); }
0039 
0040 void RBCLogicUnit::setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig& specs) { m_logic->setBoardSpecs(specs); }
0041 
0042 void RBCLogicUnit::run(const RBCInput& _input, std::bitset<2>& _decision) {
0043   m_logic->process(_input, _decision);
0044   m_layersignal[0] = m_logic->getlayersignal(0);
0045   m_layersignal[1] = m_logic->getlayersignal(1);
0046 }