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 > & branchIDListHelper ()
 
std::shared_ptr< BranchIDListHelper const > branchIDListHelper () const
 
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 > & preg ()
 
std::shared_ptr< SignallingProductRegistry const > preg () const
 
std::shared_ptr< ProcessConfiguration > & processConfiguration ()
 
std::shared_ptr< ProcessConfiguration const > processConfiguration () const
 
 ScheduleItems ()
 
 ScheduleItems (ProductRegistry const &preg, SubProcess const &om)
 
 ScheduleItems (ScheduleItems const &)=delete
 
std::shared_ptr< SubProcessParentageHelper > & subProcessParentageHelper ()
 
std::shared_ptr< ThinnedAssociationsHelper > & thinnedAssociationsHelper ()
 
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper () const
 

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

◆ ScheduleItems() [1/3]

edm::ScheduleItems::ScheduleItems ( )

Definition at line 28 of file ScheduleItems.cc.

29  : actReg_(std::make_shared<ActivityRegistry>()),
30  preg_(std::make_shared<SignallingProductRegistry>()),
31  branchIDListHelper_(std::make_shared<BranchIDListHelper>()),
32  thinnedAssociationsHelper_(std::make_shared<ThinnedAssociationsHelper>()),
34  act_table_(),

◆ ScheduleItems() [2/3]

edm::ScheduleItems::ScheduleItems ( ProductRegistry const &  preg,
SubProcess const &  om 
)

Definition at line 37 of file ScheduleItems.cc.

38  : actReg_(std::make_shared<ActivityRegistry>()),
39  preg_(std::make_shared<SignallingProductRegistry>(preg)),
40  branchIDListHelper_(std::make_shared<BranchIDListHelper>()),
41  thinnedAssociationsHelper_(std::make_shared<ThinnedAssociationsHelper>()),
42  subProcessParentageHelper_(std::make_shared<SubProcessParentageHelper>()),
43  act_table_(),
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& keptVectorP = om.keptProducts()[InProcess];
54  for (auto const& item : keptVectorP) {
55  BranchDescription const& desc = *item.first;
56  keptBranches.insert(desc.branchID());
57  }
58  SelectedProducts const& keptVectorR = om.keptProducts()[InRun];
59  for (auto const& item : keptVectorR) {
60  BranchDescription const& desc = *item.first;
61  keptBranches.insert(desc.branchID());
62  }
63  SelectedProducts const& keptVectorL = om.keptProducts()[InLumi];
64  for (auto const& item : keptVectorL) {
65  BranchDescription const& desc = *item.first;
66  keptBranches.insert(desc.branchID());
67  }
68  SelectedProducts const& keptVectorE = om.keptProducts()[InEvent];
69  for (auto const& item : keptVectorE) {
70  BranchDescription const& desc = *item.first;
71  keptBranches.insert(desc.branchID());
72  }
73  for (auto& item : preg_->productListUpdator()) {
74  BranchDescription& prod = item.second;
75  if (keptBranches.find(prod.branchID()) == keptBranches.end()) {
76  prod.setDropped(true);
77  }
78  }
79  }

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

◆ 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 101 of file ScheduleItems.cc.

101  {
102  //add the ProductRegistry as a service ONLY for the construction phase
103  typedef serviceregistry::ServiceWrapper<ConstProductRegistry> w_CPR;
104  auto reg = std::make_shared<w_CPR>(std::make_unique<ConstProductRegistry>(*preg_));
106 
107  // the next thing is ugly: pull out the trigger path pset and
108  // create a service and extra token for it
109 
110  typedef service::TriggerNamesService TNS;
111  typedef serviceregistry::ServiceWrapper<TNS> w_TNS;
112 
113  auto tnsptr = std::make_shared<w_TNS>(std::make_unique<TNS>(parameterSet));
114 
116  }

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

◆ branchIDListHelper() [1/2]

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

Definition at line 58 of file ScheduleItems.h.

References branchIDListHelper_, and edm::get_underlying_safe().

◆ branchIDListHelper() [2/2]

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

Definition at line 55 of file ScheduleItems.h.

55  {
57  }

References branchIDListHelper_, and edm::get_underlying_safe().

◆ clear()

void edm::ScheduleItems::clear ( void  )

Definition at line 148 of file ScheduleItems.cc.

148  {
149  // propagate_const<T> has no reset() function
150  actReg_ = nullptr;
151  preg_ = nullptr;
152  branchIDListHelper_ = nullptr;
153  thinnedAssociationsHelper_ = nullptr;
154  processConfiguration_ = nullptr;
155  }

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

◆ initMisc()

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

Definition at line 118 of file ScheduleItems.cc.

118  {
119  act_table_ = std::make_unique<ExceptionToActionTable>(parameterSet);
121  processConfiguration_ = std::make_shared<ProcessConfiguration>(
122  processName, getReleaseVersion(), getPassID()); // propagate_const<T> has no reset() function
123  auto common = std::make_shared<CommonParams>(
125  parameterSet.getUntrackedParameterSet("maxLuminosityBlocks").getUntrackedParameter<int>("input"),
126  parameterSet.getUntrackedParameterSet("maxSecondsUntilRampdown").getUntrackedParameter<int>("input"));
127  return common;
128  }

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

◆ initSchedule()

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

Definition at line 130 of file ScheduleItems.cc.

133  {
134  return std::make_unique<Schedule>(parameterSet,
135  ServiceRegistry::instance().get<service::TriggerNamesService>(),
136  *preg_,
140  *act_table_,
141  actReg_,
143  hasSubprocesses,
144  config,
145  processContext);
146  }

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

◆ initServices()

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

Definition at line 81 of file ScheduleItems.cc.

85  {
86  //create the services
87  ServiceToken token(ServiceRegistry::createSet(pServiceSets, iToken, iLegacy, associate));
88 
89  //see if any of the Services have to have their PSets stored
90  for (auto const& item : pServiceSets) {
91  if (item.exists("@save_config")) {
92  parameterSet.addParameter(item.getParameter<std::string>("@service_type"), item);
93  }
94  }
95  // Copy slots that hold all the registered callback functions like
96  // PostBeginJob into an ActivityRegistry
97  token.copySlotsTo(*actReg_);
98  return token;
99  }

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

◆ operator=()

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

◆ preg() [1/2]

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

Definition at line 54 of file ScheduleItems.h.

54 { return get_underlying_safe(preg_); }

References edm::get_underlying_safe(), and preg_.

◆ preg() [2/2]

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

Definition at line 53 of file ScheduleItems.h.

53 { return get_underlying_safe(preg_); }

References edm::get_underlying_safe(), and preg_.

◆ processConfiguration() [1/2]

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

◆ processConfiguration() [2/2]

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

Definition at line 68 of file ScheduleItems.h.

68  {
70  }

References edm::get_underlying_safe(), and processConfiguration_.

Referenced by initSchedule().

◆ subProcessParentageHelper()

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

Definition at line 65 of file ScheduleItems.h.

65  {
67  }

References edm::get_underlying_safe(), and subProcessParentageHelper_.

◆ thinnedAssociationsHelper() [1/2]

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

Definition at line 62 of file ScheduleItems.h.

62  {
64  }

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

◆ thinnedAssociationsHelper() [2/2]

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

Definition at line 59 of file ScheduleItems.h.

59  {
61  }

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

Member Data Documentation

◆ act_table_

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

Definition at line 78 of file ScheduleItems.h.

Referenced by initMisc(), and initSchedule().

◆ actReg_

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

Definition at line 73 of file ScheduleItems.h.

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

◆ branchIDListHelper_

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

Definition at line 75 of file ScheduleItems.h.

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

◆ preg_

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

Definition at line 74 of file ScheduleItems.h.

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

◆ processConfiguration_

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

Definition at line 79 of file ScheduleItems.h.

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

◆ subProcessParentageHelper_

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

Definition at line 77 of file ScheduleItems.h.

Referenced by initSchedule(), and subProcessParentageHelper().

◆ thinnedAssociationsHelper_

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

Definition at line 76 of file ScheduleItems.h.

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

edm::ScheduleItems::preg
std::shared_ptr< SignallingProductRegistry const > preg() const
Definition: ScheduleItems.h:53
edm::ScheduleItems::processConfiguration
std::shared_ptr< ProcessConfiguration const > processConfiguration() const
Definition: ScheduleItems.h:68
edm::ScheduleItems::processConfiguration_
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
Definition: ScheduleItems.h:79
edm::ParameterSet::getUntrackedParameterSet
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
Definition: ParameterSet.cc:2136
edm::ScheduleItems::thinnedAssociationsHelper_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:76
edm::ServiceRegistry::createSet
static ServiceToken createSet(std::vector< ParameterSet > &)
Definition: ServiceRegistry.cc:75
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::get_underlying_safe
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Definition: get_underlying_safe.h:41
edm::getPassID
std::string getPassID()
Definition: GetPassID.h:7
edm::ScheduleItems::preg_
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:74
edm::ScheduleItems::branchIDListHelper_
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:75
edm::InRun
Definition: BranchType.h:11
edm::SelectedProducts
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
Definition: SelectedProducts.h:11
edm::InProcess
Definition: BranchType.h:11
submitPVResolutionJobs.config
config
parse the configuration file
Definition: submitPVResolutionJobs.py:281
edm::ScheduleItems::act_table_
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:78
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::ScheduleItems::actReg_
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:73
edm::InEvent
Definition: BranchType.h:11
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::InLumi
Definition: BranchType.h:11
edm::serviceregistry::kOverlapIsError
Definition: ServiceLegacy.h:29
edm::ParameterSet::addParameter
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
edm::ScheduleItems::subProcessParentageHelper_
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
Definition: ScheduleItems.h:77
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
ServiceToken
edm::ServiceRegistry::instance
static ServiceRegistry & instance()
Definition: ServiceRegistry.cc:90
SimL1EmulatorRepack_CalouGT_cff.processName
processName
Definition: SimL1EmulatorRepack_CalouGT_cff.py:17
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::ServiceRegistry::createContaining
static ServiceToken createContaining(std::unique_ptr< T > iService)
create a service token that holds the service defined by iService
Definition: ServiceRegistry.h:99
edm::getReleaseVersion
std::string getReleaseVersion()
Definition: GetReleaseVersion.cc:7
edm::parameterSet
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
trackingPlots.common
common
Definition: trackingPlots.py:206
common
Definition: common.py:1
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:318