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/RBCBasicConfig.h"
0005 
0006 //-----------------------------------------------------------------------------
0007 // Implementation file for class : RBCBasicConfig
0008 //
0009 // 2008-10-31 : Andres Osorio
0010 //-----------------------------------------------------------------------------
0011 
0012 //=============================================================================
0013 // Standard constructor, initializes variables
0014 //=============================================================================
0015 RBCBasicConfig::RBCBasicConfig(const RBCBoardSpecs* rbcspecs, RBCId* info)
0016     : RBCConfiguration(rbcspecs), m_debug{false} {}
0017 
0018 RBCBasicConfig::RBCBasicConfig(const char* _logic) : RBCConfiguration(_logic) {}
0019 
0020 //=============================================================================
0021 bool RBCBasicConfig::initialise() {
0022   bool status(false);
0023 
0024   //.  read specifications
0025 
0026   std::vector<RBCBoardSpecs::RBCBoardConfig>::const_iterator itr;
0027   itr = m_rbcboardspecs->v_boardspecs.begin();
0028 
0029   // initialise logic unit
0030   m_rbclogic->setlogic((*itr).m_LogicType.c_str());
0031   status = m_rbclogic->initialise();
0032 
0033   m_rbclogic->setBoardSpecs((*itr));
0034 
0035   // get mask and force vectors
0036 
0037   m_vecmask.assign((*itr).m_MaskedOrInput.begin(), (*itr).m_MaskedOrInput.end());
0038   m_vecforce.assign((*itr).m_ForcedOrInput.begin(), (*itr).m_ForcedOrInput.end());
0039 
0040   if (!status) {
0041     if (m_debug)
0042       std::cout << "RBCConfiguration> Problem initialising the logic unit\n";
0043     return false;
0044   };
0045 
0046   return true;
0047 }
0048 
0049 void RBCBasicConfig::preprocess(RBCInput& input) {
0050   if (m_debug)
0051     std::cout << "RBCBasicConfig::preprocess> starts here" << std::endl;
0052 
0053   input.mask(m_vecmask);
0054   input.force(m_vecforce);
0055 
0056   if (m_debug)
0057     std::cout << "RBCBasicConfig::preprocess> done" << std::endl;
0058 }