CMS 3D CMS Logo

L1AcceptBunchCrossing.h
Go to the documentation of this file.
1 /*
2  * File: DataFormats/Scalers/interface/L1AcceptBunchCrossing.h (W.Badgett)
3  *
4  * Bunch crossing information for a single L1 accept. The information
5  * comes from the Scalers FED. Normally there are four of these objects
6  * per event, each representing the current L1 accept, as well as the
7  * previous three L1 accepts in time.
8  *
9  * orbitNumber_ 32-bits Orbit counter since last reset
10  * bunchCrossing_ 0...3563 Bunch counter within orbit
11  * eventType_ 0...7 Event Type:
12  * 1: Physics
13  * 2: Calibration
14  * 3: Test
15  * 4: Technical
16  * l1AcceptOffset_ Offset of the L1 Accept relative to
17  * the current event's L1 accept
18  * Typically 0, -1, -2, -3
19  */
20 
21 #ifndef DATAFORMATS_SCALERS_L1ACCEPTBUNCHCROSSING_H
22 #define DATAFORMATS_SCALERS_L1ACCEPTBUNCHCROSSING_H
23 
24 #include <ostream>
25 #include <vector>
26 
34 
38 public:
40  L1AcceptBunchCrossing(const int l1AcceptOffset__,
41  const unsigned int orbitNumber__,
42  const unsigned int bunchCrossing__,
43  const unsigned int eventType__);
44  L1AcceptBunchCrossing(const int index, const unsigned long long data);
45  virtual ~L1AcceptBunchCrossing();
46 
47  enum {
49  ORBIT_NUMBER_MASK = 0xFFFFFFFFULL,
51  BUNCH_CROSSING_MASK = 0xFFFULL,
53  EVENT_TYPE_MASK = 0xFULL
54  };
55 
57  std::string name() const { return "L1AcceptBunchCrossing"; }
58 
60  bool empty() const { return false; }
61 
62  int l1AcceptOffset() const { return (l1AcceptOffset_); }
63  unsigned int orbitNumber() const { return (orbitNumber_); }
64  unsigned int bunchCrossing() const { return (bunchCrossing_); }
65  unsigned int eventType() const { return (eventType_); }
66 
68  int operator==(const L1AcceptBunchCrossing& e) const { return false; }
69 
71  int operator!=(const L1AcceptBunchCrossing& e) const { return false; }
72 
73 protected:
75  unsigned int orbitNumber_;
76  unsigned int bunchCrossing_;
77  unsigned int eventType_;
78 };
79 
81 std::ostream& operator<<(std::ostream& s, const L1AcceptBunchCrossing& c);
82 
83 typedef std::vector<L1AcceptBunchCrossing> L1AcceptBunchCrossingCollection;
84 
85 #endif
int operator!=(const L1AcceptBunchCrossing &e) const
inequality operator
bool empty() const
empty method (= false)
unsigned int bunchCrossing() const
unsigned int orbitNumber() const
unsigned int eventType() const
std::ostream & operator<<(std::ostream &s, const L1AcceptBunchCrossing &c)
Pretty-print operator for L1AcceptBunchCrossings.
std::vector< L1AcceptBunchCrossing > L1AcceptBunchCrossingCollection
int operator==(const L1AcceptBunchCrossing &e) const
equality operator
std::string name() const
name method
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79