CMS 3D CMS Logo

L1AcceptBunchCrossing.cc
Go to the documentation of this file.
1 /*
2  * File: DataFormats/Scalers/src/L1AcceptBunchCrossing.cc (W.Badgett)
3  */
4 
7 #include <cstdio>
8 
10  : l1AcceptOffset_(0), orbitNumber_(0), bunchCrossing_(0), eventType_(0) {}
11 
13  const unsigned int orbitNumber__,
14  const unsigned int bunchCrossing__,
15  const unsigned int eventType__)
16  : l1AcceptOffset_(l1AcceptOffset__),
17  orbitNumber_(orbitNumber__),
18  bunchCrossing_(bunchCrossing__),
19  eventType_(eventType__) {}
20 
21 L1AcceptBunchCrossing::L1AcceptBunchCrossing(const int index, const unsigned long long data) {
25  eventType_ = (unsigned int)((data >> EVENT_TYPE_SHIFT) & EVENT_TYPE_MASK);
26 }
27 
29 
31 std::ostream& operator<<(std::ostream& s, const L1AcceptBunchCrossing& c) {
32  char line[128];
33 
34  sprintf(line,
35  "L1AcceptBC Offset:%2d Orbit:%10d [0x%8.8X] BC:%4d [0x%3.3X] EvtTyp:%d",
36  c.l1AcceptOffset(),
37  c.orbitNumber(),
38  c.orbitNumber(),
39  c.bunchCrossing(),
40  c.bunchCrossing(),
41  c.eventType());
42  s << line << std::endl;
43 
44  return s;
45 }
std::ostream & operator<<(std::ostream &s, const L1AcceptBunchCrossing &c)
Pretty-print operator for L1AcceptBunchCrossing.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80