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 SiPixelFakeGainESSource::setIntervalFor(), CSCNoiseMatrixDBConditions::setIntervalFor(), ESTrivialConditionRetriever::setIntervalFor(), SiStripNoiseESSource::setIntervalFor(), SiPixelFakeLorentzAngleESSource::setIntervalFor(), CSCFakeDBNoiseMatrix::setIntervalFor(), CaloMiscalibToolsMC::setIntervalFor(), XMLIdealGeometryESSource::setIntervalFor(), CSCCrateMapValues::setIntervalFor(), ElectronLikelihoodESSource::setIntervalFor(), RingESSource::setIntervalFor(), JetCorrectionService< Corrector >::setIntervalFor(), CSCChamberIndexValues::setIntervalFor(), SiStripFedCablingBuilderFromDb::setIntervalFor(), SiStripGainESSource::setIntervalFor(), SiStripTemplateEmptyFakeESSource< TObject, TRecord >::setIntervalFor(), DTFakeT0ESProducer::setIntervalFor(), CSCCrosstalkDBConditions::setIntervalFor(), CastorHardcodeCalibrations::setIntervalFor(), CSCChamberTimeCorrectionsValues::setIntervalFor(), HepPDTESSource::setIntervalFor(), SiPixelFakeGainOfflineESSource::setIntervalFor(), CSCFakeCrosstalkConditions::setIntervalFor(), CSCChipSpeedCorrectionDBConditions::setIntervalFor(), SiPixelFakeGainForHLTESSource::setIntervalFor(), CSCL1TPParametersConditions::setIntervalFor(), CaloTPGTranscoderULUTs::setIntervalFor(), CSCDDUMapValues::setIntervalFor(), SiPixelFakeCPEGenericErrorParmESSource::setIntervalFor(), CSCGainsConditions::setIntervalFor(), CSCFakeGainsConditions::setIntervalFor(), CSCBadStripsConditions::setIntervalFor(), CSCBadChambersConditions::setIntervalFor(), RoadMapESSource::setIntervalFor(), HiTrivialConditionRetriever::setIntervalFor(), CaloMiscalibTools::setIntervalFor(), SiStripHashedDetIdFakeESSource::setIntervalFor(), HcalTextCalibrations::setIntervalFor(), RPCPerformanceESSource::setIntervalFor(), CSCCrosstalkConditions::setIntervalFor(), CSCBadWiresConditions::setIntervalFor(), BeamSpotFakeConditions::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(), JetCorrectionServiceChain::setIntervalFor(), SiPixelQualityESProducer::setIntervalFor(), DTFakeTTrigESProducer::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), edm::eventsetup::IntersectingIOVRecordIntervalFinder::setIntervalFor(), CSCChamberMapValues::setIntervalFor(), PhysicsTools::MVAComputerESSourceImpl< RecordType >::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_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(), ESTrivialConditionRetriever::setIntervalFor(), CSCNoiseMatrixDBConditions::setIntervalFor(), SiPixelFakeGainESSource::setIntervalFor(), CSCCrateMapValues::setIntervalFor(), XMLIdealGeometryESSource::setIntervalFor(), CaloMiscalibToolsMC::setIntervalFor(), CSCFakeDBNoiseMatrix::setIntervalFor(), SiPixelFakeLorentzAngleESSource::setIntervalFor(), SiStripNoiseESSource::setIntervalFor(), RingESSource::setIntervalFor(), ElectronLikelihoodESSource::setIntervalFor(), SiStripFedCablingBuilderFromDb::setIntervalFor(), CSCChamberIndexValues::setIntervalFor(), JetCorrectionService< Corrector >::setIntervalFor(), CSCChamberTimeCorrectionsValues::setIntervalFor(), CastorHardcodeCalibrations::setIntervalFor(), CSCCrosstalkDBConditions::setIntervalFor(), DTFakeT0ESProducer::setIntervalFor(), SiStripTemplateEmptyFakeESSource< TObject, TRecord >::setIntervalFor(), SiStripGainESSource::setIntervalFor(), CSCChipSpeedCorrectionDBConditions::setIntervalFor(), CSCFakeCrosstalkConditions::setIntervalFor(), SiPixelFakeGainOfflineESSource::setIntervalFor(), HepPDTESSource::setIntervalFor(), CaloTPGTranscoderULUTs::setIntervalFor(), CSCL1TPParametersConditions::setIntervalFor(), SiPixelFakeGainForHLTESSource::setIntervalFor(), CSCDDUMapValues::setIntervalFor(), RoadMapESSource::setIntervalFor(), CSCBadChambersConditions::setIntervalFor(), CSCBadStripsConditions::setIntervalFor(), CSCFakeGainsConditions::setIntervalFor(), CSCGainsConditions::setIntervalFor(), SiPixelFakeCPEGenericErrorParmESSource::setIntervalFor(), edm::EmptyESSource::setIntervalFor(), CaloMiscalibTools::setIntervalFor(), HiTrivialConditionRetriever::setIntervalFor(), FWLiteESSource::setIntervalFor(), HcalTextCalibrations::setIntervalFor(), SiStripHashedDetIdFakeESSource::setIntervalFor(), BeamSpotFakeConditions::setIntervalFor(), CSCBadWiresConditions::setIntervalFor(), CSCCrosstalkConditions::setIntervalFor(), RPCPerformanceESSource::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(), PhysicsTools::MVAComputerESSourceImpl< RecordType >::setIntervalFor(), CSCChamberMapValues::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), DTFakeTTrigESProducer::setIntervalFor(), SiPixelQualityESProducer::setIntervalFor(), edm::eventsetup::IntersectingIOVRecordIntervalFinder::setIntervalFor(), JetCorrectionServiceChain::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_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]

Definition at line 43 of file IOVSyncValue.h.

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

Referenced by doOp(), cond::fromIOVSyncValue(), cond::limitedIOVSyncValue(), and CondDBESSource::setIntervalFor().

{ return eventID_.luminosityBlock();}
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().