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
 
SubProcessoperator= (SubProcess &&)=default
 
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
 
 SubProcess (SubProcess &&)=default
 
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::shared_ptr
< BranchIDListHelper const > 
branchIDListHelper () const
 
std::shared_ptr
< BranchIDListHelper > & 
branchIDListHelper ()
 
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)
 
bool hasSubProcesses () const
 
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
 
std::shared_ptr
< ThinnedAssociationsHelper
const > 
thinnedAssociationsHelper () const
 
std::shared_ptr
< ThinnedAssociationsHelper
thinnedAssociationsHelper ()
 

Private Attributes

std::unique_ptr
< ExceptionToActionTable const > 
act_table_
 
std::shared_ptr< ActivityRegistryactReg_
 
edm::propagate_const
< std::shared_ptr
< BranchIDListHelper > > 
branchIDListHelper_
 
std::map< BranchID::value_type,
BranchID::value_type
droppedBranchIDToKeptBranchID_
 
edm::propagate_const
< std::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_
 
edm::propagate_const
< std::unique_ptr
< ParameterSet > > 
processParameterSet_
 
ProductSelector productSelector_
 
ProductSelectorRules productSelectorRules_
 
edm::propagate_const
< std::unique_ptr< Schedule > > 
schedule_
 
ParameterSetID selector_config_id_
 
detail::TriggerResultsBasedEventSelector selectors_
 
ServiceToken serviceToken_
 
edm::propagate_const
< std::unique_ptr< std::vector
< SubProcess > > > 
subProcesses_
 
edm::propagate_const
< std::shared_ptr
< ThinnedAssociationsHelper > > 
thinnedAssociationsHelper_
 
bool wantAllEvents_
 

Detailed Description

Definition at line 39 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 edm::ScheduleItems::act_table_, act_table_, edm::ScheduleItems::actReg_, actReg_, edm::ScheduleItems::addCPRandTNS(), edm::ScheduleItems::branchIDListHelper(), branchIDListHelper(), branchIDListHelper_, edm::detail::configureEventSelector(), edm::ActivityRegistry::connectToSubProcess(), droppedBranchIDToKeptBranchID_, esp_, edm::ParameterSet::exists(), edm::getAllTriggerNames(), edm::ParameterSet::getUntrackedParameterSet(), hasSubProcesses(), historyAppenders_, historyRunOffset_, cmsHarvester::index, edm::ScheduleItems::initMisc(), edm::ScheduleItems::initSchedule(), edm::ScheduleItems::initServices(), edm::PrincipalCache::insert(), mps_monitormerge::items, edm::eventsetup::EventSetupsController::makeProvider(), Data_TkAlMuonIsolated_Run2015B_PromptReco_v1_cff::maxEvents, eostools::move(), edm::PreallocationConfiguration::numberOfStreams(), cmsPerfStripChart::operate(), edm::ParameterSet::popParameterSet(), edm::popSubProcessVParameterSet(), edm::ScheduleItems::preg(), preg_, principalCache_, edm::ScheduleItems::processConfiguration(), 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, subProcesses_, edm::ScheduleItems::thinnedAssociationsHelper(), thinnedAssociationsHelper(), 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  subProcesses_(),
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  // propagate_const<T> has no reset() function
92  processParameterSet_ = std::unique_ptr<ParameterSet>(parameterSet.popParameterSet(std::string("process")).release());
93 
94  // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them.
95  if(processParameterSet_->exists(maxEvents)) {
96  processParameterSet_->popParameterSet(maxEvents);
97  }
98  if(processParameterSet_->exists(maxLumis)) {
99  processParameterSet_->popParameterSet(maxLumis);
100  }
101 
102  // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process.
103  if(topLevelParameterSet.exists(maxEvents)) {
104  processParameterSet_->addUntrackedParameter<ParameterSet>(maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents));
105  }
106  if(topLevelParameterSet.exists(maxLumis)) {
107  processParameterSet_->addUntrackedParameter<ParameterSet>(maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis));
108  }
109 
110  // If there are subprocesses, pop the subprocess parameter sets out of the process parameter set
111  std::unique_ptr<std::vector<ParameterSet> > subProcessVParameterSet(popSubProcessVParameterSet(*processParameterSet_));
112  bool hasSubProcesses = subProcessVParameterSet.get() != nullptr;
113 
114  ScheduleItems items(*parentProductRegistry, *this);
115  actReg_ = items.actReg_;
116 
117  ParameterSet const& optionsPset(processParameterSet_->getUntrackedParameterSet("options", ParameterSet()));
118  IllegalParameters::setThrowAnException(optionsPset.getUntrackedParameter<bool>("throwIfIllegalParameter", true));
119 
120  //initialize the services
121  ServiceToken iToken;
122 
123  // get any configured services.
124  std::unique_ptr<std::vector<ParameterSet> > serviceSets = processParameterSet_->popVParameterSet(std::string("services"));
125 
126  ServiceToken newToken = items.initServices(*serviceSets, *processParameterSet_, token, iLegacy, false);
127  parentActReg.connectToSubProcess(*items.actReg_);
128  serviceToken_ = items.addCPRandTNS(*processParameterSet_, newToken);
129 
130 
131  //make the services available
133 
134  // intialize miscellaneous items
135  items.initMisc(*processParameterSet_);
136 
137  // intialize the event setup provider
138  esp_ = esController.makeProvider(*processParameterSet_);
139 
140  branchIDListHelper_ = items.branchIDListHelper();
141  updateBranchIDListHelper(parentBranchIDListHelper->branchIDLists());
142 
143  thinnedAssociationsHelper_ = items.thinnedAssociationsHelper();
144  thinnedAssociationsHelper_->updateFromParentProcess(parentThinnedAssociationsHelper, keepAssociation, droppedBranchIDToKeptBranchID_);
145 
146  // intialize the Schedule
147  schedule_ = items.initSchedule(*processParameterSet_,hasSubProcesses,preallocConfig,&processContext_);
148 
149  // set the items
150  act_table_ = std::move(items.act_table_);
151  preg_ = items.preg();
152  //CMS-THREADING this only works since Run/Lumis are synchronous so when principalCache asks for
153  // the reducedProcessHistoryID from a full ProcessHistoryID that registry will not be in use by
154  // another thread. We really need to change how this is done in the PrincipalCache.
156 
157 
158  processConfiguration_ = items.processConfiguration();
160  processContext_.setParentProcessContext(parentProcessContext);
161 
163  for(unsigned int index = 0; index < preallocConfig.numberOfStreams(); ++index) {
164  auto ep = std::make_shared<EventPrincipal>(preg_,
169  index);
170  ep->preModuleDelayedGetSignal_.connect(std::cref(items.actReg_->preModuleEventDelayedGetSignal_));
171  ep->postModuleDelayedGetSignal_.connect(std::cref(items.actReg_->postModuleEventDelayedGetSignal_));
173  }
174  if(hasSubProcesses) {
175  if(subProcesses_ == nullptr) {
176  subProcesses_ = std::make_unique<std::vector<SubProcess> >();
177  }
178  subProcesses_->reserve(subProcessVParameterSet->size());
179  for(auto& subProcessPSet : *subProcessVParameterSet) {
180  subProcesses_->emplace_back(subProcessPSet,
181  topLevelParameterSet,
182  preg_,
184  *thinnedAssociationsHelper_,
185  esController,
186  *items.actReg_,
187  newToken,
188  iLegacy,
189  preallocConfig,
190  &processContext_);
191  }
192  }
193  }
unsigned int historyRunOffset_
Definition: SubProcess.h:308
unsigned int historyLumiOffset_
Definition: SubProcess.h:307
ParameterSetID selector_config_id_
Definition: SubProcess.h:329
void insert(std::shared_ptr< RunPrincipal > rp)
void setNumberOfConcurrentPrincipals(PreallocationConfiguration const &)
std::shared_ptr< BranchIDListHelper const > branchIDListHelper() const
Definition: SubProcess.h:290
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:309
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: SubProcess.h:300
void updateBranchIDListHelper(BranchIDLists const &)
Definition: SubProcess.cc:617
std::unique_ptr< std::vector< ParameterSet > > popSubProcessVParameterSet(ParameterSet &parameterSet)
Definition: SubProcess.cc:640
void setParentProcessContext(ProcessContext const *parentProcessContext)
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, std::map< BranchID, bool > &keepAssociation)
Definition: SubProcess.cc:240
static void setThrowAnException(bool v)
ProductSelectorRules productSelectorRules_
Definition: SubProcess.h:323
def move
Definition: eostools.py:510
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
edm::propagate_const< std::unique_ptr< ParameterSet > > processParameterSet_
Definition: SubProcess.h:316
void setProcessConfiguration(ProcessConfiguration const *processConfiguration)
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: SubProcess.h:301
void setProcessHistoryRegistry(ProcessHistoryRegistry const &phr)
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:334
ProductSelector productSelector_
Definition: SubProcess.h:324
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:330
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:314
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:295
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:299
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:310
std::vector< std::string > const & getAllTriggerNames()
bool hasSubProcesses() const
Definition: SubProcess.h:286
std::shared_ptr< ProductRegistry const > parentPreg_
Definition: SubProcess.h:297
ProcessContext processContext_
Definition: SubProcess.h:303
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)
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper() const
Definition: SubProcess.h:292
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:298
PrincipalCache principalCache_
Definition: SubProcess.h:311
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:302
edm::SubProcess::~SubProcess ( )
virtual

Definition at line 195 of file SubProcess.cc.

195 {}
edm::SubProcess::SubProcess ( SubProcess const &  )
delete
edm::SubProcess::SubProcess ( SubProcess &&  )
default

Member Function Documentation

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

Definition at line 209 of file SubProcess.cc.

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

Referenced by doBeginJob().

209  {
212  }
215  actReg_->preBeginJobSignal_(pathsAndConsumesOfModules_, processContext_);
216  schedule_->beginJob(*preg_);
217  if(hasSubProcesses()) {
218  for(auto& subProcess : *subProcesses_) {
219  subProcess.doBeginJob();
220  }
221  }
222  }
PathsAndConsumesOfModules pathsAndConsumesOfModules_
Definition: SubProcess.h:304
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:282
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
void initialize(Schedule const *, std::shared_ptr< ProductRegistry const >)
ServiceToken serviceToken_
Definition: SubProcess.h:296
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:295
bool hasSubProcesses() const
Definition: SubProcess.h:286
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:301
ProcessContext processContext_
Definition: SubProcess.h:303
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:298
void edm::SubProcess::beginLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts 
)
private

Definition at line 450 of file SubProcess.cc.

References printConversionInfo::aux, edm::LuminosityBlockPrincipal::aux(), esp_, hasSubProcesses(), historyAppenders_, historyLumiOffset_, edm::LuminosityBlockPrincipal::index(), edm::InLumi, edm::PrincipalCache::insert(), edm::PrincipalCache::lumiPrincipalPtr(), preg_, principalCache_, processConfiguration_, edm::Principal::processHistory(), edm::Principal::processHistoryID(), processHistoryRegistries_, propagateProducts(), edm::Principal::reader(), edm::PrincipalCache::runPrincipalPtr(), schedule_, and subProcesses_.

Referenced by doBeginLuminosityBlock().

450  {
451  auto aux = std::make_shared<LuminosityBlockAuxiliary>(principal.aux());
452  aux->setProcessHistoryID(principal.processHistoryID());
453  auto lbpp = std::make_shared<LuminosityBlockPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyLumiOffset_+principal.index()]),principal.index());
454  auto & processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_+principal.index()];
455  processHistoryRegistry.registerProcessHistory(principal.processHistory());
456  lbpp->fillLuminosityBlockPrincipal(processHistoryRegistry, principal.reader());
457  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
458  principalCache_.insert(lbpp);
459  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
461  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> Traits;
462  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts));
463  if(hasSubProcesses()) {
464  for(auto& subProcess : *subProcesses_) {
465  subProcess.doBeginLuminosityBlock(lbp, ts);
466  }
467  }
468  }
unsigned int historyLumiOffset_
Definition: SubProcess.h:307
void insert(std::shared_ptr< RunPrincipal > rp)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:309
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:310
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:598
bool hasSubProcesses() const
Definition: SubProcess.h:286
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:298
PrincipalCache principalCache_
Definition: SubProcess.h:311
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:302
void edm::SubProcess::beginRun ( RunPrincipal const &  r,
IOVSyncValue const &  ts 
)
private

Definition at line 374 of file SubProcess.cc.

References printConversionInfo::aux, edm::RunPrincipal::aux(), esp_, hasSubProcesses(), historyAppenders_, historyRunOffset_, edm::RunPrincipal::index(), edm::InRun, edm::PrincipalCache::insert(), parentToChildPhID_, preg_, principalCache_, processConfiguration_, edm::Principal::processHistory(), edm::Principal::processHistoryID(), processHistoryRegistries_, propagateProducts(), edm::Principal::reader(), edm::RunPrincipal::reducedProcessHistoryID(), edm::PrincipalCache::runPrincipalPtr(), schedule_, and subProcesses_.

Referenced by doBeginRun().

374  {
375  auto aux = std::make_shared<RunAuxiliary>(principal.aux());
376  aux->setProcessHistoryID(principal.processHistoryID());
377  auto rpp = std::make_shared<RunPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyRunOffset_+principal.index()]),principal.index());
378  auto & processHistoryRegistry = processHistoryRegistries_[historyRunOffset_+principal.index()];
379  processHistoryRegistry.registerProcessHistory(principal.processHistory());
380  rpp->fillRunPrincipal(processHistoryRegistry, principal.reader());
381  principalCache_.insert(rpp);
382 
383  ProcessHistoryID const& parentInputReducedPHID = principal.reducedProcessHistoryID();
384  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
385 
386  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
387 
388  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
390  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> Traits;
391  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts));
392  if(hasSubProcesses()) {
393  for(auto& subProcess : *subProcesses_) {
394  subProcess.doBeginRun(rp, ts);
395  }
396  }
397  }
unsigned int historyRunOffset_
Definition: SubProcess.h:308
void insert(std::shared_ptr< RunPrincipal > rp)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:309
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
Hash< ProcessHistoryType > ProcessHistoryID
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:314
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:310
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:598
bool hasSubProcesses() const
Definition: SubProcess.h:286
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:298
PrincipalCache principalCache_
Definition: SubProcess.h:311
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:302
std::shared_ptr<BranchIDListHelper const> edm::SubProcess::branchIDListHelper ( ) const
inlineprivate

Definition at line 290 of file SubProcess.h.

References branchIDListHelper_, and edm::get_underlying_safe().

Referenced by SubProcess().

std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:299
std::shared_ptr<BranchIDListHelper>& edm::SubProcess::branchIDListHelper ( )
inlineprivate

Definition at line 291 of file SubProcess.h.

References branchIDListHelper_, and edm::get_underlying_safe().

std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:299
void edm::SubProcess::clearCounters ( )
inline

Clear all the counters in the trigger report.

Definition at line 257 of file SubProcess.h.

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

257  {
259  schedule_->clearCounters();
260  if(hasSubProcesses()) {
261  for(auto& subProcess : *subProcesses_) {
262  subProcess.clearCounters();
263  }
264  }
265  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::closeOutputFiles ( )
inline

Definition at line 103 of file SubProcess.h.

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

103  {
105  schedule_->closeOutputFiles();
106  if(hasSubProcesses()) {
107  for(auto& subProcess : *subProcesses_) {
108  subProcess.closeOutputFiles();
109  }
110  }
111  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::deleteLumiFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 503 of file SubProcess.cc.

References assert(), edm::PrincipalCache::deleteLumi(), hasSubProcesses(), parentToChildPhID_, principalCache_, and subProcesses_.

503  {
504  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
505  assert(it != parentToChildPhID_.end());
506  principalCache_.deleteLumi(it->second, runNumber, lumiNumber);
507  if(hasSubProcesses()) {
508  for(auto& subProcess : *subProcesses_) {
509  subProcess.deleteLumiFromCache(it->second, runNumber, lumiNumber);
510  }
511  }
512  }
void deleteLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)
assert(m_qm.get())
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:314
bool hasSubProcesses() const
Definition: SubProcess.h:286
PrincipalCache principalCache_
Definition: SubProcess.h:311
void edm::SubProcess::deleteRunFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 432 of file SubProcess.cc.

References assert(), edm::PrincipalCache::deleteRun(), hasSubProcesses(), parentToChildPhID_, principalCache_, and subProcesses_.

432  {
433  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
434  assert(it != parentToChildPhID_.end());
435  principalCache_.deleteRun(it->second, runNumber);
436  if(hasSubProcesses()) {
437  for(auto& subProcess : *subProcesses_) {
438  subProcess.deleteRunFromCache(it->second, runNumber);
439  }
440  }
441  }
assert(m_qm.get())
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:314
void deleteRun(ProcessHistoryID const &phid, RunNumber_t run)
bool hasSubProcesses() const
Definition: SubProcess.h:286
PrincipalCache principalCache_
Definition: SubProcess.h:311
void edm::SubProcess::doBeginJob ( )

Definition at line 198 of file SubProcess.cc.

References beginJob().

198  {
199  this->beginJob();
200  }
void edm::SubProcess::doBeginLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 444 of file SubProcess.cc.

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

444  {
447  }
ServiceToken serviceToken_
Definition: SubProcess.h:296
void beginLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts)
Definition: SubProcess.cc:450
void edm::SubProcess::doBeginRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 368 of file SubProcess.cc.

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

368  {
370  beginRun(principal,ts);
371  }
void beginRun(RunPrincipal const &r, IOVSyncValue const &ts)
Definition: SubProcess.cc:374
ServiceToken serviceToken_
Definition: SubProcess.h:296
void edm::SubProcess::doBeginStream ( unsigned int  iID)

Definition at line 515 of file SubProcess.cc.

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

515  {
517  schedule_->beginStream(iID);
518  if(hasSubProcesses()) {
519  for(auto& subProcess : *subProcesses_) {
520  subProcess.doBeginStream(iID);
521  }
522  }
523  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::doEndJob ( )

Definition at line 203 of file SubProcess.cc.

References endJob().

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

203  {
204  endJob();
205  }
void edm::SubProcess::doEndLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 471 of file SubProcess.cc.

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

471  {
473  endLuminosityBlock(principal,ts,cleaningUpAfterException);
474  }
ServiceToken serviceToken_
Definition: SubProcess.h:296
void endLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:477
void edm::SubProcess::doEndRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 400 of file SubProcess.cc.

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

400  {
402  endRun(principal,ts,cleaningUpAfterException);
403  }
ServiceToken serviceToken_
Definition: SubProcess.h:296
void endRun(RunPrincipal const &r, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:406
void edm::SubProcess::doEndStream ( unsigned int  iID)

Definition at line 526 of file SubProcess.cc.

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

526  {
528  schedule_->endStream(iID);
529  if(hasSubProcesses()) {
530  for(auto& subProcess : *subProcesses_) {
531  subProcess.doEndStream(iID);
532  }
533  }
534  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::doEvent ( EventPrincipal const &  principal)

Definition at line 320 of file SubProcess.cc.

References cmsPerfStripChart::operate(), process(), selectors_, serviceToken_, wantAllEvents_, and edm::detail::TriggerResultsBasedEventSelector::wantEvent().

320  {
322  /* BEGIN relevant bits from OutputModule::doEvent */
323  if(!wantAllEvents_) {
324  // use module description and const_cast unless interface to
325  // event is changed to just take a const EventPrincipal
326  if(!selectors_.wantEvent(ep, nullptr)) {
327  return;
328  }
329  }
330  process(ep);
331  /* END relevant bits from OutputModule::doEvent */
332  }
ServiceToken serviceToken_
Definition: SubProcess.h:296
void process(EventPrincipal const &e)
Definition: SubProcess.cc:335
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:330
bool wantEvent(EventPrincipal const &e, ModuleCallingContext const *)
void edm::SubProcess::doStreamBeginLuminosityBlock ( unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 567 of file SubProcess.cc.

References esp_, hasSubProcesses(), edm::PrincipalCache::lumiPrincipalPtr(), cmsPerfStripChart::operate(), principalCache_, schedule_, serviceToken_, and subProcesses_.

567  {
569  {
570  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
571  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> Traits;
572  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts));
573  if(hasSubProcesses()) {
574  for(auto& subProcess : *subProcesses_) {
575  subProcess.doStreamBeginLuminosityBlock(id,lbp, ts);
576  }
577  }
578  }
579  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
bool hasSubProcesses() const
Definition: SubProcess.h:286
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:311
void edm::SubProcess::doStreamBeginRun ( unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 537 of file SubProcess.cc.

References esp_, hasSubProcesses(), cmsPerfStripChart::operate(), principalCache_, edm::PrincipalCache::runPrincipalPtr(), schedule_, serviceToken_, and subProcesses_.

537  {
539  {
540  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
541  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> Traits;
542  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts));
543  if(hasSubProcesses()) {
544  for(auto& subProcess : *subProcesses_) {
545  subProcess.doStreamBeginRun(id,rp, ts);
546  }
547  }
548  }
549  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
bool hasSubProcesses() const
Definition: SubProcess.h:286
PrincipalCache principalCache_
Definition: SubProcess.h:311
void edm::SubProcess::doStreamEndLuminosityBlock ( unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 582 of file SubProcess.cc.

References esp_, hasSubProcesses(), edm::PrincipalCache::lumiPrincipalPtr(), cmsPerfStripChart::operate(), principalCache_, schedule_, serviceToken_, and subProcesses_.

582  {
584  {
585  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
586  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd> Traits;
587  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
588  if(hasSubProcesses()) {
589  for(auto& subProcess : *subProcesses_) {
590  subProcess.doStreamEndLuminosityBlock(id,lbp, ts,cleaningUpAfterException);
591  }
592  }
593  }
594  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
bool hasSubProcesses() const
Definition: SubProcess.h:286
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:311
void edm::SubProcess::doStreamEndRun ( unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 552 of file SubProcess.cc.

References esp_, hasSubProcesses(), cmsPerfStripChart::operate(), principalCache_, edm::PrincipalCache::runPrincipalPtr(), schedule_, serviceToken_, and subProcesses_.

552  {
554  {
555  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
556  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> Traits;
557  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
558  if(hasSubProcesses()) {
559  for(auto& subProcess : *subProcesses_) {
560  subProcess.doStreamEndRun(id,rp, ts,cleaningUpAfterException);
561  }
562  }
563  }
564  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
bool hasSubProcesses() const
Definition: SubProcess.h:286
PrincipalCache principalCache_
Definition: SubProcess.h:311
std::map<BranchID::value_type, BranchID::value_type> const& edm::SubProcess::droppedBranchIDToKeptBranchID ( )
inlineprivate

Definition at line 282 of file SubProcess.h.

References droppedBranchIDToKeptBranchID_.

Referenced by beginJob().

282  {
284  }
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:334
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 216 of file SubProcess.h.

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

216  {
218  schedule_->enableEndPaths(active);
219  if(hasSubProcesses()) {
220  for(auto& subProcess : *subProcesses_) {
221  subProcess.enableEndPaths(active);
222  }
223  }
224  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::endJob ( void  )
private

Definition at line 225 of file SubProcess.cc.

References EnergyCorrector::c, edm::ExceptionCollector::call(), hasSubProcesses(), edm::ExceptionCollector::hasThrown(), cmsPerfStripChart::operate(), edm::ExceptionCollector::rethrow(), schedule_, serviceToken_, and subProcesses_.

Referenced by doEndJob().

225  {
227  ExceptionCollector c("Multiple exceptions were thrown while executing endJob. An exception message follows for each.");
228  schedule_->endJob(c);
229  if(hasSubProcesses()) {
230  for(auto& subProcess : *subProcesses_) {
231  c.call([&subProcess](){ subProcess.doEndJob();});
232  }
233  }
234  if(c.hasThrown()) {
235  c.rethrow();
236  }
237  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::endLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)
private

Definition at line 477 of file SubProcess.cc.

References esp_, hasSubProcesses(), edm::InLumi, edm::PrincipalCache::lumiPrincipalPtr(), principalCache_, propagateProducts(), schedule_, and subProcesses_.

Referenced by doEndLuminosityBlock().

477  {
478  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
480  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> Traits;
481  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
482  if(hasSubProcesses()) {
483  for(auto& subProcess : *subProcesses_) {
484  subProcess.doEndLuminosityBlock(lbp, ts, cleaningUpAfterException);
485  }
486  }
487  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:598
bool hasSubProcesses() const
Definition: SubProcess.h:286
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:311
bool edm::SubProcess::endPathsEnabled ( ) const
inline

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

Definition at line 227 of file SubProcess.h.

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

227  {
229  return schedule_->endPathsEnabled();
230  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
void edm::SubProcess::endRun ( RunPrincipal const &  r,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)
private

Definition at line 406 of file SubProcess.cc.

References esp_, hasSubProcesses(), edm::InRun, principalCache_, propagateProducts(), edm::PrincipalCache::runPrincipalPtr(), schedule_, and subProcesses_.

Referenced by doEndRun().

406  {
407  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
409  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> Traits;
410  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
411  if(hasSubProcesses()) {
412  for(auto& subProcess : *subProcesses_) {
413  subProcess.doEndRun(rp, ts, cleaningUpAfterException);
414  }
415  }
416  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
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:598
bool hasSubProcesses() const
Definition: SubProcess.h:286
PrincipalCache principalCache_
Definition: SubProcess.h:311
void edm::SubProcess::fixBranchIDListsForEDAliases ( std::map< BranchID::value_type, BranchID::value_type > const &  droppedBranchIDToKeptBranchID)
private

Definition at line 301 of file SubProcess.cc.

References branchIDListHelper_, hasSubProcesses(), and subProcesses_.

Referenced by beginJob().

301  {
302  // Check for branches dropped while an EDAlias was kept.
303  // Replace BranchID of each dropped branch with that of the kept alias.
304  for(BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
305  for(BranchID::value_type& branchID : branchIDList) {
306  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
307  if(iter != droppedBranchIDToKeptBranchID.end()) {
308  branchID = iter->second;
309  }
310  }
311  }
312  if(hasSubProcesses()) {
313  for(auto& subProcess : *subProcesses_) {
314  subProcess.fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID);
315  }
316  }
317  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:282
unsigned int value_type
Definition: BranchID.h:16
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:299
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
bool hasSubProcesses() const
Definition: SubProcess.h:286
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 234 of file SubProcess.h.

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

234  {
236  schedule_->getTriggerReport(rep);
237  }
string rep
Definition: cuy.py:1188
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool edm::SubProcess::hasSubProcesses ( ) const
inlineprivate
void edm::SubProcess::keepThisBranch ( BranchDescription const &  desc,
std::map< BranchID, BranchDescription const * > &  trueBranchIDToKeptBranchDesc,
std::set< BranchID > &  keptProductsInEvent 
)
private

Definition at line 282 of file SubProcess.cc.

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

Referenced by selectProducts().

284  {
285 
287  trueBranchIDToKeptBranchDesc);
288 
289  if(desc.branchType() == InEvent) {
290  if(desc.produced()) {
291  keptProductsInEvent.insert(desc.originalBranchID());
292  } else {
293  keptProductsInEvent.insert(desc.branchID());
294  }
295  }
296  // Now put it in the list of selected branches.
297  keptProducts_[desc.branchType()].push_back(&desc);
298  }
SelectedProductsForBranchType keptProducts_
Definition: SubProcess.h:322
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)
SelectedProductsForBranchType const& edm::SubProcess::keptProducts ( ) const
inline

Definition at line 65 of file SubProcess.h.

References keptProducts_.

Referenced by propagateProducts(), and edm::ScheduleItems::ScheduleItems().

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

Definition at line 114 of file SubProcess.h.

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

114  {
116  schedule_->openNewOutputFilesIfNeeded();
117  if(hasSubProcesses()) {
118  for(auto& subProcess : *subProcesses_) {
119  subProcess.openNewOutputFilesIfNeeded();
120  }
121  }
122  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::openOutputFiles ( FileBlock fb)
inline

Definition at line 125 of file SubProcess.h.

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

125  {
127  schedule_->openOutputFiles(fb);
128  if(hasSubProcesses()) {
129  for(auto& subProcess : *subProcesses_) {
130  subProcess.openOutputFiles(fb);
131  }
132  }
133  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
SubProcess& edm::SubProcess::operator= ( SubProcess const &  )
delete
SubProcess& edm::SubProcess::operator= ( SubProcess &&  )
default
void edm::SubProcess::postForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
inline

Definition at line 177 of file SubProcess.h.

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

177  {
179  schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
180  if(hasSubProcesses()) {
181  for(auto& subProcess : *subProcesses_) {
182  subProcess.postForkReacquireResources(iChildIndex, iNumberOfChildren);
183  }
184  }
185  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::preForkReleaseResources ( )
inline

Definition at line 167 of file SubProcess.h.

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

167  {
169  schedule_->preForkReleaseResources();
170  if(hasSubProcesses()) {
171  for(auto& subProcess : *subProcesses_) {
172  subProcess.preForkReleaseResources();
173  }
174  }
175  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::process ( EventPrincipal const &  e)
private

Definition at line 335 of file SubProcess.cc.

References edm::ProductRegistry::anyProductProduced(), printConversionInfo::aux, edm::EventPrincipal::aux(), branchIDListHelper_, edm::EventPrincipal::branchListIndexes(), edm::EventPrincipal::clearEventPrincipal(), esp_, edm::PrincipalCache::eventPrincipal(), edm::EventPrincipal::eventSelectionIDs(), edm::EventPrincipal::fillEventPrincipal(), hasSubProcesses(), edm::InEvent, edm::PrincipalCache::lumiPrincipalPtr(), eostools::move(), principalCache_, edm::Principal::processHistory(), edm::Principal::processHistoryID(), processHistoryRegistries_, edm::EventPrincipal::productProvenanceRetrieverPtr(), edm::Principal::productRegistry(), propagateProducts(), edm::Principal::reader(), schedule_, selector_config_id_, edm::EventPrincipal::setLuminosityBlockPrincipal(), edm::EventPrincipal::streamID(), subProcesses_, edm::StreamID::value(), and wantAllEvents_.

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), doEvent(), 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().

335  {
336  EventAuxiliary aux(principal.aux());
337  aux.setProcessHistoryID(principal.processHistoryID());
338 
339  EventSelectionIDVector esids{principal.eventSelectionIDs()};
340  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
341  esids.push_back(selector_config_id_);
342  }
343 
344  EventPrincipal& ep = principalCache_.eventPrincipal(principal.streamID().value());
345  auto & processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
346  processHistoryRegistry.registerProcessHistory(principal.processHistory());
347  BranchListIndexes bli(principal.branchListIndexes());
348  branchIDListHelper_->fixBranchListIndexes(bli);
349  ep.fillEventPrincipal(aux,
350  processHistoryRegistry,
351  std::move(esids),
352  std::move(bli),
353  *(principal.productProvenanceRetrieverPtr()),//NOTE: this transfers the per product provenance
354  principal.reader());
355  ep.setLuminosityBlockPrincipal(principalCache_.lumiPrincipalPtr());
357  typedef OccurrenceTraits<EventPrincipal, BranchActionStreamBegin> Traits;
358  schedule_->processOneEvent<Traits>(ep.streamID().value(),ep, esp_->eventSetup());
359  if(hasSubProcesses()) {
360  for(auto& subProcess : *subProcesses_) {
361  subProcess.doEvent(ep);
362  }
363  }
364  ep.clearEventPrincipal();
365  }
ParameterSetID selector_config_id_
Definition: SubProcess.h:329
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:309
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
std::vector< EventSelectionID > EventSelectionIDVector
std::vector< BranchListIndex > BranchListIndexes
def move
Definition: eostools.py:510
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:312
EventPrincipal & eventPrincipal(unsigned int iStreamIndex) const
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:299
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:598
bool hasSubProcesses() const
Definition: SubProcess.h:286
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:311
void edm::SubProcess::propagateProducts ( BranchType  type,
Principal const &  parentPrincipal,
Principal principal 
) const
private

Definition at line 598 of file SubProcess.cc.

References edm::ProductData::connectTo(), edm::Principal::getModifiableProductHolder(), edm::Principal::getProductHolder(), keptProducts(), edm::ProductHolderBase::productData(), edm::ProductHolderBase::productUnavailable(), and fireworks::void.

Referenced by beginLuminosityBlock(), beginRun(), endLuminosityBlock(), endRun(), and process().

598  {
599  SelectedProducts const& keptVector = keptProducts()[type];
600  for(auto const& item : keptVector) {
601  ProductHolderBase const* parentProductHolder = parentPrincipal.getProductHolder(item->branchID());
602  if(parentProductHolder != nullptr) {
603  ProductData const& parentData = parentProductHolder->productData();
604  ProductHolderBase* productHolder = principal.getModifiableProductHolder(item->branchID());
605  if(productHolder != nullptr) {
606  ProductData& thisData = productHolder->productData();
607  //Propagate the per event(run)(lumi) data for this product to the subprocess.
608  //First, the product itself.
609  thisData.connectTo(parentData);
610  // Sets unavailable flag, if known that product is not available
611  (void)productHolder->productUnavailable();
612  }
613  }
614  }
615  }
type
Definition: HCALResponse.h:21
SelectedProductsForBranchType const & keptProducts() const
Definition: SubProcess.h:65
std::vector< BranchDescription const * > SelectedProducts
void edm::SubProcess::respondToCloseInputFile ( FileBlock const &  fb)
inline

Definition at line 141 of file SubProcess.h.

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

141  {
143  schedule_->respondToCloseInputFile(fb);
144  if(hasSubProcesses()) {
145  for(auto& subProcess : *subProcesses_) {
146  subProcess.respondToCloseInputFile(fb);
147  }
148  }
149  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 628 of file SubProcess.cc.

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

628  {
630  schedule_->respondToOpenInputFile(fb);
631  if(hasSubProcesses()) {
632  for(auto& subProcess : *subProcesses_) {
633  subProcess.respondToOpenInputFile(fb);
634  }
635  }
636  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::selectProducts ( ProductRegistry const &  preg,
ThinnedAssociationsHelper const &  parentThinnedAssociationsHelper,
std::map< BranchID, bool > &  keepAssociation 
)

Definition at line 240 of file SubProcess.cc.

References edm::ProductRegistry::allBranchDescriptions(), droppedBranchIDToKeptBranchID_, edm::ProductSelector::fillDroppedToKept(), edm::ProductSelector::initialize(), edm::ProductSelector::initialized(), keepThisBranch(), edm::BranchDescription::present(), edm::BranchDescription::produced(), edm::ProductRegistry::productList(), productSelector_, productSelectorRules_, edm::ThinnedAssociationsHelper::selectAssociationProducts(), edm::ProductSelector::selected(), edm::BranchDescription::transient(), and edm::BranchDescription::unwrappedType().

Referenced by SubProcess().

242  {
243  if(productSelector_.initialized()) return;
244  productSelector_.initialize(productSelectorRules_, preg.allBranchDescriptions());
245 
246  // TODO: See if we can collapse keptProducts_ and productSelector_ into a
247  // single object. See the notes in the header for ProductSelector
248  // for more information.
249 
250  std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
251  std::vector<BranchDescription const*> associationDescriptions;
252  std::set<BranchID> keptProductsInEvent;
253 
254  for(auto const& it : preg.productList()) {
255  BranchDescription const& desc = it.second;
256  if(desc.transient()) {
257  // if the class of the branch is marked transient, output nothing
258  } else if(!desc.present() && !desc.produced()) {
259  // else if the branch containing the product has been previously dropped,
260  // output nothing
261  } else if(desc.unwrappedType() == typeid(ThinnedAssociation)) {
262  associationDescriptions.push_back(&desc);
263  } else if(productSelector_.selected(desc)) {
264  keepThisBranch(desc, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
265  }
266  }
267 
268  parentThinnedAssociationsHelper.selectAssociationProducts(associationDescriptions,
269  keptProductsInEvent,
270  keepAssociation);
271 
272  for(auto association : associationDescriptions) {
273  if(keepAssociation[association->branchID()]) {
274  keepThisBranch(*association, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
275  }
276  }
277 
278  // Now fill in a mapping needed in the case that a branch was dropped while its EDAlias was kept.
280  }
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:323
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
Definition: SubProcess.cc:282
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:334
ProductSelector productSelector_
Definition: SubProcess.h:324
bool initialized() const
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
preg
Definition: Schedule.cc:374
bool edm::SubProcess::shouldWeCloseOutput ( ) const
inline

Definition at line 152 of file SubProcess.h.

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

152  {
154  if(schedule_->shouldWeCloseOutput()) {
155  return true;
156  }
157  if(hasSubProcesses()) {
158  for(auto const& subProcess : *subProcesses_) {
159  if(subProcess.shouldWeCloseOutput()) {
160  return true;
161  }
162  }
163  }
164  return false;
165  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
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 241 of file SubProcess.h.

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

241  {
243  if(schedule_->terminate()) {
244  return true;
245  }
246  if(hasSubProcesses()) {
247  for(auto const& subProcess : *subProcesses_) {
248  if(subProcess.terminate()) {
249  return true;
250  }
251  }
252  }
253  return false;
254  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
bool hasSubProcesses() const
Definition: SubProcess.h:286
std::shared_ptr<ThinnedAssociationsHelper const> edm::SubProcess::thinnedAssociationsHelper ( ) const
inlineprivate

Definition at line 292 of file SubProcess.h.

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

Referenced by SubProcess().

edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: SubProcess.h:300
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::shared_ptr<ThinnedAssociationsHelper> edm::SubProcess::thinnedAssociationsHelper ( )
inlineprivate

Definition at line 293 of file SubProcess.h.

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: SubProcess.h:300
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
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 197 of file SubProcess.h.

References schedule_.

197  {
198  return schedule_->totalEvents();
199  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
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 209 of file SubProcess.h.

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

209  {
211  return schedule_->totalEventsFailed();
212  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
int edm::SubProcess::totalEventsPassed ( ) const
inline

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

Definition at line 202 of file SubProcess.h.

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

202  {
204  return schedule_->totalEventsPassed();
205  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
void edm::SubProcess::updateBranchIDListHelper ( BranchIDLists const &  branchIDLists)

Definition at line 617 of file SubProcess.cc.

References branchIDListHelper_, hasSubProcesses(), and subProcesses_.

Referenced by SubProcess().

617  {
618  branchIDListHelper_->updateFromParent(branchIDLists);
619  if(hasSubProcesses()) {
620  for(auto& subProcess : *subProcesses_) {
621  subProcess.updateBranchIDListHelper(branchIDListHelper_->branchIDLists());
622  }
623  }
624  }
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:299
bool hasSubProcesses() const
Definition: SubProcess.h:286
void edm::SubProcess::writeLumi ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 490 of file SubProcess.cc.

References assert(), hasSubProcesses(), edm::PrincipalCache::lumiPrincipal(), cmsPerfStripChart::operate(), parentToChildPhID_, principalCache_, processContext_, schedule_, serviceToken_, and subProcesses_.

490  {
492  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
493  assert(it != parentToChildPhID_.end());
494  schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber), &processContext_);
495  if(hasSubProcesses()) {
496  for(auto& subProcess : *subProcesses_) {
497  subProcess.writeLumi(it->second, runNumber, lumiNumber);
498  }
499  }
500  }
assert(m_qm.get())
LuminosityBlockPrincipal & lumiPrincipal(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:314
bool hasSubProcesses() const
Definition: SubProcess.h:286
ProcessContext processContext_
Definition: SubProcess.h:303
PrincipalCache principalCache_
Definition: SubProcess.h:311
void edm::SubProcess::writeRun ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 419 of file SubProcess.cc.

References assert(), hasSubProcesses(), cmsPerfStripChart::operate(), parentToChildPhID_, principalCache_, processContext_, edm::PrincipalCache::runPrincipal(), schedule_, serviceToken_, and subProcesses_.

419  {
421  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
422  assert(it != parentToChildPhID_.end());
424  if(hasSubProcesses()) {
425  for(auto& subProcess : *subProcesses_) {
426  subProcess.writeRun(it->second, runNumber);
427  }
428  }
429  }
assert(m_qm.get())
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
Definition: SubProcess.h:315
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:313
ServiceToken serviceToken_
Definition: SubProcess.h:296
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:314
bool hasSubProcesses() const
Definition: SubProcess.h:286
ProcessContext processContext_
Definition: SubProcess.h:303
PrincipalCache principalCache_
Definition: SubProcess.h:311
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 301 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 295 of file SubProcess.h.

Referenced by beginJob(), and SubProcess().

edm::propagate_const<std::shared_ptr<BranchIDListHelper> > edm::SubProcess::branchIDListHelper_
private
std::map<BranchID::value_type, BranchID::value_type> edm::SubProcess::droppedBranchIDToKeptBranchID_
private

Definition at line 334 of file SubProcess.h.

Referenced by droppedBranchIDToKeptBranchID(), selectProducts(), and SubProcess().

edm::propagate_const<std::shared_ptr<eventsetup::EventSetupProvider> > edm::SubProcess::esp_
private
std::vector<HistoryAppender> edm::SubProcess::historyAppenders_
private

Definition at line 310 of file SubProcess.h.

Referenced by beginLuminosityBlock(), beginRun(), and SubProcess().

unsigned int edm::SubProcess::historyLumiOffset_
private

Definition at line 307 of file SubProcess.h.

Referenced by beginLuminosityBlock().

unsigned int edm::SubProcess::historyRunOffset_
private

Definition at line 308 of file SubProcess.h.

Referenced by beginRun(), and SubProcess().

SelectedProductsForBranchType edm::SubProcess::keptProducts_
private

Definition at line 322 of file SubProcess.h.

Referenced by keepThisBranch(), and keptProducts().

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

Definition at line 297 of file SubProcess.h.

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

Definition at line 314 of file SubProcess.h.

Referenced by beginRun(), deleteLumiFromCache(), deleteRunFromCache(), writeLumi(), and writeRun().

PathsAndConsumesOfModules edm::SubProcess::pathsAndConsumesOfModules_
private

Definition at line 304 of file SubProcess.h.

Referenced by beginJob().

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

Definition at line 298 of file SubProcess.h.

Referenced by beginJob(), beginLuminosityBlock(), beginRun(), and SubProcess().

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

Definition at line 302 of file SubProcess.h.

Referenced by beginLuminosityBlock(), beginRun(), and SubProcess().

ProcessContext edm::SubProcess::processContext_
private

Definition at line 303 of file SubProcess.h.

Referenced by beginJob(), SubProcess(), writeLumi(), and writeRun().

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

Definition at line 309 of file SubProcess.h.

Referenced by beginLuminosityBlock(), beginRun(), process(), and SubProcess().

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

Definition at line 316 of file SubProcess.h.

Referenced by SubProcess().

ProductSelector edm::SubProcess::productSelector_
private

Definition at line 324 of file SubProcess.h.

Referenced by selectProducts().

ProductSelectorRules edm::SubProcess::productSelectorRules_
private

Definition at line 323 of file SubProcess.h.

Referenced by selectProducts().

edm::propagate_const<std::unique_ptr<Schedule> > edm::SubProcess::schedule_
private
ParameterSetID edm::SubProcess::selector_config_id_
private

Definition at line 329 of file SubProcess.h.

Referenced by process(), and SubProcess().

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

Definition at line 330 of file SubProcess.h.

Referenced by doEvent(), and SubProcess().

ServiceToken edm::SubProcess::serviceToken_
private
edm::propagate_const<std::unique_ptr<std::vector<SubProcess> > > edm::SubProcess::subProcesses_
private
edm::propagate_const<std::shared_ptr<ThinnedAssociationsHelper> > edm::SubProcess::thinnedAssociationsHelper_
private

Definition at line 300 of file SubProcess.h.

Referenced by SubProcess(), and thinnedAssociationsHelper().

bool edm::SubProcess::wantAllEvents_
private

Definition at line 328 of file SubProcess.h.

Referenced by doEvent(), process(), and SubProcess().