00001 // $Id: RBCEmulator.h,v 1.9 2009/06/17 15:27:23 aosorio Exp $ 00002 #ifndef RBCEMULATOR_H 00003 #define RBCEMULATOR_H 1 00004 00005 // Include files 00006 #include "L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h" 00007 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCId.h" 00008 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h" 00009 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCConfiguration.h" 00010 #include "L1Trigger/RPCTechnicalTrigger/interface/ProcessInputSignal.h" 00011 #include "L1Trigger/RPCTechnicalTrigger/interface/RPCInputSignal.h" 00012 00013 #include "CondFormats/RPCObjects/interface/RBCBoardSpecs.h" 00014 00025 class RBCEmulator { 00026 public: 00028 RBCEmulator( ); 00029 00030 RBCEmulator( const char * ); 00031 00032 RBCEmulator( const char * , const char * ); 00033 00034 RBCEmulator( const char * , const char * , int, int *); 00035 00036 virtual ~RBCEmulator( ); 00037 00038 void setSpecifications( const RBCBoardSpecs * ); 00039 00040 bool initialise(); 00041 00042 void setid( int , int * ); 00043 00044 void emulate(); 00045 00046 void emulate( RBCInput * ); 00047 00048 void reset(); 00049 00050 std::bitset<6> * getlayersignal( int idx ) { return m_layersignal[idx];}; 00051 00052 bool getdecision( int idx ) { return m_decision[idx];}; 00053 00054 void printinfo(); 00055 00056 void printlayerinfo(); 00057 00058 RBCId * m_rbcinfo; 00059 00060 protected: 00061 00062 private: 00063 00064 ProcessInputSignal * m_signal; 00065 00066 RBCConfiguration * m_rbcconf; 00067 00068 RBCInput * m_input; 00069 00070 std::bitset<6> * m_layersignal[2]; 00071 00072 std::bitset<2> m_decision; 00073 00074 std::vector< std::bitset<6> *> m_layersignalVec; 00075 00076 //... 00077 00078 int m_bx; 00079 00080 std::string m_logtype; 00081 00082 bool m_debug; 00083 00084 }; 00085 #endif // RBCEMULATOR_H