CMS 3D CMS Logo

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

fwlite::IOVSyncValue Class Reference

#include <IOVSyncValue.h>

List of all members.

Public Member Functions

const edm::EventIDeventID () const
 IOVSyncValue ()
 IOVSyncValue (const edm::EventID &iID, const edm::Timestamp &iTime)
 IOVSyncValue (const edm::EventID &iID)
 IOVSyncValue (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.

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

Definition at line 38 of file IOVSyncValue.cc.

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

Definition at line 43 of file IOVSyncValue.cc.

                                                    : eventID_(), time_(iTime),
haveID_(false), haveTime_(true)
{
}
IOVSyncValue::IOVSyncValue ( const edm::EventID iID,
const edm::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 98 of file IOVSyncValue.cc.

References edm::Timestamp::beginOfTime().

                          {
   static IOVSyncValue s_beginOfTime(edm::EventID(1,0,0), edm::Timestamp::beginOfTime());
   return s_beginOfTime;
}
template<template< typename > class Op>
bool fwlite::IOVSyncValue::doOp ( const IOVSyncValue iRHS) const [inline, private]

Definition at line 78 of file IOVSyncValue.h.

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

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

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

Definition at line 42 of file IOVSyncValue.h.

References eventID_.

{ return eventID_;}
const IOVSyncValue & IOVSyncValue::invalidIOVSyncValue ( ) [static]

Definition at line 87 of file IOVSyncValue.cc.

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

                                  {
   static IOVSyncValue s_invalid;
   return s_invalid;
}
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().

bool fwlite::IOVSyncValue::operator!= ( const IOVSyncValue iRHS) const [inline]

Definition at line 49 of file IOVSyncValue.h.

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

Definition at line 53 of file IOVSyncValue.h.

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

Definition at line 56 of file IOVSyncValue.h.

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

Definition at line 46 of file IOVSyncValue.h.

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

Definition at line 59 of file IOVSyncValue.h.

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

Definition at line 62 of file IOVSyncValue.h.

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

Definition at line 44 of file IOVSyncValue.h.

References time_.

{return time_; }

Member Data Documentation

Definition at line 104 of file IOVSyncValue.h.

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

Definition at line 106 of file IOVSyncValue.h.

Referenced by doOp().

Definition at line 107 of file IOVSyncValue.h.

Referenced by doOp().

Definition at line 105 of file IOVSyncValue.h.

Referenced by doOp(), and time().