#include <RunPrincipal.h>
Public Types | |
typedef RunAuxiliary | Auxiliary |
typedef Principal | Base |
Public Member Functions | |
RunAuxiliary const & | aux () const |
Timestamp const & | beginTime () const |
Timestamp const & | endTime () const |
void | fillRunPrincipal (DelayedReader *reader=0) |
RunID const & | id () const |
void | mergeAuxiliary (RunAuxiliary const &aux) |
void | put (ConstBranchDescription const &bd, WrapperOwningHolder const &edp) |
void | readImmediate () const |
RunNumber_t | run () const |
RunPrincipal (boost::shared_ptr< RunAuxiliary > aux, boost::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender=0) | |
void | setEndTime (Timestamp const &time) |
void | setUnscheduledHandler (boost::shared_ptr< UnscheduledHandler >) |
~RunPrincipal () | |
Private Member Functions | |
void | resolveProductImmediate (Group const &g) const |
virtual bool | unscheduledFill (std::string const &) const |
Private Attributes | |
boost::shared_ptr< RunAuxiliary > | aux_ |
Definition at line 28 of file RunPrincipal.h.
Definition at line 30 of file RunPrincipal.h.
typedef Principal edm::RunPrincipal::Base |
Definition at line 31 of file RunPrincipal.h.
edm::RunPrincipal::RunPrincipal | ( | boost::shared_ptr< RunAuxiliary > | aux, |
boost::shared_ptr< ProductRegistry const > | reg, | ||
ProcessConfiguration const & | pc, | ||
HistoryAppender * | historyAppender = 0 |
||
) |
edm::RunPrincipal::~RunPrincipal | ( | ) | [inline] |
Definition at line 38 of file RunPrincipal.h.
{}
RunAuxiliary const& edm::RunPrincipal::aux | ( | ) | const [inline] |
Definition at line 42 of file RunPrincipal.h.
References aux_.
Referenced by edm::SubProcess::beginRun(), beginTime(), endTime(), id(), run(), and edm::RootOutputFile::writeRun().
{ return *aux_; }
Timestamp const& edm::RunPrincipal::beginTime | ( | ) | const [inline] |
Definition at line 54 of file RunPrincipal.h.
References aux(), and edm::RunAuxiliary::beginTime().
Referenced by edm::OccurrenceTraits< RunPrincipal, BranchActionBegin >::preScheduleSignal(), and DQMRootOutputModule::writeRun().
{ return aux().beginTime(); }
Timestamp const& edm::RunPrincipal::endTime | ( | ) | const [inline] |
Definition at line 58 of file RunPrincipal.h.
References aux(), and edm::RunAuxiliary::endTime().
Referenced by edm::OccurrenceTraits< RunPrincipal, BranchActionEnd >::preScheduleSignal(), and DQMRootOutputModule::writeRun().
{ return aux().endTime(); }
void edm::RunPrincipal::fillRunPrincipal | ( | DelayedReader * | reader = 0 | ) |
Definition at line 21 of file RunPrincipal.cc.
References aux_, edm::Principal::begin(), edm::Principal::end(), edm::Principal::fillPrincipal(), i, edm::Principal::processHistoryID(), and edm::Principal::reader().
{ fillPrincipal(aux_->processHistoryID(), reader); for (const_iterator i = this->begin(), iEnd = this->end(); i != iEnd; ++i) { (*i)->setProcessHistoryID(processHistoryID()); } }
RunID const& edm::RunPrincipal::id | ( | void | ) | const [inline] |
Definition at line 50 of file RunPrincipal.h.
References aux(), and edm::RunAuxiliary::id().
Referenced by edm::OccurrenceTraits< RunPrincipal, BranchActionEnd >::preScheduleSignal(), edm::OccurrenceTraits< RunPrincipal, BranchActionBegin >::preScheduleSignal(), DQMRootOutputModule::writeRun(), and edm::GetProductCheckerOutputModule::writeRun().
{ return aux().id(); }
void edm::RunPrincipal::mergeAuxiliary | ( | RunAuxiliary const & | aux | ) | [inline] |
Definition at line 66 of file RunPrincipal.h.
References aux_.
void edm::RunPrincipal::put | ( | ConstBranchDescription const & | bd, |
WrapperOwningHolder const & | edp | ||
) |
Definition at line 31 of file RunPrincipal.cc.
References edm::ConstBranchDescription::branchID(), Exception, g, edm::Principal::getExistingGroup(), edm::errors::InsertFailure, edm::WrapperHolder::isValid(), edm::ConstBranchDescription::produced(), and edm::Principal::putOrMerge().
Referenced by edm::Run::commit_().
{ assert(bd.produced()); if(!edp.isValid()) { throw edm::Exception(edm::errors::InsertFailure,"Null Pointer") << "put: Cannot put because auto_ptr to product is null." << "\n"; } Group *g = getExistingGroup(bd.branchID()); assert(g); // Group assumes ownership putOrMerge(edp, g); }
void edm::RunPrincipal::readImmediate | ( | ) | const |
Definition at line 48 of file RunPrincipal.cc.
References edm::Principal::begin(), edm::Group::branchDescription(), edm::Principal::end(), g, i, edm::ConstBranchDescription::produced(), edm::Group::productUnavailable(), and resolveProductImmediate().
{ for (Principal::const_iterator i = begin(), iEnd = end(); i != iEnd; ++i) { Group const& g = **i; if(!g.branchDescription().produced()) { if(!g.productUnavailable()) { resolveProductImmediate(g); } } } }
void edm::RunPrincipal::resolveProductImmediate | ( | Group const & | g | ) | const [private] |
Definition at line 60 of file RunPrincipal.cc.
References edm::Group::branchDescription(), edm::ProductData::getInterface(), edm::getProduct(), edm::ConstBranchDescription::produced(), edm::Group::productData(), edm::Principal::putOrMerge(), and edm::Principal::reader().
Referenced by readImmediate().
{ if(g.branchDescription().produced()) return; // nothing to do. if(!reader()) return; // nothing to do. // must attempt to load from persistent store BranchKey const bk = BranchKey(g.branchDescription()); WrapperOwningHolder edp(reader()->getProduct(bk, g.productData().getInterface(), this)); // Now fix up the Group if(edp.isValid()) { putOrMerge(edp, &g); } }
RunNumber_t edm::RunPrincipal::run | ( | void | ) | const [inline] |
Definition at line 46 of file RunPrincipal.h.
References aux(), and edm::RunAuxiliary::run().
Referenced by edm::InputSource::markRun(), and edm::PoolOutputModule::writeRun().
{ return aux().run(); }
void edm::RunPrincipal::setEndTime | ( | Timestamp const & | time | ) | [inline] |
Definition at line 62 of file RunPrincipal.h.
References aux_.
Referenced by edm::InputSource::doEndRun().
void edm::RunPrincipal::setUnscheduledHandler | ( | boost::shared_ptr< UnscheduledHandler > | ) | [inline] |
Definition at line 70 of file RunPrincipal.h.
{}
virtual bool edm::RunPrincipal::unscheduledFill | ( | std::string const & | ) | const [inline, private, virtual] |
boost::shared_ptr<RunAuxiliary> edm::RunPrincipal::aux_ [private] |
Definition at line 85 of file RunPrincipal.h.
Referenced by aux(), fillRunPrincipal(), mergeAuxiliary(), and setEndTime().