CMS 3D CMS Logo

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

#include <IOVSyncValue.h>

Public Member Functions

bool comparable (const IOVSyncValue &iOther) const
 
const EventIDeventID () const
 
 IOVSyncValue ()
 
 IOVSyncValue (const EventID &iID)
 
 IOVSyncValue (const Timestamp &iTime)
 
 IOVSyncValue (const EventID &iID, const Timestamp &iTime)
 
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 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
 
void throwInvalidComparison () const
 

Private Attributes

EventID eventID_
 
bool haveID_
 
bool haveTime_
 
Timestamp time_
 

Detailed Description

Definition at line 31 of file IOVSyncValue.h.

Constructor & Destructor Documentation

IOVSyncValue::IOVSyncValue ( )

Definition at line 32 of file IOVSyncValue.cc.

32 : eventID_(), time_(), haveID_(true), haveTime_(true) {}
IOVSyncValue::IOVSyncValue ( const EventID iID)
explicit

Definition at line 34 of file IOVSyncValue.cc.

34 : eventID_(iID), time_(), haveID_(true), haveTime_(false) {}
IOVSyncValue::IOVSyncValue ( const Timestamp iTime)
explicit

Definition at line 36 of file IOVSyncValue.cc.

36 : eventID_(), time_(iTime), haveID_(false), haveTime_(true) {}
IOVSyncValue::IOVSyncValue ( const EventID iID,
const Timestamp iTime 
)

Definition at line 38 of file IOVSyncValue.cc.

39  : eventID_(iID), time_(iTime), haveID_(true), haveTime_(true) {}

Member Function Documentation

const IOVSyncValue & IOVSyncValue::beginOfTime ( )
static

Definition at line 88 of file IOVSyncValue.cc.

References edm::Timestamp::beginOfTime().

Referenced by AlignmentProducerBase::applyDB(), CTPPSRPAlignmentCorrectionsMethods::iovValueToString(), CTPPSRPAlignmentCorrectionsMethods::loadFromXML(), SiStripApvSimulationParametersESSource::setIntervalFor(), Phase2TrackerCablingCfgESSource::setIntervalFor(), SiPixelFakeGenErrorDBObjectESSource::setIntervalFor(), SiPixelFakeTemplateDBObjectESSource::setIntervalFor(), SiStripFedCablingFakeESSource::setIntervalFor(), CTPPSLHCInfoESSource::setIntervalFor(), RPCPerformanceESSource::setIntervalFor(), SiStripGainESSource::setIntervalFor(), SiStripNoiseESSource::setIntervalFor(), SiStripPedestalsESSource::setIntervalFor(), XMLIdealGeometryESSource::setIntervalFor(), PhysicsTools::MVAComputerESSourceImpl< RecordType >::setIntervalFor(), EcalMultifitParametersGPUESProducer::setIntervalFor(), HcalMahiPulseOffsetsGPUESProducer::setIntervalFor(), SiStripTemplateEmptyFakeESSource< TObject, TRecord >::setIntervalFor(), HBHEDarkeningEP::setIntervalFor(), CSCFakeNoiseMatrixConditions::setIntervalFor(), HcalTimeSlewEP::setIntervalFor(), SiStripConfObjectFakeESSource::setIntervalFor(), CSCFakeDBGains::setIntervalFor(), EcalRecHitParametersGPUESProducer::setIntervalFor(), CSCNoiseMatrixConditions::setIntervalFor(), CSCCrosstalkConditions::setIntervalFor(), CSCGainsConditions::setIntervalFor(), SiStripApvGainFakeESSource::setIntervalFor(), SiStripQualityFakeESSource::setIntervalFor(), CSCNoiseMatrixDBConditions::setIntervalFor(), SiStripThresholdFakeESSource::setIntervalFor(), CSCPedestalsDBConditions::setIntervalFor(), CSCL1TPParametersConditions::setIntervalFor(), SiStripPedestalsFakeESSource::setIntervalFor(), BeamSpotFakeConditions::setIntervalFor(), CSCCrosstalkDBConditions::setIntervalFor(), SiStripLatencyFakeESSource::setIntervalFor(), CSCFakeDBCrosstalk::setIntervalFor(), CSCFakeDBNoiseMatrix::setIntervalFor(), CSCFakeDBPedestals::setIntervalFor(), CSCBadChambersConditions::setIntervalFor(), SiStripBackPlaneCorrectionFakeESSource::setIntervalFor(), CSCGainsDBConditions::setIntervalFor(), SiStripBaseDelayFakeESSource::setIntervalFor(), CSCBadStripsConditions::setIntervalFor(), CSCL1TPLookupTableEP::setIntervalFor(), CSCBadWiresConditions::setIntervalFor(), CSCGasGainCorrectionDBConditions::setIntervalFor(), SiStripBadModuleConfigurableFakeESSource::setIntervalFor(), CSCChamberIndexValues::setIntervalFor(), CSCChamberMapValues::setIntervalFor(), CSCCrateMapValues::setIntervalFor(), CSCDDUMapValues::setIntervalFor(), CSCChipSpeedCorrectionDBConditions::setIntervalFor(), CSCFakeCrosstalkConditions::setIntervalFor(), CSCChamberTimeCorrectionsValues::setIntervalFor(), HiTrivialConditionRetriever::setIntervalFor(), SiStripNoisesFakeESSource::setIntervalFor(), CSCFakeGainsConditions::setIntervalFor(), CSCFakePedestalsConditions::setIntervalFor(), HepPDTESSource::setIntervalFor(), edm::eventsetup::IntersectingIOVRecordIntervalFinder::setIntervalFor(), SiStripLorentzAngleFakeESSource::setIntervalFor(), CastorTextCalibrations::setIntervalFor(), SiPixelFakeGainOfflineESSource::setIntervalFor(), SiPixelFakeGainForHLTESSource::setIntervalFor(), SiPixelFakeLorentzAngleESSource::setIntervalFor(), SiPixelFakeGainESSource::setIntervalFor(), PPSTimingCalibrationESSource::setIntervalFor(), edm::test::EventSetupTestHelper::setIntervalFor(), SiPixelFakeQualityESSource::setIntervalFor(), DDCompactViewMFESProducer::setIntervalFor(), SiPhase2OuterTrackerFakeLorentzAngleESSource::setIntervalFor(), CastorHardcodeCalibrations::setIntervalFor(), DTFakeT0ESProducer::setIntervalFor(), PPSAlignmentConfigurationESSource::setIntervalFor(), edm::ESProducerLooper::setIntervalFor(), SiPixelQualityESProducer::setIntervalFor(), PPSAlignmentConfigESSource::setIntervalFor(), edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), CaloMiscalibToolsMC::setIntervalFor(), CaloMiscalibTools::setIntervalFor(), ESTrivialConditionRetriever::setIntervalFor(), HcalHardcodeCalibrations::setIntervalFor(), PPSPixelTopologyESSource::setIntervalFor(), SiStripFedCablingBuilderFromDb::setIntervalFor(), CTPPSBeamParametersESSource::setIntervalFor(), JetCorrectionESSource< Corrector >::setIntervalFor(), FakeAlignmentSource::setIntervalFor(), HcalTextCalibrations::setIntervalFor(), CondDBESSource::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), CTPPSRPAlignmentCorrectionsMethods::stringToIOVValue(), and CTPPSRPAlignmentCorrectionsMethods::writeToXML().

88  {
89  static const IOVSyncValue s_beginOfTime(EventID(1, 0, 0), Timestamp::beginOfTime());
90  return s_beginOfTime;
91  }
static Timestamp beginOfTime()
Definition: Timestamp.h:84
bool edm::IOVSyncValue::comparable ( const IOVSyncValue iOther) const
inline

returns true if comparison operations are possible. Comparisons only fail if a time only value is compared to a run/lumi/event only value.

Definition at line 55 of file IOVSyncValue.h.

References haveID_, and haveTime_.

Referenced by operator!=(), operator==(), and edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor().

55  {
56  return (haveID_ == iOther.haveID_) || (haveTime_ == iOther.haveTime_);
57  }
template<template< typename > class Op>
bool edm::IOVSyncValue::doOp ( const IOVSyncValue iRHS) const
inlineprivate

Definition at line 72 of file IOVSyncValue.h.

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

72  {
73  bool returnValue = false;
74  if (haveID_ && iRHS.haveID_) {
75  if (luminosityBlockNumber() == 0 || iRHS.luminosityBlockNumber() == 0 ||
76  luminosityBlockNumber() == iRHS.luminosityBlockNumber()) {
77  Op<EventID> op;
78  returnValue = op(eventID_, iRHS.eventID_);
79  } else {
80  if (iRHS.eventID_.run() == eventID_.run()) {
81  Op<LuminosityBlockNumber_t> op;
82  returnValue = op(luminosityBlockNumber(), iRHS.luminosityBlockNumber());
83  } else {
84  Op<RunNumber_t> op;
85  returnValue = op(eventID_.run(), iRHS.eventID_.run());
86  }
87  }
88 
89  } else if (haveTime_ && iRHS.haveTime_) {
90  Op<Timestamp> op;
91  returnValue = op(time_, iRHS.time_);
92  } else {
93  //error
95  }
96  return returnValue;
97  }
RunNumber_t run() const
Definition: EventID.h:38
void throwInvalidComparison() const
Definition: IOVSyncValue.cc:69
LuminosityBlockNumber_t luminosityBlockNumber() const
Definition: IOVSyncValue.h:41
const IOVSyncValue & IOVSyncValue::endOfTime ( )
static

Definition at line 82 of file IOVSyncValue.cc.

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

Referenced by EcalTestDevDB::analyze(), AlignmentProducerBase::applyDB(), CTPPSRPAlignmentCorrectionsMethods::iovValueToString(), CTPPSRPAlignmentCorrectionsMethods::loadFromXML(), SiStripApvSimulationParametersESSource::setIntervalFor(), Phase2TrackerCablingCfgESSource::setIntervalFor(), edm::EmptyESSource::setIntervalFor(), SiPixelFakeGenErrorDBObjectESSource::setIntervalFor(), SiPixelFakeTemplateDBObjectESSource::setIntervalFor(), SiStripFedCablingFakeESSource::setIntervalFor(), CTPPSLHCInfoESSource::setIntervalFor(), RPCPerformanceESSource::setIntervalFor(), SiStripGainESSource::setIntervalFor(), SiStripNoiseESSource::setIntervalFor(), SiStripPedestalsESSource::setIntervalFor(), XMLIdealGeometryESSource::setIntervalFor(), PhysicsTools::MVAComputerESSourceImpl< RecordType >::setIntervalFor(), EcalMultifitParametersGPUESProducer::setIntervalFor(), HcalMahiPulseOffsetsGPUESProducer::setIntervalFor(), SiStripTemplateEmptyFakeESSource< TObject, TRecord >::setIntervalFor(), HBHEDarkeningEP::setIntervalFor(), HcalTimeSlewEP::setIntervalFor(), CSCFakeNoiseMatrixConditions::setIntervalFor(), SiStripConfObjectFakeESSource::setIntervalFor(), EcalRecHitParametersGPUESProducer::setIntervalFor(), CSCFakeDBGains::setIntervalFor(), SiStripQualityFakeESSource::setIntervalFor(), CSCNoiseMatrixConditions::setIntervalFor(), CSCCrosstalkConditions::setIntervalFor(), CSCGainsConditions::setIntervalFor(), SiStripApvGainFakeESSource::setIntervalFor(), CSCNoiseMatrixDBConditions::setIntervalFor(), SiStripThresholdFakeESSource::setIntervalFor(), CSCPedestalsDBConditions::setIntervalFor(), CSCCrosstalkDBConditions::setIntervalFor(), SiStripPedestalsFakeESSource::setIntervalFor(), CSCFakeDBCrosstalk::setIntervalFor(), CSCFakeDBNoiseMatrix::setIntervalFor(), SiStripLatencyFakeESSource::setIntervalFor(), CSCFakeDBPedestals::setIntervalFor(), CSCBadChambersConditions::setIntervalFor(), BeamSpotFakeConditions::setIntervalFor(), SiStripBackPlaneCorrectionFakeESSource::setIntervalFor(), SiStripBaseDelayFakeESSource::setIntervalFor(), CSCBadStripsConditions::setIntervalFor(), CSCGainsDBConditions::setIntervalFor(), CSCBadWiresConditions::setIntervalFor(), CSCL1TPLookupTableEP::setIntervalFor(), CSCL1TPParametersConditions::setIntervalFor(), CSCGasGainCorrectionDBConditions::setIntervalFor(), SiStripBadModuleConfigurableFakeESSource::setIntervalFor(), CSCChamberIndexValues::setIntervalFor(), CSCChamberMapValues::setIntervalFor(), CSCCrateMapValues::setIntervalFor(), CSCDDUMapValues::setIntervalFor(), CSCChipSpeedCorrectionDBConditions::setIntervalFor(), CSCChamberTimeCorrectionsValues::setIntervalFor(), CSCFakeCrosstalkConditions::setIntervalFor(), SiStripNoisesFakeESSource::setIntervalFor(), HiTrivialConditionRetriever::setIntervalFor(), CSCFakeGainsConditions::setIntervalFor(), CSCFakePedestalsConditions::setIntervalFor(), HepPDTESSource::setIntervalFor(), edm::eventsetup::IntersectingIOVRecordIntervalFinder::setIntervalFor(), SiStripLorentzAngleFakeESSource::setIntervalFor(), CastorTextCalibrations::setIntervalFor(), SiPixelFakeGainForHLTESSource::setIntervalFor(), SiPixelFakeGainOfflineESSource::setIntervalFor(), SiPixelFakeGainESSource::setIntervalFor(), SiPixelFakeLorentzAngleESSource::setIntervalFor(), PPSTimingCalibrationESSource::setIntervalFor(), edm::test::EventSetupTestHelper::setIntervalFor(), SiPixelFakeQualityESSource::setIntervalFor(), DDCompactViewMFESProducer::setIntervalFor(), CastorHardcodeCalibrations::setIntervalFor(), SiPhase2OuterTrackerFakeLorentzAngleESSource::setIntervalFor(), DTFakeT0ESProducer::setIntervalFor(), PPSAlignmentConfigurationESSource::setIntervalFor(), edm::ESProducerLooper::setIntervalFor(), CTPPSRPAlignmentCorrectionsDataESSourceXML::setIntervalFor(), SiPixelQualityESProducer::setIntervalFor(), PPSAlignmentConfigESSource::setIntervalFor(), edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), CaloMiscalibToolsMC::setIntervalFor(), CaloMiscalibTools::setIntervalFor(), ESTrivialConditionRetriever::setIntervalFor(), HcalHardcodeCalibrations::setIntervalFor(), PPSPixelTopologyESSource::setIntervalFor(), SiStripFedCablingBuilderFromDb::setIntervalFor(), CTPPSBeamParametersESSource::setIntervalFor(), JetCorrectionESSource< Corrector >::setIntervalFor(), FakeAlignmentSource::setIntervalFor(), HcalTextCalibrations::setIntervalFor(), FWLiteESSource::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), CTPPSRPAlignmentCorrectionsMethods::stringToIOVValue(), and CTPPSRPAlignmentCorrectionsMethods::writeToXML().

82  {
83  static const IOVSyncValue s_endOfTime(
86  return s_endOfTime;
87  }
static Timestamp endOfTime()
Definition: Timestamp.h:83
static LuminosityBlockNumber_t maxLuminosityBlockNumber()
static EventNumber_t maxEventNumber()
Definition: EventID.h:96
const EventID& edm::IOVSyncValue::eventID ( ) const
inline

Definition at line 40 of file IOVSyncValue.h.

References eventID_.

Referenced by EcalTestDevDB::analyze(), BTagPerformaceRootProducerFromSQLITE::analyze(), AlignmentProducerBase::applyDB(), MillePedeAlignmentAlgorithm::beginRun(), cond::time::fromIOVSyncValue(), HIPAlignmentAlgorithm::initialize(), CTPPSRPAlignmentCorrectionsMethods::iovValueToString(), cond::time::limitedIOVSyncValue(), CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon::Merge(), RunInfoTestESProducer::produce(), DIPLumiProducer::produceDetail(), LumiCorrectionSource::produceLumiCorrectionParam(), DIPLumiProducer::produceSummary(), DTConfigDBProducer::readDTCCBConfig(), CTPPSLHCInfoESSource::setIntervalFor(), CTPPSOpticalFunctionsESSource::setIntervalFor(), CTPPSLHCInfoRandomXangleESSource::setIntervalFor(), PPSAssociationCutsESSource::setIntervalFor(), CastorHardcodeCalibrations::setIntervalFor(), PPSAlignmentConfigurationESSource::setIntervalFor(), CTPPSRPAlignmentCorrectionsDataESSourceXML::setIntervalFor(), PPSAlignmentConfigESSource::setIntervalFor(), edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), HcalHardcodeCalibrations::setIntervalFor(), PPSPixelTopologyESSource::setIntervalFor(), CTPPSBeamParametersESSource::setIntervalFor(), CondDBESSource::setIntervalFor(), FWLiteESSource::setIntervalFor(), CTPPSCompositeESSource::setIntervalFor(), CTPPSPixelDAQMappingESSourceXML::setIntervalFor(), and TotemDAQMappingESSourceXML::setIntervalFor().

40 { return eventID_; }
const IOVSyncValue & IOVSyncValue::invalidIOVSyncValue ( )
static
LuminosityBlockNumber_t edm::IOVSyncValue::luminosityBlockNumber ( ) const
inline
bool edm::IOVSyncValue::operator!= ( const IOVSyncValue iRHS) const
inline

Definition at line 45 of file IOVSyncValue.h.

References comparable().

45 { return (!comparable(iRHS)) || doOp<std::not_equal_to>(iRHS); }
bool comparable(const IOVSyncValue &iOther) const
Definition: IOVSyncValue.h:55
bool edm::IOVSyncValue::operator< ( const IOVSyncValue iRHS) const
inline

Definition at line 47 of file IOVSyncValue.h.

47 { return doOp<std::less>(iRHS); }
bool edm::IOVSyncValue::operator<= ( const IOVSyncValue iRHS) const
inline

Definition at line 48 of file IOVSyncValue.h.

48 { return doOp<std::less_equal>(iRHS); }
bool edm::IOVSyncValue::operator== ( const IOVSyncValue iRHS) const
inline

Definition at line 44 of file IOVSyncValue.h.

References comparable().

44 { return comparable(iRHS) && doOp<std::equal_to>(iRHS); }
bool comparable(const IOVSyncValue &iOther) const
Definition: IOVSyncValue.h:55
bool edm::IOVSyncValue::operator> ( const IOVSyncValue iRHS) const
inline

Definition at line 49 of file IOVSyncValue.h.

49 { return doOp<std::greater>(iRHS); }
bool edm::IOVSyncValue::operator>= ( const IOVSyncValue iRHS) const
inline

Definition at line 50 of file IOVSyncValue.h.

50 { return doOp<std::greater_equal>(iRHS); }
void IOVSyncValue::throwInvalidComparison ( ) const
private

Definition at line 69 of file IOVSyncValue.cc.

References Exception.

Referenced by doOp().

69  {
70  throw cms::Exception("InvalidIOVSyncValueComparison")
71  << "Attempted to compare a time-only and a run/lumi/event-only IOVSyncValue. Please report this error to the "
72  "framework experts.";
73  }
const Timestamp& edm::IOVSyncValue::time ( ) const
inline

Member Data Documentation

EventID edm::IOVSyncValue::eventID_
private

Definition at line 100 of file IOVSyncValue.h.

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

bool edm::IOVSyncValue::haveID_
private

Definition at line 102 of file IOVSyncValue.h.

Referenced by comparable(), and doOp().

bool edm::IOVSyncValue::haveTime_
private

Definition at line 103 of file IOVSyncValue.h.

Referenced by comparable(), and doOp().

Timestamp edm::IOVSyncValue::time_
private

Definition at line 101 of file IOVSyncValue.h.

Referenced by doOp(), and time().