CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
edm::ScheduleItems Struct Reference

#include <ScheduleItems.h>

Public Member Functions

ServiceToken addCPRandTNS (ParameterSet const &parameterSet, ServiceToken const &token)
 
void clear ()
 
boost::shared_ptr< CommonParamsinitMisc (ParameterSet &parameterSet)
 
std::auto_ptr< ScheduleinitSchedule (ParameterSet &parameterSet, ParameterSet const *subProcessPSet, PreallocationConfiguration const &iAllocConfig, ProcessContext const *)
 
ServiceToken initServices (std::vector< ParameterSet > &servicePSets, ParameterSet &processPSet, ServiceToken const &iToken, serviceregistry::ServiceLegacy iLegacy, bool associate)
 
ScheduleItemsoperator= (ScheduleItems const &)=delete
 
 ScheduleItems ()
 
 ScheduleItems (ProductRegistry const &preg, SubProcess const &om)
 
 ScheduleItems (ScheduleItems const &)=delete
 

Public Attributes

std::unique_ptr
< ExceptionToActionTable const > 
act_table_
 
boost::shared_ptr
< ActivityRegistry
actReg_
 
boost::shared_ptr
< BranchIDListHelper
branchIDListHelper_
 
std::unique_ptr
< SignallingProductRegistry
preg_
 
boost::shared_ptr
< ProcessConfiguration
processConfiguration_
 

Detailed Description

Definition at line 27 of file ScheduleItems.h.

Constructor & Destructor Documentation

edm::ScheduleItems::ScheduleItems ( )

Definition at line 24 of file ScheduleItems.cc.

24  :
27  branchIDListHelper_(new BranchIDListHelper),
28  act_table_(),
30  }
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:60
boost::shared_ptr< ProcessConfiguration > processConfiguration_
Definition: ScheduleItems.h:61
std::unique_ptr< SignallingProductRegistry > preg_
Definition: ScheduleItems.h:58
boost::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:57
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: ScheduleItems.h:59
edm::ScheduleItems::ScheduleItems ( ProductRegistry const &  preg,
SubProcess const &  om 
)

Definition at line 32 of file ScheduleItems.cc.

References edm::BranchDescription::branchID(), edm::InEvent, edm::InLumi, edm::InRun, edm::SubProcess::keptProducts(), preg_, parseEventContent::prod, edm::BranchDescription::setDropped(), edm::BranchDescription::setOnDemand(), and edm::BranchDescription::setProduced().

32  :
35  branchIDListHelper_(new BranchIDListHelper),
36  act_table_(),
38 
39  for(auto& item : preg_->productListUpdator()) {
40  BranchDescription& prod = item.second;
41  prod.setOnDemand(false);
42  prod.setProduced(false);
43  }
44 
45  // Mark dropped branches as dropped in the product registry.
46  std::set<BranchID> keptBranches;
47  SelectedProducts const& keptVectorR = om.keptProducts()[InRun];
48  for(auto const& item : keptVectorR) {
49  keptBranches.insert(item->branchID());
50  }
51  SelectedProducts const& keptVectorL = om.keptProducts()[InLumi];
52  for(auto const& item : keptVectorL) {
53  keptBranches.insert(item->branchID());
54  }
55  SelectedProducts const& keptVectorE = om.keptProducts()[InEvent];
56  for(auto const& item : keptVectorE) {
57  keptBranches.insert(item->branchID());
58  }
59  for(auto& item : preg_->productListUpdator()) {
60  BranchDescription& prod = item.second;
61  if(keptBranches.find(prod.branchID()) == keptBranches.end()) {
62  prod.setDropped(true);
63  }
64  }
65  }
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:60
boost::shared_ptr< ProcessConfiguration > processConfiguration_
Definition: ScheduleItems.h:61
std::unique_ptr< SignallingProductRegistry > preg_
Definition: ScheduleItems.h:58
std::vector< BranchDescription const * > SelectedProducts
boost::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:57
preg
Definition: Schedule.cc:369
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: ScheduleItems.h:59
edm::ScheduleItems::ScheduleItems ( ScheduleItems const &  )
delete

Member Function Documentation

ServiceToken edm::ScheduleItems::addCPRandTNS ( ParameterSet const &  parameterSet,
ServiceToken const &  token 
)

Definition at line 90 of file ScheduleItems.cc.

References edm::ServiceRegistry::createContaining(), edm::serviceregistry::kOverlapIsError, and preg_.

Referenced by edm::EventProcessor::init().

90  {
91 
92  //add the ProductRegistry as a service ONLY for the construction phase
93  typedef serviceregistry::ServiceWrapper<ConstProductRegistry> w_CPR;
94  boost::shared_ptr<w_CPR>
95  reg(new w_CPR(std::auto_ptr<ConstProductRegistry>(new ConstProductRegistry(*preg_))));
97  token,
99 
100  // the next thing is ugly: pull out the trigger path pset and
101  // create a service and extra token for it
102 
103  typedef service::TriggerNamesService TNS;
104  typedef serviceregistry::ServiceWrapper<TNS> w_TNS;
105 
106  boost::shared_ptr<w_TNS> tnsptr
107  (new w_TNS(std::auto_ptr<TNS>(new TNS(parameterSet))));
108 
109  return ServiceRegistry::createContaining(tnsptr,
110  tempToken,
112  }
static ServiceToken createContaining(std::auto_ptr< T > iService)
create a service token that holds the service defined by iService
std::unique_ptr< SignallingProductRegistry > preg_
Definition: ScheduleItems.h:58
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
void edm::ScheduleItems::clear ( void  )
boost::shared_ptr< CommonParams > edm::ScheduleItems::initMisc ( ParameterSet parameterSet)

Definition at line 115 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().

115  {
116  act_table_.reset(new ExceptionToActionTable(parameterSet));
117  std::string processName = parameterSet.getParameter<std::string>("@process_name");
118  processConfiguration_.reset(new ProcessConfiguration(processName, getReleaseVersion(), getPassID()));
119  boost::shared_ptr<CommonParams>
120  common(new CommonParams(parameterSet.getUntrackedParameterSet(
121  "maxEvents", ParameterSet()).getUntrackedParameter<int>("input", -1),
122  parameterSet.getUntrackedParameterSet(
123  "maxLuminosityBlocks", ParameterSet()).getUntrackedParameter<int>("input", -1)));
124  return common;
125  }
std::string getPassID()
Definition: GetPassID.h:8
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:60
boost::shared_ptr< ProcessConfiguration > processConfiguration_
Definition: ScheduleItems.h:61
std::string getReleaseVersion()
std::auto_ptr< Schedule > edm::ScheduleItems::initSchedule ( ParameterSet parameterSet,
ParameterSet const *  subProcessPSet,
PreallocationConfiguration const &  iAllocConfig,
ProcessContext const *  processContext 
)

Definition at line 128 of file ScheduleItems.cc.

References act_table_, actReg_, branchIDListHelper_, edm::ServiceRegistry::instance(), preg_, processConfiguration_, and Tree_ALCARECO_cff::schedule.

Referenced by edm::EventProcessor::init().

131  {
132  std::auto_ptr<Schedule> schedule(
133  new Schedule(parameterSet,
134  ServiceRegistry::instance().get<service::TriggerNamesService>(),
135  *preg_,
137  *act_table_,
138  actReg_,
140  subProcessPSet,
141  config,
142  processContext));
143  return schedule;
144  }
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:60
boost::shared_ptr< ProcessConfiguration > processConfiguration_
Definition: ScheduleItems.h:61
static ServiceRegistry & instance()
std::unique_ptr< SignallingProductRegistry > preg_
Definition: ScheduleItems.h:58
boost::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:57
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: ScheduleItems.h:59
ServiceToken edm::ScheduleItems::initServices ( std::vector< ParameterSet > &  servicePSets,
ParameterSet processPSet,
ServiceToken const &  iToken,
serviceregistry::ServiceLegacy  iLegacy,
bool  associate 
)

Definition at line 68 of file ScheduleItems.cc.

References actReg_, edm::ParameterSet::addParameter(), edm::ServiceToken::copySlotsTo(), edm::ServiceRegistry::createSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::EventProcessor::init().

72  {
73 
74  //create the services
75  ServiceToken token(ServiceRegistry::createSet(pServiceSets, iToken, iLegacy, associate));
76 
77  //see if any of the Services have to have their PSets stored
78  for(auto const& item : pServiceSets) {
79  if(item.exists("@save_config")) {
80  parameterSet.addParameter(item.getParameter<std::string>("@service_type"), item);
81  }
82  }
83  // Copy slots that hold all the registered callback functions like
84  // PostBeginJob into an ActivityRegistry
85  token.copySlotsTo(*actReg_);
86  return token;
87  }
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:142
static ServiceToken createSet(std::vector< ParameterSet > &)
boost::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:57
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
ScheduleItems& edm::ScheduleItems::operator= ( ScheduleItems const &  )
delete

Member Data Documentation

std::unique_ptr<ExceptionToActionTable const> edm::ScheduleItems::act_table_

Definition at line 60 of file ScheduleItems.h.

Referenced by edm::EventProcessor::init(), initMisc(), and initSchedule().

boost::shared_ptr<ActivityRegistry> edm::ScheduleItems::actReg_

Definition at line 57 of file ScheduleItems.h.

Referenced by clear(), edm::EventProcessor::init(), initSchedule(), and initServices().

boost::shared_ptr<BranchIDListHelper> edm::ScheduleItems::branchIDListHelper_

Definition at line 59 of file ScheduleItems.h.

Referenced by clear(), edm::EventProcessor::init(), and initSchedule().

std::unique_ptr<SignallingProductRegistry> edm::ScheduleItems::preg_
boost::shared_ptr<ProcessConfiguration> edm::ScheduleItems::processConfiguration_

Definition at line 61 of file ScheduleItems.h.

Referenced by clear(), edm::EventProcessor::init(), initMisc(), and initSchedule().