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