Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:39

0001 // Include files
0002 
0003 // local
0004 #include "L1Trigger/RPCTechnicalTrigger/interface/TTULogicUnit.h"
0005 
0006 //-----------------------------------------------------------------------------
0007 // Implementation file for class : TTULogicUnit
0008 //
0009 // 2008-10-25 : Andres Osorio
0010 //-----------------------------------------------------------------------------
0011 
0012 //=============================================================================
0013 // Standard constructor, initializes variables
0014 //=============================================================================
0015 TTULogicUnit::TTULogicUnit() : RPCLogicUnit() { m_debug = false; }
0016 
0017 TTULogicUnit::TTULogicUnit(const char* logic_type) : RPCLogicUnit() {
0018   m_logtype = std::string(logic_type);
0019   m_debug = false;
0020 }
0021 
0022 //=============================================================================
0023 bool TTULogicUnit::initialise() {
0024   LogicTool<TTULogic> logtool;
0025   m_logic = logtool.retrieve(m_logtype);
0026 
0027   if (!m_logic) {
0028     if (m_debug)
0029       std::cout << "TTULogicUnit> No logic found \n";
0030     return false;
0031   };
0032 
0033   return true;
0034 }
0035 
0036 void TTULogicUnit::setlogic(const char* logic) { m_logtype = std::string(logic); }
0037 
0038 void TTULogicUnit::setBoardSpecs(const TTUBoardSpecs::TTUBoardConfig& boardSpcs) { m_logic->setBoardSpecs(boardSpcs); }
0039 
0040 void TTULogicUnit::run(const TTUInput& input) {
0041   //... check the thresholds
0042 
0043   //... by Sector
0044 
0045   //... by Tower
0046 
0047   //... by Wheel
0048 
0049   m_logic->process(input);
0050 
0051   //m_logic->m_triggersignal = false;
0052 }
0053 
0054 void TTULogicUnit::run(const TTUInput& input, int option) {
0055   m_logic->setOption(option);
0056   m_logic->process(input);
0057 
0058   //m_logic->m_triggersignal = false;
0059 }