CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::LuminosityBlockID Class Reference

#include <LuminosityBlockID.h>

Public Member Functions

LuminosityBlockNumber_t luminosityBlock () const
 
 LuminosityBlockID ()
 
 LuminosityBlockID (boost::uint64_t id)
 
 LuminosityBlockID (RunNumber_t iRun, LuminosityBlockNumber_t iLuminosityBlock)
 
LuminosityBlockID next () const
 
LuminosityBlockID nextRun () const
 
LuminosityBlockID nextRunFirstLuminosityBlock () const
 
bool operator!= (LuminosityBlockID const &iRHS) const
 
bool operator< (LuminosityBlockID const &iRHS) const
 
bool operator<= (LuminosityBlockID const &iRHS) const
 
bool operator== (LuminosityBlockID const &iRHS) const
 
bool operator> (LuminosityBlockID const &iRHS) const
 
bool operator>= (LuminosityBlockID const &iRHS) const
 
LuminosityBlockID previous () const
 
LuminosityBlockID previousRunLastLuminosityBlock () const
 
RunNumber_t run () const
 
boost::uint64_t value () const
 

Static Public Member Functions

static LuminosityBlockID firstValidLuminosityBlock ()
 
static LuminosityBlockNumber_t maxLuminosityBlockNumber ()
 

Private Member Functions

template<template< typename > class Op>
bool doOp (LuminosityBlockID const &iRHS) const
 

Private Attributes

LuminosityBlockNumber_t luminosityBlock_
 
RunNumber_t run_
 

Detailed Description

Description: Holds run and luminosityBlock number.

Usage: <usage>

Definition at line 31 of file LuminosityBlockID.h.

Constructor & Destructor Documentation

edm::LuminosityBlockID::LuminosityBlockID ( )
inline

Definition at line 33 of file LuminosityBlockID.h.

Referenced by firstValidLuminosityBlock(), next(), nextRun(), nextRunFirstLuminosityBlock(), previous(), and previousRunLastLuminosityBlock().

LuminosityBlockNumber_t luminosityBlock_
RunNumber_t const invalidRunNumber
LuminosityBlockNumber_t const invalidLuminosityBlockNumber
edm::LuminosityBlockID::LuminosityBlockID ( boost::uint64_t  id)
explicit

Definition at line 11 of file LuminosityBlockID.cc.

11  :
12  run_(static_cast<RunNumber_t>(id >> shift)),
13  luminosityBlock_(static_cast<LuminosityBlockNumber_t>(std::numeric_limits<unsigned int>::max() & id))
14  {
15  }
LuminosityBlockNumber_t luminosityBlock_
static unsigned int const shift
edm::LuminosityBlockID::LuminosityBlockID ( RunNumber_t  iRun,
LuminosityBlockNumber_t  iLuminosityBlock 
)
inline

Definition at line 35 of file LuminosityBlockID.h.

35  :
36  run_(iRun), luminosityBlock_(iLuminosityBlock) {}
LuminosityBlockNumber_t luminosityBlock_

Member Function Documentation

template<template< typename > class Op>
bool edm::LuminosityBlockID::doOp ( LuminosityBlockID const &  iRHS) const
inlineprivate

Definition at line 109 of file LuminosityBlockID.h.

References luminosityBlock_, and run_.

109  {
110  //Run takes presidence for comparisions
111  if(run_ == iRHS.run_) {
112  Op<LuminosityBlockNumber_t> op_e;
113  return op_e(luminosityBlock_, iRHS.luminosityBlock_);
114  }
115  Op<RunNumber_t> op;
116  return op(run_, iRHS.run_) ;
117  }
LuminosityBlockNumber_t luminosityBlock_
static LuminosityBlockID edm::LuminosityBlockID::firstValidLuminosityBlock ( )
inlinestatic

Definition at line 102 of file LuminosityBlockID.h.

References LuminosityBlockID().

102  {
103  return LuminosityBlockID(1, 1);
104  }
LuminosityBlockNumber_t edm::LuminosityBlockID::luminosityBlock ( ) const
inline
static LuminosityBlockNumber_t edm::LuminosityBlockID::maxLuminosityBlockNumber ( )
inlinestatic

Definition at line 98 of file LuminosityBlockID.h.

Referenced by fwlite::IOVSyncValue::endOfTime(), edm::IOVSyncValue::endOfTime(), next(), previous(), and previousRunLastLuminosityBlock().

98  {
99  return 0xFFFFFFFFU;
100  }
LuminosityBlockID edm::LuminosityBlockID::next ( void  ) const
inline

Definition at line 47 of file LuminosityBlockID.h.

References luminosityBlock_, LuminosityBlockID(), maxLuminosityBlockNumber(), and run_.

47  {
50  }
51  return LuminosityBlockID(run_+1, 1);
52  }
LuminosityBlockNumber_t luminosityBlock_
static LuminosityBlockNumber_t maxLuminosityBlockNumber()
LuminosityBlockID edm::LuminosityBlockID::nextRun ( ) const
inline

Definition at line 53 of file LuminosityBlockID.h.

References LuminosityBlockID(), and run_.

53  {
54  return LuminosityBlockID(run_+1, 0);
55  }
LuminosityBlockID edm::LuminosityBlockID::nextRunFirstLuminosityBlock ( ) const
inline

Definition at line 56 of file LuminosityBlockID.h.

References LuminosityBlockID(), and run_.

56  {
57  return LuminosityBlockID(run_+1, 1);
58  }
bool edm::LuminosityBlockID::operator!= ( LuminosityBlockID const &  iRHS) const
inline

Definition at line 79 of file LuminosityBlockID.h.

79  {
80  return ! (*this == iRHS);
81  }
bool edm::LuminosityBlockID::operator< ( LuminosityBlockID const &  iRHS) const
inline

Definition at line 83 of file LuminosityBlockID.h.

83  {
84  return doOp<std::less>(iRHS);
85  }
bool edm::LuminosityBlockID::operator<= ( LuminosityBlockID const &  iRHS) const
inline

Definition at line 86 of file LuminosityBlockID.h.

86  {
87  return doOp<std::less_equal>(iRHS);
88  }
bool edm::LuminosityBlockID::operator== ( LuminosityBlockID const &  iRHS) const
inline

Definition at line 76 of file LuminosityBlockID.h.

References luminosityBlock_, and run_.

76  {
77  return iRHS.run_ == run_ && iRHS.luminosityBlock_ == luminosityBlock_;
78  }
LuminosityBlockNumber_t luminosityBlock_
bool edm::LuminosityBlockID::operator> ( LuminosityBlockID const &  iRHS) const
inline

Definition at line 89 of file LuminosityBlockID.h.

89  {
90  return doOp<std::greater>(iRHS);
91  }
bool edm::LuminosityBlockID::operator>= ( LuminosityBlockID const &  iRHS) const
inline

Definition at line 92 of file LuminosityBlockID.h.

92  {
93  return doOp<std::greater_equal>(iRHS);
94  }
LuminosityBlockID edm::LuminosityBlockID::previous ( ) const
inline

Definition at line 66 of file LuminosityBlockID.h.

References luminosityBlock_, LuminosityBlockID(), maxLuminosityBlockNumber(), and run_.

66  {
67  if(luminosityBlock_ > 1) {
69  }
70  if(run_ != 0) {
72  }
73  return LuminosityBlockID(0,0);
74  }
LuminosityBlockNumber_t luminosityBlock_
static LuminosityBlockNumber_t maxLuminosityBlockNumber()
LuminosityBlockID edm::LuminosityBlockID::previousRunLastLuminosityBlock ( ) const
inline

Definition at line 59 of file LuminosityBlockID.h.

References LuminosityBlockID(), maxLuminosityBlockNumber(), and run_.

59  {
60  if(run_ > 1) {
62  }
63  return LuminosityBlockID(0,0);
64  }
static LuminosityBlockNumber_t maxLuminosityBlockNumber()
RunNumber_t edm::LuminosityBlockID::run ( ) const
inline
boost::uint64_t edm::LuminosityBlockID::value ( ) const

Definition at line 18 of file LuminosityBlockID.cc.

References luminosityBlock_, run_, and edm::shift.

Referenced by average.Average::average(), and cond::time::fromIOVSyncValue().

18  {
19  boost::uint64_t id = run_;
20  id = id << shift;
21  id += luminosityBlock_;
22  return id;
23  }
LuminosityBlockNumber_t luminosityBlock_
unsigned long long uint64_t
Definition: Time.h:15
static unsigned int const shift

Member Data Documentation

LuminosityBlockNumber_t edm::LuminosityBlockID::luminosityBlock_
private

Definition at line 124 of file LuminosityBlockID.h.

Referenced by doOp(), luminosityBlock(), next(), operator==(), previous(), and value().

RunNumber_t edm::LuminosityBlockID::run_
private