CMS 3D CMS Logo

EMTFDaqOut.h
Go to the documentation of this file.
1 // Class for EMTF DAQ readout
2 
3 #ifndef __l1t_EMTF_output_h__
4 #define __l1t_EMTF_output_h__
5 
6 #include <vector>
7 
8 #include "EMTF/AMC13Header.h"
9 #include "EMTF/MTF7Header.h"
10 #include "EMTF/EventHeader.h"
11 #include "EMTF/Counters.h"
12 #include "EMTF/ME.h"
13 #include "EMTF/RPC.h"
14 #include "EMTF/GEM.h"
15 #include "EMTF/SP.h"
16 #include "EMTF/EventTrailer.h"
17 #include "EMTF/MTF7Trailer.h"
18 #include "EMTF/AMC13Trailer.h"
19 #include <cstdint>
20 
21 // All comments below apply equally to classes in EMTF/ directory - AWB 28.01.16
22 
23 namespace l1t {
24  class EMTFDaqOut {
25  public:
26  explicit EMTFDaqOut(uint64_t dataword); // What does this do? - AWB 28.01.16
27 
28  // Empty constructor - should we include classes and collections? - AWB 28.01.16
34  numME(0),
35  numRPC(0),
36  numGEM(0),
37  numSP(0),
41  format_errors(0),
42  dataword(-99){};
43 
44  /* // Fill constructor - should we included a copy constructor for classes and collections (vectors)? - AWB 28.01.16 */
45  /* EMTFDaqOut(emtf::AMC13Header class_AMC13Header, emtf::SPCollection coll_SPCollection) : */
46  /* AMC13Header(class_AMC13Header), SPCollection(coll_SPCollection), format_errors(0), dataword(-99) */
47  /* {}; */
48 
49  virtual ~EMTFDaqOut(){};
50 
52  AMC13Header = bits;
53  hasAMC13Header = true;
54  }
56  MTF7Header = bits;
57  hasMTF7Header = true;
58  }
60  EventHeader = bits;
61  hasEventHeader = true;
62  }
64  Counters = bits;
65  hasCounters = true;
66  }
68  MECollection = bits;
69  numME = MECollection.size();
70  }
71  void push_ME(emtf::ME bits) {
72  MECollection.push_back(bits);
73  numME += 1;
74  }
76  RPCCollection = bits;
77  numRPC = RPCCollection.size();
78  }
79  void push_RPC(emtf::RPC bits) {
80  RPCCollection.push_back(bits);
81  numRPC += 1;
82  }
84  GEMCollection = bits;
85  numGEM = GEMCollection.size();
86  }
87  void push_GEM(emtf::GEM bits) {
88  GEMCollection.push_back(bits);
89  numGEM += 1;
90  }
92  SPCollection = bits;
93  numSP = SPCollection.size();
94  }
95  void push_SP(emtf::SP bits) {
96  SPCollection.push_back(bits);
97  numSP += 1;
98  }
100  EventTrailer = bits;
101  hasEventTrailer = true;
102  }
104  MTF7Trailer = bits;
105  hasMTF7Trailer = true;
106  }
108  AMC13Trailer = bits;
109  hasAMC13Trailer = true;
110  }
112  void set_dataword(uint64_t bits) { dataword = bits; }
113 
114  bool HasAMC13Header() const { return hasAMC13Header; }
115  bool HasMTF7Header() const { return hasMTF7Header; }
116  bool HasEventHeader() const { return hasEventHeader; }
117  bool HasCounters() const { return hasCounters; }
118  int NumSP() const { return numSP; }
119  int NumRPC() const { return numRPC; }
120  int NumME() const { return numME; }
121  int NumGEM() const { return numGEM; }
122  bool HasAMC13Trailer() const { return hasAMC13Trailer; }
123  bool HasMTF7Trailer() const { return hasMTF7Trailer; }
124  bool HasEventTrailer() const { return hasEventTrailer; }
128  emtf::Counters GetCounters() const { return Counters; }
136  const emtf::AMC13Header* PtrAMC13Header() const { return &AMC13Header; }
137  const emtf::MTF7Header* PtrMTF7Header() const { return &MTF7Header; }
138  const emtf::EventHeader* PtrEventHeader() const { return &EventHeader; }
139  const emtf::Counters* PtrCounters() const { return &Counters; }
140  const emtf::MECollection* PtrMECollection() const { return &MECollection; }
143  const emtf::SPCollection* PtrSPCollection() const { return &SPCollection; }
144  const emtf::EventTrailer* PtrEventTrailer() const { return &EventTrailer; }
145  const emtf::MTF7Trailer* PtrMTF7Trailer() const { return &MTF7Trailer; }
146  const emtf::AMC13Trailer* PtrAMC13Trailer() const { return &AMC13Trailer; }
147  int Format_Errors() const { return format_errors; }
148  uint64_t Dataword() const { return dataword; }
149 
150  private:
155  int numME;
156  int numRPC;
157  int numGEM;
158  int numSP;
174  uint64_t dataword; // Should this be more or fewer bits? - AWB 28.01.16
175 
176  }; // End class EMTFDaqOut
177 
178  // Define a vector of EMTFDaqOut
179  typedef std::vector<EMTFDaqOut> EMTFDaqOutCollection;
180 
181 } // End namespace l1t
182 
183 #endif /* define __l1t_EMTF_output_h__ */
l1t::EMTFDaqOut::PtrMECollection
const emtf::MECollection * PtrMECollection() const
Definition: EMTFDaqOut.h:140
l1t::EMTFDaqOutCollection
std::vector< EMTFDaqOut > EMTFDaqOutCollection
Definition: EMTFDaqOut.h:179
l1t::EMTFDaqOut::GetGEMCollection
emtf::GEMCollection GetGEMCollection() const
Definition: EMTFDaqOut.h:131
l1t::EMTFDaqOut::Dataword
uint64_t Dataword() const
Definition: EMTFDaqOut.h:148
l1t::EMTFDaqOut::EMTFDaqOut
EMTFDaqOut()
Definition: EMTFDaqOut.h:29
l1t::EMTFDaqOut::set_MTF7Header
void set_MTF7Header(emtf::MTF7Header bits)
Definition: EMTFDaqOut.h:55
l1t::EMTFDaqOut::numRPC
int numRPC
Definition: EMTFDaqOut.h:156
l1t::EMTFDaqOut::HasEventHeader
bool HasEventHeader() const
Definition: EMTFDaqOut.h:116
l1t::emtf::RPCCollection
std::vector< RPC > RPCCollection
Definition: RPC.h:70
funct::false
false
Definition: Factorize.h:29
l1t::EMTFDaqOut::GetEventHeader
emtf::EventHeader GetEventHeader() const
Definition: EMTFDaqOut.h:127
l1t::EMTFDaqOut::set_MTF7Trailer
void set_MTF7Trailer(emtf::MTF7Trailer bits)
Definition: EMTFDaqOut.h:103
l1t::EMTFDaqOut::set_AMC13Header
void set_AMC13Header(emtf::AMC13Header bits)
Definition: EMTFDaqOut.h:51
l1t::EMTFDaqOut::GetMTF7Trailer
emtf::MTF7Trailer GetMTF7Trailer() const
Definition: EMTFDaqOut.h:134
l1t::EMTFDaqOut::PtrCounters
const emtf::Counters * PtrCounters() const
Definition: EMTFDaqOut.h:139
l1t::EMTFDaqOut::set_RPCCollection
void set_RPCCollection(emtf::RPCCollection bits)
Definition: EMTFDaqOut.h:75
l1t::EMTFDaqOut::PtrGEMCollection
const emtf::GEMCollection * PtrGEMCollection() const
Definition: EMTFDaqOut.h:142
l1t::EMTFDaqOut::numME
int numME
Definition: EMTFDaqOut.h:155
l1t::EMTFDaqOut::GetCounters
emtf::Counters GetCounters() const
Definition: EMTFDaqOut.h:128
l1t::EMTFDaqOut::GetMTF7Header
emtf::MTF7Header GetMTF7Header() const
Definition: EMTFDaqOut.h:126
l1t::EMTFDaqOut::PtrAMC13Trailer
const emtf::AMC13Trailer * PtrAMC13Trailer() const
Definition: EMTFDaqOut.h:146
l1t::EMTFDaqOut::set_EventHeader
void set_EventHeader(emtf::EventHeader bits)
Definition: EMTFDaqOut.h:59
l1t::EMTFDaqOut::set_Counters
void set_Counters(emtf::Counters bits)
Definition: EMTFDaqOut.h:63
l1t::emtf::MTF7Header
Definition: MTF7Header.h:11
l1t::emtf::MECollection
std::vector< ME > MECollection
Definition: ME.h:118
l1t::EMTFDaqOut::Format_Errors
int Format_Errors() const
Definition: EMTFDaqOut.h:147
l1t::emtf::RPC
Definition: RPC.h:11
l1t::emtf::ME
Definition: ME.h:11
ME.h
l1t::EMTFDaqOut::MTF7Trailer
emtf::MTF7Trailer MTF7Trailer
Definition: EMTFDaqOut.h:171
l1t::EMTFDaqOut::MECollection
emtf::MECollection MECollection
Definition: EMTFDaqOut.h:166
EventHeader
Definition: EventHeader.h:18
l1t::EMTFDaqOut::hasCounters
bool hasCounters
Definition: EMTFDaqOut.h:154
l1t::EMTFDaqOut::set_MECollection
void set_MECollection(emtf::MECollection bits)
Definition: EMTFDaqOut.h:67
l1t::EMTFDaqOut::GetMECollection
emtf::MECollection GetMECollection() const
Definition: EMTFDaqOut.h:129
Counters.h
l1t::EMTFDaqOut::PtrSPCollection
const emtf::SPCollection * PtrSPCollection() const
Definition: EMTFDaqOut.h:143
l1t::emtf::AMC13Trailer
Definition: AMC13Trailer.h:11
l1t::EMTFDaqOut::hasAMC13Trailer
bool hasAMC13Trailer
Definition: EMTFDaqOut.h:161
AMC13Header.h
l1t::EMTFDaqOut::AMC13Trailer
emtf::AMC13Trailer AMC13Trailer
Definition: EMTFDaqOut.h:172
l1t::EMTFDaqOut::HasEventTrailer
bool HasEventTrailer() const
Definition: EMTFDaqOut.h:124
l1t::emtf::SP
Definition: SP.h:11
l1t::EMTFDaqOut::MTF7Header
emtf::MTF7Header MTF7Header
Definition: EMTFDaqOut.h:163
l1t::EMTFDaqOut::PtrMTF7Trailer
const emtf::MTF7Trailer * PtrMTF7Trailer() const
Definition: EMTFDaqOut.h:145
l1t::EMTFDaqOut::hasEventHeader
bool hasEventHeader
Definition: EMTFDaqOut.h:153
GEM.h
l1t::EMTFDaqOut::AMC13Header
emtf::AMC13Header AMC13Header
Definition: EMTFDaqOut.h:162
l1t::EMTFDaqOut::HasMTF7Header
bool HasMTF7Header() const
Definition: EMTFDaqOut.h:115
l1t::EMTFDaqOut::PtrAMC13Header
const emtf::AMC13Header * PtrAMC13Header() const
Definition: EMTFDaqOut.h:136
l1t::emtf::MTF7Trailer
Definition: MTF7Trailer.h:11
l1t::EMTFDaqOut::GetEventTrailer
emtf::EventTrailer GetEventTrailer() const
Definition: EMTFDaqOut.h:133
l1t::EMTFDaqOut::hasEventTrailer
bool hasEventTrailer
Definition: EMTFDaqOut.h:159
l1t::EMTFDaqOut::add_format_error
void add_format_error()
Definition: EMTFDaqOut.h:111
l1t::EMTFDaqOut::push_SP
void push_SP(emtf::SP bits)
Definition: EMTFDaqOut.h:95
l1t::EMTFDaqOut::HasAMC13Trailer
bool HasAMC13Trailer() const
Definition: EMTFDaqOut.h:122
RPC.h
l1t::EMTFDaqOut::Counters
emtf::Counters Counters
Definition: EMTFDaqOut.h:165
l1t::EMTFDaqOut::GetAMC13Trailer
emtf::AMC13Trailer GetAMC13Trailer() const
Definition: EMTFDaqOut.h:135
l1t::emtf::GEM
Definition: GEM.h:11
l1t::EMTFDaqOut::NumGEM
int NumGEM() const
Definition: EMTFDaqOut.h:121
l1t::EMTFDaqOut::PtrEventHeader
const emtf::EventHeader * PtrEventHeader() const
Definition: EMTFDaqOut.h:138
l1t::EMTFDaqOut::NumSP
int NumSP() const
Definition: EMTFDaqOut.h:118
l1t::emtf::EventTrailer
Definition: EventTrailer.h:9
l1t
delete x;
Definition: CaloConfig.h:22
l1t::emtf::AMC13Header
Definition: AMC13Header.h:11
l1t::EMTFDaqOut::dataword
uint64_t dataword
Definition: EMTFDaqOut.h:174
l1t::EMTFDaqOut::format_errors
int format_errors
Definition: EMTFDaqOut.h:173
l1t::EMTFDaqOut::GetAMC13Header
emtf::AMC13Header GetAMC13Header() const
Definition: EMTFDaqOut.h:125
EventTrailer.h
MTF7Trailer.h
l1t::EMTFDaqOut::set_GEMCollection
void set_GEMCollection(emtf::GEMCollection bits)
Definition: EMTFDaqOut.h:83
l1t::EMTFDaqOut
Definition: EMTFDaqOut.h:24
AMC13Trailer.h
l1t::emtf::EventHeader
Definition: EventHeader.h:9
l1t::EMTFDaqOut::push_RPC
void push_RPC(emtf::RPC bits)
Definition: EMTFDaqOut.h:79
l1t::EMTFDaqOut::GetRPCCollection
emtf::RPCCollection GetRPCCollection() const
Definition: EMTFDaqOut.h:130
l1t::EMTFDaqOut::set_dataword
void set_dataword(uint64_t bits)
Definition: EMTFDaqOut.h:112
l1t::EMTFDaqOut::numSP
int numSP
Definition: EMTFDaqOut.h:158
l1t::EMTFDaqOut::EventTrailer
emtf::EventTrailer EventTrailer
Definition: EMTFDaqOut.h:170
l1t::EMTFDaqOut::PtrEventTrailer
const emtf::EventTrailer * PtrEventTrailer() const
Definition: EMTFDaqOut.h:144
l1t::EMTFDaqOut::hasMTF7Trailer
bool hasMTF7Trailer
Definition: EMTFDaqOut.h:160
l1t::EMTFDaqOut::NumRPC
int NumRPC() const
Definition: EMTFDaqOut.h:119
l1t::emtf::Counters
Definition: Counters.h:9
l1t::EMTFDaqOut::push_ME
void push_ME(emtf::ME bits)
Definition: EMTFDaqOut.h:71
l1t::EMTFDaqOut::HasMTF7Trailer
bool HasMTF7Trailer() const
Definition: EMTFDaqOut.h:123
l1t::EMTFDaqOut::HasCounters
bool HasCounters() const
Definition: EMTFDaqOut.h:117
l1t::emtf::GEMCollection
std::vector< GEM > GEMCollection
Definition: GEM.h:81
l1t::EMTFDaqOut::SPCollection
emtf::SPCollection SPCollection
Definition: EMTFDaqOut.h:169
l1t::EMTFDaqOut::set_AMC13Trailer
void set_AMC13Trailer(emtf::AMC13Trailer bits)
Definition: EMTFDaqOut.h:107
l1t::EMTFDaqOut::hasMTF7Header
bool hasMTF7Header
Definition: EMTFDaqOut.h:152
l1t::EMTFDaqOut::set_SPCollection
void set_SPCollection(emtf::SPCollection bits)
Definition: EMTFDaqOut.h:91
l1t::emtf::SPCollection
std::vector< SP > SPCollection
Definition: SP.h:146
l1t::EMTFDaqOut::RPCCollection
emtf::RPCCollection RPCCollection
Definition: EMTFDaqOut.h:167
l1t::EMTFDaqOut::EventHeader
emtf::EventHeader EventHeader
Definition: EMTFDaqOut.h:164
l1t::EMTFDaqOut::numGEM
int numGEM
Definition: EMTFDaqOut.h:157
l1t::EMTFDaqOut::PtrRPCCollection
const emtf::RPCCollection * PtrRPCCollection() const
Definition: EMTFDaqOut.h:141
l1t::EMTFDaqOut::GEMCollection
emtf::GEMCollection GEMCollection
Definition: EMTFDaqOut.h:168
MTF7Header.h
l1t::EMTFDaqOut::~EMTFDaqOut
virtual ~EMTFDaqOut()
Definition: EMTFDaqOut.h:49
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
l1t::EMTFDaqOut::set_EventTrailer
void set_EventTrailer(emtf::EventTrailer bits)
Definition: EMTFDaqOut.h:99
SP.h
l1t::EMTFDaqOut::hasAMC13Header
bool hasAMC13Header
Definition: EMTFDaqOut.h:151
EventHeader.h
l1t::EMTFDaqOut::NumME
int NumME() const
Definition: EMTFDaqOut.h:120
l1t::EMTFDaqOut::GetSPCollection
emtf::SPCollection GetSPCollection() const
Definition: EMTFDaqOut.h:132
l1t::EMTFDaqOut::push_GEM
void push_GEM(emtf::GEM bits)
Definition: EMTFDaqOut.h:87
l1t::EMTFDaqOut::HasAMC13Header
bool HasAMC13Header() const
Definition: EMTFDaqOut.h:114
l1t::EMTFDaqOut::PtrMTF7Header
const emtf::MTF7Header * PtrMTF7Header() const
Definition: EMTFDaqOut.h:137