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 // $Id: TTUEmulator.h,v 1.7 2009/08/19 15:04:01 aosorio Exp $
2 #ifndef TTUEMULATOR_H
3 #define TTUEMULATOR_H 1
4 
5 // Include files
9 
12 
13 #include <map>
14 #include <bitset>
15 
38 class TTUEmulator {
39 public:
41  TTUEmulator( ) { };
42 
43  TTUEmulator( int, int );
44 
45  TTUEmulator( int, const char *, const char *, int );
46 
47  TTUEmulator( int, const char *, const char * , const char *, int );
48 
49  virtual ~TTUEmulator( );
50 
51  bool initialise();
52 
53  void emulate();
54 
55  void processTtu( RPCInputSignal * );
56 
57  void processTtu( RPCInputSignal * , int );
58 
59  void printinfo();
60 
61  void setSpecifications( const TTUBoardSpecs *, const RBCBoardSpecs *);
62 
63  void clearTriggerResponse();
64 
65  int mode() {
66  return m_mode;
67  };
68 
69  void setmode(int mode) {
70  m_mode = mode;
71  };
72 
73  int line() {
74  return m_line;
75  };
76 
77  void SetLineId( int );
78 
79  void setSpecs();
80 
82 
84  std::bitset<2> m_trigger;
85  std::map<int, std::bitset<2> > m_triggerBx;
86 
88  {
89  public:
90 
91  TriggerResponse() { m_bx = 0; m_wedge = 0; m_trigger.reset(); };
93 
94  void setTriggerBits( int bx , const std::bitset<2> & inbits )
95  {
96  m_bx = bx;
97  m_trigger = inbits;
98  };
99 
100  void setTriggerBits( int bx , int wdg, const std::bitset<2> & inbits )
101  {
102  m_bx = bx;
103  m_wedge = wdg;
104  m_trigger = inbits;
105  };
106 
107  int m_bx;
108  int m_wedge;
109  std::bitset<2> m_trigger;
110 
111  };
112 
113  std::vector<TriggerResponse*> m_triggerBxVec;
114 
115 protected:
116 
117 private:
118 
119  int m_id;
120  int m_bx;
121  int m_mode;
122  int m_line;
123 
124  int * m_wheelIds;
125 
126  std::string m_logtype;
127 
129 
131 
132  bool m_debug;
133 
134 
135 
136 };
137 #endif // TTUEMULATOR_H
std::bitset< 2 > m_trigger
Definition: TTUEmulator.h:84
TTUConfiguration * m_ttuconf
Definition: TTUEmulator.h:130
std::vector< TriggerResponse * > m_triggerBxVec
Definition: TTUEmulator.h:113
int m_maxWheels
Definition: TTUEmulator.h:81
void clearTriggerResponse()
Definition: TTUEmulator.cc:325
int * m_wheelIds
Definition: TTUEmulator.h:124
std::bitset< 2 > m_trigger
Definition: TTUEmulator.h:109
void emulate()
Definition: TTUEmulator.cc:155
bool initialise()
Definition: TTUEmulator.cc:134
void SetLineId(int)
Definition: TTUEmulator.cc:150
void printinfo()
Definition: TTUEmulator.cc:337
void setTriggerBits(int bx, const std::bitset< 2 > &inbits)
Definition: TTUEmulator.h:94
void processTtu(RPCInputSignal *)
Definition: TTUEmulator.cc:163
RPCWheel * m_Wheels
Definition: TTUEmulator.h:83
int mode()
Definition: TTUEmulator.h:65
std::map< int, std::bitset< 2 > > m_triggerBx
Definition: TTUEmulator.h:85
void setmode(int mode)
Definition: TTUEmulator.h:69
void setSpecs()
TTUInput * m_ttuin
Definition: TTUEmulator.h:128
virtual ~TTUEmulator()
Destructor.
Definition: TTUEmulator.cc:109
std::string m_logtype
Definition: TTUEmulator.h:126
int line()
Definition: TTUEmulator.h:73
void setSpecifications(const TTUBoardSpecs *, const RBCBoardSpecs *)
Definition: TTUEmulator.cc:119
TTUEmulator()
Standard constructor.
Definition: TTUEmulator.h:41
void setTriggerBits(int bx, int wdg, const std::bitset< 2 > &inbits)
Definition: TTUEmulator.h:100