CMS 3D CMS Logo

DTuROSControlData.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
12 //
13 //--------------------------------------------------
14 #ifndef DTDigi_DTuROSControlData_h
15 #define DTDigi_DTuROSControlData_h
16 
17 #include <vector>
18 
19 static const int DOCESLOTS = 12;
20 static const int SEISXOK = 12;
21 
23 public:
26  for (int i = 0; i < SEISXOK; i++)
27  okxword_[i] = 0;
28  }
29 
32 
33  void setslot(int slot) { slot_ = slot; }
34 
35  void setheader1(long dword) { header1_ = dword; }
36 
37  void setheader2(long dword) { header2_ = dword; }
38 
39  void settrailer(long dword) { trailer_ = dword; }
40 
41  void setokword1(long okword) { okword1_ = okword; }
42 
43  void setokword2(long okword) { okword2_ = okword; }
44 
45  void setokxword(int i, long okxword) { okxword_[i] = okxword; }
46 
47  void setexword(long exword) { exword_.push_back(exword); }
48 
49  void seterror(int error) { error_.push_back(error); }
50 
51  int getslot() const { return slot_; }
52 
53  long getheader1() const { return header1_; }
54 
55  long getheader2() const { return header2_; }
56 
57  long gettrailer() const { return trailer_; }
58 
59  long getokword1() const { return okword1_; }
60 
61  long getokword2() const { return okword2_; }
62 
63  int getokflag(int i) const {
64  if (i < 60)
65  return ((okword1_ >> i) & 0x1);
66  return ((okword2_ >> (i - 60)) & 0x1);
67  }
68 
69  long getokxword(int i) const { return okxword_[i]; }
70 
71  int getokxflag(int i) const { return ((okxword_[i / 12] >> (5 * (i % 12))) & 0x1F); }
72 
73  std::vector<long> getexwords() const { return exword_; }
74 
75  long getexword(int i) const { return exword_.at(i); }
76 
77  std::vector<int> geterrors() const { return error_; }
78 
79  int geterror(int i) const { return error_.at(i); }
80 
81  int geterrorROBID(int i) const { return (error_.at(i) >> 21) & 0x7F; }
82 
83  int geterrorTDCID(int i) const { return (error_.at(i) >> 19) & 0x3; }
84 
85  int geterrorFlag(int i) const { return (error_.at(i)) & 0x7FFF; }
86 
87  int getboardId() const { return (getheader2()) & 0xFFFF; }
88 
89  int getuserWord() const { return (getheader2() >> 32) & 0xFFFFFFFF; }
90 
91 private:
92  int slot_;
93 
95 
97 
98  std::vector<long> exword_;
99 
100  std::vector<int> error_;
101 };
102 
104 public:
107  for (int i = 0; i < DOCESLOTS; i++)
108  rsize_[i] = 0;
109  }
110 
113 
114  void setfed(int fed) { fed_ = fed; }
115 
116  void setheader1(long dword) { header1_ = dword; }
117 
118  void setheader2(long dword) { header2_ = dword; }
119 
120  void settrailer(long dword) { trailer_ = dword; }
121 
122  void setnslots(int nslots) { nslots_ = nslots; }
123 
124  void setevtlgth(int evtLgth) { evtLgth_ = evtLgth; }
125 
126  void setslotsize(int slot, int size) { rsize_[slot - 1] = size; }
127 
128  void setuROS(int slot, DTuROSROSData rwords) { rdata_[slot - 1] = rwords; }
129 
130  int getfed() const { return fed_; }
131 
132  long getheader1() const { return header1_; }
133 
134  long getheader2() const { return header2_; }
135 
136  long gettrailer() const { return trailer_; }
137 
138  int getnslots() const { return nslots_; }
139 
140  int getevtlgth() const { return evtLgth_; }
141 
142  int getslotsize(int slot) const { return rsize_[slot - 1]; }
143 
144  int getBXId() const { return (getheader1() >> 20) & 0xFFF; }
145 
146  int getTTS() const { return (gettrailer() >> 4) & 0xF; }
147 
148  DTuROSROSData getuROS(int slot) const { return rdata_[slot - 1]; }
149 
150 private:
152 
154 
156 };
157 
158 typedef std::vector<DTuROSFEDData> DTuROSFEDDataCollection;
159 #endif
DTuROSFEDData::getBXId
int getBXId() const
Definition: DTuROSControlData.h:144
DTuROSROSData::geterrorROBID
int geterrorROBID(int i) const
Definition: DTuROSControlData.h:81
DTuROSFEDData::getslotsize
int getslotsize(int slot) const
Definition: DTuROSControlData.h:142
DTuROSFEDData::getheader1
long getheader1() const
Definition: DTuROSControlData.h:132
DTuROSROSData::getheader1
long getheader1() const
Definition: DTuROSControlData.h:53
DTuROSFEDData::setfed
void setfed(int fed)
Definition: DTuROSControlData.h:114
DTuROSFEDData::DTuROSFEDData
DTuROSFEDData()
Constructor.
Definition: DTuROSControlData.h:106
DTuROSFEDData::getnslots
int getnslots() const
Definition: DTuROSControlData.h:138
DTuROSROSData::geterrors
std::vector< int > geterrors() const
Definition: DTuROSControlData.h:77
mps_fire.i
i
Definition: mps_fire.py:428
DTuROSROSData::getslot
int getslot() const
Definition: DTuROSControlData.h:51
DTuROSROSData::setokxword
void setokxword(int i, long okxword)
Definition: DTuROSControlData.h:45
DTuROSFEDData::getheader2
long getheader2() const
Definition: DTuROSControlData.h:134
DTuROSROSData::okword1_
long okword1_
Definition: DTuROSControlData.h:96
DTuROSFEDData::settrailer
void settrailer(long dword)
Definition: DTuROSControlData.h:120
DTuROSROSData::setokword2
void setokword2(long okword)
Definition: DTuROSControlData.h:43
DTuROSFEDDataCollection
std::vector< DTuROSFEDData > DTuROSFEDDataCollection
Definition: DTuROSControlData.h:158
DTuROSROSData::exword_
std::vector< long > exword_
Definition: DTuROSControlData.h:98
DTuROSROSData::setexword
void setexword(long exword)
Definition: DTuROSControlData.h:47
DTuROSROSData::~DTuROSROSData
~DTuROSROSData()
Destructor.
Definition: DTuROSControlData.h:31
DTuROSROSData::okword2_
long okword2_
Definition: DTuROSControlData.h:96
DTuROSROSData::getokxword
long getokxword(int i) const
Definition: DTuROSControlData.h:69
relativeConstraints.error
error
Definition: relativeConstraints.py:53
SEISXOK
static const int SEISXOK
Definition: DTuROSControlData.h:20
DTuROSFEDData::trailer_
long trailer_
Definition: DTuROSControlData.h:151
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
DTuROSFEDData::getfed
int getfed() const
Definition: DTuROSControlData.h:130
DTuROSROSData::getokword1
long getokword1() const
Definition: DTuROSControlData.h:59
DTuROSROSData::DTuROSROSData
DTuROSROSData()
Constructor.
Definition: DTuROSControlData.h:25
DTuROSROSData::setheader2
void setheader2(long dword)
Definition: DTuROSControlData.h:37
DTuROSROSData::setslot
void setslot(int slot)
Definition: DTuROSControlData.h:33
DTuROSROSData::slot_
int slot_
Definition: DTuROSControlData.h:92
DTuROSFEDData::rdata_
DTuROSROSData rdata_[DOCESLOTS]
Definition: DTuROSControlData.h:155
DTuROSFEDData::setheader2
void setheader2(long dword)
Definition: DTuROSControlData.h:118
DTuROSROSData::settrailer
void settrailer(long dword)
Definition: DTuROSControlData.h:39
DTuROSROSData::getuserWord
int getuserWord() const
Definition: DTuROSControlData.h:89
DTuROSROSData::getokxflag
int getokxflag(int i) const
Definition: DTuROSControlData.h:71
DTuROSFEDData::getuROS
DTuROSROSData getuROS(int slot) const
Definition: DTuROSControlData.h:148
DTuROSROSData::setokword1
void setokword1(long okword)
Definition: DTuROSControlData.h:41
DTuROSROSData::getheader2
long getheader2() const
Definition: DTuROSControlData.h:55
DTuROSFEDData::setslotsize
void setslotsize(int slot, int size)
Definition: DTuROSControlData.h:126
DTuROSROSData::header2_
long header2_
Definition: DTuROSControlData.h:94
DTuROSFEDData::rsize_
int rsize_[DOCESLOTS]
Definition: DTuROSControlData.h:153
DTuROSROSData::trailer_
long trailer_
Definition: DTuROSControlData.h:94
DTuROSROSData::geterrorFlag
int geterrorFlag(int i) const
Definition: DTuROSControlData.h:85
DOCESLOTS
static const int DOCESLOTS
Definition: DTuROSControlData.h:19
DTuROSROSData
Definition: DTuROSControlData.h:22
DTuROSFEDData::gettrailer
long gettrailer() const
Definition: DTuROSControlData.h:136
DTuROSFEDData
Definition: DTuROSControlData.h:103
DTuROSFEDData::nslots_
int nslots_
Definition: DTuROSControlData.h:153
DTuROSFEDData::setheader1
void setheader1(long dword)
Definition: DTuROSControlData.h:116
DTuROSROSData::getexword
long getexword(int i) const
Definition: DTuROSControlData.h:75
DTuROSROSData::getokflag
int getokflag(int i) const
Definition: DTuROSControlData.h:63
DTuROSFEDData::header2_
long header2_
Definition: DTuROSControlData.h:151
DTuROSROSData::getboardId
int getboardId() const
Definition: DTuROSControlData.h:87
DTuROSFEDData::fed_
int fed_
Definition: DTuROSControlData.h:153
DTuROSROSData::okxword_
long okxword_[SEISXOK]
Definition: DTuROSControlData.h:96
DTuROSROSData::error_
std::vector< int > error_
Definition: DTuROSControlData.h:100
DTuROSFEDData::setnslots
void setnslots(int nslots)
Definition: DTuROSControlData.h:122
DTuROSFEDData::setevtlgth
void setevtlgth(int evtLgth)
Definition: DTuROSControlData.h:124
DTuROSROSData::getexwords
std::vector< long > getexwords() const
Definition: DTuROSControlData.h:73
DTuROSROSData::geterrorTDCID
int geterrorTDCID(int i) const
Definition: DTuROSControlData.h:83
DTuROSFEDData::evtLgth_
int evtLgth_
Definition: DTuROSControlData.h:153
DTuROSROSData::setheader1
void setheader1(long dword)
Definition: DTuROSControlData.h:35
DTuROSFEDData::header1_
long header1_
Definition: DTuROSControlData.h:151
DTuROSFEDData::~DTuROSFEDData
~DTuROSFEDData()
Destructor.
Definition: DTuROSControlData.h:112
DTuROSFEDData::getevtlgth
int getevtlgth() const
Definition: DTuROSControlData.h:140
DTuROSFEDData::setuROS
void setuROS(int slot, DTuROSROSData rwords)
Definition: DTuROSControlData.h:128
DTuROSFEDData::getTTS
int getTTS() const
Definition: DTuROSControlData.h:146
DTuROSROSData::seterror
void seterror(int error)
Definition: DTuROSControlData.h:49
DTuROSROSData::gettrailer
long gettrailer() const
Definition: DTuROSControlData.h:57
DTuROSROSData::geterror
int geterror(int i) const
Definition: DTuROSControlData.h:79
DTuROSROSData::getokword2
long getokword2() const
Definition: DTuROSControlData.h:61
DTuROSROSData::header1_
long header1_
Definition: DTuROSControlData.h:94
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443