CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::SubProcess Class Reference

#include <SubProcess.h>

Public Member Functions

void clearCounters ()
 Clear all the counters in the trigger report. More...
 
void closeOutputFiles ()
 
void deleteLumiFromCache (ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber)
 
void deleteRunFromCache (ProcessHistoryID const &parentPhID, int runNumber)
 
void doBeginJob ()
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
 
void doBeginRun (RunPrincipal const &principal, IOVSyncValue const &ts)
 
void doBeginStream (unsigned int)
 
void doEndJob ()
 
void doEndLuminosityBlock (LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void doEndRun (RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void doEndStream (unsigned int)
 
void doEvent (EventPrincipal const &principal)
 
void doStreamBeginLuminosityBlock (unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
 
void doStreamBeginRun (unsigned int iID, RunPrincipal const &principal, IOVSyncValue const &ts)
 
void doStreamEndLuminosityBlock (unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void doStreamEndRun (unsigned int iID, RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void enableEndPaths (bool active)
 
bool endPathsEnabled () const
 Return true if end_paths are active, and false if they are inactive. More...
 
std::vector< ModuleDescription
const * > 
getAllModuleDescriptions () const
 Return a vector allowing const access to all the ModuleDescriptions for this SubProcess. More...
 
void getTriggerReport (TriggerReport &rep) const
 
SelectedProductsForBranchType
const & 
keptProducts () const
 
void openNewOutputFilesIfNeeded ()
 
void openOutputFiles (FileBlock &fb)
 
SubProcessoperator= (SubProcess const &)=delete
 
void postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
void preForkReleaseResources ()
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToOpenInputFile (FileBlock const &fb)
 
void selectProducts (ProductRegistry const &preg, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, std::map< BranchID, bool > &keepAssociation)
 
bool shouldWeCloseOutput () const
 
 SubProcess (ParameterSet &parameterSet, ParameterSet const &topLevelParameterSet, std::shared_ptr< ProductRegistry const > parentProductRegistry, std::shared_ptr< BranchIDListHelper const > parentBranchIDListHelper, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy, PreallocationConfiguration const &preallocConfig, ProcessContext const *parentProcessContext)
 
 SubProcess (SubProcess const &)=delete
 
bool terminate () const
 
int totalEvents () const
 
int totalEventsFailed () const
 
int totalEventsPassed () const
 Return the number of events which have been passed by one or more trigger paths. More...
 
void updateBranchIDListHelper (BranchIDLists const &)
 
void writeLumi (ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber)
 
void writeRun (ProcessHistoryID const &parentPhID, int runNumber)
 
virtual ~SubProcess ()
 

Private Member Functions

void beginJob ()
 
void beginLuminosityBlock (LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts)
 
void beginRun (RunPrincipal const &r, IOVSyncValue const &ts)
 
std::map< BranchID::value_type,
BranchID::value_type > const & 
droppedBranchIDToKeptBranchID ()
 
void endJob ()
 
void endLuminosityBlock (LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void endRun (RunPrincipal const &r, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void fixBranchIDListsForEDAliases (std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
 
void keepThisBranch (BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
 
void process (EventPrincipal const &e)
 
void propagateProducts (BranchType type, Principal const &parentPrincipal, Principal &principal) const
 

Private Attributes

std::unique_ptr
< ExceptionToActionTable const > 
act_table_
 
std::shared_ptr< ActivityRegistryactReg_
 
std::shared_ptr
< BranchIDListHelper
branchIDListHelper_
 
std::map< BranchID::value_type,
BranchID::value_type
droppedBranchIDToKeptBranchID_
 
boost::shared_ptr
< eventsetup::EventSetupProvider
esp_
 
std::vector< HistoryAppenderhistoryAppenders_
 
unsigned int historyLumiOffset_
 
unsigned int historyRunOffset_
 
SelectedProductsForBranchType keptProducts_
 
std::shared_ptr
< ProductRegistry const > 
parentPreg_
 
std::map< ProcessHistoryID,
ProcessHistoryID
parentToChildPhID_
 
PathsAndConsumesOfModules pathsAndConsumesOfModules_
 
std::shared_ptr
< ProductRegistry const > 
preg_
 
PrincipalCache principalCache_
 
std::shared_ptr
< ProcessConfiguration const > 
processConfiguration_
 
ProcessContext processContext_
 
std::vector
< ProcessHistoryRegistry
processHistoryRegistries_
 
std::unique_ptr< ParameterSetprocessParameterSet_
 
ProductSelector productSelector_
 
ProductSelectorRules productSelectorRules_
 
std::auto_ptr< Scheduleschedule_
 
ParameterSetID selector_config_id_
 
detail::TriggerResultsBasedEventSelector selectors_
 
ServiceToken serviceToken_
 
std::auto_ptr< SubProcesssubProcess_
 
std::shared_ptr
< ThinnedAssociationsHelper
thinnedAssociationsHelper_
 
bool wantAllEvents_
 

Detailed Description

Definition at line 40 of file SubProcess.h.

Constructor & Destructor Documentation

edm::SubProcess::SubProcess ( ParameterSet parameterSet,
ParameterSet const &  topLevelParameterSet,
std::shared_ptr< ProductRegistry const >  parentProductRegistry,
std::shared_ptr< BranchIDListHelper const >  parentBranchIDListHelper,
ThinnedAssociationsHelper const &  parentThinnedAssociationsHelper,
eventsetup::EventSetupsController esController,
ActivityRegistry parentActReg,
ServiceToken const &  token,
serviceregistry::ServiceLegacy  iLegacy,
PreallocationConfiguration const &  preallocConfig,
ProcessContext const *  parentProcessContext 
)

Definition at line 37 of file SubProcess.cc.

References act_table_, actReg_, branchIDListHelper_, edm::detail::configureEventSelector(), edm::ActivityRegistry::connectToSubProcess(), droppedBranchIDToKeptBranchID_, esp_, edm::ParameterSet::exists(), edm::getAllTriggerNames(), edm::ParameterSet::getUntrackedParameterSet(), historyAppenders_, historyRunOffset_, cmsHarvester::index, edm::PrincipalCache::insert(), edm::eventsetup::EventSetupsController::makeProvider(), Data_TkAlMuonIsolated_Run2015B_PromptReco_v1_cff::maxEvents, edm::PreallocationConfiguration::numberOfStreams(), cmsPerfStripChart::operate(), edm::ParameterSet::popParameterSet(), edm::popSubProcessParameterSet(), preg_, principalCache_, processConfiguration_, processContext_, processHistoryRegistries_, processParameterSet_, edm::ParameterSet::registerIt(), edm::detail::registerProperSelectionInfo(), schedule_, selector_config_id_, selectors_, selectProducts(), serviceToken_, edm::PrincipalCache::setNumberOfConcurrentPrincipals(), edm::ProcessContext::setParentProcessContext(), edm::ProcessContext::setProcessConfiguration(), edm::PrincipalCache::setProcessHistoryRegistry(), edm::IllegalParameters::setThrowAnException(), AlCaHLTBitMon_QueryRunRegistry::string, subProcess_, thinnedAssociationsHelper_, updateBranchIDListHelper(), and wantAllEvents_.

47  :
48  serviceToken_(),
49  parentPreg_(parentProductRegistry),
50  preg_(),
52  act_table_(),
54  historyLumiOffset_(preallocConfig.numberOfStreams()),
55  historyRunOffset_(historyLumiOffset_+preallocConfig.numberOfLuminosityBlocks()),
56  processHistoryRegistries_(historyRunOffset_+ preallocConfig.numberOfRuns()),
57  historyAppenders_(historyRunOffset_+preallocConfig.numberOfRuns()),
59  esp_(),
60  schedule_(),
62  subProcess_(),
64  productSelectorRules_(parameterSet, "outputCommands", "OutputModule"),
66  wantAllEvents_(true) {
67 
68  //Setup the event selection
70 
71  ParameterSet selectevents =
72  parameterSet.getUntrackedParameterSet("SelectEvents", ParameterSet());
73 
74  selectevents.registerIt(); // Just in case this PSet is not registered
76  tns->getProcessName(),
78  selectors_);
79  std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
81  "",
82  outputModulePathPositions,
83  parentProductRegistry->anyProductProduced());
84 
85  std::map<BranchID, bool> keepAssociation;
86  selectProducts(*parentProductRegistry, parentThinnedAssociationsHelper, keepAssociation);
87 
88  std::string const maxEvents("maxEvents");
89  std::string const maxLumis("maxLuminosityBlocks");
90 
91  processParameterSet_.reset(parameterSet.popParameterSet(std::string("process")).release());
92 
93  // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them.
94  if(processParameterSet_->exists(maxEvents)) {
95  processParameterSet_->popParameterSet(maxEvents);
96  }
97  if(processParameterSet_->exists(maxLumis)) {
98  processParameterSet_->popParameterSet(maxLumis);
99  }
100 
101  // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process.
102  if(topLevelParameterSet.exists(maxEvents)) {
103  processParameterSet_->addUntrackedParameter<ParameterSet>(maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents));
104  }
105  if(topLevelParameterSet.exists(maxLumis)) {
106  processParameterSet_->addUntrackedParameter<ParameterSet>(maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis));
107  }
108 
109  // If this process has a subprocess, pop the subprocess parameter set out of the process parameter set
110 
111  std::shared_ptr<ParameterSet> subProcessParameterSet(popSubProcessParameterSet(*processParameterSet_).release());
112 
113  ScheduleItems items(*parentProductRegistry, *this);
114  actReg_ = items.actReg_;
115 
116  ParameterSet const& optionsPset(processParameterSet_->getUntrackedParameterSet("options", ParameterSet()));
117  IllegalParameters::setThrowAnException(optionsPset.getUntrackedParameter<bool>("throwIfIllegalParameter", true));
118 
119  //initialize the services
120  ServiceToken iToken;
121 
122  // get any configured services.
123  std::auto_ptr<std::vector<ParameterSet> > serviceSets = processParameterSet_->popVParameterSet(std::string("services"));
124 
125  ServiceToken newToken = items.initServices(*serviceSets, *processParameterSet_, token, iLegacy, false);
126  parentActReg.connectToSubProcess(*items.actReg_);
127  serviceToken_ = items.addCPRandTNS(*processParameterSet_, newToken);
128 
129 
130  //make the services available
132 
133  // intialize miscellaneous items
134  items.initMisc(*processParameterSet_);
135 
136  // intialize the event setup provider
137  esp_ = esController.makeProvider(*processParameterSet_);
138 
139  branchIDListHelper_ = items.branchIDListHelper_;
140  updateBranchIDListHelper(parentBranchIDListHelper->branchIDLists());
141 
142  thinnedAssociationsHelper_ = items.thinnedAssociationsHelper_;
143  thinnedAssociationsHelper_->updateFromParentProcess(parentThinnedAssociationsHelper, keepAssociation, droppedBranchIDToKeptBranchID_);
144 
145  // intialize the Schedule
146  schedule_ = items.initSchedule(*processParameterSet_,subProcessParameterSet.get(),preallocConfig,&processContext_);
147 
148  // set the items
149  act_table_ = std::move(items.act_table_);
150  preg_ = items.preg_;
151  //CMS-THREADING this only works since Run/Lumis are synchronous so when principalCache asks for
152  // the reducedProcessHistoryID from a full ProcessHistoryID that registry will not be in use by
153  // another thread. We really need to change how this is done in the PrincipalCache.
155 
156 
157  processConfiguration_ = items.processConfiguration_;
159  processContext_.setParentProcessContext(parentProcessContext);
160 
162  for(unsigned int index = 0; index < preallocConfig.numberOfStreams(); ++index) {
163  auto ep = std::make_shared<EventPrincipal>(preg_, branchIDListHelper_, thinnedAssociationsHelper_, *processConfiguration_, &(historyAppenders_[index]), index);
164  ep->preModuleDelayedGetSignal_.connect(std::cref(items.actReg_->preModuleEventDelayedGetSignal_));
165  ep->postModuleDelayedGetSignal_.connect(std::cref(items.actReg_->postModuleEventDelayedGetSignal_));
167  }
168  if(subProcessParameterSet) {
169  subProcess_.reset(new SubProcess(*subProcessParameterSet,
170  topLevelParameterSet,
171  preg_,
173  *thinnedAssociationsHelper_,
174  esController,
175  *items.actReg_,
176  newToken,
177  iLegacy,
178  preallocConfig,
179  &processContext_));
180  }
181  }
unsigned int historyRunOffset_
Definition: SubProcess.h:247
unsigned int historyLumiOffset_
Definition: SubProcess.h:246
ParameterSetID selector_config_id_
Definition: SubProcess.h:268
void insert(std::shared_ptr< RunPrincipal > rp)
void setNumberOfConcurrentPrincipals(PreallocationConfiguration const &)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:248
std::auto_ptr< ParameterSet > popSubProcessParameterSet(ParameterSet &parameterSet)
Definition: SubProcess.cc:564
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
void updateBranchIDListHelper(BranchIDLists const &)
Definition: SubProcess.cc:547
void setParentProcessContext(ProcessContext const *parentProcessContext)
ServiceToken serviceToken_
Definition: SubProcess.h:235
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, std::map< BranchID, bool > &keepAssociation)
Definition: SubProcess.cc:220
static void setThrowAnException(bool v)
ProductSelectorRules productSelectorRules_
Definition: SubProcess.h:262
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:238
void setProcessConfiguration(ProcessConfiguration const *processConfiguration)
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: SubProcess.h:240
void setProcessHistoryRegistry(ProcessHistoryRegistry const &phr)
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:273
ProductSelector productSelector_
Definition: SubProcess.h:263
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:269
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:253
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:234
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:249
std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper_
Definition: SubProcess.h:239
std::unique_ptr< ParameterSet > processParameterSet_
Definition: SubProcess.h:255
std::vector< std::string > const & getAllTriggerNames()
std::shared_ptr< ProductRegistry const > parentPreg_
Definition: SubProcess.h:236
ProcessContext processContext_
Definition: SubProcess.h:242
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)
SubProcess(ParameterSet &parameterSet, ParameterSet const &topLevelParameterSet, std::shared_ptr< ProductRegistry const > parentProductRegistry, std::shared_ptr< BranchIDListHelper const > parentBranchIDListHelper, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy, PreallocationConfiguration const &preallocConfig, ProcessContext const *parentProcessContext)
Definition: SubProcess.cc:37
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector)
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:237
PrincipalCache principalCache_
Definition: SubProcess.h:250
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:241
edm::SubProcess::~SubProcess ( )
virtual

Definition at line 183 of file SubProcess.cc.

183 {}
edm::SubProcess::SubProcess ( SubProcess const &  )
delete

Member Function Documentation

void edm::SubProcess::beginJob ( void  )
private

Definition at line 197 of file SubProcess.cc.

References actReg_, droppedBranchIDToKeptBranchID(), relativeConstraints::empty, fixBranchIDListsForEDAliases(), edm::PathsAndConsumesOfModules::initialize(), cmsPerfStripChart::operate(), pathsAndConsumesOfModules_, preg_, processContext_, schedule_, serviceToken_, and subProcess_.

Referenced by doBeginJob().

197  {
200  }
203  actReg_->preBeginJobSignal_(pathsAndConsumesOfModules_, processContext_);
204  schedule_->beginJob(*preg_);
205  if(subProcess_.get()) subProcess_->doBeginJob();
206  }
PathsAndConsumesOfModules pathsAndConsumesOfModules_
Definition: SubProcess.h:243
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:229
void initialize(Schedule const *, std::shared_ptr< ProductRegistry const >)
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:234
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:281
ProcessContext processContext_
Definition: SubProcess.h:242
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:237
void edm::SubProcess::beginLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts 
)
private

Definition at line 409 of file SubProcess.cc.

References printConversionInfo::aux, edm::LuminosityBlockPrincipal::aux(), edm::LuminosityBlockPrincipal::index(), edm::InLumi, edm::Principal::processHistory(), edm::Principal::processHistoryID(), and edm::Principal::reader().

409  {
410  auto aux = std::make_shared<LuminosityBlockAuxiliary>(principal.aux());
411  aux->setProcessHistoryID(principal.processHistoryID());
412  auto lbpp = std::make_shared<LuminosityBlockPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyLumiOffset_+principal.index()]),principal.index());
413  auto & processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_+principal.index()];
414  processHistoryRegistry.registerProcessHistory(principal.processHistory());
415  lbpp->fillLuminosityBlockPrincipal(processHistoryRegistry, principal.reader());
416  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
417  principalCache_.insert(lbpp);
418  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
420  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> Traits;
421  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts));
422  if(subProcess_.get()) subProcess_->doBeginLuminosityBlock(lbp, ts);
423  }
unsigned int historyLumiOffset_
Definition: SubProcess.h:246
void insert(std::shared_ptr< RunPrincipal > rp)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:248
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:249
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:517
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:237
PrincipalCache principalCache_
Definition: SubProcess.h:250
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:241
void edm::SubProcess::beginRun ( RunPrincipal const &  r,
IOVSyncValue const &  ts 
)
private

Definition at line 349 of file SubProcess.cc.

References printConversionInfo::aux, edm::RunPrincipal::aux(), edm::RunPrincipal::index(), edm::InRun, edm::Principal::processHistory(), edm::Principal::processHistoryID(), edm::Principal::reader(), and edm::RunPrincipal::reducedProcessHistoryID().

349  {
350  auto aux = std::make_shared<RunAuxiliary>(principal.aux());
351  aux->setProcessHistoryID(principal.processHistoryID());
352  auto rpp = std::make_shared<RunPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyRunOffset_+principal.index()]),principal.index());
353  auto & processHistoryRegistry = processHistoryRegistries_[historyRunOffset_+principal.index()];
354  processHistoryRegistry.registerProcessHistory(principal.processHistory());
355  rpp->fillRunPrincipal(processHistoryRegistry, principal.reader());
356  principalCache_.insert(rpp);
357 
358  ProcessHistoryID const& parentInputReducedPHID = principal.reducedProcessHistoryID();
359  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
360 
361  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
362 
363  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
365  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> Traits;
366  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts));
367  if(subProcess_.get()) subProcess_->doBeginRun(rp, ts);
368  }
unsigned int historyRunOffset_
Definition: SubProcess.h:247
void insert(std::shared_ptr< RunPrincipal > rp)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:248
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
Hash< ProcessHistoryType > ProcessHistoryID
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:253
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:249
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:517
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:237
PrincipalCache principalCache_
Definition: SubProcess.h:250
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:241
void edm::SubProcess::clearCounters ( )
inline

Clear all the counters in the trigger report.

Definition at line 208 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

208  {
210  schedule_->clearCounters();
211  if(subProcess_.get()) subProcess_->clearCounters();
212  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::closeOutputFiles ( )
inline

Definition at line 102 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

102  {
104  schedule_->closeOutputFiles();
105  if(subProcess_.get()) subProcess_->closeOutputFiles();
106  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::deleteLumiFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 450 of file SubProcess.cc.

References assert().

450  {
451  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
452  assert(it != parentToChildPhID_.end());
453  principalCache_.deleteLumi(it->second, runNumber, lumiNumber);
454  if(subProcess_.get()) subProcess_->deleteLumiFromCache(it->second, runNumber, lumiNumber);
455  }
void deleteLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)
assert(m_qm.get())
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:253
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
void edm::SubProcess::deleteRunFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 395 of file SubProcess.cc.

References assert().

395  {
396  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
397  assert(it != parentToChildPhID_.end());
398  principalCache_.deleteRun(it->second, runNumber);
399  if(subProcess_.get()) subProcess_->deleteRunFromCache(it->second, runNumber);
400  }
assert(m_qm.get())
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:253
void deleteRun(ProcessHistoryID const &phid, RunNumber_t run)
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
void edm::SubProcess::doBeginJob ( )

Definition at line 186 of file SubProcess.cc.

References beginJob().

186  {
187  this->beginJob();
188  }
void edm::SubProcess::doBeginLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 403 of file SubProcess.cc.

References cmsPerfStripChart::operate().

403  {
406  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
void beginLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts)
Definition: SubProcess.cc:409
void edm::SubProcess::doBeginRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 343 of file SubProcess.cc.

References cmsPerfStripChart::operate().

343  {
345  beginRun(principal,ts);
346  }
void beginRun(RunPrincipal const &r, IOVSyncValue const &ts)
Definition: SubProcess.cc:349
ServiceToken serviceToken_
Definition: SubProcess.h:235
void edm::SubProcess::doBeginStream ( unsigned int  iID)

Definition at line 458 of file SubProcess.cc.

References cmsPerfStripChart::operate().

458  {
460  schedule_->beginStream(iID);
461  if(subProcess_.get()) subProcess_->doBeginStream(iID);
462  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::doEndJob ( )

Definition at line 191 of file SubProcess.cc.

References endJob().

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

191  {
192  endJob();
193  }
void edm::SubProcess::doEndLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 426 of file SubProcess.cc.

References cmsPerfStripChart::operate().

426  {
428  endLuminosityBlock(principal,ts,cleaningUpAfterException);
429  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
void endLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:432
void edm::SubProcess::doEndRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 371 of file SubProcess.cc.

References cmsPerfStripChart::operate().

371  {
373  endRun(principal,ts,cleaningUpAfterException);
374  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
void endRun(RunPrincipal const &r, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:377
void edm::SubProcess::doEndStream ( unsigned int  iID)

Definition at line 465 of file SubProcess.cc.

References cmsPerfStripChart::operate().

465  {
467  schedule_->endStream(iID);
468  if(subProcess_.get()) subProcess_->doEndStream(iID);
469  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::doEvent ( EventPrincipal const &  principal)

Definition at line 296 of file SubProcess.cc.

References cmsPerfStripChart::operate(), and LaserDQM_cfg::process.

296  {
298  /* BEGIN relevant bits from OutputModule::doEvent */
299  detail::TRBESSentry products_sentry(selectors_);
300 
301 
302  if(!wantAllEvents_) {
303  // use module description and const_cast unless interface to
304  // event is changed to just take a const EventPrincipal
305  if(!selectors_.wantEvent(ep, nullptr)) {
306  return;
307  }
308  }
309  process(ep);
310  /* END relevant bits from OutputModule::doEvent */
311  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
void process(EventPrincipal const &e)
Definition: SubProcess.cc:314
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:269
bool wantEvent(EventPrincipal const &e, ModuleCallingContext const *)
void edm::SubProcess::doStreamBeginLuminosityBlock ( unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 494 of file SubProcess.cc.

References cmsPerfStripChart::operate().

494  {
496  {
497  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
498  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> Traits;
499  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts));
500  if(subProcess_.get()) subProcess_->doStreamBeginLuminosityBlock(id,lbp, ts);
501  }
502  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
void edm::SubProcess::doStreamBeginRun ( unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 472 of file SubProcess.cc.

References cmsPerfStripChart::operate().

472  {
474  {
475  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
476  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> Traits;
477  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts));
478  if(subProcess_.get()) subProcess_->doStreamBeginRun(id,rp, ts);
479  }
480  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
void edm::SubProcess::doStreamEndLuminosityBlock ( unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 505 of file SubProcess.cc.

References cmsPerfStripChart::operate().

505  {
507  {
508  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
509  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd> Traits;
510  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
511  if(subProcess_.get()) subProcess_->doStreamEndLuminosityBlock(id,lbp, ts,cleaningUpAfterException);
512  }
513  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
void edm::SubProcess::doStreamEndRun ( unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 483 of file SubProcess.cc.

References cmsPerfStripChart::operate().

483  {
485  {
486  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
487  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> Traits;
488  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
489  if(subProcess_.get()) subProcess_->doStreamEndRun(id,rp, ts,cleaningUpAfterException);
490  }
491  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
std::map<BranchID::value_type, BranchID::value_type> const& edm::SubProcess::droppedBranchIDToKeptBranchID ( )
inlineprivate

Definition at line 229 of file SubProcess.h.

References droppedBranchIDToKeptBranchID_.

Referenced by beginJob().

229  {
231  }
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:273
void edm::SubProcess::enableEndPaths ( bool  active)
inline

Turn end_paths "off" if "active" is false; Turn end_paths "on" if "active" is true.

Definition at line 181 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

181  {
183  schedule_->enableEndPaths(active);
184  if(subProcess_.get()) subProcess_->enableEndPaths(active);
185  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::endJob ( void  )
private

Definition at line 209 of file SubProcess.cc.

References EnergyCorrector::c, edm::ExceptionCollector::call(), cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

Referenced by doEndJob().

209  {
211  ExceptionCollector c("Multiple exceptions were thrown while executing endJob. An exception message follows for each.");
212  schedule_->endJob(c);
213  if(subProcess_.get()) c.call([this](){ this->subProcess_->doEndJob();});
214  if(c.hasThrown()) {
215  c.rethrow();
216  }
217  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::endLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)
private

Definition at line 432 of file SubProcess.cc.

References edm::InLumi.

432  {
433  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
435  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> Traits;
436  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
437  if(subProcess_.get()) subProcess_->doEndLuminosityBlock(lbp, ts, cleaningUpAfterException);
438  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:517
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
bool edm::SubProcess::endPathsEnabled ( ) const
inline

Return true if end_paths are active, and false if they are inactive.

Definition at line 188 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, and serviceToken_.

188  {
190  return schedule_->endPathsEnabled();
191  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
void edm::SubProcess::endRun ( RunPrincipal const &  r,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)
private

Definition at line 377 of file SubProcess.cc.

References edm::InRun.

377  {
378  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
380  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> Traits;
381  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
382  if(subProcess_.get()) subProcess_->doEndRun(rp, ts, cleaningUpAfterException);
383  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:517
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
void edm::SubProcess::fixBranchIDListsForEDAliases ( std::map< BranchID::value_type, BranchID::value_type > const &  droppedBranchIDToKeptBranchID)
private

Definition at line 281 of file SubProcess.cc.

Referenced by beginJob().

281  {
282  // Check for branches dropped while an EDAlias was kept.
283  // Replace BranchID of each dropped branch with that of the kept alias.
284  for(BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
285  for(BranchID::value_type& branchID : branchIDList) {
286  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
287  if(iter != droppedBranchIDToKeptBranchID.end()) {
288  branchID = iter->second;
289  }
290  }
291  }
292  if(subProcess_.get()) subProcess_->fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID);
293  }
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:229
unsigned int value_type
Definition: BranchID.h:16
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:238
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
std::vector<ModuleDescription const*> edm::SubProcess::getAllModuleDescriptions ( ) const

Return a vector allowing const access to all the ModuleDescriptions for this SubProcess.

*** N.B. *** Ownership of the ModuleDescriptions is not *** passed to the caller. Do not call delete on these *** pointers!

void edm::SubProcess::getTriggerReport ( TriggerReport rep) const
inline

Return the trigger report information on paths, modules-in-path, modules-in-endpath, and modules.

Definition at line 195 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, and serviceToken_.

195  {
197  schedule_->getTriggerReport(rep);
198  }
string rep
Definition: cuy.py:1188
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
void edm::SubProcess::keepThisBranch ( BranchDescription const &  desc,
std::map< BranchID, BranchDescription const * > &  trueBranchIDToKeptBranchDesc,
std::set< BranchID > &  keptProductsInEvent 
)
private

Definition at line 262 of file SubProcess.cc.

References edm::BranchDescription::branchID(), edm::BranchDescription::branchType(), edm::InEvent, edm::BranchDescription::originalBranchID(), and edm::BranchDescription::produced().

264  {
265 
267  trueBranchIDToKeptBranchDesc);
268 
269  if(desc.branchType() == InEvent) {
270  if(desc.produced()) {
271  keptProductsInEvent.insert(desc.originalBranchID());
272  } else {
273  keptProductsInEvent.insert(desc.branchID());
274  }
275  }
276  // Now put it in the list of selected branches.
277  keptProducts_[desc.branchType()].push_back(&desc);
278  }
SelectedProductsForBranchType keptProducts_
Definition: SubProcess.h:261
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)
SelectedProductsForBranchType const& edm::SubProcess::keptProducts ( ) const
inline

Definition at line 64 of file SubProcess.h.

References keptProducts_.

Referenced by edm::ScheduleItems::ScheduleItems().

64 {return keptProducts_;}
SelectedProductsForBranchType keptProducts_
Definition: SubProcess.h:261
void edm::SubProcess::openNewOutputFilesIfNeeded ( )
inline

Definition at line 109 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

109  {
111  schedule_->openNewOutputFilesIfNeeded();
112  if(subProcess_.get()) subProcess_->openNewOutputFilesIfNeeded();
113  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::openOutputFiles ( FileBlock fb)
inline

Definition at line 116 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

116  {
118  schedule_->openOutputFiles(fb);
119  if(subProcess_.get()) subProcess_->openOutputFiles(fb);
120  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
SubProcess& edm::SubProcess::operator= ( SubProcess const &  )
delete
void edm::SubProcess::postForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
inline

Definition at line 146 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

146  {
148  schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
149  if(subProcess_.get()) subProcess_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
150  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::preForkReleaseResources ( )
inline

Definition at line 140 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

140  {
142  schedule_->preForkReleaseResources();
143  if(subProcess_.get()) subProcess_->preForkReleaseResources();
144  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::process ( EventPrincipal const &  e)
private

Definition at line 314 of file SubProcess.cc.

References edm::ProductRegistry::anyProductProduced(), printConversionInfo::aux, edm::EventPrincipal::aux(), edm::EventPrincipal::branchListIndexes(), edm::EventPrincipal::clearEventPrincipal(), edm::EventPrincipal::eventSelectionIDs(), edm::EventPrincipal::fillEventPrincipal(), edm::InEvent, edm::Principal::processHistory(), edm::Principal::processHistoryID(), edm::EventPrincipal::productProvenanceRetrieverPtr(), edm::Principal::productRegistry(), edm::Principal::reader(), edm::EventPrincipal::setLuminosityBlockPrincipal(), edm::EventPrincipal::streamID(), and edm::StreamID::value().

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::dumpPython(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::open(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_PATFILTER(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), ConfigBuilder.ConfigBuilder::scheduleSequence(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProcess(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProperty().

314  {
315  EventAuxiliary aux(principal.aux());
316  aux.setProcessHistoryID(principal.processHistoryID());
317 
318  EventSelectionIDVector esids{principal.eventSelectionIDs()};
319  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
320  esids.push_back(selector_config_id_);
321  }
322 
323  EventPrincipal& ep = principalCache_.eventPrincipal(principal.streamID().value());
324  auto & processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
325  processHistoryRegistry.registerProcessHistory(principal.processHistory());
326  BranchListIndexes bli(principal.branchListIndexes());
327  branchIDListHelper_->fixBranchListIndexes(bli);
328  ep.fillEventPrincipal(aux,
329  processHistoryRegistry,
330  std::move(esids),
331  std::move(bli),
332  *(principal.productProvenanceRetrieverPtr()),//NOTE: this transfers the per product provenance
333  principal.reader());
334  ep.setLuminosityBlockPrincipal(principalCache_.lumiPrincipalPtr());
336  typedef OccurrenceTraits<EventPrincipal, BranchActionStreamBegin> Traits;
337  schedule_->processOneEvent<Traits>(ep.streamID().value(),ep, esp_->eventSetup());
338  if(subProcess_.get()) subProcess_->doEvent(ep);
339  ep.clearEventPrincipal();
340  }
ParameterSetID selector_config_id_
Definition: SubProcess.h:268
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:248
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
std::vector< EventSelectionID > EventSelectionIDVector
std::vector< BranchListIndex > BranchListIndexes
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:238
EventPrincipal & eventPrincipal(unsigned int iStreamIndex) const
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:517
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
void edm::SubProcess::propagateProducts ( BranchType  type,
Principal const &  parentPrincipal,
Principal principal 
) const
private

Definition at line 517 of file SubProcess.cc.

References edm::Principal::getProductHolder(), edm::Provenance::processHistory(), edm::ProductHolderBase::productData(), edm::Provenance::productID(), edm::Provenance::productProvenance(), edm::Provenance::productProvenanceValid(), edm::ProductHolderBase::productUnavailable(), edm::ProductData::prov_, edm::Provenance::resetProductProvenance(), edm::Provenance::setProcessHistory(), edm::Provenance::setProductID(), edm::Provenance::setProductProvenance(), edm::Provenance::setStore(), edm::Provenance::store(), and edm::ProductData::wrapper_.

517  {
518  SelectedProducts const& keptVector = keptProducts()[type];
519  for(auto const& item : keptVector) {
520  ProductHolderBase const* parentProductHolder = parentPrincipal.getProductHolder(item->branchID());
521  if(parentProductHolder != nullptr) {
522  ProductData const& parentData = parentProductHolder->productData();
523  ProductHolderBase const* productHolder = principal.getProductHolder(item->branchID());
524  if(productHolder != nullptr) {
525  ProductData& thisData = const_cast<ProductData&>(productHolder->productData());
526  //Propagate the per event(run)(lumi) data for this product to the subprocess.
527  //First, the product itself.
528  thisData.wrapper_ = parentData.wrapper_;
529  // Then the product ID and the ProcessHistory
530  thisData.prov_.setProductID(parentData.prov_.productID());
531  thisData.prov_.setProcessHistory(parentData.prov_.processHistory());
532  // Then the store, in case the product needs reading in a subprocess.
533  thisData.prov_.setStore(parentData.prov_.store());
534  // And last, the other per event provenance.
535  if(parentData.prov_.productProvenanceValid()) {
536  thisData.prov_.setProductProvenance(*parentData.prov_.productProvenance());
537  } else {
538  thisData.prov_.resetProductProvenance();
539  }
540  // Sets unavailable flag, if known that product is not available
541  (void)productHolder->productUnavailable();
542  }
543  }
544  }
545  }
type
Definition: HCALResponse.h:21
SelectedProductsForBranchType const & keptProducts() const
Definition: SubProcess.h:64
std::vector< BranchDescription const * > SelectedProducts
void edm::SubProcess::respondToCloseInputFile ( FileBlock const &  fb)
inline

Definition at line 128 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

128  {
130  schedule_->respondToCloseInputFile(fb);
131  if(subProcess_.get()) subProcess_->respondToCloseInputFile(fb);
132  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 556 of file SubProcess.cc.

References cmsPerfStripChart::operate().

556  {
558  schedule_->respondToOpenInputFile(fb);
559  if(subProcess_.get()) subProcess_->respondToOpenInputFile(fb);
560  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::selectProducts ( ProductRegistry const &  preg,
ThinnedAssociationsHelper const &  parentThinnedAssociationsHelper,
std::map< BranchID, bool > &  keepAssociation 
)

Definition at line 220 of file SubProcess.cc.

References edm::ProductRegistry::allBranchDescriptions(), edm::BranchDescription::present(), edm::BranchDescription::produced(), edm::ProductRegistry::productList(), edm::ThinnedAssociationsHelper::selectAssociationProducts(), edm::BranchDescription::transient(), and edm::BranchDescription::unwrappedType().

Referenced by SubProcess().

222  {
223  if(productSelector_.initialized()) return;
224  productSelector_.initialize(productSelectorRules_, preg.allBranchDescriptions());
225 
226  // TODO: See if we can collapse keptProducts_ and productSelector_ into a
227  // single object. See the notes in the header for ProductSelector
228  // for more information.
229 
230  std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
231  std::vector<BranchDescription const*> associationDescriptions;
232  std::set<BranchID> keptProductsInEvent;
233 
234  for(auto const& it : preg.productList()) {
235  BranchDescription const& desc = it.second;
236  if(desc.transient()) {
237  // if the class of the branch is marked transient, output nothing
238  } else if(!desc.present() && !desc.produced()) {
239  // else if the branch containing the product has been previously dropped,
240  // output nothing
241  } else if(desc.unwrappedType() == typeid(ThinnedAssociation)) {
242  associationDescriptions.push_back(&desc);
243  } else if(productSelector_.selected(desc)) {
244  keepThisBranch(desc, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
245  }
246  }
247 
248  parentThinnedAssociationsHelper.selectAssociationProducts(associationDescriptions,
249  keptProductsInEvent,
250  keepAssociation);
251 
252  for(auto association : associationDescriptions) {
253  if(keepAssociation[association->branchID()]) {
254  keepThisBranch(*association, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
255  }
256  }
257 
258  // Now fill in a mapping needed in the case that a branch was dropped while its EDAlias was kept.
260  }
bool selected(BranchDescription const &desc) const
static void fillDroppedToKept(ProductRegistry const &preg, std::map< BranchID, BranchDescription const * > const &trueBranchIDToKeptBranchDesc, std::map< BranchID::value_type, BranchID::value_type > &droppedBranchIDToKeptBranchID_)
ProductSelectorRules productSelectorRules_
Definition: SubProcess.h:262
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
Definition: SubProcess.cc:262
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:273
ProductSelector productSelector_
Definition: SubProcess.h:263
bool initialized() const
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
preg
Definition: Schedule.cc:370
bool edm::SubProcess::shouldWeCloseOutput ( ) const
inline

Definition at line 135 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

135  {
137  return schedule_->shouldWeCloseOutput() || (subProcess_.get() ? subProcess_->shouldWeCloseOutput() : false);
138  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
bool edm::SubProcess::terminate ( void  ) const
inline

Return whether each output module has reached its maximum count. If there is a subprocess, get this information from the subprocess.

Definition at line 202 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, serviceToken_, and subProcess_.

202  {
204  return subProcess_.get() ? subProcess_->terminate() : schedule_->terminate();
205  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
int edm::SubProcess::totalEvents ( ) const
inline

Return the number of events this SubProcess has tried to process (inclues both successes and failures, including failures due to exceptions during processing).

Definition at line 162 of file SubProcess.h.

References schedule_.

162  {
163  return schedule_->totalEvents();
164  }
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
int edm::SubProcess::totalEventsFailed ( ) const
inline

Return the number of events that have not passed any trigger. (N.B. totalEventsFailed() + totalEventsPassed() == totalEvents()

Definition at line 174 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, and serviceToken_.

174  {
176  return schedule_->totalEventsFailed();
177  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
int edm::SubProcess::totalEventsPassed ( ) const
inline

Return the number of events which have been passed by one or more trigger paths.

Definition at line 167 of file SubProcess.h.

References cmsPerfStripChart::operate(), schedule_, and serviceToken_.

167  {
169  return schedule_->totalEventsPassed();
170  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
void edm::SubProcess::updateBranchIDListHelper ( BranchIDLists const &  branchIDLists)

Definition at line 547 of file SubProcess.cc.

Referenced by SubProcess().

547  {
548  branchIDListHelper_->updateFromParent(branchIDLists);
549  if(subProcess_.get()) {
550  subProcess_->updateBranchIDListHelper(branchIDListHelper_->branchIDLists());
551  }
552  }
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:238
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
void edm::SubProcess::writeLumi ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 441 of file SubProcess.cc.

References assert(), and cmsPerfStripChart::operate().

441  {
443  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
444  assert(it != parentToChildPhID_.end());
445  schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber), &processContext_);
446  if(subProcess_.get()) subProcess_->writeLumi(it->second, runNumber, lumiNumber);
447  }
assert(m_qm.get())
LuminosityBlockPrincipal & lumiPrincipal(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:253
ProcessContext processContext_
Definition: SubProcess.h:242
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
void edm::SubProcess::writeRun ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 386 of file SubProcess.cc.

References assert(), and cmsPerfStripChart::operate().

386  {
388  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
389  assert(it != parentToChildPhID_.end());
391  if(subProcess_.get()) subProcess_->writeRun(it->second, runNumber);
392  }
assert(m_qm.get())
ServiceToken serviceToken_
Definition: SubProcess.h:235
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:252
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:253
ProcessContext processContext_
Definition: SubProcess.h:242
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:254
PrincipalCache principalCache_
Definition: SubProcess.h:250
RunPrincipal & runPrincipal(ProcessHistoryID const &phid, RunNumber_t run) const

Member Data Documentation

std::unique_ptr<ExceptionToActionTable const> edm::SubProcess::act_table_
private

Definition at line 240 of file SubProcess.h.

Referenced by SubProcess().

std::shared_ptr<ActivityRegistry> edm::SubProcess::actReg_
private

Definition at line 234 of file SubProcess.h.

Referenced by beginJob(), and SubProcess().

std::shared_ptr<BranchIDListHelper> edm::SubProcess::branchIDListHelper_
private

Definition at line 238 of file SubProcess.h.

Referenced by SubProcess().

std::map<BranchID::value_type, BranchID::value_type> edm::SubProcess::droppedBranchIDToKeptBranchID_
private

Definition at line 273 of file SubProcess.h.

Referenced by droppedBranchIDToKeptBranchID(), and SubProcess().

boost::shared_ptr<eventsetup::EventSetupProvider> edm::SubProcess::esp_
private

Definition at line 251 of file SubProcess.h.

Referenced by SubProcess().

std::vector<HistoryAppender> edm::SubProcess::historyAppenders_
private

Definition at line 249 of file SubProcess.h.

Referenced by SubProcess().

unsigned int edm::SubProcess::historyLumiOffset_
private

Definition at line 246 of file SubProcess.h.

unsigned int edm::SubProcess::historyRunOffset_
private

Definition at line 247 of file SubProcess.h.

Referenced by SubProcess().

SelectedProductsForBranchType edm::SubProcess::keptProducts_
private

Definition at line 261 of file SubProcess.h.

Referenced by keptProducts().

std::shared_ptr<ProductRegistry const> edm::SubProcess::parentPreg_
private

Definition at line 236 of file SubProcess.h.

std::map<ProcessHistoryID, ProcessHistoryID> edm::SubProcess::parentToChildPhID_
private

Definition at line 253 of file SubProcess.h.

PathsAndConsumesOfModules edm::SubProcess::pathsAndConsumesOfModules_
private

Definition at line 243 of file SubProcess.h.

Referenced by beginJob().

std::shared_ptr<ProductRegistry const> edm::SubProcess::preg_
private

Definition at line 237 of file SubProcess.h.

Referenced by beginJob(), and SubProcess().

PrincipalCache edm::SubProcess::principalCache_
private

Definition at line 250 of file SubProcess.h.

Referenced by SubProcess().

std::shared_ptr<ProcessConfiguration const> edm::SubProcess::processConfiguration_
private

Definition at line 241 of file SubProcess.h.

Referenced by SubProcess().

ProcessContext edm::SubProcess::processContext_
private

Definition at line 242 of file SubProcess.h.

Referenced by beginJob(), and SubProcess().

std::vector<ProcessHistoryRegistry> edm::SubProcess::processHistoryRegistries_
private

Definition at line 248 of file SubProcess.h.

Referenced by SubProcess().

std::unique_ptr<ParameterSet> edm::SubProcess::processParameterSet_
private

Definition at line 255 of file SubProcess.h.

Referenced by SubProcess().

ProductSelector edm::SubProcess::productSelector_
private

Definition at line 263 of file SubProcess.h.

ProductSelectorRules edm::SubProcess::productSelectorRules_
private

Definition at line 262 of file SubProcess.h.

std::auto_ptr<Schedule> edm::SubProcess::schedule_
private
ParameterSetID edm::SubProcess::selector_config_id_
private

Definition at line 268 of file SubProcess.h.

Referenced by SubProcess().

detail::TriggerResultsBasedEventSelector edm::SubProcess::selectors_
mutableprivate

Definition at line 269 of file SubProcess.h.

Referenced by SubProcess().

ServiceToken edm::SubProcess::serviceToken_
private
std::auto_ptr<SubProcess> edm::SubProcess::subProcess_
private
std::shared_ptr<ThinnedAssociationsHelper> edm::SubProcess::thinnedAssociationsHelper_
private

Definition at line 239 of file SubProcess.h.

Referenced by SubProcess().

bool edm::SubProcess::wantAllEvents_
private

Definition at line 267 of file SubProcess.h.

Referenced by SubProcess().