CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SubProcess.cc
Go to the documentation of this file.
2 
28 
29 #include <cassert>
30 #include <string>
31 #include <vector>
32 
33 namespace edm {
34 
36  ParameterSet const& topLevelParameterSet,
37  boost::shared_ptr<ProductRegistry const> parentProductRegistry,
38  boost::shared_ptr<BranchIDListHelper const> parentBranchIDListHelper,
40  ActivityRegistry& parentActReg,
41  ServiceToken const& token,
43  PreallocationConfiguration const& preallocConfig,
44  ProcessContext const* parentProcessContext) :
45  serviceToken_(),
46  parentPreg_(parentProductRegistry),
47  preg_(),
48  branchIDListHelper_(),
49  act_table_(),
50  processConfiguration_(),
51  historyLumiOffset_(preallocConfig.numberOfStreams()),
52  historyRunOffset_(historyLumiOffset_+preallocConfig.numberOfLuminosityBlocks()),
53  processHistoryRegistries_(historyRunOffset_+ preallocConfig.numberOfRuns()),
54  historyAppenders_(historyRunOffset_+preallocConfig.numberOfRuns()),
55  principalCache_(),
56  esp_(),
57  schedule_(),
58  parentToChildPhID_(),
59  subProcess_(),
60  processParameterSet_(),
61  productSelectorRules_(parameterSet, "outputCommands", "OutputModule"),
62  productSelector_(),
63  wantAllEvents_(true) {
64 
65  //Setup the event selection
67 
68  ParameterSet selectevents =
69  parameterSet.getUntrackedParameterSet("SelectEvents", ParameterSet());
70 
71  selectevents.registerIt(); // Just in case this PSet is not registered
73  tns->getProcessName(),
75  selectors_);
76  std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
78  "",
79  outputModulePathPositions,
80  parentProductRegistry->anyProductProduced());
81 
82  selectProducts(*parentProductRegistry);
83 
84  std::string const maxEvents("maxEvents");
85  std::string const maxLumis("maxLuminosityBlocks");
86 
87  processParameterSet_.reset(parameterSet.popParameterSet(std::string("process")).release());
88 
89  // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them.
90  if(processParameterSet_->exists(maxEvents)) {
91  processParameterSet_->popParameterSet(maxEvents);
92  }
93  if(processParameterSet_->exists(maxLumis)) {
94  processParameterSet_->popParameterSet(maxLumis);
95  }
96 
97  // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process.
98  if(topLevelParameterSet.exists(maxEvents)) {
99  processParameterSet_->addUntrackedParameter<ParameterSet>(maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents));
100  }
101  if(topLevelParameterSet.exists(maxLumis)) {
102  processParameterSet_->addUntrackedParameter<ParameterSet>(maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis));
103  }
104 
105  // If this process has a subprocess, pop the subprocess parameter set out of the process parameter set
106 
107  boost::shared_ptr<ParameterSet> subProcessParameterSet(popSubProcessParameterSet(*processParameterSet_).release());
108 
109  ScheduleItems items(*parentProductRegistry, *parentBranchIDListHelper, *this);
110 
111  ParameterSet const& optionsPset(processParameterSet_->getUntrackedParameterSet("options", ParameterSet()));
112  IllegalParameters::setThrowAnException(optionsPset.getUntrackedParameter<bool>("throwIfIllegalParameter", true));
113 
114  //initialize the services
115  ServiceToken iToken;
116 
117  // get any configured services.
118  std::auto_ptr<std::vector<ParameterSet> > serviceSets = processParameterSet_->popVParameterSet(std::string("services"));
119 
120  ServiceToken newToken = items.initServices(*serviceSets, *processParameterSet_, token, iLegacy, false);
121  parentActReg.connectToSubProcess(*items.actReg_);
122  serviceToken_ = items.addCPRandTNS(*processParameterSet_, newToken);
123 
124 
125  //make the services available
127 
128  // intialize miscellaneous items
129  items.initMisc(*processParameterSet_);
130 
131  // intialize the event setup provider
132  esp_ = esController.makeProvider(*processParameterSet_);
133 
134  // intialize the Schedule
135  schedule_ = items.initSchedule(*processParameterSet_,subProcessParameterSet.get(),preallocConfig,&processContext_);
136 
137  // set the items
138  act_table_ = std::move(items.act_table_);
139  preg_.reset(items.preg_.release());
140  //CMS-THREADING this only works since Run/Lumis are synchronous so when principalCache asks for
141  // the reducedProcessHistoryID from a full ProcessHistoryID that registry will not be in use by
142  // another thread. We really need to change how this is done in the PrincipalCache.
144  branchIDListHelper_ = items.branchIDListHelper_;
145  processConfiguration_ = items.processConfiguration_;
147  processContext_.setParentProcessContext(parentProcessContext);
148 
150  for(unsigned int index = 0; index < preallocConfig.numberOfStreams(); ++index) {
151  boost::shared_ptr<EventPrincipal> ep(new EventPrincipal(preg_,
155  index));
156  ep->preModuleDelayedGetSignal_.connect(std::cref(items.actReg_->preModuleEventDelayedGetSignal_));
157  ep->postModuleDelayedGetSignal_.connect(std::cref(items.actReg_->postModuleEventDelayedGetSignal_));
159  }
160  if(subProcessParameterSet) {
161  subProcess_.reset(new SubProcess(*subProcessParameterSet,
162  topLevelParameterSet,
163  preg_,
165  esController,
166  *items.actReg_,
167  newToken,
168  iLegacy,
169  preallocConfig,
170  &processContext_));
171  }
172  }
173 
175 
176  void
178  this->beginJob();
179  }
180 
181  void
183  endJob();
184  }
185 
186 
187  void
191  }
193  schedule_->beginJob(*preg_);
194  if(subProcess_.get()) subProcess_->doBeginJob();
195  }
196 
197  void
200  ExceptionCollector c("Multiple exceptions were thrown while executing endJob. An exception message follows for each.");
201  schedule_->endJob(c);
202  if(subProcess_.get()) c.call([this](){ this->subProcess_->doEndJob();});
203  if(c.hasThrown()) {
204  c.rethrow();
205  }
206  }
207 
208  void
209  SubProcess::selectProducts(ProductRegistry const& preg) {
210  if(productSelector_.initialized()) return;
211  productSelector_.initialize(productSelectorRules_, preg.allBranchDescriptions());
212 
213  // TODO: See if we can collapse keptProducts_ and productSelector_ into a
214  // single object. See the notes in the header for ProductSelector
215  // for more information.
216 
217  std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
218 
219  for(auto const& it : preg.productList()) {
220  BranchDescription const& desc = it.second;
221  if(desc.transient()) {
222  // if the class of the branch is marked transient, output nothing
223  } else if(!desc.present() && !desc.produced()) {
224  // else if the branch containing the product has been previously dropped,
225  // output nothing
226  } else if(productSelector_.selected(desc)) {
227  // else if the branch has been selected, put it in the list of selected branches.
228  if(desc.produced()) {
229  // First we check if an equivalent branch has already been selected due to an EDAlias.
230  // We only need the check for products produced in this process.
231  BranchID const& trueBranchID = desc.originalBranchID();
232  std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(trueBranchID);
233  if(iter != trueBranchIDToKeptBranchDesc.end()) {
234  throw edm::Exception(errors::Configuration, "Duplicate Output Selection")
235  << "Two (or more) equivalent branches have been selected for output.\n"
236  << "#1: " << BranchKey(desc) << "\n"
237  << "#2: " << BranchKey(*iter->second) << "\n"
238  << "Please drop at least one of them.\n";
239  }
240  trueBranchIDToKeptBranchDesc.insert(std::make_pair(trueBranchID, &desc));
241  }
242  // Now put it in the list of selected branches.
243  keptProducts_[desc.branchType()].push_back(&desc);
244  }
245  }
246  // Now fill in a mapping needed in the case that a branch was dropped while its EDAlias was kept.
247  for(auto const& it : preg.productList()) {
248  BranchDescription const& desc = it.second;
249  if(!desc.produced() || desc.isAlias()) continue;
250  BranchID const& branchID = desc.branchID();
251  std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(branchID);
252  if(iter != trueBranchIDToKeptBranchDesc.end()) {
253  // This branch, produced in this process, or an alias of it, was persisted.
254  BranchID const& keptBranchID = iter->second->branchID();
255  if(keptBranchID != branchID) {
256  // An EDAlias branch was persisted.
257  droppedBranchIDToKeptBranchID_.insert(std::make_pair(branchID.id(), keptBranchID.id()));
258  }
259  }
260  }
261  }
262 
263  void
264  SubProcess::fixBranchIDListsForEDAliases(std::map<BranchID::value_type, BranchID::value_type> const& droppedBranchIDToKeptBranchID) {
265  // Check for branches dropped while an EDAlias was kept.
266  // Replace BranchID of each dropped branch with that of the kept alias.
267  for(BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
268  for(BranchID::value_type& branchID : branchIDList) {
269  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
270  if(iter != droppedBranchIDToKeptBranchID.end()) {
271  branchID = iter->second;
272  }
273  }
274  }
275  if(subProcess_.get()) subProcess_->fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID);
276  }
277 
278  void
279  SubProcess::doEvent(EventPrincipal const& ep) {
280  ServiceRegistry::Operate operate(serviceToken_);
281  /* BEGIN relevant bits from OutputModule::doEvent */
282  detail::TRBESSentry products_sentry(selectors_);
283 
284 
285  if(!wantAllEvents_) {
286  // use module description and const_cast unless interface to
287  // event is changed to just take a const EventPrincipal
288  if(!selectors_.wantEvent(ep, nullptr)) {
289  return;
290  }
291  }
292  process(ep);
293  /* END relevant bits from OutputModule::doEvent */
294  }
295 
296  void
298  EventAuxiliary aux(principal.aux());
299  aux.setProcessHistoryID(principal.processHistoryID());
300 
301  EventSelectionIDVector esids{principal.eventSelectionIDs()};
302  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
303  esids.push_back(selector_config_id_);
304  }
305 
306  EventPrincipal& ep = principalCache_.eventPrincipal(principal.streamID().value());
307  auto & processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
308  processHistoryRegistry.registerProcessHistory(principal.processHistory());
309  BranchListIndexes bli(principal.branchListIndexes());
311  processHistoryRegistry,
312  std::move(esids),
313  std::move(bli),
314  *(principal.productProvenanceRetrieverPtr()),//NOTE: this transfers the per product provenance
315  principal.reader());
316  ep.setLuminosityBlockPrincipal(principalCache_.lumiPrincipalPtr());
317  propagateProducts(InEvent, principal, ep);
319  schedule_->processOneEvent<Traits>(ep.streamID().value(),ep, esp_->eventSetup());
320  if(subProcess_.get()) subProcess_->doEvent(ep);
321  ep.clearEventPrincipal();
322  }
323 
324  void
325  SubProcess::doBeginRun(RunPrincipal const& principal, IOVSyncValue const& ts) {
326  ServiceRegistry::Operate operate(serviceToken_);
327  beginRun(principal,ts);
328  }
329 
330  void
331  SubProcess::beginRun(RunPrincipal const& principal, IOVSyncValue const& ts) {
332  boost::shared_ptr<RunAuxiliary> aux(new RunAuxiliary(principal.aux()));
333  aux->setProcessHistoryID(principal.processHistoryID());
334  boost::shared_ptr<RunPrincipal> rpp(new RunPrincipal(aux, preg_, *processConfiguration_, &(historyAppenders_[historyRunOffset_+principal.index()]),principal.index()));
335  auto & processHistoryRegistry = processHistoryRegistries_[historyRunOffset_+principal.index()];
336  processHistoryRegistry.registerProcessHistory(principal.processHistory());
337  rpp->fillRunPrincipal(processHistoryRegistry, principal.reader());
338  principalCache_.insert(rpp);
339 
340  ProcessHistoryID const& parentInputReducedPHID = principal.reducedProcessHistoryID();
341  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
342 
343  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
344 
345  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
346  propagateProducts(InRun, principal, rp);
348  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts));
349  if(subProcess_.get()) subProcess_->doBeginRun(rp, ts);
350  }
351 
352  void
353  SubProcess::doEndRun(RunPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
354  ServiceRegistry::Operate operate(serviceToken_);
355  endRun(principal,ts,cleaningUpAfterException);
356  }
357 
358  void
359  SubProcess::endRun(RunPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
360  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
361  propagateProducts(InRun, principal, rp);
363  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
364  if(subProcess_.get()) subProcess_->doEndRun(rp, ts, cleaningUpAfterException);
365  }
366 
367  void
368  SubProcess::writeRun(ProcessHistoryID const& parentPhID, int runNumber) {
369  ServiceRegistry::Operate operate(serviceToken_);
370  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
371  assert(it != parentToChildPhID_.end());
372  schedule_->writeRun(principalCache_.runPrincipal(it->second, runNumber), &processContext_);
373  if(subProcess_.get()) subProcess_->writeRun(it->second, runNumber);
374  }
375 
376  void
377  SubProcess::deleteRunFromCache(ProcessHistoryID const& parentPhID, int runNumber) {
378  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
379  assert(it != parentToChildPhID_.end());
380  principalCache_.deleteRun(it->second, runNumber);
381  if(subProcess_.get()) subProcess_->deleteRunFromCache(it->second, runNumber);
382  }
383 
384  void
385  SubProcess::doBeginLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts) {
386  ServiceRegistry::Operate operate(serviceToken_);
387  beginLuminosityBlock(principal,ts);
388  }
389 
390  void
391  SubProcess::beginLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts) {
392  boost::shared_ptr<LuminosityBlockAuxiliary> aux(new LuminosityBlockAuxiliary(principal.aux()));
393  aux->setProcessHistoryID(principal.processHistoryID());
394  boost::shared_ptr<LuminosityBlockPrincipal> lbpp(new LuminosityBlockPrincipal(aux, preg_, *processConfiguration_, &(historyAppenders_[historyLumiOffset_+principal.index()]),principal.index()));
395  auto & processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_+principal.index()];
396  processHistoryRegistry.registerProcessHistory(principal.processHistory());
397  lbpp->fillLuminosityBlockPrincipal(processHistoryRegistry, principal.reader());
398  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
399  principalCache_.insert(lbpp);
400  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
401  propagateProducts(InLumi, principal, lbp);
403  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts));
404  if(subProcess_.get()) subProcess_->doBeginLuminosityBlock(lbp, ts);
405  }
406 
407  void
408  SubProcess::doEndLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
409  ServiceRegistry::Operate operate(serviceToken_);
410  endLuminosityBlock(principal,ts,cleaningUpAfterException);
411  }
412 
413  void
414  SubProcess::endLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
415  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
416  propagateProducts(InLumi, principal, lbp);
418  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
419  if(subProcess_.get()) subProcess_->doEndLuminosityBlock(lbp, ts, cleaningUpAfterException);
420  }
421 
422  void
423  SubProcess::writeLumi(ProcessHistoryID const& parentPhID, int runNumber, int lumiNumber) {
424  ServiceRegistry::Operate operate(serviceToken_);
425  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
426  assert(it != parentToChildPhID_.end());
427  schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber), &processContext_);
428  if(subProcess_.get()) subProcess_->writeLumi(it->second, runNumber, lumiNumber);
429  }
430 
431  void
432  SubProcess::deleteLumiFromCache(ProcessHistoryID const& parentPhID, int runNumber, int lumiNumber) {
433  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
434  assert(it != parentToChildPhID_.end());
435  principalCache_.deleteLumi(it->second, runNumber, lumiNumber);
436  if(subProcess_.get()) subProcess_->deleteLumiFromCache(it->second, runNumber, lumiNumber);
437  }
438 
439  void
440  SubProcess::doBeginStream(unsigned int iID) {
441  ServiceRegistry::Operate operate(serviceToken_);
442  schedule_->beginStream(iID);
443  if(subProcess_.get()) subProcess_->doBeginStream(iID);
444  }
445 
446  void
447  SubProcess::doEndStream(unsigned int iID) {
448  ServiceRegistry::Operate operate(serviceToken_);
449  schedule_->endStream(iID);
450  if(subProcess_.get()) subProcess_->doEndStream(iID);
451  }
452 
453  void
454  SubProcess::doStreamBeginRun(unsigned int id, RunPrincipal const& principal, IOVSyncValue const& ts) {
455  ServiceRegistry::Operate operate(serviceToken_);
456  {
457  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
459  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts));
460  if(subProcess_.get()) subProcess_->doStreamBeginRun(id,rp, ts);
461  }
462  }
463 
464  void
465  SubProcess::doStreamEndRun(unsigned int id, RunPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
466  ServiceRegistry::Operate operate(serviceToken_);
467  {
468  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
470  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
471  if(subProcess_.get()) subProcess_->doStreamEndRun(id,rp, ts,cleaningUpAfterException);
472  }
473  }
474 
475  void
476  SubProcess::doStreamBeginLuminosityBlock(unsigned int id, LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts) {
477  ServiceRegistry::Operate operate(serviceToken_);
478  {
479  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
481  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts));
482  if(subProcess_.get()) subProcess_->doStreamBeginLuminosityBlock(id,lbp, ts);
483  }
484  }
485 
486  void
487  SubProcess::doStreamEndLuminosityBlock(unsigned int id, LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
488  ServiceRegistry::Operate operate(serviceToken_);
489  {
490  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
492  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
493  if(subProcess_.get()) subProcess_->doStreamEndLuminosityBlock(id,lbp, ts,cleaningUpAfterException);
494  }
495  }
496 
497 
498  void
499  SubProcess::propagateProducts(BranchType type, Principal const& parentPrincipal, Principal& principal) const {
500  SelectedProducts const& keptVector = keptProducts()[type];
501  for(auto const& item : keptVector) {
502  ProductHolderBase const* parentProductHolder = parentPrincipal.getProductHolder(item->branchID());
503  if(parentProductHolder != nullptr) {
504  ProductData const& parentData = parentProductHolder->productData();
505  ProductHolderBase const* productHolder = principal.getProductHolder(item->branchID());
506  if(productHolder != nullptr) {
507  ProductData& thisData = const_cast<ProductData&>(productHolder->productData());
508  //Propagate the per event(run)(lumi) data for this product to the subprocess.
509  //First, the product itself.
510  thisData.wrapper_ = parentData.wrapper_;
511  // Then the product ID and the ProcessHistory
512  thisData.prov_.setProductID(parentData.prov_.productID());
513  thisData.prov_.setProcessHistory(parentData.prov_.processHistory());
514  // Then the store, in case the product needs reading in a subprocess.
515  thisData.prov_.setStore(parentData.prov_.store());
516  // And last, the other per event provenance.
517  if(parentData.prov_.productProvenanceValid()) {
518  thisData.prov_.setProductProvenance(*parentData.prov_.productProvenance());
519  } else {
520  thisData.prov_.resetProductProvenance();
521  }
522  // Sets unavailable flag, if known that product is not available
523  (void)productHolder->productUnavailable();
524  }
525  }
526  }
527  }
528 
529  // Call respondToOpenInputFile() on all Modules
530  void
531  SubProcess::respondToOpenInputFile(FileBlock const& fb) {
532  ServiceRegistry::Operate operate(serviceToken_);
533  branchIDListHelper_->updateFromInput(fb.branchIDLists());
534  schedule_->respondToOpenInputFile(fb);
535  if(subProcess_.get()) subProcess_->respondToOpenInputFile(fb);
536  }
537 
538  // free function
539  std::auto_ptr<ParameterSet>
541  std::vector<std::string> subProcesses = parameterSet.getUntrackedParameter<std::vector<std::string> >("@all_subprocesses");
542  if(!subProcesses.empty()) {
543  assert(subProcesses.size() == 1U);
544  assert(subProcesses[0] == "@sub_process");
545  return parameterSet.popParameterSet(subProcesses[0]);
546  }
547  return std::auto_ptr<ParameterSet>(nullptr);
548  }
549 }
550 
unsigned int historyRunOffset_
Definition: SubProcess.h:230
ParameterSetID selector_config_id_
Definition: SubProcess.h:251
bool productProvenanceValid() const
Definition: Provenance.h:53
type
Definition: HCALResponse.h:21
void setLuminosityBlockPrincipal(boost::shared_ptr< LuminosityBlockPrincipal > const &lbp)
ProductRegistry const & productRegistry() const
Definition: Principal.h:149
T getUntrackedParameter(std::string const &, T const &) const
EventSelectionIDVector const & eventSelectionIDs() const
BranchType const & branchType() const
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: RunPrincipal.h:65
ConstProductHolderPtr getProductHolder(BranchID const &oid) const
Definition: Principal.cc:429
void setNumberOfConcurrentPrincipals(PreallocationConfiguration const &)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:231
std::auto_ptr< ParameterSet > popSubProcessParameterSet(ParameterSet &parameterSet)
Definition: SubProcess.cc:540
Definition: Hash.h:42
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:234
BranchIDLists const & branchIDLists() const
Definition: FileBlock.h:118
virtual ~SubProcess()
Definition: SubProcess.cc:174
bool exists(std::string const &parameterName) const
checks if a parameter exists
void call(boost::function< void(void)>)
ProductProvenance * productProvenance() const
Definition: Provenance.h:49
LuminosityBlockAuxiliary const & aux() const
LuminosityBlockIndex index() const
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
void insert(boost::shared_ptr< RunPrincipal > rp)
void setParentProcessContext(ProcessContext const *parentProcessContext)
void setStore(boost::shared_ptr< ProductProvenanceRetriever > store) const
Definition: Provenance.h:74
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:215
BranchListIndexes const & branchListIndexes() const
void resetProductProvenance() const
Definition: Provenance.cc:72
unsigned int id() const
Definition: BranchID.h:23
ProcessHistory const & processHistory() const
Definition: Principal.h:139
BranchType
Definition: BranchType.h:11
std::vector< EventSelectionID > EventSelectionIDVector
void selectProducts(ProductRegistry const &preg)
Definition: SubProcess.cc:209
ProductList const & productList() const
ServiceToken serviceToken_
Definition: SubProcess.h:220
Provenance prov_
Definition: ProductData.h:51
std::vector< BranchListIndex > BranchListIndexes
unsigned int value_type
Definition: BranchID.h:16
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:143
ProcessHistory const & processHistory() const
Definition: Provenance.h:65
static void setThrowAnException(bool v)
StreamID streamID() const
boost::shared_ptr< void const > wrapper_
Definition: ProductData.h:50
std::vector< BranchDescription const * > allBranchDescriptions() const
std::auto_ptr< ParameterSet > popParameterSet(std::string const &name)
SubProcess(ParameterSet &parameterSet, ParameterSet const &topLevelParameterSet, boost::shared_ptr< ProductRegistry const > parentProductRegistry, boost::shared_ptr< BranchIDListHelper const > parentBranchIDListHelper, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy, PreallocationConfiguration const &preallocConfig, ProcessContext const *parentProcessContext)
Definition: SubProcess.cc:35
BranchID const & branchID() const
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:57
ProductData const & productData() const
Definition: ProductHolder.h:42
boost::shared_ptr< ProductProvenanceRetriever > const & store() const
Definition: Provenance.h:64
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
void setProcessConfiguration(ProcessConfiguration const *processConfiguration)
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: SubProcess.h:224
void setProcessHistoryRegistry(ProcessHistoryRegistry const &phr)
DelayedReader * reader() const
Definition: Principal.h:173
unsigned int value() const
Definition: StreamID.h:46
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:252
boost::shared_ptr< EventSetupProvider > makeProvider(ParameterSet &)
boost::shared_ptr< ProductProvenanceRetriever > productProvenanceRetrieverPtr() const
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:235
void connectToSubProcess(ActivityRegistry &iOther)
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:223
RunIndex index() const
Definition: RunPrincipal.h:53
bool anyProductProduced() const
void setProductID(ProductID const &pid)
Definition: Provenance.h:82
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:232
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
std::unique_ptr< ParameterSet > processParameterSet_
Definition: SubProcess.h:238
std::vector< std::string > const & getAllTriggerNames()
void setProcessHistory(ProcessHistory const &ph)
Definition: Provenance.h:76
std::vector< BranchDescription const * > SelectedProducts
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:264
void setProductProvenance(ProductProvenance const &prov) const
Definition: Provenance.cc:78
ProcessContext processContext_
Definition: SubProcess.h:226
BranchID const & originalBranchID() const
ProductID const & productID() const
Definition: Provenance.h:78
ParameterSetID registerProperSelectionInfo(edm::ParameterSet const &iInitial, std::string const &iLabel, std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
preg
Definition: Schedule.cc:362
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:237
tuple process
Definition: LaserDQM_cfg.py:3
boost::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:225
boost::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:222
EventAuxiliary const & aux() const
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector)
ParameterSet const & registerIt()
PrincipalCache principalCache_
Definition: SubProcess.h:233
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
bool productUnavailable() const
Definition: ProductHolder.h:71