CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
35 
39 {
40  public:
41 
43  L1AcceptBunchCrossing(const int l1AcceptOffset__,
44  const unsigned int orbitNumber__,
45  const unsigned int bunchCrossing__,
46  const unsigned int eventType__);
47  L1AcceptBunchCrossing(const int index,
48  const unsigned long long data);
49  virtual ~L1AcceptBunchCrossing();
50 
51  enum
52  {
54  ORBIT_NUMBER_MASK = 0xFFFFFFFFULL,
56  BUNCH_CROSSING_MASK = 0xFFFULL,
58  EVENT_TYPE_MASK = 0xFULL
59  };
60 
62  std::string name() const { return "L1AcceptBunchCrossing"; }
63 
65  bool empty() const { return false; }
66 
67  int l1AcceptOffset() const { return(l1AcceptOffset_);}
68  unsigned int orbitNumber() const { return(orbitNumber_);}
69  unsigned int bunchCrossing() const { return(bunchCrossing_);}
70  unsigned int eventType() const { return(eventType_);}
71 
73  int operator==(const L1AcceptBunchCrossing& e) const { return false; }
74 
76  int operator!=(const L1AcceptBunchCrossing& e) const { return false; }
77 
78 protected:
79 
81  unsigned int orbitNumber_;
82  unsigned int bunchCrossing_;
83  unsigned int eventType_;
84 
85 };
86 
88 std::ostream& operator<<(std::ostream& s, const L1AcceptBunchCrossing& c);
89 
90 typedef std::vector<L1AcceptBunchCrossing> L1AcceptBunchCrossingCollection;
91 
92 #endif
unsigned int bunchCrossing() const
bool empty() const
empty method (= false)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
std::string name() const
name method
int operator==(const L1AcceptBunchCrossing &e) const
equality operator
std::vector< L1AcceptBunchCrossing > L1AcceptBunchCrossingCollection
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
unsigned int eventType() const
unsigned int orbitNumber() const
int operator!=(const L1AcceptBunchCrossing &e) const
inequality operator