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/SP.h"
15 #include "EMTF/EventTrailer.h"
16 #include "EMTF/MTF7Trailer.h"
17 #include "EMTF/AMC13Trailer.h"
18 #include <cstdint>
19 
20 // All comments below apply equally to classes in EMTF/ directory - AWB 28.01.16
21 
22 namespace l1t {
23  class EMTFDaqOut {
24  public:
25  explicit EMTFDaqOut(uint64_t dataword); // What does this do? - AWB 28.01.16
26 
27  // Empty constructor - should we include classes and collections? - AWB 28.01.16
33  numME(0),
34  numRPC(0),
35  numSP(0),
39  format_errors(0),
40  dataword(-99){};
41 
42  /* // Fill constructor - should we included a copy constructor for classes and collections (vectors)? - AWB 28.01.16 */
43  /* EMTFDaqOut(emtf::AMC13Header class_AMC13Header, emtf::SPCollection coll_SPCollection) : */
44  /* AMC13Header(class_AMC13Header), SPCollection(coll_SPCollection), format_errors(0), dataword(-99) */
45  /* {}; */
46 
47  virtual ~EMTFDaqOut(){};
48 
50  AMC13Header = bits;
51  hasAMC13Header = true;
52  }
54  MTF7Header = bits;
55  hasMTF7Header = true;
56  }
58  EventHeader = bits;
59  hasEventHeader = true;
60  }
62  Counters = bits;
63  hasCounters = true;
64  }
67  numME = MECollection.size();
68  }
70  MECollection.push_back(bits);
71  numME += 1;
72  }
75  numRPC = RPCCollection.size();
76  }
78  RPCCollection.push_back(bits);
79  numRPC += 1;
80  }
83  numSP = SPCollection.size();
84  }
86  SPCollection.push_back(bits);
87  numSP += 1;
88  }
91  hasEventTrailer = true;
92  }
94  MTF7Trailer = bits;
95  hasMTF7Trailer = true;
96  }
99  hasAMC13Trailer = true;
100  }
103 
104  bool HasAMC13Header() const { return hasAMC13Header; }
105  bool HasMTF7Header() const { return hasMTF7Header; }
106  bool HasEventHeader() const { return hasEventHeader; }
107  bool HasCounters() const { return hasCounters; }
108  int NumSP() const { return numSP; }
109  int NumRPC() const { return numRPC; }
110  int NumME() const { return numME; }
111  bool HasAMC13Trailer() const { return hasAMC13Trailer; }
112  bool HasMTF7Trailer() const { return hasMTF7Trailer; }
113  bool HasEventTrailer() const { return hasEventTrailer; }
117  emtf::Counters GetCounters() const { return Counters; }
124  const emtf::AMC13Header* PtrAMC13Header() const { return &AMC13Header; }
125  const emtf::MTF7Header* PtrMTF7Header() const { return &MTF7Header; }
126  const emtf::EventHeader* PtrEventHeader() const { return &EventHeader; }
127  const emtf::Counters* PtrCounters() const { return &Counters; }
128  const emtf::MECollection* PtrMECollection() const { return &MECollection; }
130  const emtf::SPCollection* PtrSPCollection() const { return &SPCollection; }
131  const emtf::EventTrailer* PtrEventTrailer() const { return &EventTrailer; }
132  const emtf::MTF7Trailer* PtrMTF7Trailer() const { return &MTF7Trailer; }
133  const emtf::AMC13Trailer* PtrAMC13Trailer() const { return &AMC13Trailer; }
134  int Format_Errors() const { return format_errors; }
135  uint64_t Dataword() const { return dataword; }
136 
137  private:
142  int numME;
143  int numRPC;
144  int numSP;
159  uint64_t dataword; // Should this be more or fewer bits? - AWB 28.01.16
160 
161  }; // End class EMTFDaqOut
162 
163  // Define a vector of EMTFDaqOut
164  typedef std::vector<EMTFDaqOut> EMTFDaqOutCollection;
165 
166 } // End namespace l1t
167 
168 #endif /* define __l1t_EMTF_output_h__ */
l1t::EMTFDaqOut::PtrMECollection
const emtf::MECollection * PtrMECollection() const
Definition: EMTFDaqOut.h:128
l1t::EMTFDaqOutCollection
std::vector< EMTFDaqOut > EMTFDaqOutCollection
Definition: EMTFDaqOut.h:164
l1t::EMTFDaqOut::Dataword
uint64_t Dataword() const
Definition: EMTFDaqOut.h:135
l1t::EMTFDaqOut::EMTFDaqOut
EMTFDaqOut()
Definition: EMTFDaqOut.h:28
l1t::EMTFDaqOut::set_MTF7Header
void set_MTF7Header(emtf::MTF7Header bits)
Definition: EMTFDaqOut.h:53
l1t::EMTFDaqOut::numRPC
int numRPC
Definition: EMTFDaqOut.h:143
l1t::EMTFDaqOut::HasEventHeader
bool HasEventHeader() const
Definition: EMTFDaqOut.h:106
l1t::emtf::RPCCollection
std::vector< RPC > RPCCollection
Definition: RPC.h:70
funct::false
false
Definition: Factorize.h:34
l1t::EMTFDaqOut::GetEventHeader
emtf::EventHeader GetEventHeader() const
Definition: EMTFDaqOut.h:116
l1t::EMTFDaqOut::set_MTF7Trailer
void set_MTF7Trailer(emtf::MTF7Trailer bits)
Definition: EMTFDaqOut.h:93
l1t::EMTFDaqOut::set_AMC13Header
void set_AMC13Header(emtf::AMC13Header bits)
Definition: EMTFDaqOut.h:49
l1t::EMTFDaqOut::GetMTF7Trailer
emtf::MTF7Trailer GetMTF7Trailer() const
Definition: EMTFDaqOut.h:122
l1t::EMTFDaqOut::PtrCounters
const emtf::Counters * PtrCounters() const
Definition: EMTFDaqOut.h:127
l1t::EMTFDaqOut::set_RPCCollection
void set_RPCCollection(emtf::RPCCollection bits)
Definition: EMTFDaqOut.h:73
l1t::EMTFDaqOut::numME
int numME
Definition: EMTFDaqOut.h:142
l1t::EMTFDaqOut::GetCounters
emtf::Counters GetCounters() const
Definition: EMTFDaqOut.h:117
l1t::EMTFDaqOut::GetMTF7Header
emtf::MTF7Header GetMTF7Header() const
Definition: EMTFDaqOut.h:115
l1t::EMTFDaqOut::PtrAMC13Trailer
const emtf::AMC13Trailer * PtrAMC13Trailer() const
Definition: EMTFDaqOut.h:133
l1t::EMTFDaqOut::set_EventHeader
void set_EventHeader(emtf::EventHeader bits)
Definition: EMTFDaqOut.h:57
l1t::EMTFDaqOut::set_Counters
void set_Counters(emtf::Counters bits)
Definition: EMTFDaqOut.h:61
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:134
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:156
l1t::EMTFDaqOut::MECollection
emtf::MECollection MECollection
Definition: EMTFDaqOut.h:152
EventHeader
Definition: EventHeader.h:18
l1t::EMTFDaqOut::hasCounters
bool hasCounters
Definition: EMTFDaqOut.h:141
l1t::EMTFDaqOut::set_MECollection
void set_MECollection(emtf::MECollection bits)
Definition: EMTFDaqOut.h:65
l1t::EMTFDaqOut::GetMECollection
emtf::MECollection GetMECollection() const
Definition: EMTFDaqOut.h:118
Counters.h
l1t::EMTFDaqOut::PtrSPCollection
const emtf::SPCollection * PtrSPCollection() const
Definition: EMTFDaqOut.h:130
l1t::emtf::AMC13Trailer
Definition: AMC13Trailer.h:11
l1t::EMTFDaqOut::hasAMC13Trailer
bool hasAMC13Trailer
Definition: EMTFDaqOut.h:147
AMC13Header.h
l1t::EMTFDaqOut::AMC13Trailer
emtf::AMC13Trailer AMC13Trailer
Definition: EMTFDaqOut.h:157
l1t::EMTFDaqOut::HasEventTrailer
bool HasEventTrailer() const
Definition: EMTFDaqOut.h:113
l1t::emtf::SP
Definition: SP.h:11
l1t::EMTFDaqOut::MTF7Header
emtf::MTF7Header MTF7Header
Definition: EMTFDaqOut.h:149
l1t::EMTFDaqOut::PtrMTF7Trailer
const emtf::MTF7Trailer * PtrMTF7Trailer() const
Definition: EMTFDaqOut.h:132
l1t::EMTFDaqOut::hasEventHeader
bool hasEventHeader
Definition: EMTFDaqOut.h:140
l1t::EMTFDaqOut::AMC13Header
emtf::AMC13Header AMC13Header
Definition: EMTFDaqOut.h:148
l1t::EMTFDaqOut::HasMTF7Header
bool HasMTF7Header() const
Definition: EMTFDaqOut.h:105
l1t::EMTFDaqOut::PtrAMC13Header
const emtf::AMC13Header * PtrAMC13Header() const
Definition: EMTFDaqOut.h:124
l1t::emtf::MTF7Trailer
Definition: MTF7Trailer.h:11
l1t::EMTFDaqOut::GetEventTrailer
emtf::EventTrailer GetEventTrailer() const
Definition: EMTFDaqOut.h:121
l1t::EMTFDaqOut::hasEventTrailer
bool hasEventTrailer
Definition: EMTFDaqOut.h:145
l1t::EMTFDaqOut::add_format_error
void add_format_error()
Definition: EMTFDaqOut.h:101
l1t::EMTFDaqOut::push_SP
void push_SP(emtf::SP bits)
Definition: EMTFDaqOut.h:85
l1t::EMTFDaqOut::HasAMC13Trailer
bool HasAMC13Trailer() const
Definition: EMTFDaqOut.h:111
RPC.h
l1t::EMTFDaqOut::Counters
emtf::Counters Counters
Definition: EMTFDaqOut.h:151
l1t::EMTFDaqOut::GetAMC13Trailer
emtf::AMC13Trailer GetAMC13Trailer() const
Definition: EMTFDaqOut.h:123
l1t::EMTFDaqOut::PtrEventHeader
const emtf::EventHeader * PtrEventHeader() const
Definition: EMTFDaqOut.h:126
l1t::EMTFDaqOut::NumSP
int NumSP() const
Definition: EMTFDaqOut.h:108
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:159
l1t::EMTFDaqOut::format_errors
int format_errors
Definition: EMTFDaqOut.h:158
l1t::EMTFDaqOut::GetAMC13Header
emtf::AMC13Header GetAMC13Header() const
Definition: EMTFDaqOut.h:114
EventTrailer.h
MTF7Trailer.h
l1t::EMTFDaqOut
Definition: EMTFDaqOut.h:23
AMC13Trailer.h
l1t::emtf::EventHeader
Definition: EventHeader.h:9
l1t::EMTFDaqOut::push_RPC
void push_RPC(emtf::RPC bits)
Definition: EMTFDaqOut.h:77
l1t::EMTFDaqOut::GetRPCCollection
emtf::RPCCollection GetRPCCollection() const
Definition: EMTFDaqOut.h:119
l1t::EMTFDaqOut::set_dataword
void set_dataword(uint64_t bits)
Definition: EMTFDaqOut.h:102
l1t::EMTFDaqOut::numSP
int numSP
Definition: EMTFDaqOut.h:144
l1t::EMTFDaqOut::EventTrailer
emtf::EventTrailer EventTrailer
Definition: EMTFDaqOut.h:155
l1t::EMTFDaqOut::PtrEventTrailer
const emtf::EventTrailer * PtrEventTrailer() const
Definition: EMTFDaqOut.h:131
l1t::EMTFDaqOut::hasMTF7Trailer
bool hasMTF7Trailer
Definition: EMTFDaqOut.h:146
l1t::EMTFDaqOut::NumRPC
int NumRPC() const
Definition: EMTFDaqOut.h:109
l1t::emtf::Counters
Definition: Counters.h:9
l1t::EMTFDaqOut::push_ME
void push_ME(emtf::ME bits)
Definition: EMTFDaqOut.h:69
l1t::EMTFDaqOut::HasMTF7Trailer
bool HasMTF7Trailer() const
Definition: EMTFDaqOut.h:112
bits
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
Definition: EventSelector-behavior.doc:35
l1t::EMTFDaqOut::HasCounters
bool HasCounters() const
Definition: EMTFDaqOut.h:107
l1t::EMTFDaqOut::SPCollection
emtf::SPCollection SPCollection
Definition: EMTFDaqOut.h:154
l1t::EMTFDaqOut::set_AMC13Trailer
void set_AMC13Trailer(emtf::AMC13Trailer bits)
Definition: EMTFDaqOut.h:97
l1t::EMTFDaqOut::hasMTF7Header
bool hasMTF7Header
Definition: EMTFDaqOut.h:139
l1t::EMTFDaqOut::set_SPCollection
void set_SPCollection(emtf::SPCollection bits)
Definition: EMTFDaqOut.h:81
l1t::emtf::SPCollection
std::vector< SP > SPCollection
Definition: SP.h:146
l1t::EMTFDaqOut::RPCCollection
emtf::RPCCollection RPCCollection
Definition: EMTFDaqOut.h:153
l1t::EMTFDaqOut::EventHeader
emtf::EventHeader EventHeader
Definition: EMTFDaqOut.h:150
l1t::EMTFDaqOut::PtrRPCCollection
const emtf::RPCCollection * PtrRPCCollection() const
Definition: EMTFDaqOut.h:129
MTF7Header.h
l1t::EMTFDaqOut::~EMTFDaqOut
virtual ~EMTFDaqOut()
Definition: EMTFDaqOut.h:47
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:89
SP.h
l1t::EMTFDaqOut::hasAMC13Header
bool hasAMC13Header
Definition: EMTFDaqOut.h:138
EventHeader.h
l1t::EMTFDaqOut::NumME
int NumME() const
Definition: EMTFDaqOut.h:110
l1t::EMTFDaqOut::GetSPCollection
emtf::SPCollection GetSPCollection() const
Definition: EMTFDaqOut.h:120
l1t::EMTFDaqOut::HasAMC13Header
bool HasAMC13Header() const
Definition: EMTFDaqOut.h:104
l1t::EMTFDaqOut::PtrMTF7Header
const emtf::MTF7Header * PtrMTF7Header() const
Definition: EMTFDaqOut.h:125