CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Public Attributes
edm::ScheduleItems Struct Reference

#include <ScheduleItems.h>

Classes

class  MadeModules
 

Public Member Functions

ServiceToken addCPRandTNS (ParameterSet const &parameterSet, ServiceToken const &token)
 
std::shared_ptr< BranchIDListHelper const > branchIDListHelper () const
 
std::shared_ptr< BranchIDListHelper > & branchIDListHelper ()
 
std::unique_ptr< SchedulefinishSchedule (MadeModules, ParameterSet &parameterSet, service::TriggerNamesService const &tns, bool hasSubprocesses, PreallocationConfiguration const &iAllocConfig, ProcessContext const *, ProcessBlockHelperBase &processBlockHelper)
 
std::shared_ptr< CommonParamsinitMisc (ParameterSet &parameterSet)
 
MadeModules initModules (ParameterSet &parameterSet, service::TriggerNamesService const &tns, PreallocationConfiguration const &iAllocConfig, ProcessContext const *, ModuleTypeResolverMaker const *typeResolverMaker)
 
std::unique_ptr< ScheduleinitSchedule (ParameterSet &parameterSet, bool hasSubprocesses, PreallocationConfiguration const &iAllocConfig, ProcessContext const *, ModuleTypeResolverMaker const *, ProcessBlockHelperBase &processBlockHelper)
 
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, SubProcessBlockHelper &subProcessBlockHelper, ProcessBlockHelperBase const &parentProcessBlockHelper)
 
 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 34 of file ScheduleItems.h.

Constructor & Destructor Documentation

◆ ScheduleItems() [1/3]

edm::ScheduleItems::ScheduleItems ( )

Definition at line 33 of file ScheduleItems.cc.

34  : actReg_(std::make_shared<ActivityRegistry>()),
35  preg_(std::make_shared<SignallingProductRegistry>()),
36  branchIDListHelper_(std::make_shared<BranchIDListHelper>()),
37  thinnedAssociationsHelper_(std::make_shared<ThinnedAssociationsHelper>()),
39  act_table_(),
std::shared_ptr< ActivityRegistry > actReg_
std::unique_ptr< ExceptionToActionTable const > act_table_
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_

◆ ScheduleItems() [2/3]

edm::ScheduleItems::ScheduleItems ( ProductRegistry const &  preg,
SubProcess const &  om,
SubProcessBlockHelper subProcessBlockHelper,
ProcessBlockHelperBase const &  parentProcessBlockHelper 
)

Definition at line 42 of file ScheduleItems.cc.

References submitPVResolutionJobs::desc, edm::InEvent, edm::InLumi, edm::InProcess, edm::InRun, B2GTnPMonitor_cfi::item, edm::SubProcess::keptProducts(), preg_, dumpMFGeometry_cfg::prod, and edm::SubProcessBlockHelper::updateFromParentProcess().

46  : actReg_(std::make_shared<ActivityRegistry>()),
47  preg_(std::make_shared<SignallingProductRegistry>(preg)),
48  branchIDListHelper_(std::make_shared<BranchIDListHelper>()),
49  thinnedAssociationsHelper_(std::make_shared<ThinnedAssociationsHelper>()),
50  subProcessParentageHelper_(std::make_shared<SubProcessParentageHelper>()),
51  act_table_(),
53  for (auto& item : preg_->productListUpdator()) {
54  BranchDescription& prod = item.second;
55  prod.setOnDemand(false);
56  prod.setProduced(false);
57  }
58 
59  // Mark dropped branches as dropped in the product registry.
60  std::set<BranchID> keptBranches;
61  SelectedProducts const& keptVectorP = om.keptProducts()[InProcess];
62  for (auto const& item : keptVectorP) {
63  BranchDescription const& desc = *item.first;
64  keptBranches.insert(desc.branchID());
65  }
66  SelectedProducts const& keptVectorR = om.keptProducts()[InRun];
67  for (auto const& item : keptVectorR) {
68  BranchDescription const& desc = *item.first;
69  keptBranches.insert(desc.branchID());
70  }
71  SelectedProducts const& keptVectorL = om.keptProducts()[InLumi];
72  for (auto const& item : keptVectorL) {
73  BranchDescription const& desc = *item.first;
74  keptBranches.insert(desc.branchID());
75  }
76  SelectedProducts const& keptVectorE = om.keptProducts()[InEvent];
77  for (auto const& item : keptVectorE) {
78  BranchDescription const& desc = *item.first;
79  keptBranches.insert(desc.branchID());
80  }
81  for (auto& item : preg_->productListUpdator()) {
82  BranchDescription& prod = item.second;
83  if (keptBranches.find(prod.branchID()) == keptBranches.end()) {
84  prod.setDropped(true);
85  }
86  }
87  subProcessBlockHelper.updateFromParentProcess(parentProcessBlockHelper, *preg_);
88  }
std::shared_ptr< ActivityRegistry > actReg_
std::unique_ptr< ExceptionToActionTable const > act_table_
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
std::shared_ptr< SignallingProductRegistry const > preg() const
Definition: ScheduleItems.h:85
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_

◆ ScheduleItems() [3/3]

edm::ScheduleItems::ScheduleItems ( ScheduleItems const &  )
delete

Member Function Documentation

◆ addCPRandTNS()

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

Definition at line 110 of file ScheduleItems.cc.

References edm::ServiceRegistry::createContaining(), edm::serviceregistry::kOverlapIsError, edm::parameterSet(), and unpackBuffers-CaloStage2::token.

110  {
111  //add the ProductRegistry as a service ONLY for the construction phase
112  typedef serviceregistry::ServiceWrapper<ConstProductRegistry> w_CPR;
113  auto reg = std::make_shared<w_CPR>(std::make_unique<ConstProductRegistry>(*preg_));
115 
116  // the next thing is ugly: pull out the trigger path pset and
117  // create a service and extra token for it
118 
119  typedef service::TriggerNamesService TNS;
120  typedef serviceregistry::ServiceWrapper<TNS> w_TNS;
121 
122  auto tnsptr = std::make_shared<w_TNS>(std::make_unique<TNS>(parameterSet));
123 
125  }
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
static ServiceToken createContaining(std::unique_ptr< T > iService)
create a service token that holds the service defined by iService

◆ branchIDListHelper() [1/2]

std::shared_ptr<BranchIDListHelper const> edm::ScheduleItems::branchIDListHelper ( ) const
inline

Definition at line 87 of file ScheduleItems.h.

References branchIDListHelper_, and edm::get_underlying_safe().

87  {
89  }
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_

◆ branchIDListHelper() [2/2]

std::shared_ptr<BranchIDListHelper>& edm::ScheduleItems::branchIDListHelper ( )
inline

Definition at line 90 of file ScheduleItems.h.

References branchIDListHelper_, and edm::get_underlying_safe().

constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_

◆ finishSchedule()

std::unique_ptr< Schedule > edm::ScheduleItems::finishSchedule ( MadeModules  madeModules,
ParameterSet parameterSet,
service::TriggerNamesService const &  tns,
bool  hasSubprocesses,
PreallocationConfiguration const &  iAllocConfig,
ProcessContext const *  processContext,
ProcessBlockHelperBase processBlockHelper 
)

Definition at line 193 of file ScheduleItems.cc.

References actReg_, branchIDListHelper_, DiMuonV_cfg::config, edm::ScheduleItems::MadeModules::m_schedule, eostools::move(), edm::parameterSet(), preg_, processConfiguration(), subProcessParentageHelper_, and thinnedAssociationsHelper_.

199  {
200  auto sched = std::move(madeModules.m_schedule);
201  sched->finishSetup(parameterSet,
202  tns,
203  *preg_,
205  processBlockHelper,
208  actReg_,
210  hasSubprocesses,
211  config,
212  processContext);
213  return sched;
214  }
std::shared_ptr< ActivityRegistry > actReg_
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
std::shared_ptr< ProcessConfiguration const > processConfiguration() const
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
dictionary config
Read in AllInOne config in JSON format.
Definition: DiMuonV_cfg.py:30
def move(src, dest)
Definition: eostools.py:511

◆ initMisc()

std::shared_ptr< CommonParams > edm::ScheduleItems::initMisc ( ParameterSet parameterSet)

Definition at line 127 of file ScheduleItems.cc.

References act_table_, trackingPlots::common, edm::ParameterSet::getParameter(), edm::getPassID(), edm::getReleaseVersion(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), edm::ResourceInformation::initializeAcceleratorTypes(), edm::Service< T >::isAvailable(), edm::parameterSet(), processConfiguration_, SimL1EmulatorRepack_CalouGT_cff::processName, and AlCaHLTBitMon_QueryRunRegistry::string.

127  {
128  edm::Service<edm::ResourceInformation> resourceInformationService;
129  if (resourceInformationService.isAvailable()) {
130  auto const& selectedAccelerators =
131  parameterSet.getUntrackedParameter<std::vector<std::string>>("@selected_accelerators");
132  resourceInformationService->initializeAcceleratorTypes(selectedAccelerators);
133  }
134 
135  act_table_ = std::make_unique<ExceptionToActionTable>(parameterSet);
137  processConfiguration_ = std::make_shared<ProcessConfiguration>(
138  processName, getReleaseVersion(), getPassID()); // propagate_const<T> has no reset() function
139  auto common = std::make_shared<CommonParams>(
141  parameterSet.getUntrackedParameterSet("maxLuminosityBlocks").getUntrackedParameter<int>("input"),
142  parameterSet.getUntrackedParameterSet("maxSecondsUntilRampdown").getUntrackedParameter<int>("input"));
143  return common;
144  }
virtual void initializeAcceleratorTypes(std::vector< std::string > const &selectedAccelerators)=0
std::string getPassID()
Definition: GetPassID.h:7
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::unique_ptr< ExceptionToActionTable const > act_table_
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
T getUntrackedParameter(std::string const &, T const &) const
std::string getReleaseVersion()
Definition: common.py:1
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
bool isAvailable() const
Definition: Service.h:40

◆ initModules()

ScheduleItems::MadeModules edm::ScheduleItems::initModules ( ParameterSet parameterSet,
service::TriggerNamesService const &  tns,
PreallocationConfiguration const &  iAllocConfig,
ProcessContext const *  processContext,
ModuleTypeResolverMaker const *  typeResolverMaker 
)

Definition at line 177 of file ScheduleItems.cc.

References act_table_, actReg_, edm::parameterSet(), preg_, and processConfiguration().

181  {
182  return MadeModules(std::make_unique<Schedule>(parameterSet,
183  tns,
184  *preg_,
185  *act_table_,
186  actReg_,
188  config,
189  processContext,
190  typeResolverMaker));
191  }
std::shared_ptr< ActivityRegistry > actReg_
std::unique_ptr< ExceptionToActionTable const > act_table_
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: config.py:1
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
std::shared_ptr< ProcessConfiguration const > processConfiguration() const

◆ initSchedule()

std::unique_ptr< Schedule > edm::ScheduleItems::initSchedule ( ParameterSet parameterSet,
bool  hasSubprocesses,
PreallocationConfiguration const &  iAllocConfig,
ProcessContext const *  processContext,
ModuleTypeResolverMaker const *  typeResolverMaker,
ProcessBlockHelperBase processBlockHelper 
)

Definition at line 146 of file ScheduleItems.cc.

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

151  {
152  auto& tns = ServiceRegistry::instance().get<service::TriggerNamesService>();
153  auto ret = std::make_unique<Schedule>(parameterSet,
154  tns,
155  *preg_,
156  *act_table_,
157  actReg_,
159  config,
160  processContext,
161  typeResolverMaker);
162  ret->finishSetup(parameterSet,
163  tns,
164  *preg_,
166  processBlockHelper,
169  actReg_,
171  hasSubprocesses,
172  config,
173  processContext);
174  return ret;
175  }
std::shared_ptr< ActivityRegistry > actReg_
std::unique_ptr< ExceptionToActionTable const > act_table_
ret
prodAgent to be discontinued
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
std::shared_ptr< ProcessConfiguration const > processConfiguration() const
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
static ServiceRegistry & instance()
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
dictionary config
Read in AllInOne config in JSON format.
Definition: DiMuonV_cfg.py:30

◆ initServices()

ServiceToken edm::ScheduleItems::initServices ( std::vector< ParameterSet > &  servicePSets,
ParameterSet processPSet,
ServiceToken const &  iToken,
serviceregistry::ServiceLegacy  iLegacy,
bool  associate 
)

Definition at line 90 of file ScheduleItems.cc.

References actReg_, edm::ParameterSet::addParameter(), edm::ServiceRegistry::createSet(), B2GTnPMonitor_cfi::item, edm::parameterSet(), AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

94  {
95  //create the services
96  ServiceToken token(ServiceRegistry::createSet(pServiceSets, iToken, iLegacy, associate));
97 
98  //see if any of the Services have to have their PSets stored
99  for (auto const& item : pServiceSets) {
100  if (item.exists("@save_config")) {
101  parameterSet.addParameter(item.getParameter<std::string>("@service_type"), item);
102  }
103  }
104  // Copy slots that hold all the registered callback functions like
105  // PostBeginJob into an ActivityRegistry
106  token.copySlotsTo(*actReg_);
107  return token;
108  }
std::shared_ptr< ActivityRegistry > actReg_
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:136
static ServiceToken createSet(std::vector< ParameterSet > &)

◆ operator=()

ScheduleItems& edm::ScheduleItems::operator= ( ScheduleItems const &  )
delete

◆ preg() [1/2]

std::shared_ptr<SignallingProductRegistry const> edm::ScheduleItems::preg ( ) const
inline

Definition at line 85 of file ScheduleItems.h.

References edm::get_underlying_safe(), and preg_.

85 { return get_underlying_safe(preg_); }
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)

◆ preg() [2/2]

std::shared_ptr<SignallingProductRegistry>& edm::ScheduleItems::preg ( )
inline

Definition at line 86 of file ScheduleItems.h.

References edm::get_underlying_safe(), and preg_.

86 { return get_underlying_safe(preg_); }
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)

◆ processConfiguration() [1/2]

std::shared_ptr<ProcessConfiguration const> edm::ScheduleItems::processConfiguration ( ) const
inline

Definition at line 100 of file ScheduleItems.h.

References edm::get_underlying_safe(), and processConfiguration_.

Referenced by finishSchedule(), initModules(), and initSchedule().

100  {
102  }
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_

◆ processConfiguration() [2/2]

std::shared_ptr<ProcessConfiguration>& edm::ScheduleItems::processConfiguration ( )
inline

Definition at line 103 of file ScheduleItems.h.

References edm::get_underlying_safe(), and processConfiguration_.

constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_

◆ subProcessParentageHelper()

std::shared_ptr<SubProcessParentageHelper>& edm::ScheduleItems::subProcessParentageHelper ( )
inline

Definition at line 97 of file ScheduleItems.h.

References edm::get_underlying_safe(), and subProcessParentageHelper_.

97  {
99  }
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_

◆ thinnedAssociationsHelper() [1/2]

std::shared_ptr<ThinnedAssociationsHelper const> edm::ScheduleItems::thinnedAssociationsHelper ( ) const
inline

Definition at line 91 of file ScheduleItems.h.

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

91  {
93  }
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)

◆ thinnedAssociationsHelper() [2/2]

std::shared_ptr<ThinnedAssociationsHelper>& edm::ScheduleItems::thinnedAssociationsHelper ( )
inline

Definition at line 94 of file ScheduleItems.h.

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

94  {
96  }
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)

Member Data Documentation

◆ act_table_

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

Definition at line 110 of file ScheduleItems.h.

Referenced by initMisc(), initModules(), and initSchedule().

◆ actReg_

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

Definition at line 105 of file ScheduleItems.h.

Referenced by finishSchedule(), initModules(), initSchedule(), and initServices().

◆ branchIDListHelper_

edm::propagate_const<std::shared_ptr<BranchIDListHelper> > edm::ScheduleItems::branchIDListHelper_

Definition at line 107 of file ScheduleItems.h.

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

◆ preg_

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

Definition at line 106 of file ScheduleItems.h.

Referenced by finishSchedule(), initModules(), initSchedule(), preg(), and ScheduleItems().

◆ processConfiguration_

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

Definition at line 111 of file ScheduleItems.h.

Referenced by initMisc(), and processConfiguration().

◆ subProcessParentageHelper_

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

Definition at line 109 of file ScheduleItems.h.

Referenced by finishSchedule(), initSchedule(), and subProcessParentageHelper().

◆ thinnedAssociationsHelper_

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

Definition at line 108 of file ScheduleItems.h.

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