CMS 3D CMS Logo

RBCEmulator.h
Go to the documentation of this file.
1 #ifndef RBCEMULATOR_H
2 #define RBCEMULATOR_H 1
3 
4 // Include files
11 
13 
14 #include <memory>
25 class RBCEmulator {
26 public:
28  RBCEmulator();
29 
30  RBCEmulator(const char*);
31 
32  RBCEmulator(const char*, const char*);
33 
34  RBCEmulator(const char*, const char*, int, int*);
35 
36  void setSpecifications(const RBCBoardSpecs*);
37 
38  bool initialise();
39 
40  void setid(int, int*);
41 
42  void emulate();
43 
44  void emulate(RBCInput*);
45 
46  void reset();
47 
48  std::bitset<6>* getlayersignal(int idx) { return m_layersignal[idx]; };
49 
50  bool getdecision(int idx) const { return m_decision[idx]; };
51 
52  void printinfo() const;
53 
54  void printlayerinfo() const;
55 
56  const RBCId& rbcinfo() const { return m_rbcinfo; }
57 
58 protected:
59 private:
61 
62  std::unique_ptr<ProcessInputSignal> m_signal;
63 
64  std::unique_ptr<RBCConfiguration> m_rbcconf;
65 
67 
68  std::bitset<6>* m_layersignal[2];
69 
70  std::bitset<2> m_decision;
71 
72  std::array<std::bitset<6>, 2> m_layersignalVec;
73 
74  //...
76 
77  bool m_debug;
78 };
79 #endif // RBCEMULATOR_H
void emulate()
Definition: RBCEmulator.cc:66
std::unique_ptr< ProcessInputSignal > m_signal
Definition: RBCEmulator.h:62
void printlayerinfo() const
Definition: RBCEmulator.cc:143
bool initialise()
Definition: RBCEmulator.cc:50
void printinfo() const
Definition: RBCEmulator.cc:136
std::unique_ptr< RBCConfiguration > m_rbcconf
Definition: RBCEmulator.h:64
std::bitset< 6 > * getlayersignal(int idx)
Definition: RBCEmulator.h:48
RBCEmulator()
Standard constructor.
Definition: RBCEmulator.cc:18
Definition: RBCId.h:16
std::string m_logtype
Definition: RBCEmulator.h:75
std::bitset< 6 > * m_layersignal[2]
Definition: RBCEmulator.h:68
bool m_debug
Definition: RBCEmulator.h:77
std::array< std::bitset< 6 >, 2 > m_layersignalVec
Definition: RBCEmulator.h:72
RBCInput m_input
Definition: RBCEmulator.h:66
std::bitset< 2 > m_decision
Definition: RBCEmulator.h:70
const RBCId & rbcinfo() const
Definition: RBCEmulator.h:56
bool getdecision(int idx) const
Definition: RBCEmulator.h:50
void reset()
Definition: RBCEmulator.cc:130
RBCId m_rbcinfo
Definition: RBCEmulator.h:60
void setid(int, int *)
Definition: RBCEmulator.cc:64
void setSpecifications(const RBCBoardSpecs *)
Definition: RBCEmulator.cc:46