CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TTUEmulator.h
Go to the documentation of this file.
1 #ifndef TTUEMULATOR_H
2 #define TTUEMULATOR_H 1
3 
4 // Include files
8 
11 
12 #include <map>
13 #include <bitset>
14 
37 class TTUEmulator {
38 public:
40  TTUEmulator( ) { };
41 
42  TTUEmulator( int, int );
43 
44  TTUEmulator( int, const char *, const char *, int );
45 
46  TTUEmulator( int, const char *, const char * , const char *, int );
47 
48  virtual ~TTUEmulator( );
49 
50  bool initialise();
51 
52  void emulate();
53 
54  void processTtu( RPCInputSignal * );
55 
56  void processTtu( RPCInputSignal * , int );
57 
58  void printinfo();
59 
60  void setSpecifications( const TTUBoardSpecs *, const RBCBoardSpecs *);
61 
62  void clearTriggerResponse();
63 
64  int mode() {
65  return m_mode;
66  };
67 
68  void setmode(int mode) {
69  m_mode = mode;
70  };
71 
72  int line() {
73  return m_line;
74  };
75 
76  void SetLineId( int );
77 
78  void setSpecs();
79 
81 
83  std::bitset<2> m_trigger;
84  std::map<int, std::bitset<2> > m_triggerBx;
85 
87  {
88  public:
89 
90  TriggerResponse() { m_bx = 0; m_wedge = 0; m_trigger.reset(); };
92 
93  void setTriggerBits( int bx , const std::bitset<2> & inbits )
94  {
95  m_bx = bx;
96  m_trigger = inbits;
97  };
98 
99  void setTriggerBits( int bx , int wdg, const std::bitset<2> & inbits )
100  {
101  m_bx = bx;
102  m_wedge = wdg;
103  m_trigger = inbits;
104  };
105 
106  int m_bx;
107  int m_wedge;
108  std::bitset<2> m_trigger;
109 
110  };
111 
112  std::vector<TriggerResponse*> m_triggerBxVec;
113 
114 protected:
115 
116 private:
117 
118  int m_id;
119  int m_bx;
120  int m_mode;
121  int m_line;
122 
123  int * m_wheelIds;
124 
126 
128 
130 
131  bool m_debug;
132 
133 
134 
135 };
136 #endif // TTUEMULATOR_H
std::bitset< 2 > m_trigger
Definition: TTUEmulator.h:83
TTUConfiguration * m_ttuconf
Definition: TTUEmulator.h:129
std::vector< TriggerResponse * > m_triggerBxVec
Definition: TTUEmulator.h:112
int m_maxWheels
Definition: TTUEmulator.h:80
void clearTriggerResponse()
Definition: TTUEmulator.cc:324
int * m_wheelIds
Definition: TTUEmulator.h:123
std::bitset< 2 > m_trigger
Definition: TTUEmulator.h:108
void emulate()
Definition: TTUEmulator.cc:154
bool initialise()
Definition: TTUEmulator.cc:133
void SetLineId(int)
Definition: TTUEmulator.cc:149
void printinfo()
Definition: TTUEmulator.cc:336
void setTriggerBits(int bx, const std::bitset< 2 > &inbits)
Definition: TTUEmulator.h:93
void processTtu(RPCInputSignal *)
Definition: TTUEmulator.cc:162
RPCWheel * m_Wheels
Definition: TTUEmulator.h:82
int mode()
Definition: TTUEmulator.h:64
std::map< int, std::bitset< 2 > > m_triggerBx
Definition: TTUEmulator.h:84
void setmode(int mode)
Definition: TTUEmulator.h:68
void setSpecs()
TTUInput * m_ttuin
Definition: TTUEmulator.h:127
virtual ~TTUEmulator()
Destructor.
Definition: TTUEmulator.cc:108
std::string m_logtype
Definition: TTUEmulator.h:125
int line()
Definition: TTUEmulator.h:72
void setSpecifications(const TTUBoardSpecs *, const RBCBoardSpecs *)
Definition: TTUEmulator.cc:118
TTUEmulator()
Standard constructor.
Definition: TTUEmulator.h:40
void setTriggerBits(int bx, int wdg, const std::bitset< 2 > &inbits)
Definition: TTUEmulator.h:99