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>

Inheritance diagram for edm::SubProcess:
edm::EDConsumerBase

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 doEventAsync (WaitingTaskHolder iHolder, 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 ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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)
 
void keepThisBranch (BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
 
void processAsync (WaitingTaskHolder iHolder, 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_
 
std::vector< SubProcesssubProcesses_
 
edm::propagate_const
< std::shared_ptr
< ThinnedAssociationsHelper > > 
thinnedAssociationsHelper_
 
bool wantAllEvents_
 

Additional Inherited Members

- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 42 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 41 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(), edm::EDConsumerBase::consumesCollector(), droppedBranchIDToKeptBranchID_, esp_, edm::ParameterSet::exists(), edm::getAllTriggerNames(), edm::ParameterSet::getUntrackedParameterSet(), 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_, ull, updateBranchIDListHelper(), and wantAllEvents_.

51  :
53  serviceToken_(),
54  parentPreg_(parentProductRegistry),
55  preg_(),
57  act_table_(),
59  historyLumiOffset_(preallocConfig.numberOfStreams()),
60  historyRunOffset_(historyLumiOffset_+preallocConfig.numberOfLuminosityBlocks()),
61  processHistoryRegistries_(historyRunOffset_+ preallocConfig.numberOfRuns()),
62  historyAppenders_(historyRunOffset_+preallocConfig.numberOfRuns()),
64  esp_(),
65  schedule_(),
67  subProcesses_(),
69  productSelectorRules_(parameterSet, "outputCommands", "OutputModule"),
71  wantAllEvents_(true) {
72 
73  //Setup the event selection
75 
76  ParameterSet selectevents =
77  parameterSet.getUntrackedParameterSet("SelectEvents", ParameterSet());
78 
79  selectevents.registerIt(); // Just in case this PSet is not registered
81  tns->getProcessName(),
83  selectors_,
85  std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
87  "",
88  outputModulePathPositions,
89  parentProductRegistry->anyProductProduced());
90 
91  std::map<BranchID, bool> keepAssociation;
92  selectProducts(*parentProductRegistry, parentThinnedAssociationsHelper, keepAssociation);
93 
94  std::string const maxEvents("maxEvents");
95  std::string const maxLumis("maxLuminosityBlocks");
96 
97  // propagate_const<T> has no reset() function
98  processParameterSet_ = std::unique_ptr<ParameterSet>(parameterSet.popParameterSet(std::string("process")).release());
99 
100  // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them.
101  if(processParameterSet_->exists(maxEvents)) {
102  processParameterSet_->popParameterSet(maxEvents);
103  }
104  if(processParameterSet_->exists(maxLumis)) {
105  processParameterSet_->popParameterSet(maxLumis);
106  }
107 
108  // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process.
109  if(topLevelParameterSet.exists(maxEvents)) {
110  processParameterSet_->addUntrackedParameter<ParameterSet>(maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents));
111  }
112  if(topLevelParameterSet.exists(maxLumis)) {
113  processParameterSet_->addUntrackedParameter<ParameterSet>(maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis));
114  }
115 
116  // If there are subprocesses, pop the subprocess parameter sets out of the process parameter set
117  auto subProcessVParameterSet = popSubProcessVParameterSet(*processParameterSet_);
118  bool hasSubProcesses = subProcessVParameterSet.size() != 0ull;
119 
120  ScheduleItems items(*parentProductRegistry, *this);
121  actReg_ = items.actReg_;
122 
123  ParameterSet const& optionsPset(processParameterSet_->getUntrackedParameterSet("options", ParameterSet()));
124  IllegalParameters::setThrowAnException(optionsPset.getUntrackedParameter<bool>("throwIfIllegalParameter", true));
125 
126  //initialize the services
127  ServiceToken iToken;
128 
129  // get any configured services.
130  auto serviceSets = processParameterSet_->popVParameterSet(std::string("services"));
131 
132  ServiceToken newToken = items.initServices(serviceSets, *processParameterSet_, token, iLegacy, false);
133  parentActReg.connectToSubProcess(*items.actReg_);
134  serviceToken_ = items.addCPRandTNS(*processParameterSet_, newToken);
135 
136 
137  //make the services available
139 
140  // intialize miscellaneous items
141  items.initMisc(*processParameterSet_);
142 
143  // intialize the event setup provider
144  esp_ = esController.makeProvider(*processParameterSet_);
145 
146  branchIDListHelper_ = items.branchIDListHelper();
147  updateBranchIDListHelper(parentBranchIDListHelper->branchIDLists());
148 
149  thinnedAssociationsHelper_ = items.thinnedAssociationsHelper();
150  thinnedAssociationsHelper_->updateFromParentProcess(parentThinnedAssociationsHelper, keepAssociation, droppedBranchIDToKeptBranchID_);
151 
152  // intialize the Schedule
153  schedule_ = items.initSchedule(*processParameterSet_,hasSubProcesses,preallocConfig,&processContext_);
154 
155  // set the items
156  act_table_ = std::move(items.act_table_);
157  preg_ = items.preg();
158  //CMS-THREADING this only works since Run/Lumis are synchronous so when principalCache asks for
159  // the reducedProcessHistoryID from a full ProcessHistoryID that registry will not be in use by
160  // another thread. We really need to change how this is done in the PrincipalCache.
162 
163 
164  processConfiguration_ = items.processConfiguration();
166  processContext_.setParentProcessContext(parentProcessContext);
167 
169  for(unsigned int index = 0; index < preallocConfig.numberOfStreams(); ++index) {
170  auto ep = std::make_shared<EventPrincipal>(preg_,
175  index,
176  false /*not primary process*/);
178  }
179 
180  subProcesses_.reserve(subProcessVParameterSet.size());
181  for(auto& subProcessPSet : subProcessVParameterSet) {
182  subProcesses_.emplace_back(subProcessPSet,
183  topLevelParameterSet,
184  preg_,
186  *thinnedAssociationsHelper_,
187  esController,
188  *items.actReg_,
189  newToken,
190  iLegacy,
191  preallocConfig,
192  &processContext_);
193  }
194  }
unsigned int historyRunOffset_
Definition: SubProcess.h:272
unsigned int historyLumiOffset_
Definition: SubProcess.h:271
ParameterSetID selector_config_id_
Definition: SubProcess.h:292
void insert(std::shared_ptr< RunPrincipal > rp)
void setNumberOfConcurrentPrincipals(PreallocationConfiguration const &)
std::shared_ptr< BranchIDListHelper const > branchIDListHelper() const
Definition: SubProcess.h:254
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:273
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: SubProcess.h:264
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
void updateBranchIDListHelper(BranchIDLists const &)
Definition: SubProcess.cc:595
void setParentProcessContext(ProcessContext const *parentProcessContext)
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
#define ull
Definition: vppc_sim_lib.h:15
ServiceToken serviceToken_
Definition: SubProcess.h:260
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, std::map< BranchID, bool > &keepAssociation)
Definition: SubProcess.cc:243
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
static void setThrowAnException(bool v)
ProductSelectorRules productSelectorRules_
Definition: SubProcess.h:287
def move
Definition: eostools.py:510
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
edm::propagate_const< std::unique_ptr< ParameterSet > > processParameterSet_
Definition: SubProcess.h:280
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector, ConsumesCollector &&iC)
void setProcessConfiguration(ProcessConfiguration const *processConfiguration)
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: SubProcess.h:265
std::vector< ParameterSet > popSubProcessVParameterSet(ParameterSet &parameterSet)
Definition: SubProcess.cc:610
void setProcessHistoryRegistry(ProcessHistoryRegistry const &phr)
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:297
ProductSelector productSelector_
Definition: SubProcess.h:288
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:293
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:278
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:259
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:263
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:274
std::vector< std::string > const & getAllTriggerNames()
std::shared_ptr< ProductRegistry const > parentPreg_
Definition: SubProcess.h:261
ProcessContext processContext_
Definition: SubProcess.h:267
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:256
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:262
PrincipalCache principalCache_
Definition: SubProcess.h:275
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:266
edm::SubProcess::~SubProcess ( )
virtual

Definition at line 196 of file SubProcess.cc.

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

Member Function Documentation

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

Definition at line 210 of file SubProcess.cc.

References actReg_, edm::checkForModuleDependencyCorrectness(), droppedBranchIDToKeptBranchID(), fixBranchIDListsForEDAliases(), edm::for_all(), edm::InEvent, edm::PathsAndConsumesOfModules::initialize(), cmsPerfStripChart::operate(), parentPreg_, pathsAndConsumesOfModules_, preg_, processContext_, schedule_, serviceToken_, subProcesses_, and edm::EDConsumerBase::updateLookup().

Referenced by doBeginJob().

210  {
211  // If event selection is being used, the SubProcess class reads TriggerResults
212  // object(s) in the parent process from the event. This next call is needed for
213  // getByToken to work properly. Normally, this is done by the worker, but since
214  // a SubProcess is not a module, it has no worker.
215  updateLookup(InEvent, *parentPreg_->productLookup(InEvent),false);
216 
217  if(!droppedBranchIDToKeptBranchID().empty()) {
219  }
222  //NOTE: this may throw
224  actReg_->preBeginJobSignal_(pathsAndConsumesOfModules_, processContext_);
225  schedule_->beginJob(*preg_);
226  for_all(subProcesses_, [](auto& subProcess){ subProcess.doBeginJob(); });
227  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
PathsAndConsumesOfModules pathsAndConsumesOfModules_
Definition: SubProcess.h:268
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:250
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
void initialize(Schedule const *, std::shared_ptr< ProductRegistry const >)
ServiceToken serviceToken_
Definition: SubProcess.h:260
void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const &iPnC, bool iPrintDependencies)
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:259
std::shared_ptr< ProductRegistry const > parentPreg_
Definition: SubProcess.h:261
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:309
ProcessContext processContext_
Definition: SubProcess.h:267
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:262
void edm::SubProcess::beginLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts 
)
private

Definition at line 468 of file SubProcess.cc.

References printConversionInfo::aux, edm::LuminosityBlockPrincipal::aux(), esp_, edm::for_all(), 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().

468  {
469  auto aux = std::make_shared<LuminosityBlockAuxiliary>(principal.aux());
470  aux->setProcessHistoryID(principal.processHistoryID());
471  auto lbpp = std::make_shared<LuminosityBlockPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyLumiOffset_+principal.index()]),principal.index(),false);
472  auto & processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_+principal.index()];
473  processHistoryRegistry.registerProcessHistory(principal.processHistory());
474  lbpp->fillLuminosityBlockPrincipal(processHistoryRegistry, principal.reader());
475  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
476  principalCache_.insert(lbpp);
477  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
479  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> Traits;
480  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts));
481  for_all(subProcesses_, [&lbp, &ts](auto& subProcess){ subProcess.doBeginLuminosityBlock(lbp, ts); });
482  }
unsigned int historyLumiOffset_
Definition: SubProcess.h:271
void insert(std::shared_ptr< RunPrincipal > rp)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:273
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:274
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:579
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:262
PrincipalCache principalCache_
Definition: SubProcess.h:275
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:266
void edm::SubProcess::beginRun ( RunPrincipal const &  r,
IOVSyncValue const &  ts 
)
private

Definition at line 405 of file SubProcess.cc.

References printConversionInfo::aux, edm::RunPrincipal::aux(), esp_, edm::for_all(), 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().

405  {
406  auto aux = std::make_shared<RunAuxiliary>(principal.aux());
407  aux->setProcessHistoryID(principal.processHistoryID());
408  auto rpp = std::make_shared<RunPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyRunOffset_+principal.index()]),principal.index(),false);
409  auto & processHistoryRegistry = processHistoryRegistries_[historyRunOffset_+principal.index()];
410  processHistoryRegistry.registerProcessHistory(principal.processHistory());
411  rpp->fillRunPrincipal(processHistoryRegistry, principal.reader());
412  principalCache_.insert(rpp);
413 
414  ProcessHistoryID const& parentInputReducedPHID = principal.reducedProcessHistoryID();
415  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
416 
417  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
418 
419  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
421  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> Traits;
422  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts));
423  for_all(subProcesses_, [&rp, &ts](auto& subProcess){ subProcess.doBeginRun(rp, ts); });
424  }
unsigned int historyRunOffset_
Definition: SubProcess.h:272
void insert(std::shared_ptr< RunPrincipal > rp)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:273
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
Hash< ProcessHistoryType > ProcessHistoryID
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:278
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:274
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:579
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:262
PrincipalCache principalCache_
Definition: SubProcess.h:275
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:266
std::shared_ptr<BranchIDListHelper const> edm::SubProcess::branchIDListHelper ( ) const
inlineprivate

Definition at line 254 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:263
std::shared_ptr<BranchIDListHelper>& edm::SubProcess::branchIDListHelper ( )
inlineprivate

Definition at line 255 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:263
void edm::SubProcess::clearCounters ( )
inline

Clear all the counters in the trigger report.

Definition at line 229 of file SubProcess.h.

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

229  {
231  schedule_->clearCounters();
232  for_all(subProcesses_, [](auto& subProcess){ subProcess.clearCounters(); });
233  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::closeOutputFiles ( )
inline

Definition at line 107 of file SubProcess.h.

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

107  {
109  schedule_->closeOutputFiles();
110  for_all(subProcesses_, [](auto& subProcess) { subProcess.closeOutputFiles(); });
111  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::deleteLumiFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 511 of file SubProcess.cc.

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

511  {
512  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
513  assert(it != parentToChildPhID_.end());
514  auto const& childPhID = it->second;
515  principalCache_.deleteLumi(childPhID, runNumber, lumiNumber);
516  for_all(subProcesses_, [&childPhID, runNumber, lumiNumber](auto& subProcess){ subProcess.deleteLumiFromCache(childPhID, runNumber, lumiNumber); });
517  }
void deleteLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
assert(m_qm.get())
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:278
PrincipalCache principalCache_
Definition: SubProcess.h:275
void edm::SubProcess::deleteRunFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 453 of file SubProcess.cc.

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

453  {
454  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
455  assert(it != parentToChildPhID_.end());
456  auto const& childPhID = it->second;
457  principalCache_.deleteRun(childPhID, runNumber);
458  for_all(subProcesses_, [&childPhID, runNumber](auto& subProcess){ subProcess.deleteRunFromCache(childPhID, runNumber); });
459  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
assert(m_qm.get())
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:278
void deleteRun(ProcessHistoryID const &phid, RunNumber_t run)
PrincipalCache principalCache_
Definition: SubProcess.h:275
void edm::SubProcess::doBeginJob ( )

Definition at line 199 of file SubProcess.cc.

References beginJob().

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

Definition at line 462 of file SubProcess.cc.

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

462  {
465  }
ServiceToken serviceToken_
Definition: SubProcess.h:260
void beginLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts)
Definition: SubProcess.cc:468
void edm::SubProcess::doBeginRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 399 of file SubProcess.cc.

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

399  {
401  beginRun(principal,ts);
402  }
void beginRun(RunPrincipal const &r, IOVSyncValue const &ts)
Definition: SubProcess.cc:405
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::doBeginStream ( unsigned int  iID)

Definition at line 520 of file SubProcess.cc.

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

520  {
522  schedule_->beginStream(iID);
523  for_all(subProcesses_, [iID](auto& subProcess){ subProcess.doBeginStream(iID); });
524  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::doEndJob ( )

Definition at line 204 of file SubProcess.cc.

References endJob().

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

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

Definition at line 485 of file SubProcess.cc.

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

485  {
487  endLuminosityBlock(principal,ts,cleaningUpAfterException);
488  }
ServiceToken serviceToken_
Definition: SubProcess.h:260
void endLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:491
void edm::SubProcess::doEndRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 427 of file SubProcess.cc.

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

427  {
429  endRun(principal,ts,cleaningUpAfterException);
430  }
ServiceToken serviceToken_
Definition: SubProcess.h:260
void endRun(RunPrincipal const &r, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:433
void edm::SubProcess::doEndStream ( unsigned int  iID)

Definition at line 527 of file SubProcess.cc.

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

527  {
529  schedule_->endStream(iID);
530  for_all(subProcesses_, [iID](auto& subProcess){ subProcess.doEndStream(iID); });
531  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::doEventAsync ( WaitingTaskHolder  iHolder,
EventPrincipal const &  principal 
)

Definition at line 324 of file SubProcess.cc.

References alignCSCRings::e, eostools::move(), cmsPerfStripChart::operate(), processAsync(), selectors_, serviceToken_, edm::OccurrenceForOutput::setConsumer(), wantAllEvents_, and edm::detail::TriggerResultsBasedEventSelector::wantEvent().

325  {
327  /* BEGIN relevant bits from OutputModule::doEvent */
328  if(!wantAllEvents_) {
329  EventForOutput e(ep, ModuleDescription(), nullptr);
330  e.setConsumer(this);
331  if(!selectors_.wantEvent(e)) {
332  return;
333  }
334  }
335  processAsync(std::move(iHolder),ep);
336  /* END relevant bits from OutputModule::doEvent */
337  }
ServiceToken serviceToken_
Definition: SubProcess.h:260
void processAsync(WaitingTaskHolder iHolder, EventPrincipal const &e)
Definition: SubProcess.cc:340
def move
Definition: eostools.py:510
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:293
void edm::SubProcess::doStreamBeginLuminosityBlock ( unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 556 of file SubProcess.cc.

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

556  {
558  {
559  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
560  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> Traits;
561  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts));
562  for_all(subProcesses_, [id, &lbp, &ts](auto& subProcess){ subProcess.doStreamBeginLuminosityBlock(id,lbp, ts); });
563  }
564  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:275
void edm::SubProcess::doStreamBeginRun ( unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 534 of file SubProcess.cc.

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

534  {
536  {
537  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
538  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> Traits;
539  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts));
540  for_all(subProcesses_, [id, &rp, &ts](auto& subProcess){ subProcess.doStreamBeginRun(id,rp, ts); });
541  }
542  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
PrincipalCache principalCache_
Definition: SubProcess.h:275
void edm::SubProcess::doStreamEndLuminosityBlock ( unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 567 of file SubProcess.cc.

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

567  {
569  {
570  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
571  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd> Traits;
572  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
573  for_all(subProcesses_, [id, &lbp, &ts, cleaningUpAfterException](auto& subProcess){ subProcess.doStreamEndLuminosityBlock(id,lbp, ts,cleaningUpAfterException); });
574  }
575  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:275
void edm::SubProcess::doStreamEndRun ( unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 545 of file SubProcess.cc.

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

545  {
547  {
548  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
549  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> Traits;
550  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
551  for_all(subProcesses_, [id, &rp, &ts, cleaningUpAfterException](auto& subProcess){ subProcess.doStreamEndRun(id,rp, ts,cleaningUpAfterException); });
552  }
553  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
PrincipalCache principalCache_
Definition: SubProcess.h:275
std::map<BranchID::value_type, BranchID::value_type> const& edm::SubProcess::droppedBranchIDToKeptBranchID ( )
inlineprivate

Definition at line 250 of file SubProcess.h.

References droppedBranchIDToKeptBranchID_.

Referenced by beginJob().

250  {
252  }
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:297
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 194 of file SubProcess.h.

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

194  {
196  schedule_->enableEndPaths(active);
197  for_all(subProcesses_, [active](auto& subProcess){ subProcess.enableEndPaths(active); });
198  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::endJob ( void  )
private

Definition at line 230 of file SubProcess.cc.

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

Referenced by doEndJob().

230  {
232  ExceptionCollector c("Multiple exceptions were thrown while executing endJob. An exception message follows for each.");
233  schedule_->endJob(c);
234  for(auto& subProcess : subProcesses_) {
235  c.call([&subProcess](){ subProcess.doEndJob();});
236  }
237  if(c.hasThrown()) {
238  c.rethrow();
239  }
240  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::endLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)
private

Definition at line 491 of file SubProcess.cc.

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

Referenced by doEndLuminosityBlock().

491  {
492  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
493  lbp.setComplete();
495  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> Traits;
496  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
497  for_all(subProcesses_, [&lbp, &ts, cleaningUpAfterException](auto& subProcess){ subProcess.doEndLuminosityBlock(lbp, ts, cleaningUpAfterException); });
498  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:579
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:275
bool edm::SubProcess::endPathsEnabled ( ) const
inline

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

Definition at line 201 of file SubProcess.h.

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

201  {
203  return schedule_->endPathsEnabled();
204  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::endRun ( RunPrincipal const &  r,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)
private

Definition at line 433 of file SubProcess.cc.

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

Referenced by doEndRun().

433  {
434  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
435  rp.setComplete();
437  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> Traits;
438  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
439  for_all(subProcesses_, [&rp, &ts, cleaningUpAfterException](auto& subProcess){ subProcess.doEndRun(rp, ts, cleaningUpAfterException); });
440  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
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:579
PrincipalCache principalCache_
Definition: SubProcess.h:275
void edm::SubProcess::fixBranchIDListsForEDAliases ( std::map< BranchID::value_type, BranchID::value_type > const &  droppedBranchIDToKeptBranchID)
private

Definition at line 309 of file SubProcess.cc.

References branchIDListHelper_, edm::for_all(), and subProcesses_.

Referenced by beginJob().

309  {
310  // Check for branches dropped while an EDAlias was kept.
311  // Replace BranchID of each dropped branch with that of the kept alias.
312  for(BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
313  for(BranchID::value_type& branchID : branchIDList) {
314  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
315  if(iter != droppedBranchIDToKeptBranchID.end()) {
316  branchID = iter->second;
317  }
318  }
319  }
320  for_all(subProcesses_, [&droppedBranchIDToKeptBranchID](auto& subProcess){ subProcess.fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID); });
321  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:250
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
unsigned int value_type
Definition: BranchID.h:16
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:263
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
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 208 of file SubProcess.h.

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

208  {
210  schedule_->getTriggerReport(rep);
211  }
string rep
Definition: cuy.py:1188
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::keepThisBranch ( BranchDescription const &  desc,
std::map< BranchID, BranchDescription const * > &  trueBranchIDToKeptBranchDesc,
std::set< BranchID > &  keptProductsInEvent 
)
private

Definition at line 285 of file SubProcess.cc.

References edm::BranchDescription::branchID(), edm::BranchDescription::branchType(), edm::ProductSelector::checkForDuplicateKeptBranch(), edm::EDConsumerBase::consumes(), edm::InEvent, keptProducts_, edm::BranchDescription::moduleLabel(), edm::BranchDescription::originalBranchID(), edm::BranchDescription::processName(), edm::BranchDescription::produced(), edm::PRODUCT_TYPE, edm::BranchDescription::productInstanceName(), unpackBuffers-CaloStage2::token, and edm::BranchDescription::unwrappedTypeID().

Referenced by selectProducts().

287  {
288 
290  trueBranchIDToKeptBranchDesc);
291 
292  if(desc.branchType() == InEvent) {
293  if(desc.produced()) {
294  keptProductsInEvent.insert(desc.originalBranchID());
295  } else {
296  keptProductsInEvent.insert(desc.branchID());
297  }
298  }
299  EDGetToken token = consumes(TypeToGet{desc.unwrappedTypeID(),PRODUCT_TYPE},
300  InputTag{desc.moduleLabel(),
301  desc.productInstanceName(),
302  desc.processName()});
303 
304  // Now put it in the list of selected branches.
305  keptProducts_[desc.branchType()].push_back(std::make_pair(&desc, token));
306  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
SelectedProductsForBranchType keptProducts_
Definition: SubProcess.h:286
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)
SelectedProductsForBranchType const& edm::SubProcess::keptProducts ( ) const
inline

Definition at line 68 of file SubProcess.h.

References keptProducts_.

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

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

Definition at line 114 of file SubProcess.h.

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

114  {
116  schedule_->openNewOutputFilesIfNeeded();
117  for_all(subProcesses_, [](auto& subProcess) { subProcess.openNewOutputFilesIfNeeded(); });
118  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::openOutputFiles ( FileBlock fb)
inline

Definition at line 121 of file SubProcess.h.

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

121  {
123  schedule_->openOutputFiles(fb);
124  for_all(subProcesses_, [&fb](auto& subProcess) { subProcess.openOutputFiles(fb); });
125  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
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 159 of file SubProcess.h.

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

159  {
161  schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
162  for_all(subProcesses_, [iChildIndex, iNumberOfChildren](auto& subProcess){ subProcess.postForkReacquireResources(iChildIndex, iNumberOfChildren); });
163  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::preForkReleaseResources ( )
inline

Definition at line 153 of file SubProcess.h.

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

153  {
155  schedule_->preForkReleaseResources();
156  for_all(subProcesses_, [](auto& subProcess){ subProcess.preForkReleaseResources(); });
157  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::processAsync ( WaitingTaskHolder  iHolder,
EventPrincipal const &  e 
)
private

Definition at line 340 of file SubProcess.cc.

References edm::ProductRegistry::anyProductProduced(), printConversionInfo::aux, edm::EventPrincipal::aux(), branchIDListHelper_, edm::EventPrincipal::branchListIndexes(), edm::EventPrincipal::clearEventPrincipal(), edm::WaitingTaskHolder::doneWaiting(), esp_, edm::PrincipalCache::eventPrincipal(), edm::EventPrincipal::eventSelectionIDs(), edm::EventPrincipal::fillEventPrincipal(), edm::InEvent, edm::PrincipalCache::lumiPrincipalPtr(), edm::make_waiting_task(), 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 doEventAsync().

341  {
342  EventAuxiliary aux(principal.aux());
343  aux.setProcessHistoryID(principal.processHistoryID());
344 
345  EventSelectionIDVector esids{principal.eventSelectionIDs()};
346  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
347  esids.push_back(selector_config_id_);
348  }
349 
350  EventPrincipal& ep = principalCache_.eventPrincipal(principal.streamID().value());
351  auto & processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
352  processHistoryRegistry.registerProcessHistory(principal.processHistory());
353  BranchListIndexes bli(principal.branchListIndexes());
354  branchIDListHelper_->fixBranchListIndexes(bli);
355  ep.fillEventPrincipal(aux,
356  processHistoryRegistry,
357  std::move(esids),
358  std::move(bli),
359  *(principal.productProvenanceRetrieverPtr()),//NOTE: this transfers the per product provenance
360  principal.reader());
361  ep.setLuminosityBlockPrincipal(principalCache_.lumiPrincipalPtr());
363 
364  WaitingTaskHolder finalizeEventTask( make_waiting_task(tbb::task::allocate_root(),
365  [this,&ep,iHolder](std::exception_ptr const* iPtr) mutable
366  {
367  ep.clearEventPrincipal();
368  if(iPtr) {
369  iHolder.doneWaiting(*iPtr);
370  } else {
371  iHolder.doneWaiting(std::exception_ptr());
372  }
373  }
374  )
375  );
376  WaitingTaskHolder afterProcessTask;
377  if(subProcesses_.empty()) {
378  afterProcessTask = std::move(finalizeEventTask);
379  } else {
380  afterProcessTask = WaitingTaskHolder(
381  make_waiting_task(tbb::task::allocate_root(),
382  [this,&ep,finalizeEventTask] (std::exception_ptr const* iPtr) mutable{
383  if(not iPtr) {
384  for(auto& subProcess: boost::adaptors::reverse(subProcesses_)) {
385  subProcess.doEventAsync(finalizeEventTask,ep);
386  }
387  } else {
388  finalizeEventTask.doneWaiting(*iPtr);
389  }
390  })
391  );
392  }
393 
394  schedule_->processOneEventAsync(std::move(afterProcessTask),
395  ep.streamID().value(),ep, esp_->eventSetup());
396  }
ParameterSetID selector_config_id_
Definition: SubProcess.h:292
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:273
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
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:276
EventPrincipal & eventPrincipal(unsigned int iStreamIndex) const
FunctorWaitingTask< F > * make_waiting_task(ALLOC &&iAlloc, F f)
Definition: WaitingTask.h:90
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:263
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:579
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:275
void edm::SubProcess::propagateProducts ( BranchType  type,
Principal const &  parentPrincipal,
Principal principal 
) const
private

Definition at line 579 of file SubProcess.cc.

References edm::BranchDescription::branchID(), edm::ProductResolverBase::connectTo(), edm::Principal::getModifiableProductResolver(), edm::Principal::getProductResolver(), and keptProducts().

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

579  {
580  SelectedProducts const& keptVector = keptProducts()[type];
581  for(auto const& item : keptVector) {
582  BranchDescription const& desc = *item.first;
583  ProductResolverBase const* parentProductResolver = parentPrincipal.getProductResolver(desc.branchID());
584  if(parentProductResolver != nullptr) {
585  ProductResolverBase* productResolver = principal.getModifiableProductResolver(desc.branchID());
586  if(productResolver != nullptr) {
587  //Propagate the per event(run)(lumi) data for this product to the subprocess.
588  //First, the product itself.
589  productResolver->connectTo(*parentProductResolver, &parentPrincipal);
590  }
591  }
592  }
593  }
type
Definition: HCALResponse.h:21
SelectedProductsForBranchType const & keptProducts() const
Definition: SubProcess.h:68
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
void edm::SubProcess::respondToCloseInputFile ( FileBlock const &  fb)
inline

Definition at line 133 of file SubProcess.h.

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

133  {
135  schedule_->respondToCloseInputFile(fb);
136  for_all(subProcesses_, [&fb](auto& subProcess) { subProcess.respondToCloseInputFile(fb); });
137  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 602 of file SubProcess.cc.

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

602  {
604  schedule_->respondToOpenInputFile(fb);
605  for_all(subProcesses_, [&fb](auto& subProcess){ subProcess.respondToOpenInputFile(fb); });
606  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::selectProducts ( ProductRegistry const &  preg,
ThinnedAssociationsHelper const &  parentThinnedAssociationsHelper,
std::map< BranchID, bool > &  keepAssociation 
)

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

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

Definition at line 140 of file SubProcess.h.

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

140  {
142  if(schedule_->shouldWeCloseOutput()) {
143  return true;
144  }
145  for(auto const& subProcess : subProcesses_) {
146  if(subProcess.shouldWeCloseOutput()) {
147  return true;
148  }
149  }
150  return false;
151  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:260
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 215 of file SubProcess.h.

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

215  {
217  if(schedule_->terminate()) {
218  return true;
219  }
220  for(auto const& subProcess : subProcesses_) {
221  if(subProcess.terminate()) {
222  return true;
223  }
224  }
225  return false;
226  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:260
std::shared_ptr<ThinnedAssociationsHelper const> edm::SubProcess::thinnedAssociationsHelper ( ) const
inlineprivate

Definition at line 256 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:264
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 257 of file SubProcess.h.

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: SubProcess.h:264
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 175 of file SubProcess.h.

References schedule_.

175  {
176  return schedule_->totalEvents();
177  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
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 187 of file SubProcess.h.

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

187  {
189  return schedule_->totalEventsFailed();
190  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:260
int edm::SubProcess::totalEventsPassed ( ) const
inline

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

Definition at line 180 of file SubProcess.h.

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

180  {
182  return schedule_->totalEventsPassed();
183  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:260
void edm::SubProcess::updateBranchIDListHelper ( BranchIDLists const &  branchIDLists)

Definition at line 595 of file SubProcess.cc.

References branchIDListHelper_, edm::for_all(), and subProcesses_.

Referenced by SubProcess().

595  {
596  branchIDListHelper_->updateFromParent(branchIDLists);
597  for_all(subProcesses_, [this](auto& subProcess){ subProcess.updateBranchIDListHelper(branchIDListHelper_->branchIDLists()); });
598  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:263
void edm::SubProcess::writeLumi ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 501 of file SubProcess.cc.

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

501  {
503  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
504  assert(it != parentToChildPhID_.end());
505  auto const& childPhID = it->second;
506  schedule_->writeLumi(principalCache_.lumiPrincipal(childPhID, runNumber, lumiNumber), &processContext_);
507  for_all(subProcesses_, [&childPhID, runNumber, lumiNumber](auto& subProcess){ subProcess.writeLumi(childPhID, runNumber, lumiNumber); });
508  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
assert(m_qm.get())
LuminosityBlockPrincipal & lumiPrincipal(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:278
ProcessContext processContext_
Definition: SubProcess.h:267
PrincipalCache principalCache_
Definition: SubProcess.h:275
void edm::SubProcess::writeRun ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 443 of file SubProcess.cc.

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

443  {
445  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
446  assert(it != parentToChildPhID_.end());
447  auto const& childPhID = it->second;
449  for_all(subProcesses_, [&childPhID, runNumber](auto& subProcess){ subProcess.writeRun(childPhID, runNumber); });
450  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
assert(m_qm.get())
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:260
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:278
ProcessContext processContext_
Definition: SubProcess.h:267
PrincipalCache principalCache_
Definition: SubProcess.h:275
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 265 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 259 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 297 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 274 of file SubProcess.h.

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

unsigned int edm::SubProcess::historyLumiOffset_
private

Definition at line 271 of file SubProcess.h.

Referenced by beginLuminosityBlock().

unsigned int edm::SubProcess::historyRunOffset_
private

Definition at line 272 of file SubProcess.h.

Referenced by beginRun(), and SubProcess().

SelectedProductsForBranchType edm::SubProcess::keptProducts_
private

Definition at line 286 of file SubProcess.h.

Referenced by keepThisBranch(), and keptProducts().

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

Definition at line 261 of file SubProcess.h.

Referenced by beginJob().

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

Definition at line 278 of file SubProcess.h.

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

PathsAndConsumesOfModules edm::SubProcess::pathsAndConsumesOfModules_
private

Definition at line 268 of file SubProcess.h.

Referenced by beginJob().

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

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

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

ProcessContext edm::SubProcess::processContext_
private

Definition at line 267 of file SubProcess.h.

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

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

Definition at line 273 of file SubProcess.h.

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

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

Definition at line 280 of file SubProcess.h.

Referenced by SubProcess().

ProductSelector edm::SubProcess::productSelector_
private

Definition at line 288 of file SubProcess.h.

Referenced by selectProducts().

ProductSelectorRules edm::SubProcess::productSelectorRules_
private

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

Referenced by processAsync(), and SubProcess().

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

Definition at line 293 of file SubProcess.h.

Referenced by doEventAsync(), and SubProcess().

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

Definition at line 264 of file SubProcess.h.

Referenced by SubProcess(), and thinnedAssociationsHelper().

bool edm::SubProcess::wantAllEvents_
private

Definition at line 291 of file SubProcess.h.

Referenced by doEventAsync(), processAsync(), and SubProcess().