CMS 3D CMS Logo

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)
 
std::shared_ptr< BranchIDListHelper const > branchIDListHelper () const
 
std::shared_ptr< BranchIDListHelper > & branchIDListHelper ()
 
void clear ()
 
std::shared_ptr< CommonParamsinitMisc (ParameterSet &parameterSet)
 
std::unique_ptr< ScheduleinitSchedule (ParameterSet &parameterSet, bool hasSubprocesses, 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
 
std::shared_ptr< SignallingProductRegistry const > preg () const
 
std::shared_ptr< SignallingProductRegistry > & preg ()
 
std::shared_ptr< ProcessConfiguration const > processConfiguration () const
 
std::shared_ptr< ProcessConfiguration > & processConfiguration ()
 
 ScheduleItems ()
 
 ScheduleItems (ProductRegistry const &preg, SubProcess const &om)
 
 ScheduleItems (ScheduleItems const &)=delete
 
std::shared_ptr< SubProcessParentageHelper > & subProcessParentageHelper ()
 
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper () const
 
std::shared_ptr< ThinnedAssociationsHelper > & thinnedAssociationsHelper ()
 

Public Attributes

std::unique_ptr< ExceptionToActionTable const > act_table_
 
std::shared_ptr< ActivityRegistryactReg_
 
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
 
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
 
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
 
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
 
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
 

Detailed Description

Definition at line 28 of file ScheduleItems.h.

Constructor & Destructor Documentation

edm::ScheduleItems::ScheduleItems ( )

Definition at line 26 of file ScheduleItems.cc.

26  :
27  actReg_(std::make_shared<ActivityRegistry>()),
28  preg_(std::make_shared<SignallingProductRegistry>()),
29  branchIDListHelper_(std::make_shared<BranchIDListHelper>()),
30  thinnedAssociationsHelper_(std::make_shared<ThinnedAssociationsHelper>()),
32  act_table_(),
34  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:68
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:73
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:69
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:71
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:70
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
Definition: ScheduleItems.h:74
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
Definition: ScheduleItems.h:72
edm::ScheduleItems::ScheduleItems ( ProductRegistry const &  preg,
SubProcess const &  om 
)

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

36  :
37  actReg_(std::make_shared<ActivityRegistry>()),
38  preg_(std::make_shared<SignallingProductRegistry>(preg)),
39  branchIDListHelper_(std::make_shared<BranchIDListHelper>()),
40  thinnedAssociationsHelper_(std::make_shared<ThinnedAssociationsHelper>()),
41  subProcessParentageHelper_(std::make_shared<SubProcessParentageHelper>()),
42  act_table_(),
44 
45  for(auto& item : preg_->productListUpdator()) {
46  BranchDescription& prod = item.second;
47  prod.setOnDemand(false);
48  prod.setProduced(false);
49  }
50 
51  // Mark dropped branches as dropped in the product registry.
52  std::set<BranchID> keptBranches;
53  SelectedProducts const& keptVectorR = om.keptProducts()[InRun];
54  for(auto const& item : keptVectorR) {
55  BranchDescription const& desc = *item.first;
56  keptBranches.insert(desc.branchID());
57  }
58  SelectedProducts const& keptVectorL = om.keptProducts()[InLumi];
59  for(auto const& item : keptVectorL) {
60  BranchDescription const& desc = *item.first;
61  keptBranches.insert(desc.branchID());
62  }
63  SelectedProducts const& keptVectorE = om.keptProducts()[InEvent];
64  for(auto const& item : keptVectorE) {
65  BranchDescription const& desc = *item.first;
66  keptBranches.insert(desc.branchID());
67  }
68  for(auto& item : preg_->productListUpdator()) {
69  BranchDescription& prod = item.second;
70  if(keptBranches.find(prod.branchID()) == keptBranches.end()) {
71  prod.setDropped(true);
72  }
73  }
74  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:68
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:73
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:69
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:71
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:70
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
Definition: ScheduleItems.h:74
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
Definition: ScheduleItems.h:72
std::shared_ptr< SignallingProductRegistry const > preg() const
Definition: ScheduleItems.h:58
edm::ScheduleItems::ScheduleItems ( ScheduleItems const &  )
delete

Member Function Documentation

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

Definition at line 99 of file ScheduleItems.cc.

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

Referenced by edm::EventProcessor::init(), and edm::SubProcess::SubProcess().

99  {
100 
101  //add the ProductRegistry as a service ONLY for the construction phase
102  typedef serviceregistry::ServiceWrapper<ConstProductRegistry> w_CPR;
103  auto reg = std::make_shared<w_CPR>(std::make_unique<ConstProductRegistry>(*preg_));
105  token,
107 
108  // the next thing is ugly: pull out the trigger path pset and
109  // create a service and extra token for it
110 
111  typedef service::TriggerNamesService TNS;
112  typedef serviceregistry::ServiceWrapper<TNS> w_TNS;
113 
114  auto tnsptr = std::make_shared<w_TNS>(std::make_unique<TNS>(parameterSet));
115 
116  return ServiceRegistry::createContaining(tnsptr,
117  tempToken,
119  }
static ServiceToken createContaining(std::unique_ptr< T > iService)
create a service token that holds the service defined by iService
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
std::shared_ptr<BranchIDListHelper const> edm::ScheduleItems::branchIDListHelper ( ) const
inline

Definition at line 60 of file ScheduleItems.h.

References branchIDListHelper_, and edm::get_underlying_safe().

Referenced by edm::EventProcessor::init(), and edm::SubProcess::SubProcess().

edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:70
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::shared_ptr<BranchIDListHelper>& edm::ScheduleItems::branchIDListHelper ( )
inline

Definition at line 61 of file ScheduleItems.h.

References branchIDListHelper_, and edm::get_underlying_safe().

edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:70
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
void edm::ScheduleItems::clear ( void  )

Definition at line 157 of file ScheduleItems.cc.

References actReg_, branchIDListHelper_, preg_, processConfiguration_, and thinnedAssociationsHelper_.

Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().

157  {
158  // propagate_const<T> has no reset() function
159  actReg_ = nullptr;
160  preg_ = nullptr;
161  branchIDListHelper_ = nullptr;
162  thinnedAssociationsHelper_ = nullptr;
163  processConfiguration_ = nullptr;
164  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:68
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:69
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:71
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:70
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
Definition: ScheduleItems.h:74
std::shared_ptr< CommonParams > edm::ScheduleItems::initMisc ( ParameterSet parameterSet)

Definition at line 122 of file ScheduleItems.cc.

References act_table_, trackingPlots::common, edm::ParameterSet::getParameter(), edm::getPassID(), edm::getReleaseVersion(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), processConfiguration_, modifiedElectrons_cfi::processName, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::EventProcessor::init(), and edm::SubProcess::SubProcess().

122  {
123  act_table_.reset(new ExceptionToActionTable(parameterSet));
124  std::string processName = parameterSet.getParameter<std::string>("@process_name");
125  processConfiguration_ = std::make_shared<ProcessConfiguration>(processName, getReleaseVersion(), getPassID()); // propagate_const<T> has no reset() function
126  auto common = std::make_shared<CommonParams>(
127  parameterSet.getUntrackedParameterSet(
128  "maxEvents", ParameterSet()).getUntrackedParameter<int>("input", -1),
129  parameterSet.getUntrackedParameterSet(
130  "maxLuminosityBlocks", ParameterSet()).getUntrackedParameter<int>("input", -1),
131  parameterSet.getUntrackedParameterSet(
132  "maxSecondsUntilRampdown", ParameterSet()).getUntrackedParameter<int>("input", -1));
133  return common;
134  }
std::string getPassID()
Definition: GetPassID.h:8
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:73
std::string getReleaseVersion()
Definition: common.py:1
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
Definition: ScheduleItems.h:74
std::unique_ptr< Schedule > edm::ScheduleItems::initSchedule ( ParameterSet parameterSet,
bool  hasSubprocesses,
PreallocationConfiguration const &  iAllocConfig,
ProcessContext const *  processContext 
)

Definition at line 137 of file ScheduleItems.cc.

References act_table_, actReg_, branchIDListHelper_, looper::config, edm::ServiceRegistry::get(), edm::ServiceRegistry::instance(), edm::parameterSet(), preg_, processConfiguration(), subProcessParentageHelper_, and thinnedAssociationsHelper_.

Referenced by edm::EventProcessor::init(), and edm::SubProcess::SubProcess().

140  {
141  return std::make_unique<Schedule>(
142  parameterSet,
143  ServiceRegistry::instance().get<service::TriggerNamesService>(),
144  *preg_,
148  *act_table_,
149  actReg_,
151  hasSubprocesses,
152  config,
153  processContext);
154  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:68
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:73
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:69
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:71
config
Definition: looper.py:287
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:70
static ServiceRegistry & instance()
std::shared_ptr< ProcessConfiguration const > processConfiguration() const
Definition: ScheduleItems.h:65
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
Definition: ScheduleItems.h:72
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
ServiceToken edm::ScheduleItems::initServices ( std::vector< ParameterSet > &  servicePSets,
ParameterSet processPSet,
ServiceToken const &  iToken,
serviceregistry::ServiceLegacy  iLegacy,
bool  associate 
)

Definition at line 77 of file ScheduleItems.cc.

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

Referenced by edm::EventProcessor::init(), and edm::SubProcess::SubProcess().

81  {
82 
83  //create the services
84  ServiceToken token(ServiceRegistry::createSet(pServiceSets, iToken, iLegacy, associate));
85 
86  //see if any of the Services have to have their PSets stored
87  for(auto const& item : pServiceSets) {
88  if(item.exists("@save_config")) {
89  parameterSet.addParameter(item.getParameter<std::string>("@service_type"), item);
90  }
91  }
92  // Copy slots that hold all the registered callback functions like
93  // PostBeginJob into an ActivityRegistry
94  token.copySlotsTo(*actReg_);
95  return token;
96  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:68
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:144
static ServiceToken createSet(std::vector< ParameterSet > &)
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
ScheduleItems& edm::ScheduleItems::operator= ( ScheduleItems const &  )
delete
std::shared_ptr<SignallingProductRegistry const> edm::ScheduleItems::preg ( ) const
inline

Definition at line 58 of file ScheduleItems.h.

References edm::get_underlying_safe(), and preg_.

Referenced by edm::EventProcessor::init(), and edm::SubProcess::SubProcess().

58 {return get_underlying_safe(preg_);}
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:69
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::shared_ptr<SignallingProductRegistry>& edm::ScheduleItems::preg ( )
inline

Definition at line 59 of file ScheduleItems.h.

References edm::get_underlying_safe(), and preg_.

59 {return get_underlying_safe(preg_);}
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:69
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::shared_ptr<ProcessConfiguration const> edm::ScheduleItems::processConfiguration ( ) const
inline

Definition at line 65 of file ScheduleItems.h.

References edm::get_underlying_safe(), and processConfiguration_.

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

std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
Definition: ScheduleItems.h:74
std::shared_ptr<ProcessConfiguration>& edm::ScheduleItems::processConfiguration ( )
inline

Definition at line 66 of file ScheduleItems.h.

References edm::get_underlying_safe(), and processConfiguration_.

std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
Definition: ScheduleItems.h:74
std::shared_ptr<SubProcessParentageHelper>& edm::ScheduleItems::subProcessParentageHelper ( )
inline

Definition at line 64 of file ScheduleItems.h.

References edm::get_underlying_safe(), and subProcessParentageHelper_.

Referenced by edm::SubProcess::SubProcess().

std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
Definition: ScheduleItems.h:72
std::shared_ptr<ThinnedAssociationsHelper const> edm::ScheduleItems::thinnedAssociationsHelper ( ) const
inline

Definition at line 62 of file ScheduleItems.h.

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

Referenced by edm::EventProcessor::init(), and edm::SubProcess::SubProcess().

edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:71
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::shared_ptr<ThinnedAssociationsHelper>& edm::ScheduleItems::thinnedAssociationsHelper ( )
inline

Definition at line 63 of file ScheduleItems.h.

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:71
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)

Member Data Documentation

std::unique_ptr<ExceptionToActionTable const> edm::ScheduleItems::act_table_
std::shared_ptr<ActivityRegistry> edm::ScheduleItems::actReg_
edm::propagate_const<std::shared_ptr<BranchIDListHelper> > edm::ScheduleItems::branchIDListHelper_

Definition at line 70 of file ScheduleItems.h.

Referenced by branchIDListHelper(), clear(), and initSchedule().

edm::propagate_const<std::shared_ptr<SignallingProductRegistry> > edm::ScheduleItems::preg_

Definition at line 69 of file ScheduleItems.h.

Referenced by clear(), initSchedule(), preg(), and ScheduleItems().

edm::propagate_const<std::shared_ptr<ProcessConfiguration> > edm::ScheduleItems::processConfiguration_

Definition at line 74 of file ScheduleItems.h.

Referenced by clear(), initMisc(), and processConfiguration().

edm::propagate_const<std::shared_ptr<SubProcessParentageHelper> > edm::ScheduleItems::subProcessParentageHelper_

Definition at line 72 of file ScheduleItems.h.

Referenced by initSchedule(), and subProcessParentageHelper().

edm::propagate_const<std::shared_ptr<ThinnedAssociationsHelper> > edm::ScheduleItems::thinnedAssociationsHelper_

Definition at line 71 of file ScheduleItems.h.

Referenced by clear(), initSchedule(), and thinnedAssociationsHelper().