#include <SubProcess.h>
Classes | |
struct | ESInfo |
Public Member Functions | |
void | clearCounters () |
Clear all the counters in the trigger report. | |
void | closeOutputFiles () |
void | deleteLumiFromCache (ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber) |
void | deleteRunFromCache (ProcessHistoryID const &parentPhID, int runNumber) |
void | doBeginLuminosityBlock (LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts) |
void | doBeginRun (RunPrincipal const &principal, IOVSyncValue const &ts) |
void | doEndLuminosityBlock (LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException) |
void | doEndRun (RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException) |
void | doEvent (EventPrincipal const &principal, IOVSyncValue const &ts) |
void | enableEndPaths (bool active) |
bool | endPathsEnabled () const |
Return true if end_paths are active, and false if they are inactive. | |
std::vector< ModuleDescription const * > | getAllModuleDescriptions () const |
Return a vector allowing const access to all the ModuleDescriptions for this SubProcess. | |
void | getTriggerReport (TriggerReport &rep) const |
void | openNewOutputFilesIfNeeded () |
void | openOutputFiles (FileBlock &fb) |
void | postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren) |
void | preForkReleaseResources () |
void | respondToCloseInputFile (FileBlock const &fb) |
void | respondToCloseOutputFiles (FileBlock const &fb) |
void | respondToOpenInputFile (FileBlock const &fb) |
void | respondToOpenOutputFiles (FileBlock const &fb) |
bool | shouldWeCloseOutput () const |
SubProcess (ParameterSet ¶meterSet, ParameterSet const &topLevelParameterSet, boost::shared_ptr< ProductRegistry const > parentProductRegistry, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy) | |
bool | terminate () const |
int | totalEvents () const |
int | totalEventsFailed () const |
int | totalEventsPassed () const |
Return the number of events which have been passed by one or more trigger paths. | |
void | writeLumi (ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber) |
void | writeRun (ProcessHistoryID const &parentPhID, int runNumber) |
virtual | ~SubProcess () |
Private Member Functions | |
virtual void | beginJob () |
virtual void | beginLuminosityBlock (LuminosityBlockPrincipal const &lb) |
virtual void | beginRun (RunPrincipal const &r) |
virtual void | endJob () |
virtual void | endLuminosityBlock (LuminosityBlockPrincipal const &lb) |
virtual void | endRun (RunPrincipal const &r) |
void | propagateProducts (BranchType type, Principal const &parentPrincipal, Principal &principal) const |
virtual void | write (EventPrincipal const &e) |
virtual void | writeLuminosityBlock (LuminosityBlockPrincipal const &) |
virtual void | writeRun (RunPrincipal const &) |
Private Attributes | |
boost::shared_ptr< ActionTable const > | act_table_ |
bool | cleaningUpAfterException_ |
std::auto_ptr< ESInfo > | esInfo_ |
boost::shared_ptr < eventsetup::EventSetupProvider > | esp_ |
boost::scoped_ptr < HistoryAppender > | historyAppender_ |
boost::shared_ptr < ProductRegistry const > | parentPreg_ |
std::map< ProcessHistoryID, ProcessHistoryID > | parentToChildPhID_ |
boost::shared_ptr < SignallingProductRegistry > | preg_ |
PrincipalCache | principalCache_ |
boost::shared_ptr < ProcessConfiguration > | processConfiguration_ |
std::unique_ptr< ParameterSet > | processParameterSet_ |
std::auto_ptr< Schedule > | schedule_ |
ServiceToken | serviceToken_ |
std::auto_ptr< SubProcess > | subProcess_ |
Definition at line 28 of file SubProcess.h.
edm::SubProcess::SubProcess | ( | ParameterSet & | parameterSet, |
ParameterSet const & | topLevelParameterSet, | ||
boost::shared_ptr< ProductRegistry const > | parentProductRegistry, | ||
eventsetup::EventSetupsController & | esController, | ||
ActivityRegistry & | parentActReg, | ||
ServiceToken const & | token, | ||
serviceregistry::ServiceLegacy | iLegacy | ||
) |
Definition at line 31 of file SubProcess.cc.
References act_table_, edm::ActivityRegistry::connectToSubProcess(), esp_, edm::ParameterSet::exists(), edm::ParameterSet::getUntrackedParameterSet(), historyAppender_, edm::PrincipalCache::insert(), edm::eventsetup::EventSetupsController::makeProvider(), edm::OutputModule::maxEvents(), cmsPerfStripChart::operate(), edm::ParameterSet::popParameterSet(), edm::popSubProcessParameterSet(), preg_, principalCache_, processConfiguration_, processParameterSet_, schedule_, serviceToken_, edm::OutputModule::setEventSelectionInfo(), edm::IllegalParameters::setThrowAnException(), and subProcess_.
: OutputModule(parameterSet), serviceToken_(), parentPreg_(parentProductRegistry), preg_(), act_table_(), processConfiguration_(), principalCache_(), esp_(), schedule_(), parentToChildPhID_(), historyAppender_(new HistoryAppender), esInfo_(0), subProcess_(), cleaningUpAfterException_(false), processParameterSet_() { std::string const maxEvents("maxEvents"); std::string const maxLumis("maxLuminosityBlocks"); processParameterSet_.reset(parameterSet.popParameterSet(std::string("process")).release()); // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them. if(processParameterSet_->exists(maxEvents)) { processParameterSet_->popParameterSet(maxEvents); } if(processParameterSet_->exists(maxLumis)) { processParameterSet_->popParameterSet(maxLumis); } // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process. if(topLevelParameterSet.exists(maxEvents)) { processParameterSet_->addUntrackedParameter<ParameterSet>(maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents)); } if(topLevelParameterSet.exists(maxLumis)) { processParameterSet_->addUntrackedParameter<ParameterSet>(maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis)); } // If this process has a subprocess, pop the subprocess parameter set out of the process parameter set boost::shared_ptr<ParameterSet> subProcessParameterSet(popSubProcessParameterSet(*processParameterSet_).release()); ScheduleItems items(*parentProductRegistry); ParameterSet const& optionsPset(processParameterSet_->getUntrackedParameterSet("options", ParameterSet())); IllegalParameters::setThrowAnException(optionsPset.getUntrackedParameter<bool>("throwIfIllegalParameter", true)); //initialize the services ServiceToken iToken; // get any configured services. std::auto_ptr<std::vector<ParameterSet> > serviceSets = processParameterSet_->popVParameterSet(std::string("services")); ServiceToken newToken = items.initServices(*serviceSets, *processParameterSet_, token, iLegacy, false); parentActReg.connectToSubProcess(*items.actReg_); serviceToken_ = items.addCPRandTNS(*processParameterSet_, newToken); //make the services available ServiceRegistry::Operate operate(serviceToken_); // intialize miscellaneous items items.initMisc(*processParameterSet_); // intialize the event setup provider esp_ = esController.makeProvider(*processParameterSet_); // intialize the Schedule schedule_ = items.initSchedule(*processParameterSet_,subProcessParameterSet.get()); // set the items act_table_ = items.act_table_; preg_ = items.preg_; processConfiguration_ = items.processConfiguration_; std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions; setEventSelectionInfo(outputModulePathPositions, parentProductRegistry->anyProductProduced()); boost::shared_ptr<EventPrincipal> ep(new EventPrincipal(preg_, *processConfiguration_, historyAppender_.get())); principalCache_.insert(ep); if(subProcessParameterSet) { subProcess_.reset(new SubProcess(*subProcessParameterSet, topLevelParameterSet, preg_, esController, *items.actReg_, newToken, iLegacy)); } }
edm::SubProcess::~SubProcess | ( | ) | [virtual] |
Definition at line 123 of file SubProcess.cc.
{}
void edm::SubProcess::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 126 of file SubProcess.cc.
References edm::InEvent, edm::InLumi, edm::InRun, edm::OutputModule::keptProducts(), cmsPerfStripChart::operate(), preg_, schedule_, serviceToken_, and subProcess_.
{ // Mark dropped branches as dropped in the product registry. { std::set<BranchID> keptBranches; Selections const& keptVectorR = keptProducts()[InRun]; for(Selections::const_iterator it = keptVectorR.begin(), itEnd = keptVectorR.end(); it != itEnd; ++it) { keptBranches.insert((*it)->branchID()); } Selections const& keptVectorL = keptProducts()[InLumi]; for(Selections::const_iterator it = keptVectorL.begin(), itEnd = keptVectorL.end(); it != itEnd; ++it) { keptBranches.insert((*it)->branchID()); } Selections const& keptVectorE = keptProducts()[InEvent]; for(Selections::const_iterator it = keptVectorE.begin(), itEnd = keptVectorE.end(); it != itEnd; ++it) { keptBranches.insert((*it)->branchID()); } for(ProductRegistry::ProductList::const_iterator it = preg_->productList().begin(), itEnd = preg_->productList().end(); it != itEnd; ++it) { if(keptBranches.find(it->second.branchID()) == keptBranches.end()) { it->second.setDropped(); } } } ServiceRegistry::Operate operate(serviceToken_); schedule_->beginJob(); if(subProcess_.get()) subProcess_->doBeginJob(); }
void edm::SubProcess::beginLuminosityBlock | ( | LuminosityBlockPrincipal const & | lb | ) | [private, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 279 of file SubProcess.cc.
References printConversionInfo::aux, edm::LuminosityBlockPrincipal::aux(), esInfo_, historyAppender_, edm::InLumi, edm::PrincipalCache::insert(), edm::PrincipalCache::lumiPrincipalPtr(), preg_, principalCache_, processConfiguration_, edm::Principal::processHistoryID(), propagateProducts(), edm::Principal::reader(), edm::PrincipalCache::runPrincipalPtr(), schedule_, and subProcess_.
{ boost::shared_ptr<LuminosityBlockAuxiliary> aux(new LuminosityBlockAuxiliary(principal.aux())); aux->setProcessHistoryID(principal.processHistoryID()); boost::shared_ptr<LuminosityBlockPrincipal> lbpp(new LuminosityBlockPrincipal(aux, preg_, *processConfiguration_, principalCache_.runPrincipalPtr(), historyAppender_.get())); lbpp->fillLuminosityBlockPrincipal(principal.reader()); principalCache_.insert(lbpp); LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr(); propagateProducts(InLumi, principal, lbp); typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionBegin> Traits; schedule_->processOneOccurrence<Traits>(lbp, esInfo_->es_); if(subProcess_.get()) subProcess_->doBeginLuminosityBlock(lbp, esInfo_->ts_); }
void edm::SubProcess::beginRun | ( | RunPrincipal const & | r | ) | [private, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 213 of file SubProcess.cc.
References edm::RunPrincipal::aux(), printConversionInfo::aux, esInfo_, historyAppender_, edm::InRun, edm::PrincipalCache::insert(), edm::detail::ThreadSafeRegistry< KEY, T, E >::instance(), parentToChildPhID_, preg_, principalCache_, processConfiguration_, edm::RunAuxiliary::processHistoryID(), edm::Principal::processHistoryID(), propagateProducts(), edm::Principal::reader(), edm::FullHistoryToReducedHistoryMap::reduceProcessHistoryID(), edm::PrincipalCache::runPrincipalPtr(), schedule_, and subProcess_.
{ boost::shared_ptr<RunAuxiliary> aux(new RunAuxiliary(principal.aux())); aux->setProcessHistoryID(principal.processHistoryID()); boost::shared_ptr<RunPrincipal> rpp(new RunPrincipal(aux, preg_, *processConfiguration_, historyAppender_.get())); rpp->fillRunPrincipal(principal.reader()); principalCache_.insert(rpp); FullHistoryToReducedHistoryMap & phidConverter(ProcessHistoryRegistry::instance()->extra()); ProcessHistoryID const& parentInputReducedPHID = phidConverter.reduceProcessHistoryID(principal.aux().processHistoryID()); ProcessHistoryID const& inputReducedPHID = phidConverter.reduceProcessHistoryID(principal.processHistoryID()); parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID)); RunPrincipal& rp = *principalCache_.runPrincipalPtr(); propagateProducts(InRun, principal, rp); typedef OccurrenceTraits<RunPrincipal, BranchActionBegin> Traits; schedule_->processOneOccurrence<Traits>(rp, esInfo_->es_); if(subProcess_.get()) subProcess_->doBeginRun(rp, esInfo_->ts_); }
void edm::SubProcess::clearCounters | ( | ) | [inline] |
Clear all the counters in the trigger report.
Definition at line 191 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->clearCounters(); if(subProcess_.get()) subProcess_->clearCounters(); }
void edm::SubProcess::closeOutputFiles | ( | ) | [inline] |
Definition at line 69 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->closeOutputFiles(); if(subProcess_.get()) subProcess_->closeOutputFiles(); }
void edm::SubProcess::deleteLumiFromCache | ( | ProcessHistoryID const & | parentPhID, |
int | runNumber, | ||
int | lumiNumber | ||
) |
Definition at line 321 of file SubProcess.cc.
References edm::PrincipalCache::deleteLumi(), parentToChildPhID_, principalCache_, and subProcess_.
{ std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID); assert(it != parentToChildPhID_.end()); principalCache_.deleteLumi(it->second, runNumber, lumiNumber); if(subProcess_.get()) subProcess_->deleteLumiFromCache(it->second, runNumber, lumiNumber); }
void edm::SubProcess::deleteRunFromCache | ( | ProcessHistoryID const & | parentPhID, |
int | runNumber | ||
) |
Definition at line 262 of file SubProcess.cc.
References edm::PrincipalCache::deleteRun(), parentToChildPhID_, principalCache_, and subProcess_.
{ std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID); assert(it != parentToChildPhID_.end()); principalCache_.deleteRun(it->second, runNumber); if(subProcess_.get()) subProcess_->deleteRunFromCache(it->second, runNumber); }
void edm::SubProcess::doBeginLuminosityBlock | ( | LuminosityBlockPrincipal const & | principal, |
IOVSyncValue const & | ts | ||
) |
Definition at line 270 of file SubProcess.cc.
References esInfo_, esp_, cmsPerfStripChart::operate(), and serviceToken_.
{ ServiceRegistry::Operate operate(serviceToken_); esInfo_.reset(new ESInfo(ts, *esp_)); CurrentProcessingContext cpc; doBeginLuminosityBlock(principal, esInfo_->es_, &cpc); esInfo_.reset(); }
void edm::SubProcess::doBeginRun | ( | RunPrincipal const & | principal, |
IOVSyncValue const & | ts | ||
) |
Definition at line 204 of file SubProcess.cc.
References esInfo_, esp_, cmsPerfStripChart::operate(), and serviceToken_.
{ ServiceRegistry::Operate operate(serviceToken_); esInfo_.reset(new ESInfo(ts, *esp_)); CurrentProcessingContext cpc; doBeginRun(principal, esInfo_->es_, &cpc); esInfo_.reset(); }
void edm::SubProcess::doEndLuminosityBlock | ( | LuminosityBlockPrincipal const & | principal, |
IOVSyncValue const & | ts, | ||
bool | cleaningUpAfterException | ||
) |
Definition at line 293 of file SubProcess.cc.
References cleaningUpAfterException_, esInfo_, esp_, cmsPerfStripChart::operate(), and serviceToken_.
{ cleaningUpAfterException_ = cleaningUpAfterException; ServiceRegistry::Operate operate(serviceToken_); esInfo_.reset(new ESInfo(ts, *esp_)); CurrentProcessingContext cpc; doEndLuminosityBlock(principal, esInfo_->es_, &cpc); esInfo_.reset(); }
void edm::SubProcess::doEndRun | ( | RunPrincipal const & | principal, |
IOVSyncValue const & | ts, | ||
bool | cleaningUpAfterException | ||
) |
Definition at line 234 of file SubProcess.cc.
References cleaningUpAfterException_, esInfo_, esp_, cmsPerfStripChart::operate(), and serviceToken_.
{ cleaningUpAfterException_ = cleaningUpAfterException; ServiceRegistry::Operate operate(serviceToken_); esInfo_.reset(new ESInfo(ts, *esp_)); CurrentProcessingContext cpc; doEndRun(principal, esInfo_->es_, &cpc); esInfo_.reset(); }
void edm::SubProcess::doEvent | ( | EventPrincipal const & | principal, |
IOVSyncValue const & | ts | ||
) |
Definition at line 170 of file SubProcess.cc.
References esInfo_, esp_, cmsPerfStripChart::operate(), and serviceToken_.
{ ServiceRegistry::Operate operate(serviceToken_); esInfo_.reset(new ESInfo(ts, *esp_)); CurrentProcessingContext cpc; doEvent(principal, esInfo_->es_, &cpc); esInfo_.reset(); }
void edm::SubProcess::enableEndPaths | ( | bool | active | ) | [inline] |
Turn end_paths "off" if "active" is false; Turn end_paths "on" if "active" is true.
Definition at line 164 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->enableEndPaths(active); if(subProcess_.get()) subProcess_->enableEndPaths(active); }
void edm::SubProcess::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 154 of file SubProcess.cc.
References trackerHits::c, edm::ExceptionCollector::hasThrown(), cmsPerfStripChart::operate(), edm::ExceptionCollector::rethrow(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); ExceptionCollector c("Multiple exceptions were thrown while executing endJob. An exception message follows for each."); schedule_->endJob(c); if(c.hasThrown()) { c.rethrow(); } if(subProcess_.get()) subProcess_->doEndJob(); }
void edm::SubProcess::endLuminosityBlock | ( | LuminosityBlockPrincipal const & | lb | ) | [private, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 303 of file SubProcess.cc.
References cleaningUpAfterException_, esInfo_, edm::InLumi, edm::PrincipalCache::lumiPrincipalPtr(), principalCache_, propagateProducts(), schedule_, and subProcess_.
{ LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr(); propagateProducts(InLumi, principal, lbp); typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionEnd> Traits; schedule_->processOneOccurrence<Traits>(lbp, esInfo_->es_, cleaningUpAfterException_); if(subProcess_.get()) subProcess_->doEndLuminosityBlock(lbp, esInfo_->ts_, cleaningUpAfterException_); }
bool edm::SubProcess::endPathsEnabled | ( | ) | const [inline] |
Return true if end_paths are active, and false if they are inactive.
Definition at line 171 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, and serviceToken_.
{ ServiceRegistry::Operate operate(serviceToken_); return schedule_->endPathsEnabled(); }
void edm::SubProcess::endRun | ( | RunPrincipal const & | r | ) | [private, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 244 of file SubProcess.cc.
References cleaningUpAfterException_, esInfo_, edm::InRun, principalCache_, propagateProducts(), edm::PrincipalCache::runPrincipalPtr(), schedule_, and subProcess_.
{ RunPrincipal& rp = *principalCache_.runPrincipalPtr(); propagateProducts(InRun, principal, rp); typedef OccurrenceTraits<RunPrincipal, BranchActionEnd> Traits; schedule_->processOneOccurrence<Traits>(rp, esInfo_->es_, cleaningUpAfterException_); if(subProcess_.get()) subProcess_->doEndRun(rp, esInfo_->ts_, cleaningUpAfterException_); }
std::vector<ModuleDescription const*> edm::SubProcess::getAllModuleDescriptions | ( | ) | const |
Return a vector allowing const access to all the ModuleDescriptions for this SubProcess.
*** N.B. *** Ownership of the ModuleDescriptions is *not* passed to the caller. Do not call delete on these pointers!
void edm::SubProcess::getTriggerReport | ( | TriggerReport & | rep | ) | const [inline] |
Return the trigger report information on paths, modules-in-path, modules-in-endpath, and modules.
Definition at line 178 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, and serviceToken_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->getTriggerReport(rep); }
void edm::SubProcess::openNewOutputFilesIfNeeded | ( | ) | [inline] |
Definition at line 76 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->openNewOutputFilesIfNeeded(); if(subProcess_.get()) subProcess_->openNewOutputFilesIfNeeded(); }
void edm::SubProcess::openOutputFiles | ( | FileBlock & | fb | ) | [inline] |
Definition at line 83 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->openOutputFiles(fb); if(subProcess_.get()) subProcess_->openOutputFiles(fb); }
void edm::SubProcess::postForkReacquireResources | ( | unsigned int | iChildIndex, |
unsigned int | iNumberOfChildren | ||
) | [inline, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 129 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren); if(subProcess_.get()) subProcess_->postForkReacquireResources(iChildIndex, iNumberOfChildren); }
void edm::SubProcess::preForkReleaseResources | ( | ) | [inline, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 123 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->preForkReleaseResources(); if(subProcess_.get()) subProcess_->preForkReleaseResources(); }
void edm::SubProcess::propagateProducts | ( | BranchType | type, |
Principal const & | parentPrincipal, | ||
Principal & | principal | ||
) | const [private] |
Definition at line 329 of file SubProcess.cc.
References edm::Principal::getGroup(), edm::OutputModule::keptProducts(), edm::Provenance::processHistoryID(), edm::Group::productData(), edm::Provenance::productID(), edm::Provenance::productProvenance(), edm::Provenance::productProvenanceValid(), edm::Group::productUnavailable(), edm::ProductData::prov_, edm::Provenance::resetProductProvenance(), edm::Provenance::setProcessHistoryID(), edm::Provenance::setProductID(), edm::Provenance::setProductProvenance(), edm::Provenance::setStore(), edm::Provenance::store(), and edm::ProductData::wrapper_.
Referenced by beginLuminosityBlock(), beginRun(), endLuminosityBlock(), endRun(), and write().
{ Selections const& keptVector = keptProducts()[type]; for(Selections::const_iterator it = keptVector.begin(), itEnd = keptVector.end(); it != itEnd; ++it) { Group const* parentGroup = parentPrincipal.getGroup((*it)->branchID(), false, false); if(parentGroup != 0) { ProductData const& parentData = parentGroup->productData(); Group const* group = principal.getGroup((*it)->branchID(), false, false); if(group != 0) { ProductData& thisData = const_cast<ProductData&>(group->productData()); //Propagate the per event(run)(lumi) data for this product to the subprocess. //First, the product itself. thisData.wrapper_ = parentData.wrapper_; // Then the product ID and the ProcessHistory thisData.prov_.setProductID(parentData.prov_.productID()); thisData.prov_.setProcessHistoryID(parentData.prov_.processHistoryID()); // Then the store, in case the product needs reading in a subprocess. thisData.prov_.setStore(parentData.prov_.store()); // And last, the other per event provenance. if(parentData.prov_.productProvenanceValid()) { thisData.prov_.setProductProvenance(*parentData.prov_.productProvenance()); } else { thisData.prov_.resetProductProvenance(); } // Sets unavailable flag, if known that product is not available (void)group->productUnavailable(); } } } }
void edm::SubProcess::respondToCloseInputFile | ( | FileBlock const & | fb | ) | [inline, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 97 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->respondToCloseInputFile(fb); if(subProcess_.get()) subProcess_->respondToCloseInputFile(fb); }
void edm::SubProcess::respondToCloseOutputFiles | ( | FileBlock const & | fb | ) | [inline, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 111 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->respondToCloseOutputFiles(fb); if(subProcess_.get()) subProcess_->respondToCloseOutputFiles(fb); }
void edm::SubProcess::respondToOpenInputFile | ( | FileBlock const & | fb | ) | [inline, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 90 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->respondToOpenInputFile(fb); if(subProcess_.get()) subProcess_->respondToOpenInputFile(fb); }
void edm::SubProcess::respondToOpenOutputFiles | ( | FileBlock const & | fb | ) | [inline, virtual] |
Reimplemented from edm::OutputModule.
Definition at line 104 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); schedule_->respondToOpenOutputFiles(fb); if(subProcess_.get()) subProcess_->respondToOpenOutputFiles(fb); }
bool edm::SubProcess::shouldWeCloseOutput | ( | ) | const [inline] |
Definition at line 118 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); return schedule_->shouldWeCloseOutput() || (subProcess_.get() ? subProcess_->shouldWeCloseOutput() : false); }
bool edm::SubProcess::terminate | ( | void | ) | const [inline] |
Return whether each output module has reached its maximum count. If there is a subprocess, get this information from the subprocess.
Definition at line 185 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); return subProcess_.get() ? subProcess_->terminate() : schedule_->terminate(); }
int edm::SubProcess::totalEvents | ( | ) | const [inline] |
Return the number of events this SubProcess has tried to process (inclues both successes and failures, including failures due to exceptions during processing).
Definition at line 145 of file SubProcess.h.
References schedule_.
{ return schedule_->totalEvents(); }
int edm::SubProcess::totalEventsFailed | ( | ) | const [inline] |
Return the number of events that have not passed any trigger. (N.B. totalEventsFailed() + totalEventsPassed() == totalEvents()
Definition at line 157 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, and serviceToken_.
{ ServiceRegistry::Operate operate(serviceToken_); return schedule_->totalEventsFailed(); }
int edm::SubProcess::totalEventsPassed | ( | ) | const [inline] |
Return the number of events which have been passed by one or more trigger paths.
Definition at line 150 of file SubProcess.h.
References cmsPerfStripChart::operate(), schedule_, and serviceToken_.
{ ServiceRegistry::Operate operate(serviceToken_); return schedule_->totalEventsPassed(); }
void edm::SubProcess::write | ( | EventPrincipal const & | e | ) | [private, virtual] |
Implements edm::OutputModule.
Definition at line 179 of file SubProcess.cc.
References edm::ProductRegistry::anyProductProduced(), edm::EventPrincipal::aux(), printConversionInfo::aux, edm::EventPrincipal::branchListIndexes(), edm::EventPrincipal::branchMapperPtr(), esInfo_, edm::PrincipalCache::eventPrincipal(), edm::EventPrincipal::eventSelectionIDs(), edm::EventPrincipal::fillEventPrincipal(), edm::InEvent, edm::PrincipalCache::lumiPrincipalPtr(), principalCache_, edm::Principal::processHistoryID(), edm::Principal::productRegistry(), propagateProducts(), edm::Principal::reader(), schedule_, edm::OutputModule::selectorConfig(), subProcess_, and edm::OutputModule::wantAllEvents().
{ EventAuxiliary aux(principal.aux()); aux.setProcessHistoryID(principal.processHistoryID()); boost::shared_ptr<EventSelectionIDVector> esids(new EventSelectionIDVector); *esids = principal.eventSelectionIDs(); if (principal.productRegistry().anyProductProduced() || !wantAllEvents()) { esids->push_back(selectorConfig()); } EventPrincipal& ep = principalCache_.eventPrincipal(); ep.fillEventPrincipal(aux, principalCache_.lumiPrincipalPtr(), esids, boost::shared_ptr<BranchListIndexes>(new BranchListIndexes(principal.branchListIndexes())), principal.branchMapperPtr(), principal.reader()); propagateProducts(InEvent, principal, ep); typedef OccurrenceTraits<EventPrincipal, BranchActionBegin> Traits; schedule_->processOneOccurrence<Traits>(ep, esInfo_->es_); if(subProcess_.get()) subProcess_->doEvent(ep, esInfo_->ts_); ep.clearEventPrincipal(); }
void edm::SubProcess::writeLumi | ( | ProcessHistoryID const & | parentPhID, |
int | runNumber, | ||
int | lumiNumber | ||
) |
Definition at line 312 of file SubProcess.cc.
References edm::PrincipalCache::lumiPrincipal(), cmsPerfStripChart::operate(), parentToChildPhID_, principalCache_, schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID); assert(it != parentToChildPhID_.end()); schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber)); if(subProcess_.get()) subProcess_->writeLumi(it->second, runNumber, lumiNumber); }
virtual void edm::SubProcess::writeLuminosityBlock | ( | LuminosityBlockPrincipal const & | ) | [inline, private, virtual] |
virtual void edm::SubProcess::writeRun | ( | RunPrincipal const & | ) | [inline, private, virtual] |
void edm::SubProcess::writeRun | ( | ProcessHistoryID const & | parentPhID, |
int | runNumber | ||
) |
Definition at line 253 of file SubProcess.cc.
References cmsPerfStripChart::operate(), parentToChildPhID_, principalCache_, edm::PrincipalCache::runPrincipal(), schedule_, serviceToken_, and subProcess_.
{ ServiceRegistry::Operate operate(serviceToken_); std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID); assert(it != parentToChildPhID_.end()); schedule_->writeRun(principalCache_.runPrincipal(it->second, runNumber)); if(subProcess_.get()) subProcess_->writeRun(it->second, runNumber); }
boost::shared_ptr<ActionTable const> edm::SubProcess::act_table_ [private] |
Definition at line 219 of file SubProcess.h.
Referenced by SubProcess().
bool edm::SubProcess::cleaningUpAfterException_ [private] |
Definition at line 228 of file SubProcess.h.
Referenced by doEndLuminosityBlock(), doEndRun(), endLuminosityBlock(), and endRun().
std::auto_ptr<ESInfo> edm::SubProcess::esInfo_ [private] |
Definition at line 226 of file SubProcess.h.
Referenced by beginLuminosityBlock(), beginRun(), doBeginLuminosityBlock(), doBeginRun(), doEndLuminosityBlock(), doEndRun(), doEvent(), endLuminosityBlock(), endRun(), and write().
boost::shared_ptr<eventsetup::EventSetupProvider> edm::SubProcess::esp_ [private] |
Definition at line 222 of file SubProcess.h.
Referenced by doBeginLuminosityBlock(), doBeginRun(), doEndLuminosityBlock(), doEndRun(), doEvent(), and SubProcess().
boost::scoped_ptr<HistoryAppender> edm::SubProcess::historyAppender_ [private] |
Definition at line 225 of file SubProcess.h.
Referenced by beginLuminosityBlock(), beginRun(), and SubProcess().
boost::shared_ptr<ProductRegistry const> edm::SubProcess::parentPreg_ [private] |
Definition at line 217 of file SubProcess.h.
std::map<ProcessHistoryID, ProcessHistoryID> edm::SubProcess::parentToChildPhID_ [private] |
Definition at line 224 of file SubProcess.h.
Referenced by beginRun(), deleteLumiFromCache(), deleteRunFromCache(), writeLumi(), and writeRun().
boost::shared_ptr<SignallingProductRegistry> edm::SubProcess::preg_ [private] |
Definition at line 218 of file SubProcess.h.
Referenced by beginJob(), beginLuminosityBlock(), beginRun(), and SubProcess().
Definition at line 221 of file SubProcess.h.
Referenced by beginLuminosityBlock(), beginRun(), deleteLumiFromCache(), deleteRunFromCache(), endLuminosityBlock(), endRun(), SubProcess(), write(), writeLumi(), and writeRun().
boost::shared_ptr<ProcessConfiguration> edm::SubProcess::processConfiguration_ [private] |
Definition at line 220 of file SubProcess.h.
Referenced by beginLuminosityBlock(), beginRun(), and SubProcess().
std::unique_ptr<ParameterSet> edm::SubProcess::processParameterSet_ [private] |
Definition at line 229 of file SubProcess.h.
Referenced by SubProcess().
std::auto_ptr<Schedule> edm::SubProcess::schedule_ [private] |
Definition at line 223 of file SubProcess.h.
Referenced by beginJob(), beginLuminosityBlock(), beginRun(), clearCounters(), closeOutputFiles(), enableEndPaths(), endJob(), endLuminosityBlock(), endPathsEnabled(), endRun(), getTriggerReport(), openNewOutputFilesIfNeeded(), openOutputFiles(), postForkReacquireResources(), preForkReleaseResources(), respondToCloseInputFile(), respondToCloseOutputFiles(), respondToOpenInputFile(), respondToOpenOutputFiles(), shouldWeCloseOutput(), SubProcess(), terminate(), totalEvents(), totalEventsFailed(), totalEventsPassed(), write(), writeLumi(), and writeRun().
ServiceToken edm::SubProcess::serviceToken_ [private] |
Definition at line 216 of file SubProcess.h.
Referenced by beginJob(), clearCounters(), closeOutputFiles(), doBeginLuminosityBlock(), doBeginRun(), doEndLuminosityBlock(), doEndRun(), doEvent(), enableEndPaths(), endJob(), endPathsEnabled(), getTriggerReport(), openNewOutputFilesIfNeeded(), openOutputFiles(), postForkReacquireResources(), preForkReleaseResources(), respondToCloseInputFile(), respondToCloseOutputFiles(), respondToOpenInputFile(), respondToOpenOutputFiles(), shouldWeCloseOutput(), SubProcess(), terminate(), totalEventsFailed(), totalEventsPassed(), writeLumi(), and writeRun().
std::auto_ptr<SubProcess> edm::SubProcess::subProcess_ [private] |
Definition at line 227 of file SubProcess.h.
Referenced by beginJob(), beginLuminosityBlock(), beginRun(), clearCounters(), closeOutputFiles(), deleteLumiFromCache(), deleteRunFromCache(), enableEndPaths(), endJob(), endLuminosityBlock(), endRun(), openNewOutputFilesIfNeeded(), openOutputFiles(), postForkReacquireResources(), preForkReleaseResources(), respondToCloseInputFile(), respondToCloseOutputFiles(), respondToOpenInputFile(), respondToOpenOutputFiles(), shouldWeCloseOutput(), SubProcess(), terminate(), write(), writeLumi(), and writeRun().