CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LuminosityBlockID.cc
Go to the documentation of this file.
2 #include <ostream>
3 #include <limits>
4 
5 namespace edm {
6 
7  static unsigned int const shift = 8 * sizeof(unsigned int);
8 
10  : run_(static_cast<RunNumber_t>(id >> shift)),
11  luminosityBlock_(static_cast<LuminosityBlockNumber_t>(std::numeric_limits<unsigned int>::max() & id)) {}
12 
14  uint64_t id = run_;
15  id = id << shift;
16  id += luminosityBlock_;
17  return id;
18  }
19 
20  std::ostream& operator<<(std::ostream& oStream, LuminosityBlockID const& iID) {
21  oStream << "run: " << iID.run() << " luminosityBlock: " << iID.luminosityBlock();
22  return oStream;
23  }
24 } // namespace edm
uint16_t *__restrict__ id
LuminosityBlockNumber_t luminosityBlock_
unsigned int LuminosityBlockNumber_t
RunNumber_t run() const
uint64_t value() const
unsigned long long uint64_t
Definition: Time.h:13
LuminosityBlockNumber_t luminosityBlock() const
static unsigned int const shift
unsigned int RunNumber_t
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
EventID const & max(EventID const &lh, EventID const &rh)
Definition: EventID.h:118