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
< 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_
 
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 38 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 36 of file SubProcess.cc.

References act_table_, 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(), LaserTracksInput_cfi::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_.

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

Definition at line 181 of file SubProcess.cc.

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

Member Function Documentation

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

Definition at line 195 of file SubProcess.cc.

References droppedBranchIDToKeptBranchID(), relativeConstraints::empty, fixBranchIDListsForEDAliases(), cmsPerfStripChart::operate(), preg_, schedule_, serviceToken_, and subProcess_.

Referenced by doBeginJob().

195  {
198  }
200  schedule_->beginJob(*preg_);
201  if(subProcess_.get()) subProcess_->doBeginJob();
202  }
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:227
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:277
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:234
void edm::SubProcess::beginLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts 
)
private

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

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

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

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

Clear all the counters in the trigger report.

Definition at line 206 of file SubProcess.h.

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

206  {
208  schedule_->clearCounters();
209  if(subProcess_.get()) subProcess_->clearCounters();
210  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::closeOutputFiles ( )
inline

Definition at line 100 of file SubProcess.h.

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

100  {
102  schedule_->closeOutputFiles();
103  if(subProcess_.get()) subProcess_->closeOutputFiles();
104  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::deleteLumiFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 446 of file SubProcess.cc.

446  {
447  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
448  assert(it != parentToChildPhID_.end());
449  principalCache_.deleteLumi(it->second, runNumber, lumiNumber);
450  if(subProcess_.get()) subProcess_->deleteLumiFromCache(it->second, runNumber, lumiNumber);
451  }
void deleteLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:249
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
PrincipalCache principalCache_
Definition: SubProcess.h:246
void edm::SubProcess::deleteRunFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 391 of file SubProcess.cc.

391  {
392  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
393  assert(it != parentToChildPhID_.end());
394  principalCache_.deleteRun(it->second, runNumber);
395  if(subProcess_.get()) subProcess_->deleteRunFromCache(it->second, runNumber);
396  }
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:249
void deleteRun(ProcessHistoryID const &phid, RunNumber_t run)
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
PrincipalCache principalCache_
Definition: SubProcess.h:246
void edm::SubProcess::doBeginJob ( )

Definition at line 184 of file SubProcess.cc.

References beginJob().

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

Definition at line 399 of file SubProcess.cc.

References cmsPerfStripChart::operate().

399  {
402  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
void beginLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts)
Definition: SubProcess.cc:405
void edm::SubProcess::doBeginRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 339 of file SubProcess.cc.

References cmsPerfStripChart::operate().

339  {
341  beginRun(principal,ts);
342  }
void beginRun(RunPrincipal const &r, IOVSyncValue const &ts)
Definition: SubProcess.cc:345
ServiceToken serviceToken_
Definition: SubProcess.h:232
void edm::SubProcess::doBeginStream ( unsigned int  iID)

Definition at line 454 of file SubProcess.cc.

References cmsPerfStripChart::operate().

454  {
456  schedule_->beginStream(iID);
457  if(subProcess_.get()) subProcess_->doBeginStream(iID);
458  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::doEndJob ( )

Definition at line 189 of file SubProcess.cc.

References endJob().

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

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

Definition at line 422 of file SubProcess.cc.

References cmsPerfStripChart::operate().

422  {
424  endLuminosityBlock(principal,ts,cleaningUpAfterException);
425  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
void endLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:428
void edm::SubProcess::doEndRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 367 of file SubProcess.cc.

References cmsPerfStripChart::operate().

367  {
369  endRun(principal,ts,cleaningUpAfterException);
370  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
void endRun(RunPrincipal const &r, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:373
void edm::SubProcess::doEndStream ( unsigned int  iID)

Definition at line 461 of file SubProcess.cc.

References cmsPerfStripChart::operate().

461  {
463  schedule_->endStream(iID);
464  if(subProcess_.get()) subProcess_->doEndStream(iID);
465  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::doEvent ( EventPrincipal const &  principal)

Definition at line 292 of file SubProcess.cc.

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

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

Definition at line 490 of file SubProcess.cc.

References cmsPerfStripChart::operate().

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

Definition at line 468 of file SubProcess.cc.

References cmsPerfStripChart::operate().

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

Definition at line 501 of file SubProcess.cc.

References cmsPerfStripChart::operate().

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

Definition at line 479 of file SubProcess.cc.

References cmsPerfStripChart::operate().

479  {
481  {
482  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
483  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> Traits;
484  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
485  if(subProcess_.get()) subProcess_->doStreamEndRun(id,rp, ts,cleaningUpAfterException);
486  }
487  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:247
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
PrincipalCache principalCache_
Definition: SubProcess.h:246
std::map<BranchID::value_type, BranchID::value_type> const& edm::SubProcess::droppedBranchIDToKeptBranchID ( )
inlineprivate

Definition at line 227 of file SubProcess.h.

References droppedBranchIDToKeptBranchID_.

Referenced by beginJob().

227  {
229  }
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:269
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 179 of file SubProcess.h.

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

179  {
181  schedule_->enableEndPaths(active);
182  if(subProcess_.get()) subProcess_->enableEndPaths(active);
183  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::endJob ( void  )
private

Definition at line 205 of file SubProcess.cc.

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

Referenced by doEndJob().

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

Definition at line 428 of file SubProcess.cc.

References edm::InLumi.

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

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

Definition at line 186 of file SubProcess.h.

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

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

Definition at line 373 of file SubProcess.cc.

References edm::InRun.

373  {
374  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
376  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> Traits;
377  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
378  if(subProcess_.get()) subProcess_->doEndRun(rp, ts, cleaningUpAfterException);
379  }
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:247
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
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:513
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
PrincipalCache principalCache_
Definition: SubProcess.h:246
void edm::SubProcess::fixBranchIDListsForEDAliases ( std::map< BranchID::value_type, BranchID::value_type > const &  droppedBranchIDToKeptBranchID)
private

Definition at line 277 of file SubProcess.cc.

References getDQMSummary::iter.

Referenced by beginJob().

277  {
278  // Check for branches dropped while an EDAlias was kept.
279  // Replace BranchID of each dropped branch with that of the kept alias.
280  for(BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
281  for(BranchID::value_type& branchID : branchIDList) {
282  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
283  if(iter != droppedBranchIDToKeptBranchID.end()) {
284  branchID = iter->second;
285  }
286  }
287  }
288  if(subProcess_.get()) subProcess_->fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID);
289  }
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:227
unsigned int value_type
Definition: BranchID.h:16
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:235
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
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 193 of file SubProcess.h.

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

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

Definition at line 258 of file SubProcess.cc.

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

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

Definition at line 62 of file SubProcess.h.

References keptProducts_.

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

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

Definition at line 107 of file SubProcess.h.

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

107  {
109  schedule_->openNewOutputFilesIfNeeded();
110  if(subProcess_.get()) subProcess_->openNewOutputFilesIfNeeded();
111  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::openOutputFiles ( FileBlock fb)
inline

Definition at line 114 of file SubProcess.h.

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

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

Definition at line 144 of file SubProcess.h.

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

144  {
146  schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
147  if(subProcess_.get()) subProcess_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
148  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::preForkReleaseResources ( )
inline

Definition at line 138 of file SubProcess.h.

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

138  {
140  schedule_->preForkReleaseResources();
141  if(subProcess_.get()) subProcess_->preForkReleaseResources();
142  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::process ( EventPrincipal const &  e)
private

Definition at line 310 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::__init__(), ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::anyOf(), 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(), ConfigBuilder.ConfigBuilder::prepare_ALCA(), ConfigBuilder.ConfigBuilder::prepare_DQM(), ConfigBuilder.ConfigBuilder::prepare_FASTSIM(), ConfigBuilder.ConfigBuilder::prepare_HARVESTING(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), 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().

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

Definition at line 513 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_.

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

Definition at line 126 of file SubProcess.h.

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

126  {
128  schedule_->respondToCloseInputFile(fb);
129  if(subProcess_.get()) subProcess_->respondToCloseInputFile(fb);
130  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 552 of file SubProcess.cc.

References cmsPerfStripChart::operate().

552  {
554  schedule_->respondToOpenInputFile(fb);
555  if(subProcess_.get()) subProcess_->respondToOpenInputFile(fb);
556  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::selectProducts ( ProductRegistry const &  preg,
ThinnedAssociationsHelper const &  parentThinnedAssociationsHelper,
std::map< BranchID, bool > &  keepAssociation 
)

Definition at line 216 of file SubProcess.cc.

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

Referenced by SubProcess().

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

Definition at line 133 of file SubProcess.h.

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

133  {
135  return schedule_->shouldWeCloseOutput() || (subProcess_.get() ? subProcess_->shouldWeCloseOutput() : false);
136  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
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 200 of file SubProcess.h.

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

200  {
202  return subProcess_.get() ? subProcess_->terminate() : schedule_->terminate();
203  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
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 160 of file SubProcess.h.

References schedule_.

160  {
161  return schedule_->totalEvents();
162  }
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
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 172 of file SubProcess.h.

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

172  {
174  return schedule_->totalEventsFailed();
175  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
int edm::SubProcess::totalEventsPassed ( ) const
inline

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

Definition at line 165 of file SubProcess.h.

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

165  {
167  return schedule_->totalEventsPassed();
168  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
void edm::SubProcess::updateBranchIDListHelper ( BranchIDLists const &  branchIDLists)

Definition at line 543 of file SubProcess.cc.

Referenced by SubProcess().

543  {
544  branchIDListHelper_->updateFromParent(branchIDLists);
545  if(subProcess_.get()) {
546  subProcess_->updateBranchIDListHelper(branchIDListHelper_->branchIDLists());
547  }
548  }
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:235
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
void edm::SubProcess::writeLumi ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 437 of file SubProcess.cc.

References cmsPerfStripChart::operate().

437  {
439  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
440  assert(it != parentToChildPhID_.end());
441  schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber), &processContext_);
442  if(subProcess_.get()) subProcess_->writeLumi(it->second, runNumber, lumiNumber);
443  }
LuminosityBlockPrincipal & lumiPrincipal(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:249
ProcessContext processContext_
Definition: SubProcess.h:239
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
PrincipalCache principalCache_
Definition: SubProcess.h:246
void edm::SubProcess::writeRun ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 382 of file SubProcess.cc.

References cmsPerfStripChart::operate().

382  {
384  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
385  assert(it != parentToChildPhID_.end());
387  if(subProcess_.get()) subProcess_->writeRun(it->second, runNumber);
388  }
ServiceToken serviceToken_
Definition: SubProcess.h:232
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:248
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:249
ProcessContext processContext_
Definition: SubProcess.h:239
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:250
PrincipalCache principalCache_
Definition: SubProcess.h:246
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 237 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 235 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 269 of file SubProcess.h.

Referenced by droppedBranchIDToKeptBranchID(), and SubProcess().

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

Definition at line 247 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 245 of file SubProcess.h.

Referenced by SubProcess().

unsigned int edm::SubProcess::historyLumiOffset_
private

Definition at line 242 of file SubProcess.h.

unsigned int edm::SubProcess::historyRunOffset_
private

Definition at line 243 of file SubProcess.h.

Referenced by SubProcess().

SelectedProductsForBranchType edm::SubProcess::keptProducts_
private

Definition at line 257 of file SubProcess.h.

Referenced by keptProducts().

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

Definition at line 233 of file SubProcess.h.

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

Definition at line 249 of file SubProcess.h.

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

Definition at line 234 of file SubProcess.h.

Referenced by beginJob(), and SubProcess().

PrincipalCache edm::SubProcess::principalCache_
private

Definition at line 246 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 238 of file SubProcess.h.

Referenced by SubProcess().

ProcessContext edm::SubProcess::processContext_
private

Definition at line 239 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 244 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 251 of file SubProcess.h.

Referenced by SubProcess().

ProductSelector edm::SubProcess::productSelector_
private

Definition at line 259 of file SubProcess.h.

ProductSelectorRules edm::SubProcess::productSelectorRules_
private

Definition at line 258 of file SubProcess.h.

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

Definition at line 264 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 265 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 236 of file SubProcess.h.

Referenced by SubProcess().

bool edm::SubProcess::wantAllEvents_
private

Definition at line 263 of file SubProcess.h.

Referenced by SubProcess().