#include <RawInputSource.h>
Public Member Functions | |
RawInputSource (ParameterSet const &pset, InputSourceDescription const &desc) | |
virtual | ~RawInputSource () |
Static Public Member Functions | |
static void | fillDescription (ParameterSetDescription &description) |
Protected Member Functions | |
virtual bool | checkNextEvent ()=0 |
EventPrincipal * | makeEvent (EventPrincipal &eventPrincipal, EventAuxiliary const &eventAuxiliary) |
virtual EventPrincipal * | read (EventPrincipal &eventPrincipal)=0 |
void | setInputFileTransitionsEachEvent () |
Private Member Functions | |
virtual ItemType | getNextItemType () |
virtual void | preForkReleaseResources () |
virtual EventPrincipal * | readEvent_ (EventPrincipal &eventPrincipal) |
virtual boost::shared_ptr < LuminosityBlockAuxiliary > | readLuminosityBlockAuxiliary_ () |
virtual boost::shared_ptr < RunAuxiliary > | readRunAuxiliary_ () |
virtual void | reset_ () |
virtual void | rewind_ () |
Private Attributes | |
bool | inputFileTransitionsEachEvent_ |
Definition at line 19 of file RawInputSource.h.
edm::RawInputSource::RawInputSource | ( | ParameterSet const & | pset, |
InputSourceDescription const & | desc | ||
) | [explicit] |
Definition at line 15 of file RawInputSource.cc.
References edm::Timestamp::beginOfTime(), and edm::InputSource::setTimestamp().
: InputSource(pset, desc), // The default value for the following parameter get defined in at least one derived class // where it has a different default value. inputFileTransitionsEachEvent_(pset.getUntrackedParameter<bool>("inputFileTransitionsEachEvent", false)) { setTimestamp(Timestamp::beginOfTime()); }
edm::RawInputSource::~RawInputSource | ( | ) | [virtual] |
Definition at line 23 of file RawInputSource.cc.
{ }
virtual bool edm::RawInputSource::checkNextEvent | ( | ) | [protected, pure virtual] |
Implemented in edm::DQMHttpSource, edm::EventStreamHttpReader, edm::StreamerInputModule< Producer >, and edm::StreamerFileReader.
Referenced by getNextItemType().
void edm::RawInputSource::fillDescription | ( | ParameterSetDescription & | description | ) | [static] |
Reimplemented from edm::InputSource.
Reimplemented in edm::StreamerInputSource.
Definition at line 110 of file RawInputSource.cc.
{ // The default value for "inputFileTransitionsEachEvent" gets defined in the derived class // as it depends on the derived class. So, we cannot redefine it here. InputSource::fillDescription(description); }
InputSource::ItemType edm::RawInputSource::getNextItemType | ( | ) | [private, virtual] |
Implements edm::InputSource.
Definition at line 65 of file RawInputSource.cc.
References checkNextEvent(), edm::InputSource::eventCached(), inputFileTransitionsEachEvent_, edm::InputSource::IsEvent, edm::InputSource::IsFile, edm::InputSource::IsInvalid, edm::InputSource::IsLumi, edm::InputSource::IsRun, edm::InputSource::IsStop, edm::InputSource::luminosityBlockAuxiliary(), edm::InputSource::newLumi(), edm::InputSource::newRun(), edm::InputSource::resetLuminosityBlockAuxiliary(), edm::InputSource::resetRunAuxiliary(), edm::InputSource::runAuxiliary(), and edm::InputSource::state().
{ if(state() == IsInvalid) { return IsFile; } if(newRun() && runAuxiliary()) { return IsRun; } if(newLumi() && luminosityBlockAuxiliary()) { return IsLumi; } if(eventCached()) { return IsEvent; } if (inputFileTransitionsEachEvent_) { resetRunAuxiliary(newRun()); resetLuminosityBlockAuxiliary(newLumi()); } bool another = checkNextEvent(); if(!another || (!newLumi() && !eventCached())) { return IsStop; } else if(inputFileTransitionsEachEvent_) { return IsFile; } if(newRun()) { return IsRun; } else if(newLumi()) { return IsLumi; } return IsEvent; }
EventPrincipal * edm::RawInputSource::makeEvent | ( | EventPrincipal & | eventPrincipal, |
EventAuxiliary const & | eventAuxiliary | ||
) | [protected] |
Definition at line 53 of file RawInputSource.cc.
References edm::EventPrincipal::fillEventPrincipal().
Referenced by edm::DQMHttpSource::read().
{ EventSourceSentry sentry(*this); eventPrincipal.fillEventPrincipal(eventAuxiliary); return &eventPrincipal; }
void edm::RawInputSource::preForkReleaseResources | ( | ) | [private, virtual] |
Reimplemented from edm::InputSource.
Definition at line 60 of file RawInputSource.cc.
References edm::InputSource::closeFile().
{ closeFile(boost::shared_ptr<FileBlock>(), false); }
virtual EventPrincipal* edm::RawInputSource::read | ( | EventPrincipal & | eventPrincipal | ) | [protected, pure virtual] |
Implemented in edm::DQMHttpSource, and edm::StreamerInputSource.
Referenced by readEvent_().
EventPrincipal * edm::RawInputSource::readEvent_ | ( | EventPrincipal & | eventPrincipal | ) | [private, virtual] |
Implements edm::InputSource.
Definition at line 44 of file RawInputSource.cc.
References edm::InputSource::eventCached(), edm::InputSource::newLumi(), edm::InputSource::newRun(), read(), and edm::InputSource::resetEventCached().
{ assert(!newRun()); assert(!newLumi()); assert(eventCached()); resetEventCached(); return read(eventPrincipal); }
boost::shared_ptr< LuminosityBlockAuxiliary > edm::RawInputSource::readLuminosityBlockAuxiliary_ | ( | ) | [private, virtual] |
Implements edm::InputSource.
Definition at line 35 of file RawInputSource.cc.
References edm::InputSource::luminosityBlockAuxiliary(), edm::InputSource::newLumi(), edm::InputSource::newRun(), and edm::InputSource::resetNewLumi().
{ assert(!newRun()); assert(newLumi()); assert(luminosityBlockAuxiliary()); resetNewLumi(); return luminosityBlockAuxiliary(); }
boost::shared_ptr< RunAuxiliary > edm::RawInputSource::readRunAuxiliary_ | ( | ) | [private, virtual] |
Implements edm::InputSource.
Definition at line 27 of file RawInputSource.cc.
References edm::InputSource::newRun(), edm::InputSource::resetNewRun(), and edm::InputSource::runAuxiliary().
{ assert(newRun()); assert(runAuxiliary()); resetNewRun(); return runAuxiliary(); }
void edm::RawInputSource::reset_ | ( | ) | [private, virtual] |
Reimplemented in edm::StreamerFileReader.
Definition at line 97 of file RawInputSource.cc.
References Exception, and edm::errors::LogicError.
Referenced by rewind_().
{ throw Exception(errors::LogicError) << "RawInputSource::reset()\n" << "Forking is not implemented for this type of RawInputSource\n" << "Contact a Framework Developer\n"; }
void edm::RawInputSource::rewind_ | ( | ) | [private, virtual] |
Reimplemented from edm::InputSource.
Definition at line 105 of file RawInputSource.cc.
References reset_().
{ reset_(); }
void edm::RawInputSource::setInputFileTransitionsEachEvent | ( | ) | [inline, protected] |
Definition at line 29 of file RawInputSource.h.
References inputFileTransitionsEachEvent_.
{inputFileTransitionsEachEvent_ = true;}
bool edm::RawInputSource::inputFileTransitionsEachEvent_ [private] |
Definition at line 40 of file RawInputSource.h.
Referenced by getNextItemType(), and setInputFileTransitionsEachEvent().