#include <ScheduleItems.h>
Public Member Functions | |
ServiceToken | addCPRandTNS (ParameterSet const ¶meterSet, ServiceToken const &token) |
void | clear () |
boost::shared_ptr< CommonParams > | initMisc (ParameterSet ¶meterSet) |
std::auto_ptr< Schedule > | initSchedule (ParameterSet ¶meterSet, ParameterSet const *subProcessPSet) |
ServiceToken | initServices (std::vector< ParameterSet > &servicePSets, ParameterSet &processPSet, ServiceToken const &iToken, serviceregistry::ServiceLegacy iLegacy, bool associate) |
ScheduleItems & | operator= (ScheduleItems const &) |
ScheduleItems (ProductRegistry const &preg, BranchIDListHelper const &branchIDListHelper, OutputModule const &om) | |
ScheduleItems (ScheduleItems const &) | |
ScheduleItems () | |
Public Attributes | |
std::unique_ptr< ActionTable const > | act_table_ |
boost::shared_ptr < ActivityRegistry > | actReg_ |
boost::shared_ptr < BranchIDListHelper > | branchIDListHelper_ |
std::unique_ptr < SignallingProductRegistry > | preg_ |
boost::shared_ptr < ProcessConfiguration > | processConfiguration_ |
Definition at line 24 of file ScheduleItems.h.
edm::ScheduleItems::ScheduleItems | ( | ) |
Definition at line 24 of file ScheduleItems.cc.
: actReg_(new ActivityRegistry), preg_(new SignallingProductRegistry), branchIDListHelper_(new BranchIDListHelper()), act_table_(), processConfiguration_() { }
edm::ScheduleItems::ScheduleItems | ( | ProductRegistry const & | preg, |
BranchIDListHelper const & | branchIDListHelper, | ||
OutputModule const & | om | ||
) |
Definition at line 32 of file ScheduleItems.cc.
References edm::InEvent, edm::InLumi, edm::InRun, edm::OutputModule::keptProducts(), and preg_.
: actReg_(new ActivityRegistry), preg_(new SignallingProductRegistry(preg)), branchIDListHelper_(new BranchIDListHelper(branchIDListHelper)), act_table_(), processConfiguration_() { for(ProductRegistry::ProductList::iterator it = preg_->productListUpdator().begin(), itEnd = preg_->productListUpdator().end(); it != itEnd; ++it) { it->second.onDemand() = false; it->second.produced() = false; } // Mark dropped branches as dropped in the product registry. std::set<BranchID> keptBranches; Selections const& keptVectorR = om.keptProducts()[InRun]; for(Selections::const_iterator it = keptVectorR.begin(), itEnd = keptVectorR.end(); it != itEnd; ++it) { keptBranches.insert((*it)->branchID()); } Selections const& keptVectorL = om.keptProducts()[InLumi]; for(Selections::const_iterator it = keptVectorL.begin(), itEnd = keptVectorL.end(); it != itEnd; ++it) { keptBranches.insert((*it)->branchID()); } Selections const& keptVectorE = om.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(); } } }
edm::ScheduleItems::ScheduleItems | ( | ScheduleItems const & | ) |
ServiceToken edm::ScheduleItems::addCPRandTNS | ( | ParameterSet const & | parameterSet, |
ServiceToken const & | token | ||
) |
Definition at line 89 of file ScheduleItems.cc.
References edm::ServiceRegistry::createContaining(), edm::serviceregistry::kOverlapIsError, and preg_.
Referenced by edm::EventProcessor::init().
{ //add the ProductRegistry as a service ONLY for the construction phase typedef serviceregistry::ServiceWrapper<ConstProductRegistry> w_CPR; boost::shared_ptr<w_CPR> reg(new w_CPR(std::auto_ptr<ConstProductRegistry>(new ConstProductRegistry(*preg_)))); ServiceToken tempToken(ServiceRegistry::createContaining(reg, token, serviceregistry::kOverlapIsError)); // the next thing is ugly: pull out the trigger path pset and // create a service and extra token for it typedef service::TriggerNamesService TNS; typedef serviceregistry::ServiceWrapper<TNS> w_TNS; boost::shared_ptr<w_TNS> tnsptr (new w_TNS(std::auto_ptr<TNS>(new TNS(parameterSet)))); return ServiceRegistry::createContaining(tnsptr, tempToken, serviceregistry::kOverlapIsError); }
void edm::ScheduleItems::clear | ( | void | ) |
Definition at line 142 of file ScheduleItems.cc.
References actReg_, branchIDListHelper_, preg_, and processConfiguration_.
{ actReg_.reset(); preg_.reset(); branchIDListHelper_.reset(); processConfiguration_.reset(); }
boost::shared_ptr< CommonParams > edm::ScheduleItems::initMisc | ( | ParameterSet & | parameterSet | ) |
Definition at line 114 of file ScheduleItems.cc.
References act_table_, edm::ParameterSet::getParameter(), edm::getPassID(), edm::getReleaseVersion(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), processConfiguration_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by edm::EventProcessor::init().
{ act_table_.reset(new ActionTable(parameterSet)); std::string processName = parameterSet.getParameter<std::string>("@process_name"); processConfiguration_.reset(new ProcessConfiguration(processName, getReleaseVersion(), getPassID())); boost::shared_ptr<CommonParams> common(new CommonParams(parameterSet.getUntrackedParameterSet( "maxEvents", ParameterSet()).getUntrackedParameter<int>("input", -1), parameterSet.getUntrackedParameterSet( "maxLuminosityBlocks", ParameterSet()).getUntrackedParameter<int>("input", -1))); return common; }
std::auto_ptr< Schedule > edm::ScheduleItems::initSchedule | ( | ParameterSet & | parameterSet, |
ParameterSet const * | subProcessPSet | ||
) |
Definition at line 127 of file ScheduleItems.cc.
References act_table_, actReg_, branchIDListHelper_, edm::ServiceRegistry::instance(), preg_, processConfiguration_, and Tree_ALCARECO_cff::schedule.
Referenced by edm::EventProcessor::init().
{ std::auto_ptr<Schedule> schedule( new Schedule(parameterSet, ServiceRegistry::instance().get<service::TriggerNamesService>(), *preg_, *branchIDListHelper_, *act_table_, actReg_, processConfiguration_, subProcessPSet)); return schedule; }
ServiceToken edm::ScheduleItems::initServices | ( | std::vector< ParameterSet > & | servicePSets, |
ParameterSet & | processPSet, | ||
ServiceToken const & | iToken, | ||
serviceregistry::ServiceLegacy | iLegacy, | ||
bool | associate | ||
) |
Definition at line 65 of file ScheduleItems.cc.
References actReg_, edm::ParameterSet::addParameter(), edm::ServiceToken::copySlotsTo(), edm::ServiceRegistry::createSet(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by edm::EventProcessor::init().
{ //create the services ServiceToken token(ServiceRegistry::createSet(pServiceSets, iToken, iLegacy, associate)); //see if any of the Services have to have their PSets stored for(std::vector<ParameterSet>::const_iterator it = pServiceSets.begin(), itEnd = pServiceSets.end(); it != itEnd; ++it) { if(it->exists("@save_config")) { parameterSet.addParameter(it->getParameter<std::string>("@service_type"), *it); } } // Copy slots that hold all the registered callback functions like // PostBeginJob into an ActivityRegistry token.copySlotsTo(*actReg_); return token; }
ScheduleItems& edm::ScheduleItems::operator= | ( | ScheduleItems const & | ) |
std::unique_ptr<ActionTable const> edm::ScheduleItems::act_table_ |
Definition at line 55 of file ScheduleItems.h.
Referenced by edm::EventProcessor::init(), initMisc(), and initSchedule().
boost::shared_ptr<ActivityRegistry> edm::ScheduleItems::actReg_ |
Definition at line 52 of file ScheduleItems.h.
Referenced by clear(), edm::EventProcessor::init(), initSchedule(), and initServices().
boost::shared_ptr<BranchIDListHelper> edm::ScheduleItems::branchIDListHelper_ |
Definition at line 54 of file ScheduleItems.h.
Referenced by clear(), edm::EventProcessor::init(), and initSchedule().
std::unique_ptr<SignallingProductRegistry> edm::ScheduleItems::preg_ |
Definition at line 53 of file ScheduleItems.h.
Referenced by addCPRandTNS(), clear(), edm::EventProcessor::init(), initSchedule(), and ScheduleItems().
boost::shared_ptr<ProcessConfiguration> edm::ScheduleItems::processConfiguration_ |
Definition at line 56 of file ScheduleItems.h.
Referenced by clear(), edm::EventProcessor::init(), initMisc(), and initSchedule().