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:561
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:251
void updateBranchIDListHelper(BranchIDLists const &)
Definition: SubProcess.cc:544
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 406 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().

406  {
407  auto aux = std::make_shared<LuminosityBlockAuxiliary>(principal.aux());
408  aux->setProcessHistoryID(principal.processHistoryID());
409  auto lbpp = std::make_shared<LuminosityBlockPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyLumiOffset_+principal.index()]),principal.index());
410  auto & processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_+principal.index()];
411  processHistoryRegistry.registerProcessHistory(principal.processHistory());
412  lbpp->fillLuminosityBlockPrincipal(processHistoryRegistry, principal.reader());
413  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
414  principalCache_.insert(lbpp);
415  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
417  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> Traits;
418  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts));
419  if(subProcess_.get()) subProcess_->doBeginLuminosityBlock(lbp, ts);
420  }
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:514
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 346 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().

346  {
347  auto aux = std::make_shared<RunAuxiliary>(principal.aux());
348  aux->setProcessHistoryID(principal.processHistoryID());
349  auto rpp = std::make_shared<RunPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyRunOffset_+principal.index()]),principal.index());
350  auto & processHistoryRegistry = processHistoryRegistries_[historyRunOffset_+principal.index()];
351  processHistoryRegistry.registerProcessHistory(principal.processHistory());
352  rpp->fillRunPrincipal(processHistoryRegistry, principal.reader());
353  principalCache_.insert(rpp);
354 
355  ProcessHistoryID const& parentInputReducedPHID = principal.reducedProcessHistoryID();
356  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
357 
358  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
359 
360  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
362  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> Traits;
363  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts));
364  if(subProcess_.get()) subProcess_->doBeginRun(rp, ts);
365  }
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:514
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 447 of file SubProcess.cc.

References assert().

447  {
448  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
449  assert(it != parentToChildPhID_.end());
450  principalCache_.deleteLumi(it->second, runNumber, lumiNumber);
451  if(subProcess_.get()) subProcess_->deleteLumiFromCache(it->second, runNumber, lumiNumber);
452  }
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 392 of file SubProcess.cc.

References assert().

392  {
393  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
394  assert(it != parentToChildPhID_.end());
395  principalCache_.deleteRun(it->second, runNumber);
396  if(subProcess_.get()) subProcess_->deleteRunFromCache(it->second, runNumber);
397  }
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 400 of file SubProcess.cc.

References cmsPerfStripChart::operate().

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

Definition at line 340 of file SubProcess.cc.

References cmsPerfStripChart::operate().

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

Definition at line 455 of file SubProcess.cc.

References cmsPerfStripChart::operate().

455  {
457  schedule_->beginStream(iID);
458  if(subProcess_.get()) subProcess_->doBeginStream(iID);
459  }
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 423 of file SubProcess.cc.

References cmsPerfStripChart::operate().

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

Definition at line 368 of file SubProcess.cc.

References cmsPerfStripChart::operate().

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

Definition at line 462 of file SubProcess.cc.

References cmsPerfStripChart::operate().

462  {
464  schedule_->endStream(iID);
465  if(subProcess_.get()) subProcess_->doEndStream(iID);
466  }
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  if(!wantAllEvents_) {
300  // use module description and const_cast unless interface to
301  // event is changed to just take a const EventPrincipal
302  if(!selectors_.wantEvent(ep, nullptr)) {
303  return;
304  }
305  }
306  process(ep);
307  /* END relevant bits from OutputModule::doEvent */
308  }
ServiceToken serviceToken_
Definition: SubProcess.h:235
void process(EventPrincipal const &e)
Definition: SubProcess.cc:311
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 491 of file SubProcess.cc.

References cmsPerfStripChart::operate().

491  {
493  {
494  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
495  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> Traits;
496  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts));
497  if(subProcess_.get()) subProcess_->doStreamBeginLuminosityBlock(id,lbp, ts);
498  }
499  }
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 469 of file SubProcess.cc.

References cmsPerfStripChart::operate().

469  {
471  {
472  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
473  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> Traits;
474  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts));
475  if(subProcess_.get()) subProcess_->doStreamBeginRun(id,rp, ts);
476  }
477  }
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 502 of file SubProcess.cc.

References cmsPerfStripChart::operate().

502  {
504  {
505  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
506  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd> Traits;
507  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
508  if(subProcess_.get()) subProcess_->doStreamEndLuminosityBlock(id,lbp, ts,cleaningUpAfterException);
509  }
510  }
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 480 of file SubProcess.cc.

References cmsPerfStripChart::operate().

480  {
482  {
483  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
484  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> Traits;
485  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
486  if(subProcess_.get()) subProcess_->doStreamEndRun(id,rp, ts,cleaningUpAfterException);
487  }
488  }
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 429 of file SubProcess.cc.

References edm::InLumi.

429  {
430  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
432  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> Traits;
433  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
434  if(subProcess_.get()) subProcess_->doEndLuminosityBlock(lbp, ts, cleaningUpAfterException);
435  }
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:514
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 374 of file SubProcess.cc.

References edm::InRun.

374  {
375  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
377  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> Traits;
378  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
379  if(subProcess_.get()) subProcess_->doEndRun(rp, ts, cleaningUpAfterException);
380  }
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:514
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 311 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().

311  {
312  EventAuxiliary aux(principal.aux());
313  aux.setProcessHistoryID(principal.processHistoryID());
314 
315  EventSelectionIDVector esids{principal.eventSelectionIDs()};
316  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
317  esids.push_back(selector_config_id_);
318  }
319 
320  EventPrincipal& ep = principalCache_.eventPrincipal(principal.streamID().value());
321  auto & processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
322  processHistoryRegistry.registerProcessHistory(principal.processHistory());
323  BranchListIndexes bli(principal.branchListIndexes());
324  branchIDListHelper_->fixBranchListIndexes(bli);
325  ep.fillEventPrincipal(aux,
326  processHistoryRegistry,
327  std::move(esids),
328  std::move(bli),
329  *(principal.productProvenanceRetrieverPtr()),//NOTE: this transfers the per product provenance
330  principal.reader());
331  ep.setLuminosityBlockPrincipal(principalCache_.lumiPrincipalPtr());
333  typedef OccurrenceTraits<EventPrincipal, BranchActionStreamBegin> Traits;
334  schedule_->processOneEvent<Traits>(ep.streamID().value(),ep, esp_->eventSetup());
335  if(subProcess_.get()) subProcess_->doEvent(ep);
336  ep.clearEventPrincipal();
337  }
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:514
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 514 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_.

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

References cmsPerfStripChart::operate().

553  {
555  schedule_->respondToOpenInputFile(fb);
556  if(subProcess_.get()) subProcess_->respondToOpenInputFile(fb);
557  }
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:369
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 544 of file SubProcess.cc.

Referenced by SubProcess().

544  {
545  branchIDListHelper_->updateFromParent(branchIDLists);
546  if(subProcess_.get()) {
547  subProcess_->updateBranchIDListHelper(branchIDListHelper_->branchIDLists());
548  }
549  }
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 438 of file SubProcess.cc.

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

438  {
440  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
441  assert(it != parentToChildPhID_.end());
442  schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber), &processContext_);
443  if(subProcess_.get()) subProcess_->writeLumi(it->second, runNumber, lumiNumber);
444  }
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 383 of file SubProcess.cc.

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

383  {
385  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
386  assert(it != parentToChildPhID_.end());
388  if(subProcess_.get()) subProcess_->writeRun(it->second, runNumber);
389  }
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().