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 #include <boost/cstdint.hpp> // For uint64_t and other types. Also found in DataFormats/L1Trigger/src/classes.h
8 
9 #include "EMTF/AMC13Header.h"
10 #include "EMTF/MTF7Header.h"
11 #include "EMTF/EventHeader.h"
12 #include "EMTF/Counters.h"
13 #include "EMTF/ME.h"
14 #include "EMTF/RPC.h"
15 #include "EMTF/SP.h"
16 #include "EMTF/EventTrailer.h"
17 #include "EMTF/MTF7Trailer.h"
18 #include "EMTF/AMC13Trailer.h"
19 
20 // All comments below apply equally to classes in EMTF/ directory - AWB 28.01.16
21 
22 namespace l1t {
23  class EMTFDaqOut {
24 
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
32  {};
33 
34  /* // Fill constructor - should we included a copy constructor for classes and collections (vectors)? - AWB 28.01.16 */
35  /* EMTFDaqOut(emtf::AMC13Header class_AMC13Header, emtf::SPCollection coll_SPCollection) : */
36  /* AMC13Header(class_AMC13Header), SPCollection(coll_SPCollection), format_errors(0), dataword(-99) */
37  /* {}; */
38 
39  virtual ~EMTFDaqOut() {};
40 
42  hasAMC13Header = true; }
44  hasMTF7Header = true; }
46  hasEventHeader = true; }
48  hasCounters = true; }
50  numME = MECollection.size(); }
51  void push_ME(emtf::ME bits) { MECollection.push_back(bits);
52  numME += 1; }
54  numRPC = RPCCollection.size(); }
55  void push_RPC(emtf::RPC bits) { RPCCollection.push_back(bits);
56  numRPC += 1; }
58  numSP = SPCollection.size(); }
59  void push_SP(emtf::SP bits) { SPCollection.push_back(bits);
60  numSP += 1; }
62  hasEventTrailer = true; }
64  hasMTF7Trailer = true; }
66  hasAMC13Trailer = true; }
68  void set_dataword(uint64_t bits) { dataword = bits; }
69 
70  bool HasAMC13Header() const { return hasAMC13Header; }
71  bool HasMTF7Header() const { return hasMTF7Header; }
72  bool HasEventHeader() const { return hasEventHeader; }
73  bool HasCounters() const { return hasCounters; }
74  int NumSP() const { return numSP; }
75  int NumRPC() const { return numRPC; }
76  int NumME() const { return numME; }
77  bool HasAMC13Trailer() const { return hasAMC13Trailer; }
78  bool HasMTF7Trailer() const { return hasMTF7Trailer; }
79  bool HasEventTrailer() const { return hasEventTrailer; }
83  emtf::Counters GetCounters() const { return Counters; }
90  const emtf::AMC13Header* PtrAMC13Header() const { return & AMC13Header; }
91  const emtf::MTF7Header* PtrMTF7Header() const { return & MTF7Header; }
92  const emtf::EventHeader* PtrEventHeader() const { return & EventHeader; }
93  const emtf::Counters* PtrCounters() const { return & Counters; }
94  const emtf::MECollection* PtrMECollection() const { return & MECollection; }
95  const emtf::RPCCollection* PtrRPCCollection() const { return & RPCCollection; }
96  const emtf::SPCollection* PtrSPCollection() const { return & SPCollection; }
97  const emtf::EventTrailer* PtrEventTrailer() const { return & EventTrailer; }
98  const emtf::MTF7Trailer* PtrMTF7Trailer() const { return & MTF7Trailer; }
99  const emtf::AMC13Trailer* PtrAMC13Trailer() const { return & AMC13Trailer; }
100  int Format_Errors() const { return format_errors; }
101  uint64_t Dataword() const { return dataword; }
102 
103  private:
107  bool hasCounters;
108  int numME;
109  int numRPC;
110  int numSP;
125  uint64_t dataword; // Should this be more or fewer bits? - AWB 28.01.16
126 
127  }; // End class EMTFDaqOut
128 
129  // Define a vector of EMTFDaqOut
130  typedef std::vector<EMTFDaqOut> EMTFDaqOutCollection;
131 
132 } // End namespace l1t
133 
134 #endif /* define __l1t_EMTF_output_h__ */
emtf::RPCCollection GetRPCCollection() const
Definition: EMTFDaqOut.h:85
const emtf::MTF7Trailer * PtrMTF7Trailer() const
Definition: EMTFDaqOut.h:98
const emtf::RPCCollection * PtrRPCCollection() const
Definition: EMTFDaqOut.h:95
void set_AMC13Header(emtf::AMC13Header bits)
Definition: EMTFDaqOut.h:41
emtf::Counters GetCounters() const
Definition: EMTFDaqOut.h:83
void set_Counters(emtf::Counters bits)
Definition: EMTFDaqOut.h:47
const emtf::EventHeader * PtrEventHeader() const
Definition: EMTFDaqOut.h:92
uint64_t Dataword() const
Definition: EMTFDaqOut.h:101
bool HasEventTrailer() const
Definition: EMTFDaqOut.h:79
void set_RPCCollection(emtf::RPCCollection bits)
Definition: EMTFDaqOut.h:53
void set_MECollection(emtf::MECollection bits)
Definition: EMTFDaqOut.h:49
emtf::SPCollection GetSPCollection() const
Definition: EMTFDaqOut.h:86
const emtf::Counters * PtrCounters() const
Definition: EMTFDaqOut.h:93
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
void set_MTF7Trailer(emtf::MTF7Trailer bits)
Definition: EMTFDaqOut.h:63
emtf::EventTrailer GetEventTrailer() const
Definition: EMTFDaqOut.h:87
bool hasAMC13Trailer
Definition: EMTFDaqOut.h:113
delete x;
Definition: CaloConfig.h:22
void set_EventHeader(emtf::EventHeader bits)
Definition: EMTFDaqOut.h:45
emtf::AMC13Header AMC13Header
Definition: EMTFDaqOut.h:114
emtf::MTF7Trailer MTF7Trailer
Definition: EMTFDaqOut.h:122
bool HasMTF7Trailer() const
Definition: EMTFDaqOut.h:78
emtf::MECollection MECollection
Definition: EMTFDaqOut.h:118
bool HasMTF7Header() const
Definition: EMTFDaqOut.h:71
bool hasEventTrailer
Definition: EMTFDaqOut.h:111
void add_format_error()
Definition: EMTFDaqOut.h:67
emtf::MTF7Header GetMTF7Header() const
Definition: EMTFDaqOut.h:81
emtf::MTF7Header MTF7Header
Definition: EMTFDaqOut.h:115
std::vector< RPC > RPCCollection
Definition: RPC.h:62
emtf::EventHeader GetEventHeader() const
Definition: EMTFDaqOut.h:82
std::vector< ME > MECollection
Definition: ME.h:101
bool HasAMC13Trailer() const
Definition: EMTFDaqOut.h:77
emtf::MTF7Trailer GetMTF7Trailer() const
Definition: EMTFDaqOut.h:88
std::vector< EMTFDaqOut > EMTFDaqOutCollection
Definition: EMTFDaqOut.h:130
emtf::AMC13Trailer AMC13Trailer
Definition: EMTFDaqOut.h:123
emtf::AMC13Header GetAMC13Header() const
Definition: EMTFDaqOut.h:80
const emtf::AMC13Header * PtrAMC13Header() const
Definition: EMTFDaqOut.h:90
void push_SP(emtf::SP bits)
Definition: EMTFDaqOut.h:59
const emtf::AMC13Trailer * PtrAMC13Trailer() const
Definition: EMTFDaqOut.h:99
emtf::Counters Counters
Definition: EMTFDaqOut.h:117
int NumME() const
Definition: EMTFDaqOut.h:76
void push_ME(emtf::ME bits)
Definition: EMTFDaqOut.h:51
int NumRPC() const
Definition: EMTFDaqOut.h:75
emtf::EventHeader EventHeader
Definition: EMTFDaqOut.h:116
const emtf::EventTrailer * PtrEventTrailer() const
Definition: EMTFDaqOut.h:97
unsigned long long uint64_t
Definition: Time.h:15
emtf::SPCollection SPCollection
Definition: EMTFDaqOut.h:120
uint64_t dataword
Definition: EMTFDaqOut.h:125
void set_EventTrailer(emtf::EventTrailer bits)
Definition: EMTFDaqOut.h:61
void set_dataword(uint64_t bits)
Definition: EMTFDaqOut.h:68
emtf::EventTrailer EventTrailer
Definition: EMTFDaqOut.h:121
emtf::MECollection GetMECollection() const
Definition: EMTFDaqOut.h:84
virtual ~EMTFDaqOut()
Definition: EMTFDaqOut.h:39
emtf::AMC13Trailer GetAMC13Trailer() const
Definition: EMTFDaqOut.h:89
const emtf::SPCollection * PtrSPCollection() const
Definition: EMTFDaqOut.h:96
void set_AMC13Trailer(emtf::AMC13Trailer bits)
Definition: EMTFDaqOut.h:65
void push_RPC(emtf::RPC bits)
Definition: EMTFDaqOut.h:55
int Format_Errors() const
Definition: EMTFDaqOut.h:100
bool HasEventHeader() const
Definition: EMTFDaqOut.h:72
bool HasAMC13Header() const
Definition: EMTFDaqOut.h:70
std::vector< SP > SPCollection
Definition: SP.h:124
bool HasCounters() const
Definition: EMTFDaqOut.h:73
const emtf::MTF7Header * PtrMTF7Header() const
Definition: EMTFDaqOut.h:91
void set_SPCollection(emtf::SPCollection bits)
Definition: EMTFDaqOut.h:57
const emtf::MECollection * PtrMECollection() const
Definition: EMTFDaqOut.h:94
void set_MTF7Header(emtf::MTF7Header bits)
Definition: EMTFDaqOut.h:43
emtf::RPCCollection RPCCollection
Definition: EMTFDaqOut.h:119
int NumSP() const
Definition: EMTFDaqOut.h:74