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