CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

edm::IOVSyncValue Class Reference

#include <IOVSyncValue.h>

List of all members.

Public Member Functions

bool comparable (const IOVSyncValue &iOther) const
const EventIDeventID () const
 IOVSyncValue ()
 IOVSyncValue (const EventID &iID, const Timestamp &iTime)
 IOVSyncValue (const EventID &iID)
 IOVSyncValue (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 33 of file IOVSyncValue.cc.

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

Definition at line 38 of file IOVSyncValue.cc.

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

Definition at line 43 of file IOVSyncValue.cc.

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

Definition at line 48 of file IOVSyncValue.cc.

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

Member Function Documentation

const IOVSyncValue & IOVSyncValue::beginOfTime ( ) [static]

Definition at line 103 of file IOVSyncValue.cc.

References edm::Timestamp::beginOfTime().

Referenced by AlignmentProducer::applyDB(), SiPixelFakeGainESSource::setIntervalFor(), CSCNoiseMatrixDBConditions::setIntervalFor(), ESTrivialConditionRetriever::setIntervalFor(), CSCCrateMapValues::setIntervalFor(), XMLIdealGeometryESSource::setIntervalFor(), SiStripNoiseESSource::setIntervalFor(), SiPixelFakeLorentzAngleESSource::setIntervalFor(), CSCFakeDBNoiseMatrix::setIntervalFor(), CaloMiscalibToolsMC::setIntervalFor(), RingESSource::setIntervalFor(), ElectronLikelihoodESSource::setIntervalFor(), SiStripFedCablingBuilderFromDb::setIntervalFor(), CSCChamberIndexValues::setIntervalFor(), CSCChamberTimeCorrectionsValues::setIntervalFor(), SiStripGainESSource::setIntervalFor(), SiStripTemplateEmptyFakeESSource< TObject, TRecord >::setIntervalFor(), DTFakeT0ESProducer::setIntervalFor(), CSCCrosstalkDBConditions::setIntervalFor(), CastorHardcodeCalibrations::setIntervalFor(), SiPixelFakeGainOfflineESSource::setIntervalFor(), CSCFakeCrosstalkConditions::setIntervalFor(), CSCChipSpeedCorrectionDBConditions::setIntervalFor(), HepPDTESSource::setIntervalFor(), SiPixelFakeGainForHLTESSource::setIntervalFor(), CSCL1TPParametersConditions::setIntervalFor(), CaloTPGTranscoderULUTs::setIntervalFor(), CSCDDUMapValues::setIntervalFor(), RoadMapESSource::setIntervalFor(), SiPixelFakeCPEGenericErrorParmESSource::setIntervalFor(), CSCGainsConditions::setIntervalFor(), CSCFakeGainsConditions::setIntervalFor(), CSCBadStripsConditions::setIntervalFor(), CSCBadChambersConditions::setIntervalFor(), JetCorrectionESSource< Corrector >::setIntervalFor(), CaloMiscalibTools::setIntervalFor(), HiTrivialConditionRetriever::setIntervalFor(), SiStripHashedDetIdFakeESSource::setIntervalFor(), HcalTextCalibrations::setIntervalFor(), BeamSpotFakeConditions::setIntervalFor(), RPCPerformanceESSource::setIntervalFor(), CSCGasGainCorrectionDBConditions::setIntervalFor(), CSCCrosstalkConditions::setIntervalFor(), CSCBadWiresConditions::setIntervalFor(), CSCGainsDBConditions::setIntervalFor(), CSCFakePedestalsConditions::setIntervalFor(), CSCFakeDBGains::setIntervalFor(), CastorTextCalibrations::setIntervalFor(), HcalOmdsCalibrations::setIntervalFor(), SiStripTemplateFakeESSource< TObject, TRecord, TService >::setIntervalFor(), SiStripQualityFakeESSource::setIntervalFor(), SiStripFedCablingFakeESSource::setIntervalFor(), DTFakeVDriftESProducer::setIntervalFor(), CSCPedestalsDBConditions::setIntervalFor(), CSCFakeNoiseMatrixConditions::setIntervalFor(), PhysicsTools::MVAComputerESSourceImpl< RecordType >::setIntervalFor(), CSCChamberMapValues::setIntervalFor(), edm::eventsetup::IntersectingIOVRecordIntervalFinder::setIntervalFor(), SiPixelQualityESProducer::setIntervalFor(), DTFakeTTrigESProducer::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), edm::ESProducerLooper::setIntervalFor(), SiStripPedestalsESSource::setIntervalFor(), SiPixelFakeQualityESSource::setIntervalFor(), CSCNoiseMatrixConditions::setIntervalFor(), HcalHardcodeCalibrations::setIntervalFor(), edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), SiPixelFakeTemplateDBObjectESSource::setIntervalFor(), CSCFakeDBPedestals::setIntervalFor(), CSCFakeDBCrosstalk::setIntervalFor(), and FakeAlignmentSource::setIntervalFor().

                          {
   static IOVSyncValue s_beginOfTime(EventID(1,0,0), Timestamp::beginOfTime());
   return s_beginOfTime;
}
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 69 of file IOVSyncValue.h.

References haveID_, and haveTime_.

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

                                                        {
        return (haveID_==iOther.haveID_) || (haveTime_==iOther.haveTime_);
      }
template<template< typename > class Op>
bool edm::IOVSyncValue::doOp ( const IOVSyncValue iRHS) const [inline, private]

Definition at line 86 of file IOVSyncValue.h.

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

                                                   {
            bool returnValue = false;
            if(haveID_ && iRHS.haveID_) {
               if(luminosityBlockNumber()==0 || iRHS.luminosityBlockNumber()==0 || luminosityBlockNumber()==iRHS.luminosityBlockNumber()) {
                  Op<EventID> op;
                  returnValue = op(eventID_, iRHS.eventID_);
               } else {
                  if(iRHS.eventID_.run() == eventID_.run()) {
                     Op<LuminosityBlockNumber_t> op;
                     returnValue = op(luminosityBlockNumber(), iRHS.luminosityBlockNumber());
                  } else {
                     Op<RunNumber_t> op;
                     returnValue = op(eventID_.run(), iRHS.eventID_.run());
                  }
               }

            } else if (haveTime_ && iRHS.haveTime_) {
               Op<Timestamp> op;
               returnValue = op(time_, iRHS.time_);
            } else {
               //error
               throwInvalidComparison();
            }
            return returnValue;
         }
const IOVSyncValue & IOVSyncValue::endOfTime ( ) [static]

Definition at line 97 of file IOVSyncValue.cc.

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

Referenced by EcalTestDevDB::analyze(), AlignmentProducer::applyDB(), SiPixelFakeGainESSource::setIntervalFor(), CSCNoiseMatrixDBConditions::setIntervalFor(), ESTrivialConditionRetriever::setIntervalFor(), CSCCrateMapValues::setIntervalFor(), XMLIdealGeometryESSource::setIntervalFor(), SiStripNoiseESSource::setIntervalFor(), SiPixelFakeLorentzAngleESSource::setIntervalFor(), CSCFakeDBNoiseMatrix::setIntervalFor(), CaloMiscalibToolsMC::setIntervalFor(), RingESSource::setIntervalFor(), ElectronLikelihoodESSource::setIntervalFor(), SiStripFedCablingBuilderFromDb::setIntervalFor(), CSCChamberIndexValues::setIntervalFor(), CSCChamberTimeCorrectionsValues::setIntervalFor(), SiStripGainESSource::setIntervalFor(), SiStripTemplateEmptyFakeESSource< TObject, TRecord >::setIntervalFor(), DTFakeT0ESProducer::setIntervalFor(), CSCCrosstalkDBConditions::setIntervalFor(), CastorHardcodeCalibrations::setIntervalFor(), SiPixelFakeGainOfflineESSource::setIntervalFor(), CSCFakeCrosstalkConditions::setIntervalFor(), CSCChipSpeedCorrectionDBConditions::setIntervalFor(), HepPDTESSource::setIntervalFor(), SiPixelFakeGainForHLTESSource::setIntervalFor(), CSCL1TPParametersConditions::setIntervalFor(), CaloTPGTranscoderULUTs::setIntervalFor(), CSCDDUMapValues::setIntervalFor(), RoadMapESSource::setIntervalFor(), SiPixelFakeCPEGenericErrorParmESSource::setIntervalFor(), CSCGainsConditions::setIntervalFor(), CSCFakeGainsConditions::setIntervalFor(), CSCBadStripsConditions::setIntervalFor(), CSCBadChambersConditions::setIntervalFor(), edm::EmptyESSource::setIntervalFor(), JetCorrectionESSource< Corrector >::setIntervalFor(), CaloMiscalibTools::setIntervalFor(), HiTrivialConditionRetriever::setIntervalFor(), FWLiteESSource::setIntervalFor(), SiStripHashedDetIdFakeESSource::setIntervalFor(), HcalTextCalibrations::setIntervalFor(), BeamSpotFakeConditions::setIntervalFor(), RPCPerformanceESSource::setIntervalFor(), CSCGasGainCorrectionDBConditions::setIntervalFor(), CSCCrosstalkConditions::setIntervalFor(), CSCBadWiresConditions::setIntervalFor(), CSCGainsDBConditions::setIntervalFor(), CSCFakePedestalsConditions::setIntervalFor(), CSCFakeDBGains::setIntervalFor(), CastorTextCalibrations::setIntervalFor(), HcalOmdsCalibrations::setIntervalFor(), SiStripTemplateFakeESSource< TObject, TRecord, TService >::setIntervalFor(), SiStripQualityFakeESSource::setIntervalFor(), SiStripFedCablingFakeESSource::setIntervalFor(), DTFakeVDriftESProducer::setIntervalFor(), CSCPedestalsDBConditions::setIntervalFor(), CSCFakeNoiseMatrixConditions::setIntervalFor(), PhysicsTools::MVAComputerESSourceImpl< RecordType >::setIntervalFor(), CSCChamberMapValues::setIntervalFor(), SiPixelQualityESProducer::setIntervalFor(), DTFakeTTrigESProducer::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), edm::eventsetup::IntersectingIOVRecordIntervalFinder::setIntervalFor(), SiStripPedestalsESSource::setIntervalFor(), SiPixelFakeQualityESSource::setIntervalFor(), CSCNoiseMatrixConditions::setIntervalFor(), HcalHardcodeCalibrations::setIntervalFor(), edm::ESProducerLooper::setIntervalFor(), SiPixelFakeTemplateDBObjectESSource::setIntervalFor(), CSCFakeDBPedestals::setIntervalFor(), CSCFakeDBCrosstalk::setIntervalFor(), FakeAlignmentSource::setIntervalFor(), and edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor().

                        {
   static IOVSyncValue s_endOfTime(EventID(0xFFFFFFFFUL, LuminosityBlockID::maxLuminosityBlockNumber(), EventID::maxEventNumber()),
                                   Timestamp::endOfTime());
   return s_endOfTime;
}
const EventID& edm::IOVSyncValue::eventID ( ) const [inline]
const IOVSyncValue & IOVSyncValue::invalidIOVSyncValue ( ) [static]
LuminosityBlockNumber_t edm::IOVSyncValue::luminosityBlockNumber ( ) const [inline]
bool edm::IOVSyncValue::operator!= ( const IOVSyncValue iRHS) const [inline]

Definition at line 49 of file IOVSyncValue.h.

References comparable().

                                                      {
        return (!comparable(iRHS)) || doOp<std::not_equal_to>(iRHS);
      }
bool edm::IOVSyncValue::operator< ( const IOVSyncValue iRHS) const [inline]

Definition at line 53 of file IOVSyncValue.h.

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

Definition at line 56 of file IOVSyncValue.h.

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

Definition at line 46 of file IOVSyncValue.h.

References comparable().

                                                      {
         return comparable(iRHS) && doOp<std::equal_to>(iRHS);
      }
bool edm::IOVSyncValue::operator> ( const IOVSyncValue iRHS) const [inline]

Definition at line 59 of file IOVSyncValue.h.

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

Definition at line 62 of file IOVSyncValue.h.

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

Definition at line 83 of file IOVSyncValue.cc.

References Exception.

Referenced by doOp().

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

Member Data Documentation

Definition at line 113 of file IOVSyncValue.h.

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

Definition at line 115 of file IOVSyncValue.h.

Referenced by comparable(), and doOp().

Definition at line 116 of file IOVSyncValue.h.

Referenced by comparable(), and doOp().

Definition at line 114 of file IOVSyncValue.h.

Referenced by doOp(), and time().