CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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)
 
std::shared_ptr
< BranchIDListHelper const > 
branchIDListHelper () const
 
std::shared_ptr
< BranchIDListHelper > & 
branchIDListHelper ()
 
std::shared_ptr< CommonParamsinitMisc (ParameterSet &parameterSet)
 
std::unique_ptr< ScheduleinitSchedule (ParameterSet &parameterSet, bool hasSubprocesses, PreallocationConfiguration const &iAllocConfig, ProcessContext 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 30 of file ScheduleItems.h.

Constructor & Destructor Documentation

edm::ScheduleItems::ScheduleItems ( )

Definition at line 29 of file ScheduleItems.cc.

30  : actReg_(std::make_shared<ActivityRegistry>()),
31  preg_(std::make_shared<SignallingProductRegistry>()),
32  branchIDListHelper_(std::make_shared<BranchIDListHelper>()),
33  thinnedAssociationsHelper_(std::make_shared<ThinnedAssociationsHelper>()),
35  act_table_(),
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:77
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:82
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:78
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:80
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:79
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
Definition: ScheduleItems.h:83
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
Definition: ScheduleItems.h:81
edm::ScheduleItems::ScheduleItems ( ProductRegistry const &  preg,
SubProcess const &  om,
SubProcessBlockHelper subProcessBlockHelper,
ProcessBlockHelperBase const &  parentProcessBlockHelper 
)

Definition at line 38 of file ScheduleItems.cc.

References edm::BranchDescription::branchID(), submitPVResolutionJobs::desc, edm::InEvent, edm::InLumi, edm::InProcess, edm::InRun, B2GTnPMonitor_cfi::item, edm::SubProcess::keptProducts(), preg_, edm::BranchDescription::setDropped(), edm::BranchDescription::setOnDemand(), edm::BranchDescription::setProduced(), and edm::SubProcessBlockHelper::updateFromParentProcess().

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

Member Function Documentation

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

Definition at line 106 of file ScheduleItems.cc.

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

Referenced by edm::test::TestProcessor::TestProcessor().

106  {
107  //add the ProductRegistry as a service ONLY for the construction phase
108  typedef serviceregistry::ServiceWrapper<ConstProductRegistry> w_CPR;
109  auto reg = std::make_shared<w_CPR>(std::make_unique<ConstProductRegistry>(*preg_));
111 
112  // the next thing is ugly: pull out the trigger path pset and
113  // create a service and extra token for it
114 
115  typedef service::TriggerNamesService TNS;
116  typedef serviceregistry::ServiceWrapper<TNS> w_TNS;
117 
118  auto tnsptr = std::make_shared<w_TNS>(std::make_unique<TNS>(parameterSet));
119 
121  }
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
std::shared_ptr<BranchIDListHelper const> edm::ScheduleItems::branchIDListHelper ( ) const
inline

Definition at line 59 of file ScheduleItems.h.

References branchIDListHelper_, and edm::get_underlying_safe().

Referenced by edm::test::TestProcessor::TestProcessor().

59  {
61  }
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:79
std::shared_ptr<BranchIDListHelper>& edm::ScheduleItems::branchIDListHelper ( )
inline

Definition at line 62 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_
Definition: ScheduleItems.h:79
std::shared_ptr< CommonParams > edm::ScheduleItems::initMisc ( ParameterSet parameterSet)

Definition at line 123 of file ScheduleItems.cc.

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

Referenced by edm::test::TestProcessor::TestProcessor().

123  {
124  act_table_ = std::make_unique<ExceptionToActionTable>(parameterSet);
125  std::string processName = parameterSet.getParameter<std::string>("@process_name");
126  processConfiguration_ = std::make_shared<ProcessConfiguration>(
127  processName, getReleaseVersion(), getPassID()); // propagate_const<T> has no reset() function
128  auto common = std::make_shared<CommonParams>(
129  parameterSet.getUntrackedParameterSet("maxEvents").getUntrackedParameter<int>("input"),
130  parameterSet.getUntrackedParameterSet("maxLuminosityBlocks").getUntrackedParameter<int>("input"),
131  parameterSet.getUntrackedParameterSet("maxSecondsUntilRampdown").getUntrackedParameter<int>("input"));
132  return common;
133  }
std::string getPassID()
Definition: GetPassID.h:7
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:82
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
std::string getReleaseVersion()
edm::propagate_const< std::shared_ptr< ProcessConfiguration > > processConfiguration_
Definition: ScheduleItems.h:83
std::unique_ptr< Schedule > edm::ScheduleItems::initSchedule ( ParameterSet parameterSet,
bool  hasSubprocesses,
PreallocationConfiguration const &  iAllocConfig,
ProcessContext const *  processContext,
ProcessBlockHelperBase processBlockHelper 
)

Definition at line 135 of file ScheduleItems.cc.

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

Referenced by edm::test::TestProcessor::TestProcessor().

139  {
140  return std::make_unique<Schedule>(parameterSet,
141  ServiceRegistry::instance().get<service::TriggerNamesService>(),
142  *preg_,
144  processBlockHelper,
147  *act_table_,
148  actReg_,
150  hasSubprocesses,
151  config,
152  processContext);
153  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:77
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:82
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:78
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:80
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: ScheduleItems.h:79
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
static ServiceRegistry & instance()
std::shared_ptr< ProcessConfiguration const > processConfiguration() const
Definition: ScheduleItems.h:72
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
Definition: ScheduleItems.h:81
tuple config
parse the configuration file
ServiceToken edm::ScheduleItems::initServices ( std::vector< ParameterSet > &  servicePSets,
ParameterSet processPSet,
ServiceToken const &  iToken,
serviceregistry::ServiceLegacy  iLegacy,
bool  associate 
)

Definition at line 86 of file ScheduleItems.cc.

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

Referenced by edm::test::TestProcessor::TestProcessor().

90  {
91  //create the services
92  ServiceToken token(ServiceRegistry::createSet(pServiceSets, iToken, iLegacy, associate));
93 
94  //see if any of the Services have to have their PSets stored
95  for (auto const& item : pServiceSets) {
96  if (item.exists("@save_config")) {
97  parameterSet.addParameter(item.getParameter<std::string>("@service_type"), item);
98  }
99  }
100  // Copy slots that hold all the registered callback functions like
101  // PostBeginJob into an ActivityRegistry
102  token.copySlotsTo(*actReg_);
103  return token;
104  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:77
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:135
static ServiceToken createSet(std::vector< ParameterSet > &)
ScheduleItems& edm::ScheduleItems::operator= ( ScheduleItems const &  )
delete
std::shared_ptr<SignallingProductRegistry const> edm::ScheduleItems::preg ( ) const
inline

Definition at line 57 of file ScheduleItems.h.

References edm::get_underlying_safe(), and preg_.

Referenced by edm::test::TestProcessor::TestProcessor().

57 { return get_underlying_safe(preg_); }
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:78
constexpr 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 58 of file ScheduleItems.h.

References edm::get_underlying_safe(), and preg_.

58 { return get_underlying_safe(preg_); }
edm::propagate_const< std::shared_ptr< SignallingProductRegistry > > preg_
Definition: ScheduleItems.h:78
constexpr 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 72 of file ScheduleItems.h.

References edm::get_underlying_safe(), and processConfiguration_.

Referenced by initSchedule(), and edm::test::TestProcessor::TestProcessor().

72  {
74  }
constexpr 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:83
std::shared_ptr<ProcessConfiguration>& edm::ScheduleItems::processConfiguration ( )
inline

Definition at line 75 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_
Definition: ScheduleItems.h:83
std::shared_ptr<SubProcessParentageHelper>& edm::ScheduleItems::subProcessParentageHelper ( )
inline

Definition at line 69 of file ScheduleItems.h.

References edm::get_underlying_safe(), and subProcessParentageHelper_.

69  {
71  }
constexpr 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:81
std::shared_ptr<ThinnedAssociationsHelper const> edm::ScheduleItems::thinnedAssociationsHelper ( ) const
inline

Definition at line 63 of file ScheduleItems.h.

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

Referenced by edm::test::TestProcessor::TestProcessor().

63  {
65  }
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:80
constexpr 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 66 of file ScheduleItems.h.

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

66  {
68  }
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: ScheduleItems.h:80
constexpr 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_

Definition at line 82 of file ScheduleItems.h.

Referenced by initMisc(), initSchedule(), and edm::test::TestProcessor::TestProcessor().

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

Definition at line 79 of file ScheduleItems.h.

Referenced by branchIDListHelper(), and initSchedule().

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

Definition at line 78 of file ScheduleItems.h.

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

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

Definition at line 83 of file ScheduleItems.h.

Referenced by initMisc(), and processConfiguration().

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

Definition at line 81 of file ScheduleItems.h.

Referenced by initSchedule(), and subProcessParentageHelper().

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

Definition at line 80 of file ScheduleItems.h.

Referenced by initSchedule(), and thinnedAssociationsHelper().