Public Types | |
typedef unsigned long long | Time_t |
Public Member Functions | |
EmptyIOVSource (edm::ParameterSet const &, edm::InputSourceDescription const &) | |
~EmptyIOVSource () | |
Private Member Functions | |
virtual bool | produce (edm::Event &e) |
virtual void | setRunAndEventInfo () |
Private Attributes | |
Time_t | m_current |
Time_t | m_firstValid |
Time_t | m_interval |
Time_t | m_lastValid |
std::string | m_timeType |
Definition at line 4 of file EmptyIOVSource.cc.
typedef unsigned long long cond::EmptyIOVSource::Time_t |
Definition at line 6 of file EmptyIOVSource.cc.
cond::EmptyIOVSource::EmptyIOVSource | ( | edm::ParameterSet const & | pset, |
edm::InputSourceDescription const & | desc | ||
) |
Definition at line 29 of file EmptyIOVSource.cc.
References m_current, m_firstValid, and setRunAndEventInfo().
: edm::ConfigurableInputSource(pset,desc), m_timeType(pset.getParameter<std::string>("timetype")), m_firstValid(pset.getParameter<unsigned long long>("firstValue")), m_lastValid(pset.getParameter<unsigned long long>("lastValue")), m_interval(pset.getParameter<unsigned long long>("interval")){ m_current=m_firstValid; setRunAndEventInfo(); }
cond::EmptyIOVSource::~EmptyIOVSource | ( | ) |
Definition at line 39 of file EmptyIOVSource.cc.
{ }
bool cond::EmptyIOVSource::produce | ( | edm::Event & | e | ) | [private, virtual] |
Implements edm::ConfigurableInputSource.
Definition at line 41 of file EmptyIOVSource.cc.
References m_current, m_interval, m_lastValid, and convertSQLiteXML::ok.
{ bool ok = !(m_lastValid<m_current); m_current += m_interval; return ok; }
void cond::EmptyIOVSource::setRunAndEventInfo | ( | ) | [private, virtual] |
Reimplemented from edm::ConfigurableInputSource.
Definition at line 46 of file EmptyIOVSource.cc.
References edm::errors::Configuration, Exception, prof2calltree::l, edm::LuminosityBlockID::luminosityBlock(), m_current, m_lastValid, m_timeType, edm::LuminosityBlockID::run(), edm::ConfigurableInputSource::setEventNumber(), edm::InputSource::setLuminosityBlockNumber_t(), edm::InputSource::setRunNumber(), and edm::ConfigurableInputSource::setTime().
Referenced by EmptyIOVSource().
{ if(m_current<=m_lastValid){ if( m_timeType=="runnumber" ){ setRunNumber(m_current); }else if( m_timeType=="timestamp" ){ setTime(m_current); }else if( m_timeType=="lumiid" ){ edm::LuminosityBlockID l(m_current); setRunNumber(l.run()); //std::cout<<"run "<<l.run()<<std::endl; //std::cout<<"luminosityBlock "<<l.luminosityBlock()<<std::endl; setLuminosityBlockNumber_t(l.luminosityBlock()); }else{ throw edm::Exception(edm::errors::Configuration, std::string("EmptyIOVSource::setRunAndEventInfo: ")+m_timeType+std::string("is not one of the supported types: runnumber,timestamp,lumiid") ); } setEventNumber(1); } }
Time_t cond::EmptyIOVSource::m_current [private] |
Definition at line 17 of file EmptyIOVSource.cc.
Referenced by EmptyIOVSource(), produce(), and setRunAndEventInfo().
Time_t cond::EmptyIOVSource::m_firstValid [private] |
Definition at line 14 of file EmptyIOVSource.cc.
Referenced by EmptyIOVSource().
Time_t cond::EmptyIOVSource::m_interval [private] |
Definition at line 16 of file EmptyIOVSource.cc.
Referenced by produce().
Time_t cond::EmptyIOVSource::m_lastValid [private] |
Definition at line 15 of file EmptyIOVSource.cc.
Referenced by produce(), and setRunAndEventInfo().
std::string cond::EmptyIOVSource::m_timeType [private] |
Definition at line 13 of file EmptyIOVSource.cc.
Referenced by setRunAndEventInfo().