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 ()
 
std::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_
 
std::shared_ptr< ActivityRegistryactReg_
 
std::shared_ptr
< BranchIDListHelper
branchIDListHelper_
 
std::shared_ptr
< SignallingProductRegistry
preg_
 
std::shared_ptr
< ProcessConfiguration
processConfiguration_
 
std::shared_ptr
< ThinnedAssociationsHelper
thinnedAssociationsHelper_
 

Detailed Description

Definition at line 26 of file ScheduleItems.h.

Constructor & Destructor Documentation

edm::ScheduleItems::ScheduleItems ( )

Definition at line 25 of file ScheduleItems.cc.

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

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

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

Member Function Documentation

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

Definition at line 93 of file ScheduleItems.cc.

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

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

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

Definition at line 116 of file ScheduleItems.cc.

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

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

116  {
117  act_table_.reset(new ExceptionToActionTable(parameterSet));
118  std::string processName = parameterSet.getParameter<std::string>("@process_name");
119  processConfiguration_.reset(new ProcessConfiguration(processName, getReleaseVersion(), getPassID()));
120  auto common = std::make_shared<CommonParams>(
121  parameterSet.getUntrackedParameterSet(
122  "maxEvents", ParameterSet()).getUntrackedParameter<int>("input", -1),
123  parameterSet.getUntrackedParameterSet(
124  "maxLuminosityBlocks", ParameterSet()).getUntrackedParameter<int>("input", -1),
125  parameterSet.getUntrackedParameterSet(
126  "maxSecondsUntilRampdown", ParameterSet()).getUntrackedParameter<int>("input", -1));
127  return common;
128  }
std::string getPassID()
Definition: GetPassID.h:8
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: ScheduleItems.h:60
std::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 131 of file ScheduleItems.cc.

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

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

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

Definition at line 71 of file ScheduleItems.cc.

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

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

75  {
76 
77  //create the services
78  ServiceToken token(ServiceRegistry::createSet(pServiceSets, iToken, iLegacy, associate));
79 
80  //see if any of the Services have to have their PSets stored
81  for(auto const& item : pServiceSets) {
82  if(item.exists("@save_config")) {
83  parameterSet.addParameter(item.getParameter<std::string>("@service_type"), item);
84  }
85  }
86  // Copy slots that hold all the registered callback functions like
87  // PostBeginJob into an ActivityRegistry
88  token.copySlotsTo(*actReg_);
89  return token;
90  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: ScheduleItems.h:56
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

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().

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

Definition at line 56 of file ScheduleItems.h.

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

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

Definition at line 58 of file ScheduleItems.h.

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

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

Definition at line 61 of file ScheduleItems.h.

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

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

Definition at line 59 of file ScheduleItems.h.

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