Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RBCEMULATOR_H
0002 #define RBCEMULATOR_H 1
0003 
0004 // Include files
0005 #include "L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h"
0006 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCId.h"
0007 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h"
0008 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCConfiguration.h"
0009 #include "L1Trigger/RPCTechnicalTrigger/interface/ProcessInputSignal.h"
0010 #include "L1Trigger/RPCTechnicalTrigger/interface/RPCInputSignal.h"
0011 
0012 #include "CondFormats/RPCObjects/interface/RBCBoardSpecs.h"
0013 
0014 #include <memory>
0015 /** @class RBCEmulator RBCEmulator.h
0016  *  
0017  *
0018  *  @author Andres Osorio, Flavio Loddo, Marcello Maggi
0019  *
0020  *  email: aosorio@uniandes.edu.co
0021  *
0022  *  @date   2008-10-10
0023  */
0024 
0025 class RBCEmulator {
0026 public:
0027   /// Standard constructor
0028   RBCEmulator();
0029 
0030   RBCEmulator(const char*);
0031 
0032   RBCEmulator(const char*, const char*);
0033 
0034   RBCEmulator(const char*, const char*, int, int*);
0035 
0036   void setSpecifications(const RBCBoardSpecs*);
0037 
0038   bool initialise();
0039 
0040   void setid(int, int*);
0041 
0042   void emulate();
0043 
0044   void emulate(RBCInput*);
0045 
0046   void reset();
0047 
0048   std::bitset<6>* getlayersignal(int idx) { return m_layersignal[idx]; };
0049 
0050   bool getdecision(int idx) const { return m_decision[idx]; };
0051 
0052   void printinfo() const;
0053 
0054   void printlayerinfo() const;
0055 
0056   const RBCId& rbcinfo() const { return m_rbcinfo; }
0057 
0058 protected:
0059 private:
0060   RBCId m_rbcinfo;
0061 
0062   std::unique_ptr<ProcessInputSignal> m_signal;
0063 
0064   std::unique_ptr<RBCConfiguration> m_rbcconf;
0065 
0066   RBCInput m_input;
0067 
0068   std::bitset<6>* m_layersignal[2];
0069 
0070   std::bitset<2> m_decision;
0071 
0072   std::array<std::bitset<6>, 2> m_layersignalVec;
0073 
0074   //...
0075   std::string m_logtype;
0076 
0077   bool m_debug;
0078 };
0079 #endif  // RBCEMULATOR_H