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 }
L1AcceptBunchCrossing::eventType_
unsigned int eventType_
Definition: L1AcceptBunchCrossing.h:77
L1AcceptBunchCrossing.h
L1AcceptBunchCrossing::EVENT_TYPE_SHIFT
Definition: L1AcceptBunchCrossing.h:52
L1AcceptBunchCrossing
Definition: L1AcceptBunchCrossing.h:37
operator<<
std::ostream & operator<<(std::ostream &s, const L1AcceptBunchCrossing &c)
Pretty-print operator for L1AcceptBunchCrossing.
Definition: L1AcceptBunchCrossing.cc:31
ScalersRaw.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1AcceptBunchCrossing::ORBIT_NUMBER_MASK
Definition: L1AcceptBunchCrossing.h:49
L1AcceptBunchCrossing::L1AcceptBunchCrossing
L1AcceptBunchCrossing()
Definition: L1AcceptBunchCrossing.cc:9
L1AcceptBunchCrossing::bunchCrossing_
unsigned int bunchCrossing_
Definition: L1AcceptBunchCrossing.h:76
createfilelist.int
int
Definition: createfilelist.py:10
L1AcceptBunchCrossing::ORBIT_NUMBER_SHIFT
Definition: L1AcceptBunchCrossing.h:48
L1AcceptBunchCrossing::orbitNumber_
unsigned int orbitNumber_
Definition: L1AcceptBunchCrossing.h:75
L1AcceptBunchCrossing::~L1AcceptBunchCrossing
virtual ~L1AcceptBunchCrossing()
Definition: L1AcceptBunchCrossing.cc:28
L1AcceptBunchCrossing::EVENT_TYPE_MASK
Definition: L1AcceptBunchCrossing.h:53
L1AcceptBunchCrossing::l1AcceptOffset_
int l1AcceptOffset_
Definition: L1AcceptBunchCrossing.h:74
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
L1AcceptBunchCrossing::BUNCH_CROSSING_MASK
Definition: L1AcceptBunchCrossing.h:51
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
mps_splice.line
line
Definition: mps_splice.py:76
L1AcceptBunchCrossing::BUNCH_CROSSING_SHIFT
Definition: L1AcceptBunchCrossing.h:50