CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EMTFOutput.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 EMTFOutput {
24 
25  public:
26  explicit EMTFOutput(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  /* EMTFOutput(emtf::AMC13Header class_AMC13Header, emtf::SPCollection coll_SPCollection) : */
36  /* AMC13Header(class_AMC13Header), SPCollection(coll_SPCollection), format_errors(0), dataword(-99) */
37  /* {}; */
38 
39  virtual ~EMTFOutput() {};
40 
45  void push_ME(emtf::ME bits) { MECollection.push_back(bits); numME += 1; };
46  void push_RPC(emtf::RPC bits) { RPCCollection.push_back(bits); numRPC += 1; };
47  void push_SP(emtf::SP bits) { SPCollection.push_back(bits); numSP += 1; };
51  void add_format_error() { format_errors += 1; };
52  void set_dataword(uint64_t bits) { dataword = bits; };
53 
54  const bool HasAMC13Header() const { return hasAMC13Header; };
55  const bool HasMTF7Header() const { return hasMTF7Header; };
56  const bool HasEventHeader() const { return hasEventHeader; };
57  const bool HasCounters() const { return hasCounters; };
58  const int NumSP() const { return numSP; };
59  const int NumRPC() const { return numRPC; };
60  const int NumME() const { return numME; };
61  const bool HasAMC13Trailer() const { return hasAMC13Trailer; };
62  const bool HasMTF7Trailer() const { return hasMTF7Trailer; };
63  const bool HasEventTrailer() const { return hasEventTrailer; };
64  const emtf::AMC13Header GetAMC13Header() const { return AMC13Header; };
65  const emtf::MTF7Header GetMTF7Header() const { return MTF7Header; };
66  const emtf::EventHeader GetEventHeader() const { return EventHeader; };
67  const emtf::Counters GetCounters() const { return Counters; };
68  const emtf::MECollection GetMECollection() const { return MECollection; };
70  const emtf::SPCollection GetSPCollection() const { return SPCollection; };
71  const emtf::EventTrailer GetEventTrailer() const { return EventTrailer; };
72  const emtf::MTF7Trailer GetMTF7Trailer() const { return MTF7Trailer; };
73  const emtf::AMC13Trailer GetAMC13Trailer() const { return AMC13Trailer; };
74  const int Format_Errors() const { return format_errors; };
75  const uint64_t Dataword() const { return dataword; };
76 
77  private:
78  bool hasAMC13Header;
81  bool hasCounters;
82  int numME;
83  int numRPC;
84  int numSP;
99  uint64_t dataword; // Should this be more or fewer bits? - AWB 28.01.16
100 
101  }; // End class EMTFOutput
102 
103  // Define a vector of EMTFOutput
104  typedef std::vector<EMTFOutput> EMTFOutputCollection;
105 
106 } // End namespace l1t
107 
108 #endif /* define __l1t_EMTF_output_h__ */
emtf::RPCCollection RPCCollection
Definition: EMTFOutput.h:93
void set_MTF7Trailer(emtf::MTF7Trailer bits)
Definition: EMTFOutput.h:49
void push_SP(emtf::SP bits)
Definition: EMTFOutput.h:47
void add_format_error()
Definition: EMTFOutput.h:51
bool hasAMC13Trailer
Definition: EMTFOutput.h:87
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
const int NumRPC() const
Definition: EMTFOutput.h:59
void set_Counters(emtf::Counters bits)
Definition: EMTFOutput.h:44
emtf::AMC13Header AMC13Header
Definition: EMTFOutput.h:88
bool hasEventHeader
Definition: EMTFOutput.h:80
emtf::MTF7Trailer MTF7Trailer
Definition: EMTFOutput.h:96
const emtf::EventHeader GetEventHeader() const
Definition: EMTFOutput.h:66
bool hasMTF7Trailer
Definition: EMTFOutput.h:86
const emtf::EventTrailer GetEventTrailer() const
Definition: EMTFOutput.h:71
void set_EventTrailer(emtf::EventTrailer bits)
Definition: EMTFOutput.h:48
void set_AMC13Trailer(emtf::AMC13Trailer bits)
Definition: EMTFOutput.h:50
emtf::AMC13Trailer AMC13Trailer
Definition: EMTFOutput.h:97
const int NumME() const
Definition: EMTFOutput.h:60
emtf::MTF7Header MTF7Header
Definition: EMTFOutput.h:89
bool hasMTF7Header
Definition: EMTFOutput.h:79
std::vector< EMTFOutput > EMTFOutputCollection
Definition: EMTFOutput.h:104
std::vector< RPC > RPCCollection
Definition: RPC.h:71
std::vector< ME > MECollection
Definition: ME.h:104
const bool HasEventTrailer() const
Definition: EMTFOutput.h:63
const emtf::MTF7Trailer GetMTF7Trailer() const
Definition: EMTFOutput.h:72
const emtf::MTF7Header GetMTF7Header() const
Definition: EMTFOutput.h:65
emtf::SPCollection SPCollection
Definition: EMTFOutput.h:94
void set_dataword(uint64_t bits)
Definition: EMTFOutput.h:52
const emtf::RPCCollection GetRPCCollection() const
Definition: EMTFOutput.h:69
virtual ~EMTFOutput()
Definition: EMTFOutput.h:39
const bool HasMTF7Header() const
Definition: EMTFOutput.h:55
void set_AMC13Header(emtf::AMC13Header bits)
Definition: EMTFOutput.h:41
emtf::EventHeader EventHeader
Definition: EMTFOutput.h:90
const emtf::MECollection GetMECollection() const
Definition: EMTFOutput.h:68
const bool HasAMC13Header() const
Definition: EMTFOutput.h:54
const emtf::SPCollection GetSPCollection() const
Definition: EMTFOutput.h:70
bool hasAMC13Header
Definition: EMTFOutput.h:75
const uint64_t Dataword() const
Definition: EMTFOutput.h:75
unsigned long long uint64_t
Definition: Time.h:15
emtf::Counters Counters
Definition: EMTFOutput.h:91
const emtf::Counters GetCounters() const
Definition: EMTFOutput.h:67
const bool HasMTF7Trailer() const
Definition: EMTFOutput.h:62
emtf::MECollection MECollection
Definition: EMTFOutput.h:92
const int Format_Errors() const
Definition: EMTFOutput.h:74
const bool HasAMC13Trailer() const
Definition: EMTFOutput.h:61
bool hasEventTrailer
Definition: EMTFOutput.h:85
void push_ME(emtf::ME bits)
Definition: EMTFOutput.h:45
const emtf::AMC13Header GetAMC13Header() const
Definition: EMTFOutput.h:64
uint64_t dataword
Definition: EMTFOutput.h:99
void set_MTF7Header(emtf::MTF7Header bits)
Definition: EMTFOutput.h:42
const bool HasEventHeader() const
Definition: EMTFOutput.h:56
const int NumSP() const
Definition: EMTFOutput.h:58
volatile std::atomic< bool > shutdown_flag false
const emtf::AMC13Trailer GetAMC13Trailer() const
Definition: EMTFOutput.h:73
std::vector< SP > SPCollection
Definition: SP.h:227
void push_RPC(emtf::RPC bits)
Definition: EMTFOutput.h:46
emtf::EventTrailer EventTrailer
Definition: EMTFOutput.h:95
const bool HasCounters() const
Definition: EMTFOutput.h:57
void set_EventHeader(emtf::EventHeader bits)
Definition: EMTFOutput.h:43