CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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),
11  orbitNumber_(0),
12  bunchCrossing_(0),
13  eventType_(0)
14 {
15 }
16 
18  const unsigned int orbitNumber__,
19  const unsigned int bunchCrossing__,
20  const unsigned int eventType__) :
21  l1AcceptOffset_(l1AcceptOffset__),
22  orbitNumber_(orbitNumber__),
23  bunchCrossing_(bunchCrossing__),
24  eventType_(eventType__)
25 {
26 }
27 
29  const unsigned long long data)
30 {
32  orbitNumber_ = (unsigned int) (( data >> ORBIT_NUMBER_SHIFT )
34  bunchCrossing_ = (unsigned int) (( data >> BUNCH_CROSSING_SHIFT )
36  eventType_ = (unsigned int) (( data >> EVENT_TYPE_SHIFT )
37  & EVENT_TYPE_MASK);
38 }
39 
41 
43 std::ostream& operator<<(std::ostream& s, const L1AcceptBunchCrossing& c)
44 {
45  char line[128];
46 
47  sprintf(line,
48  "L1AcceptBC Offset:%2d Orbit:%10d [0x%8.8X] BC:%4d [0x%3.3X] EvtTyp:%d",
49  c.l1AcceptOffset(),
50  c.orbitNumber(),
51  c.orbitNumber(),
52  c.bunchCrossing(),
53  c.bunchCrossing(),
54  c.eventType());
55  s << line << std::endl;
56 
57  return s;
58 }
unsigned int bunchCrossing() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
unsigned int eventType() const
unsigned int orbitNumber() const