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
fwlite::IOVSyncValue Class Reference

#include <IOVSyncValue.h>

Public Member Functions

const edm::EventIDeventID () const
 
 IOVSyncValue ()
 
 IOVSyncValue (const edm::EventID &iID)
 
 IOVSyncValue (const edm::Timestamp &iTime)
 
 IOVSyncValue (const edm::EventID &iID, const edm::Timestamp &iTime)
 
edm::LuminosityBlockNumber_t luminosityBlockNumber () const
 
bool operator!= (const IOVSyncValue &iRHS) const
 
bool operator< (const IOVSyncValue &iRHS) const
 
bool operator<= (const IOVSyncValue &iRHS) const
 
bool operator== (const IOVSyncValue &iRHS) const
 
bool operator> (const IOVSyncValue &iRHS) const
 
bool operator>= (const IOVSyncValue &iRHS) const
 
const edm::Timestamptime () const
 

Static Public Member Functions

static const IOVSyncValuebeginOfTime ()
 
static const IOVSyncValueendOfTime ()
 
static const IOVSyncValueinvalidIOVSyncValue ()
 

Private Member Functions

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

Private Attributes

edm::EventID eventID_
 
bool haveID_
 
bool haveTime_
 
edm::Timestamp time_
 

Detailed Description

Definition at line 31 of file IOVSyncValue.h.

Constructor & Destructor Documentation

IOVSyncValue::IOVSyncValue ( )

Definition at line 33 of file IOVSyncValue.cc.

33  : eventID_(), time_(),
34 haveID_(true), haveTime_(true)
35 {
36 }
edm::EventID eventID_
Definition: IOVSyncValue.h:104
edm::Timestamp time_
Definition: IOVSyncValue.h:105
IOVSyncValue::IOVSyncValue ( const edm::EventID iID)
explicit

Definition at line 38 of file IOVSyncValue.cc.

38  : eventID_(iID), time_(),
39 haveID_(true), haveTime_(false)
40 {
41 }
edm::EventID eventID_
Definition: IOVSyncValue.h:104
edm::Timestamp time_
Definition: IOVSyncValue.h:105
IOVSyncValue::IOVSyncValue ( const edm::Timestamp iTime)
explicit

Definition at line 43 of file IOVSyncValue.cc.

43  : eventID_(), time_(iTime),
44 haveID_(false), haveTime_(true)
45 {
46 }
edm::EventID eventID_
Definition: IOVSyncValue.h:104
edm::Timestamp time_
Definition: IOVSyncValue.h:105
IOVSyncValue::IOVSyncValue ( const edm::EventID iID,
const edm::Timestamp iTime 
)

Definition at line 48 of file IOVSyncValue.cc.

48  :
49 eventID_(iID), time_(iTime),
50 haveID_(true), haveTime_(true)
51 {
52 }
edm::EventID eventID_
Definition: IOVSyncValue.h:104
edm::Timestamp time_
Definition: IOVSyncValue.h:105

Member Function Documentation

const IOVSyncValue & IOVSyncValue::beginOfTime ( )
static

Definition at line 98 of file IOVSyncValue.cc.

References edm::Timestamp::beginOfTime().

98  {
99  static IOVSyncValue s_beginOfTime(edm::EventID(1,0,0), edm::Timestamp::beginOfTime());
100  return s_beginOfTime;
101 }
static Timestamp beginOfTime()
Definition: Timestamp.h:103
template<template< typename > class Op>
bool fwlite::IOVSyncValue::doOp ( const IOVSyncValue iRHS) const
inlineprivate

Definition at line 78 of file IOVSyncValue.h.

References eventID_, haveID_, haveTime_, luminosityBlockNumber(), edm::EventID::run(), and time_.

78  {
79  bool returnValue = false;
80  if(haveID_ && iRHS.haveID_) {
81  if(luminosityBlockNumber()==0 || iRHS.luminosityBlockNumber()==0 || luminosityBlockNumber()==iRHS.luminosityBlockNumber()) {
82  Op<edm::EventID> op;
83  returnValue = op(eventID_, iRHS.eventID_);
84  } else {
85  if(iRHS.eventID_.run() == eventID_.run()) {
86  Op<edm::LuminosityBlockNumber_t> op;
87  returnValue = op(luminosityBlockNumber(), iRHS.luminosityBlockNumber());
88  } else {
89  Op<edm::RunNumber_t> op;
90  returnValue = op(eventID_.run(), iRHS.eventID_.run());
91  }
92  }
93 
94  } else if (haveTime_ && iRHS.haveTime_) {
95  Op<edm::Timestamp> op;
96  returnValue = op(time_, iRHS.time_);
97  } else {
98  //error
99  }
100  return returnValue;
101  }
RunNumber_t run() const
Definition: EventID.h:42
edm::EventID eventID_
Definition: IOVSyncValue.h:104
edm::Timestamp time_
Definition: IOVSyncValue.h:105
edm::LuminosityBlockNumber_t luminosityBlockNumber() const
Definition: IOVSyncValue.h:43
const IOVSyncValue & IOVSyncValue::endOfTime ( )
static

Definition at line 92 of file IOVSyncValue.cc.

References edm::Timestamp::endOfTime(), edm::EventID::maxEventNumber(), and edm::LuminosityBlockID::maxLuminosityBlockNumber().

92  {
95  return s_endOfTime;
96 }
static Timestamp endOfTime()
Definition: Timestamp.h:102
static LuminosityBlockNumber_t maxLuminosityBlockNumber()
static EventNumber_t maxEventNumber()
Definition: EventID.h:106
const edm::EventID& fwlite::IOVSyncValue::eventID ( ) const
inline

Definition at line 42 of file IOVSyncValue.h.

References eventID_.

Referenced by main(), and FWLiteESSource::setIntervalFor().

42 { return eventID_;}
edm::EventID eventID_
Definition: IOVSyncValue.h:104
const IOVSyncValue & IOVSyncValue::invalidIOVSyncValue ( )
static

Definition at line 87 of file IOVSyncValue.cc.

Referenced by fwlite::Record::syncTo().

87  {
88  static IOVSyncValue s_invalid;
89  return s_invalid;
90 }
edm::LuminosityBlockNumber_t fwlite::IOVSyncValue::luminosityBlockNumber ( ) const
inline

Definition at line 43 of file IOVSyncValue.h.

References eventID_, and edm::EventID::luminosityBlock().

Referenced by doOp().

43 { return eventID_.luminosityBlock();}
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:43
edm::EventID eventID_
Definition: IOVSyncValue.h:104
bool fwlite::IOVSyncValue::operator!= ( const IOVSyncValue iRHS) const
inline

Definition at line 49 of file IOVSyncValue.h.

49  {
50  return doOp<std::not_equal_to>(iRHS);
51  }
bool fwlite::IOVSyncValue::operator< ( const IOVSyncValue iRHS) const
inline

Definition at line 53 of file IOVSyncValue.h.

53  {
54  return doOp<std::less>(iRHS);
55  }
bool fwlite::IOVSyncValue::operator<= ( const IOVSyncValue iRHS) const
inline

Definition at line 56 of file IOVSyncValue.h.

56  {
57  return doOp<std::less_equal>(iRHS);
58  }
bool fwlite::IOVSyncValue::operator== ( const IOVSyncValue iRHS) const
inline

Definition at line 46 of file IOVSyncValue.h.

46  {
47  return doOp<std::equal_to>(iRHS);
48  }
bool fwlite::IOVSyncValue::operator> ( const IOVSyncValue iRHS) const
inline

Definition at line 59 of file IOVSyncValue.h.

59  {
60  return doOp<std::greater>(iRHS);
61  }
bool fwlite::IOVSyncValue::operator>= ( const IOVSyncValue iRHS) const
inline

Definition at line 62 of file IOVSyncValue.h.

62  {
63  return doOp<std::greater_equal>(iRHS);
64  }
const edm::Timestamp& fwlite::IOVSyncValue::time ( ) const
inline

Definition at line 44 of file IOVSyncValue.h.

References time_.

Referenced by FWLiteESSource::setIntervalFor().

44 {return time_; }
edm::Timestamp time_
Definition: IOVSyncValue.h:105

Member Data Documentation

edm::EventID fwlite::IOVSyncValue::eventID_
private

Definition at line 104 of file IOVSyncValue.h.

Referenced by doOp(), eventID(), and luminosityBlockNumber().

bool fwlite::IOVSyncValue::haveID_
private

Definition at line 106 of file IOVSyncValue.h.

Referenced by doOp().

bool fwlite::IOVSyncValue::haveTime_
private

Definition at line 107 of file IOVSyncValue.h.

Referenced by doOp().

edm::Timestamp fwlite::IOVSyncValue::time_
private

Definition at line 105 of file IOVSyncValue.h.

Referenced by doOp(), and time().