CMS 3D CMS Logo

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 (LuminosityBlockPrincipal &)
 
void deleteRunFromCache (ProcessHistoryID const &parentPhID, int runNumber)
 
void doBeginJob ()
 
void doBeginLuminosityBlockAsync (WaitingTaskHolder iHolder, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
 
void doBeginRunAsync (WaitingTaskHolder iHolder, RunPrincipal const &principal, IOVSyncValue const &ts)
 
void doBeginStream (unsigned int)
 
void doEndJob ()
 
void doEndLuminosityBlockAsync (WaitingTaskHolder iHolder, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void doEndRunAsync (WaitingTaskHolder iHolder, RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void doEndStream (unsigned int)
 
void doEventAsync (WaitingTaskHolder iHolder, EventPrincipal const &principal)
 
void doStreamBeginLuminosityBlockAsync (WaitingTaskHolder iHolder, unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
 
void doStreamBeginRunAsync (WaitingTaskHolder iHolder, unsigned int iID, RunPrincipal const &principal, IOVSyncValue const &ts)
 
void doStreamEndLuminosityBlockAsync (WaitingTaskHolder iHolder, unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void doStreamEndRunAsync (WaitingTaskHolder iHolder, 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 openOutputFiles (FileBlock &fb)
 
SubProcessoperator= (SubProcess const &)=delete
 
SubProcessoperator= (SubProcess &&)=default
 
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, SubProcessParentageHelper const &parentSubProcessParentageHelper, 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 writeLumiAsync (WaitingTaskHolder, LuminosityBlockPrincipal &)
 
void writeRunAsync (WaitingTaskHolder, ProcessHistoryID const &parentPhID, int runNumber, MergeableRunProductMetadata const *)
 
 ~SubProcess () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 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 & itemsToGetFrom (BranchType iType) 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) 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< ThinnedAssociationsHelperthinnedAssociationsHelper ()
 

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_typedroppedBranchIDToKeptBranchID_
 
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
 
std::vector< HistoryAppenderhistoryAppenders_
 
unsigned int historyLumiOffset_
 
unsigned int historyRunOffset_
 
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
 
SelectedProductsForBranchType keptProducts_
 
std::shared_ptr< ProductRegistry const > parentPreg_
 
std::map< ProcessHistoryID, ProcessHistoryIDparentToChildPhID_
 
PathsAndConsumesOfModules pathsAndConsumesOfModules_
 
std::shared_ptr< ProductRegistry const > preg_
 
PrincipalCache principalCache_
 
std::shared_ptr< ProcessConfiguration const > processConfiguration_
 
ProcessContext processContext_
 
std::vector< ProcessHistoryRegistryprocessHistoryRegistries_
 
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< SubProcessParentageHelper > > subProcessParentageHelper_
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, ESInputTag const &tag)
 
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 44 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,
SubProcessParentageHelper const &  parentSubProcessParentageHelper,
eventsetup::EventSetupsController esController,
ActivityRegistry parentActReg,
ServiceToken const &  token,
serviceregistry::ServiceLegacy  iLegacy,
PreallocationConfiguration const &  preallocConfig,
ProcessContext const *  parentProcessContext 
)

Definition at line 45 of file SubProcess.cc.

References act_table_, actReg_, branchIDListHelper(), branchIDListHelper_, edm::detail::configureEventSelector(), edm::ActivityRegistry::connectToSubProcess(), edm::EDConsumerBase::consumesCollector(), droppedBranchIDToKeptBranchID_, esp_, edm::ParameterSet::exists(), edm::getAllTriggerNames(), edm::ParameterSet::getUntrackedParameterSet(), historyAppenders_, historyLumiOffset_, historyRunOffset_, edm::PrincipalCache::insert(), inUseLumiPrincipals_, mps_monitormerge::items, edm::eventsetup::EventSetupsController::makeProvider(), Data_TkAlMinBias_Run2018C_PromptReco_v3_cff::maxEvents, eostools::move(), edm::PreallocationConfiguration::numberOfLuminosityBlocks(), edm::PreallocationConfiguration::numberOfStreams(), cmsPerfStripChart::operate(), edm::ParameterSet::popParameterSet(), edm::popSubProcessVParameterSet(), 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(), AlCaHLTBitMon_QueryRunRegistry::string, subProcesses_, subProcessParentageHelper_, thinnedAssociationsHelper(), thinnedAssociationsHelper_, updateBranchIDListHelper(), edm::validateTopLevelParameterSets(), and wantAllEvents_.

56  :
58  serviceToken_(),
59  parentPreg_(parentProductRegistry),
60  preg_(),
62  act_table_(),
64  historyLumiOffset_(preallocConfig.numberOfStreams()),
65  historyRunOffset_(historyLumiOffset_+preallocConfig.numberOfLuminosityBlocks()),
66  processHistoryRegistries_(historyRunOffset_+ preallocConfig.numberOfRuns()),
67  historyAppenders_(historyRunOffset_+preallocConfig.numberOfRuns()),
69  esp_(),
70  schedule_(),
72  subProcesses_(),
74  productSelectorRules_(parameterSet, "outputCommands", "OutputModule"),
76  wantAllEvents_(true) {
77 
78  //Setup the event selection
80 
81  ParameterSet selectevents =
82  parameterSet.getUntrackedParameterSet("SelectEvents", ParameterSet());
83 
84  selectevents.registerIt(); // Just in case this PSet is not registered
86  tns->getProcessName(),
88  selectors_,
90  std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
92  "",
93  outputModulePathPositions,
94  parentProductRegistry->anyProductProduced());
95 
96  std::map<BranchID, bool> keepAssociation;
97  selectProducts(*parentProductRegistry, parentThinnedAssociationsHelper, keepAssociation);
98 
99  std::string const maxEvents("maxEvents");
100  std::string const maxLumis("maxLuminosityBlocks");
101 
102  // propagate_const<T> has no reset() function
103  processParameterSet_ = std::unique_ptr<ParameterSet>(parameterSet.popParameterSet(std::string("process")).release());
104 
105  // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them.
106  if(processParameterSet_->exists(maxEvents)) {
107  processParameterSet_->popParameterSet(maxEvents);
108  }
109  if(processParameterSet_->exists(maxLumis)) {
110  processParameterSet_->popParameterSet(maxLumis);
111  }
112 
113  // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process.
114  if(topLevelParameterSet.exists(maxEvents)) {
115  processParameterSet_->addUntrackedParameter<ParameterSet>(maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents));
116  }
117  if(topLevelParameterSet.exists(maxLumis)) {
118  processParameterSet_->addUntrackedParameter<ParameterSet>(maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis));
119  }
120 
121  // If there are subprocesses, pop the subprocess parameter sets out of the process parameter set
122  auto subProcessVParameterSet = popSubProcessVParameterSet(*processParameterSet_);
123  bool hasSubProcesses = subProcessVParameterSet.size() != 0ull;
124 
125  // Validates the parameters in the 'options', 'maxEvents', and 'maxLuminosityBlocks'
126  // top level parameter sets. Default values are also set in here if the
127  // parameters were not explicitly set.
129 
130  ScheduleItems items(*parentProductRegistry, *this);
131  actReg_ = items.actReg_;
132 
133  //initialize the services
134  ServiceToken iToken;
135 
136  // get any configured services.
137  auto serviceSets = processParameterSet_->popVParameterSet(std::string("services"));
138 
139  ServiceToken newToken = items.initServices(serviceSets, *processParameterSet_, token, iLegacy, false);
140  parentActReg.connectToSubProcess(*items.actReg_);
141  serviceToken_ = items.addCPRandTNS(*processParameterSet_, newToken);
142 
143 
144  //make the services available
146 
147  // intialize miscellaneous items
148  items.initMisc(*processParameterSet_);
149 
150  // intialize the event setup provider
151  esp_ = esController.makeProvider(*processParameterSet_, actReg_.get());
152 
153  branchIDListHelper_ = items.branchIDListHelper();
154  updateBranchIDListHelper(parentBranchIDListHelper->branchIDLists());
155 
156  thinnedAssociationsHelper_ = items.thinnedAssociationsHelper();
157  thinnedAssociationsHelper_->updateFromParentProcess(parentThinnedAssociationsHelper, keepAssociation, droppedBranchIDToKeptBranchID_);
158 
159  // intialize the Schedule
160  schedule_ = items.initSchedule(*processParameterSet_,hasSubProcesses,preallocConfig,&processContext_);
161 
162  // set the items
163  act_table_ = std::move(items.act_table_);
164  preg_ = items.preg();
165 
166  subProcessParentageHelper_ = items.subProcessParentageHelper();
167  subProcessParentageHelper_->update(parentSubProcessParentageHelper, *parentProductRegistry);
168 
169  //CMS-THREADING this only works since Run/Lumis are synchronous so when principalCache asks for
170  // the reducedProcessHistoryID from a full ProcessHistoryID that registry will not be in use by
171  // another thread. We really need to change how this is done in the PrincipalCache.
173 
174 
175  processConfiguration_ = items.processConfiguration();
177  processContext_.setParentProcessContext(parentProcessContext);
178 
180  for(unsigned int index = 0; index < preallocConfig.numberOfStreams(); ++index) {
181  auto ep = std::make_shared<EventPrincipal>(preg_,
186  index,
187  false /*not primary process*/);
189  }
190  for(unsigned int index = 0; index < preallocConfig.numberOfLuminosityBlocks(); ++ index) {
191  auto lbpp = std::make_unique<LuminosityBlockPrincipal>(preg_, *processConfiguration_, &(historyAppenders_[historyLumiOffset_+index]),index,false);
193  }
194 
195  inUseLumiPrincipals_.resize(preallocConfig.numberOfLuminosityBlocks());
196 
197  subProcesses_.reserve(subProcessVParameterSet.size());
198  for(auto& subProcessPSet : subProcessVParameterSet) {
199  subProcesses_.emplace_back(subProcessPSet,
200  topLevelParameterSet,
201  preg_,
203  *thinnedAssociationsHelper_,
205  esController,
206  *items.actReg_,
207  newToken,
208  iLegacy,
209  preallocConfig,
210  &processContext_);
211  }
212  }
unsigned int historyRunOffset_
Definition: SubProcess.h:270
unsigned int historyLumiOffset_
Definition: SubProcess.h:269
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:251
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:271
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: SubProcess.h:261
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
void updateBranchIDListHelper(BranchIDLists const &)
Definition: SubProcess.cc:671
void setParentProcessContext(ProcessContext const *parentProcessContext)
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
void validateTopLevelParameterSets(ParameterSet *processParameterSet)
ServiceToken serviceToken_
Definition: SubProcess.h:257
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
Definition: SubProcess.h:275
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, std::map< BranchID, bool > &keepAssociation)
Definition: SubProcess.cc:262
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
ProductSelectorRules productSelectorRules_
Definition: SubProcess.h:287
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:263
std::vector< ParameterSet > popSubProcessVParameterSet(ParameterSet &parameterSet)
Definition: SubProcess.cc:686
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:256
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:260
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:272
std::vector< std::string > const & getAllTriggerNames()
std::shared_ptr< ProductRegistry const > parentPreg_
Definition: SubProcess.h:258
ProcessContext processContext_
Definition: SubProcess.h:265
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:253
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:259
PrincipalCache principalCache_
Definition: SubProcess.h:273
def move(src, dest)
Definition: eostools.py:511
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
Definition: SubProcess.h:262
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:264
def operate(timelog, memlog, json_f, num)
edm::SubProcess::~SubProcess ( )
override

Definition at line 214 of file SubProcess.cc.

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

Member Function Documentation

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

Definition at line 228 of file SubProcess.cc.

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

Referenced by doBeginJob().

228  {
229  // If event selection is being used, the SubProcess class reads TriggerResults
230  // object(s) in the parent process from the event. This next call is needed for
231  // getByToken to work properly. Normally, this is done by the worker, but since
232  // a SubProcess is not a module, it has no worker.
233  updateLookup(InEvent, *parentPreg_->productLookup(InEvent),false);
234 
235  if(!droppedBranchIDToKeptBranchID().empty()) {
237  }
239  schedule_->convertCurrentProcessAlias(processConfiguration_->processName());
241  //NOTE: this may throw
243  actReg_->preBeginJobSignal_(pathsAndConsumesOfModules_, processContext_);
244  schedule_->beginJob(*preg_);
245  for_all(subProcesses_, [](auto& subProcess){ subProcess.doBeginJob(); });
246  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
PathsAndConsumesOfModules pathsAndConsumesOfModules_
Definition: SubProcess.h:266
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:247
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:257
void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const &iPnC, bool iPrintDependencies)
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:256
std::shared_ptr< ProductRegistry const > parentPreg_
Definition: SubProcess.h:258
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:328
ProcessContext processContext_
Definition: SubProcess.h:265
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:259
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:264
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::beginLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts 
)
private
void edm::SubProcess::beginRun ( RunPrincipal const &  r,
IOVSyncValue const &  ts 
)
private
std::shared_ptr<BranchIDListHelper const> edm::SubProcess::branchIDListHelper ( ) const
inlineprivate

Definition at line 251 of file SubProcess.h.

References 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:260
std::shared_ptr<BranchIDListHelper>& edm::SubProcess::branchIDListHelper ( )
inlineprivate

Definition at line 252 of file SubProcess.h.

References 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:260
void edm::SubProcess::clearCounters ( )
inline

Clear all the counters in the trigger report.

Definition at line 226 of file SubProcess.h.

References bk::beginJob(), MillePedeFileConverter_cfg::e, Ecal2004TBTDCRanges_v1_cff::endRun, edm::for_all(), cmsPerfStripChart::operate(), and alignCSCRings::r.

226  {
228  schedule_->clearCounters();
229  for_all(subProcesses_, [](auto& subProcess){ subProcess.clearCounters(); });
230  }
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:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::closeOutputFiles ( )
inline

Definition at line 123 of file SubProcess.h.

References edm::for_all(), and cmsPerfStripChart::operate().

123  {
125  schedule_->closeOutputFiles();
126  for_all(subProcesses_, [](auto& subProcess) { subProcess.closeOutputFiles(); });
127  }
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:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::deleteLumiFromCache ( LuminosityBlockPrincipal principal)

Definition at line 559 of file SubProcess.cc.

References edm::LuminosityBlockPrincipal::index(), inUseLumiPrincipals_, eostools::move(), alignCSCRings::s, and subProcesses_.

559  {
560  //release from list but stay around till end of routine
561  auto lb = std::move(inUseLumiPrincipals_[principal.index()]);
562  for(auto& s: subProcesses_) {
563  s.deleteLumiFromCache(*lb);
564  }
565  lb->clearPrincipal();
566  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
def principal(options)
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
Definition: SubProcess.h:275
def move(src, dest)
Definition: eostools.py:511
void edm::SubProcess::deleteRunFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 490 of file SubProcess.cc.

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

490  {
491  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
492  assert(it != parentToChildPhID_.end());
493  auto const& childPhID = it->second;
494  principalCache_.deleteRun(childPhID, runNumber);
495  for_all(subProcesses_, [&childPhID, runNumber](auto& subProcess){ subProcess.deleteRunFromCache(childPhID, runNumber); });
496  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
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:273
void edm::SubProcess::doBeginJob ( )

Definition at line 217 of file SubProcess.cc.

References beginJob().

217  {
218  this->beginJob();
219  }
void edm::SubProcess::doBeginLuminosityBlockAsync ( WaitingTaskHolder  iHolder,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 499 of file SubProcess.cc.

References printConversionInfo::aux, edm::LuminosityBlockPrincipal::aux(), esp_, edm::PrincipalCache::getAvailableLumiPrincipalPtr(), historyLumiOffset_, edm::LuminosityBlockPrincipal::index(), edm::InLumi, inUseLumiPrincipals_, eostools::move(), cmsPerfStripChart::operate(), principalCache_, edm::Principal::processHistory(), edm::Principal::processHistoryID(), processHistoryRegistries_, propagateProducts(), edm::Principal::reader(), edm::PrincipalCache::runPrincipalPtr(), schedule_, serviceToken_, and subProcesses_.

Referenced by edm::subProcessDoGlobalBeginTransitionAsync().

499  {
501 
502  auto aux = principal.aux();
503  aux.setProcessHistoryID(principal.processHistoryID());
505  lbpp->setAux(aux);
506  auto & processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_+lbpp->index()];
507  inUseLumiPrincipals_[principal.index()] = lbpp;
508  processHistoryRegistry.registerProcessHistory(principal.processHistory());
509  lbpp->fillLuminosityBlockPrincipal(processHistoryRegistry, principal.reader());
510  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
511  LuminosityBlockPrincipal& lbp = *lbpp;
513  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> Traits;
514  beginGlobalTransitionAsync<Traits>(std::move(iHolder),
515  *schedule_,
516  lbp,
517  ts,
518  esp_->eventSetup(),
520  subProcesses_);
521  }
unsigned int historyLumiOffset_
Definition: SubProcess.h:269
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:271
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:257
def principal(options)
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
Definition: SubProcess.h:275
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:655
std::shared_ptr< LuminosityBlockPrincipal > getAvailableLumiPrincipalPtr()
PrincipalCache principalCache_
Definition: SubProcess.h:273
def move(src, dest)
Definition: eostools.py:511
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::doBeginRunAsync ( WaitingTaskHolder  iHolder,
RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 420 of file SubProcess.cc.

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

Referenced by edm::subProcessDoGlobalBeginTransitionAsync().

420  {
422 
423  auto aux = std::make_shared<RunAuxiliary>(principal.aux());
424  aux->setProcessHistoryID(principal.processHistoryID());
425  auto rpp = std::make_shared<RunPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyRunOffset_+principal.index()]),principal.index(),false);
426  auto & processHistoryRegistry = processHistoryRegistries_[historyRunOffset_+principal.index()];
427  processHistoryRegistry.registerProcessHistory(principal.processHistory());
428  rpp->fillRunPrincipal(processHistoryRegistry, principal.reader());
429  principalCache_.insert(rpp);
430 
431  ProcessHistoryID const& parentInputReducedPHID = principal.reducedProcessHistoryID();
432  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
433 
434  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
435 
436  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
438  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> Traits;
439  beginGlobalTransitionAsync<Traits>(std::move(iHolder),
440  *schedule_,
441  rp,
442  ts,
443  esp_->eventSetup(),
445  subProcesses_);
446  }
unsigned int historyRunOffset_
Definition: SubProcess.h:270
void insert(std::shared_ptr< RunPrincipal > rp)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:271
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:257
def principal(options)
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:272
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:655
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:259
PrincipalCache principalCache_
Definition: SubProcess.h:273
def move(src, dest)
Definition: eostools.py:511
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:264
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::doBeginStream ( unsigned int  iID)

Definition at line 569 of file SubProcess.cc.

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

569  {
571  schedule_->beginStream(iID);
572  for_all(subProcesses_, [iID](auto& subProcess){ subProcess.doBeginStream(iID); });
573  }
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:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::doEndJob ( )

Definition at line 222 of file SubProcess.cc.

References endJob().

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

222  {
223  endJob();
224  }
void edm::SubProcess::doEndLuminosityBlockAsync ( WaitingTaskHolder  iHolder,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 524 of file SubProcess.cc.

References esp_, edm::LuminosityBlockPrincipal::index(), edm::InLumi, inUseLumiPrincipals_, eostools::move(), propagateProducts(), schedule_, serviceToken_, and subProcesses_.

Referenced by edm::subProcessDoGlobalEndTransitionAsync().

524  {
525 
526  LuminosityBlockPrincipal& lbp = *inUseLumiPrincipals_[principal.index()];
528  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> Traits;
529  endGlobalTransitionAsync<Traits>(std::move(iHolder),
530  *schedule_,
531  lbp,
532  ts,
533  esp_->eventSetup(),
536  cleaningUpAfterException);
537  }
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:257
def principal(options)
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
Definition: SubProcess.h:275
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:655
def move(src, dest)
Definition: eostools.py:511
void edm::SubProcess::doEndRunAsync ( WaitingTaskHolder  iHolder,
RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 450 of file SubProcess.cc.

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

Referenced by edm::subProcessDoGlobalEndTransitionAsync().

453  {
454  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
456  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> Traits;
457  endGlobalTransitionAsync<Traits>(std::move(iHolder),
458  *schedule_,
459  rp,
460  ts,
461  esp_->eventSetup(),
464  cleaningUpAfterException);
465  }
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:257
def principal(options)
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:655
PrincipalCache principalCache_
Definition: SubProcess.h:273
def move(src, dest)
Definition: eostools.py:511
void edm::SubProcess::doEndStream ( unsigned int  iID)

Definition at line 576 of file SubProcess.cc.

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

576  {
578  schedule_->endStream(iID);
579  for_all(subProcesses_, [iID](auto& subProcess){ subProcess.doEndStream(iID); });
580  }
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:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::doEventAsync ( WaitingTaskHolder  iHolder,
EventPrincipal const &  principal 
)

Definition at line 343 of file SubProcess.cc.

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

344  {
346  /* BEGIN relevant bits from OutputModule::doEvent */
347  if(!wantAllEvents_) {
348  EventForOutput e(ep, ModuleDescription(), nullptr);
349  e.setConsumer(this);
350  if(!selectors_.wantEvent(e)) {
351  return;
352  }
353  }
354  processAsync(std::move(iHolder),ep);
355  /* END relevant bits from OutputModule::doEvent */
356  }
ServiceToken serviceToken_
Definition: SubProcess.h:257
void processAsync(WaitingTaskHolder iHolder, EventPrincipal const &e)
Definition: SubProcess.cc:359
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:293
def move(src, dest)
Definition: eostools.py:511
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::doStreamBeginLuminosityBlockAsync ( WaitingTaskHolder  iHolder,
unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 619 of file SubProcess.cc.

References esp_, triggerObjects_cff::id, edm::LuminosityBlockPrincipal::index(), inUseLumiPrincipals_, eostools::move(), schedule_, serviceToken_, and subProcesses_.

Referenced by edm::subProcessDoStreamBeginTransitionAsync().

620  {
621  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> Traits;
622 
623  LuminosityBlockPrincipal& lbp = *inUseLumiPrincipals_[principal.index()];
624 
625  beginStreamTransitionAsync<Traits>(std::move(iHolder),
626  *schedule_,
627  id,
628  lbp,
629  ts,
630  esp_->eventSetup(),
632  subProcesses_);
633  }
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:257
def principal(options)
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
Definition: SubProcess.h:275
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
def move(src, dest)
Definition: eostools.py:511
void edm::SubProcess::doStreamBeginRunAsync ( WaitingTaskHolder  iHolder,
unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 583 of file SubProcess.cc.

References esp_, triggerObjects_cff::id, eostools::move(), principalCache_, edm::PrincipalCache::runPrincipalPtr(), schedule_, serviceToken_, and subProcesses_.

Referenced by edm::subProcessDoStreamBeginTransitionAsync().

584  {
585  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> Traits;
586 
587  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
588 
589  beginStreamTransitionAsync<Traits>(std::move(iHolder),
590  *schedule_,
591  id,
592  rp,
593  ts,
594  esp_->eventSetup(),
596  subProcesses_);
597 
598  }
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:257
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:273
def move(src, dest)
Definition: eostools.py:511
void edm::SubProcess::doStreamEndLuminosityBlockAsync ( WaitingTaskHolder  iHolder,
unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 638 of file SubProcess.cc.

References esp_, triggerObjects_cff::id, edm::LuminosityBlockPrincipal::index(), inUseLumiPrincipals_, eostools::move(), schedule_, serviceToken_, and subProcesses_.

Referenced by edm::subProcessDoStreamEndTransitionAsync().

639  {
640  LuminosityBlockPrincipal& lbp = *inUseLumiPrincipals_[principal.index()];
641  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd> Traits;
642  endStreamTransitionAsync<Traits>(std::move(iHolder),
643  *schedule_,
644  id,
645  lbp,
646  ts,
647  esp_->eventSetup(),
650  cleaningUpAfterException);
651  }
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:257
def principal(options)
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
Definition: SubProcess.h:275
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:276
def move(src, dest)
Definition: eostools.py:511
void edm::SubProcess::doStreamEndRunAsync ( WaitingTaskHolder  iHolder,
unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 602 of file SubProcess.cc.

References esp_, triggerObjects_cff::id, eostools::move(), principalCache_, edm::PrincipalCache::runPrincipalPtr(), schedule_, serviceToken_, and subProcesses_.

Referenced by edm::subProcessDoStreamEndTransitionAsync().

603  {
604  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
605  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> Traits;
606 
607  endStreamTransitionAsync<Traits>(std::move(iHolder),
608  *schedule_,
609  id,
610  rp,
611  ts,
612  esp_->eventSetup(),
615  cleaningUpAfterException);
616  }
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:257
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:273
def move(src, dest)
Definition: eostools.py:511
std::map<BranchID::value_type, BranchID::value_type> const& edm::SubProcess::droppedBranchIDToKeptBranchID ( )
inlineprivate

Definition at line 247 of file SubProcess.h.

Referenced by beginJob().

247  {
249  }
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 191 of file SubProcess.h.

References edm::for_all(), and cmsPerfStripChart::operate().

191  {
193  schedule_->enableEndPaths(active);
194  for_all(subProcesses_, [active](auto& subProcess){ subProcess.enableEndPaths(active); });
195  }
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:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::endJob ( void  )
private

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

249  {
251  ExceptionCollector c("Multiple exceptions were thrown while executing endJob. An exception message follows for each.");
252  schedule_->endJob(c);
253  for(auto& subProcess : subProcesses_) {
254  c.call([&subProcess](){ subProcess.doEndJob();});
255  }
256  if(c.hasThrown()) {
257  c.rethrow();
258  }
259  }
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:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::endLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)
private
bool edm::SubProcess::endPathsEnabled ( ) const
inline

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

Definition at line 198 of file SubProcess.h.

References cmsPerfStripChart::operate().

198  {
200  return schedule_->endPathsEnabled();
201  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::endRun ( RunPrincipal const &  r,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)
private
void edm::SubProcess::fixBranchIDListsForEDAliases ( std::map< BranchID::value_type, BranchID::value_type > const &  droppedBranchIDToKeptBranchID)
private

Definition at line 328 of file SubProcess.cc.

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

Referenced by beginJob().

328  {
329  // Check for branches dropped while an EDAlias was kept.
330  // Replace BranchID of each dropped branch with that of the kept alias.
331  for(BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
332  for(BranchID::value_type& branchID : branchIDList) {
333  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
334  if(iter != droppedBranchIDToKeptBranchID.end()) {
335  branchID = iter->second;
336  }
337  }
338  }
339  for_all(subProcesses_, [&droppedBranchIDToKeptBranchID](auto& subProcess){ subProcess.fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID); });
340  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:247
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:260
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 205 of file SubProcess.h.

References cmsPerfStripChart::operate().

205  {
207  schedule_->getTriggerReport(rep);
208  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:257
rep
Definition: cuy.py:1190
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::keepThisBranch ( BranchDescription const &  desc,
std::map< BranchID, BranchDescription const * > &  trueBranchIDToKeptBranchDesc,
std::set< BranchID > &  keptProductsInEvent 
)
private

Definition at line 304 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(), and edm::BranchDescription::unwrappedTypeID().

Referenced by selectProducts().

306  {
307 
309  trueBranchIDToKeptBranchDesc);
310 
311  if(desc.branchType() == InEvent) {
312  if(desc.produced()) {
313  keptProductsInEvent.insert(desc.originalBranchID());
314  } else {
315  keptProductsInEvent.insert(desc.branchID());
316  }
317  }
318  EDGetToken token = consumes(TypeToGet{desc.unwrappedTypeID(),PRODUCT_TYPE},
319  InputTag{desc.moduleLabel(),
320  desc.productInstanceName(),
321  desc.processName()});
322 
323  // Now put it in the list of selected branches.
324  keptProducts_[desc.branchType()].push_back(std::make_pair(&desc, token));
325  }
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 71 of file SubProcess.h.

References cmsRelvalreport::principal(), and convertSQLiteXML::runNumber.

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

71 {return keptProducts_;}
SelectedProductsForBranchType keptProducts_
Definition: SubProcess.h:286
void edm::SubProcess::openOutputFiles ( FileBlock fb)
inline

Definition at line 130 of file SubProcess.h.

References benchmark_cfg::fb, edm::for_all(), and cmsPerfStripChart::operate().

130  {
132  schedule_->openOutputFiles(fb);
133  for_all(subProcesses_, [&fb](auto& subProcess) { subProcess.openOutputFiles(fb); });
134  }
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:257
def operate(timelog, memlog, json_f, num)
SubProcess& edm::SubProcess::operator= ( SubProcess const &  )
delete
SubProcess& edm::SubProcess::operator= ( SubProcess &&  )
default
void edm::SubProcess::processAsync ( WaitingTaskHolder  iHolder,
EventPrincipal const &  e 
)
private

Definition at line 359 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::LuminosityBlockPrincipal::index(), edm::InEvent, inUseLumiPrincipals_, edm::EventPrincipal::luminosityBlockPrincipal(), edm::make_waiting_task(), eostools::move(), principalCache_, edm::Principal::processHistory(), edm::Principal::processHistoryID(), processHistoryRegistries_, edm::EventPrincipal::productProvenanceRetrieverPtr(), edm::Principal::productRegistry(), propagateProducts(), edm::Principal::reader(), groupFilesInBlocks::reverse, schedule_, selector_config_id_, serviceToken_, edm::EventPrincipal::setLuminosityBlockPrincipal(), edm::EventPrincipal::streamID(), subProcesses_, edm::StreamID::value(), and wantAllEvents_.

Referenced by doEventAsync().

360  {
361  EventAuxiliary aux(principal.aux());
362  aux.setProcessHistoryID(principal.processHistoryID());
363 
364  EventSelectionIDVector esids{principal.eventSelectionIDs()};
365  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
366  esids.push_back(selector_config_id_);
367  }
368 
369  EventPrincipal& ep = principalCache_.eventPrincipal(principal.streamID().value());
370  auto & processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
371  processHistoryRegistry.registerProcessHistory(principal.processHistory());
372  BranchListIndexes bli(principal.branchListIndexes());
373  branchIDListHelper_->fixBranchListIndexes(bli);
374  bool deepCopyRetriever = false;
375  ep.fillEventPrincipal(aux,
376  processHistoryRegistry,
377  std::move(esids),
378  std::move(bli),
379  *(principal.productProvenanceRetrieverPtr()),//NOTE: this transfers the per product provenance
380  principal.reader(),
381  deepCopyRetriever);
382  ep.setLuminosityBlockPrincipal(inUseLumiPrincipals_[principal.luminosityBlockPrincipal().index()].get());
384 
385  WaitingTaskHolder finalizeEventTask( make_waiting_task(tbb::task::allocate_root(),
386  [&ep,iHolder](std::exception_ptr const* iPtr) mutable
387  {
388  ep.clearEventPrincipal();
389  if(iPtr) {
390  iHolder.doneWaiting(*iPtr);
391  } else {
392  iHolder.doneWaiting(std::exception_ptr());
393  }
394  }
395  )
396  );
397  WaitingTaskHolder afterProcessTask;
398  if(subProcesses_.empty()) {
399  afterProcessTask = std::move(finalizeEventTask);
400  } else {
401  afterProcessTask = WaitingTaskHolder(
402  make_waiting_task(tbb::task::allocate_root(),
403  [this,&ep,finalizeEventTask] (std::exception_ptr const* iPtr) mutable{
404  if(not iPtr) {
405  for(auto& subProcess: boost::adaptors::reverse(subProcesses_)) {
406  subProcess.doEventAsync(finalizeEventTask,ep);
407  }
408  } else {
409  finalizeEventTask.doneWaiting(*iPtr);
410  }
411  })
412  );
413  }
414 
415  schedule_->processOneEventAsync(std::move(afterProcessTask),
416  ep.streamID().value(),ep, esp_->eventSetup(),serviceToken_);
417  }
ParameterSetID selector_config_id_
Definition: SubProcess.h:292
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:271
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:279
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
std::vector< EventSelectionID > EventSelectionIDVector
ServiceToken serviceToken_
Definition: SubProcess.h:257
def principal(options)
std::vector< BranchListIndex > BranchListIndexes
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
Definition: SubProcess.h:275
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:92
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:260
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:655
PrincipalCache principalCache_
Definition: SubProcess.h:273
def move(src, dest)
Definition: eostools.py:511
void edm::SubProcess::propagateProducts ( BranchType  type,
Principal const &  parentPrincipal,
Principal principal 
) const
private

Definition at line 655 of file SubProcess.cc.

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

Referenced by doBeginLuminosityBlockAsync(), doBeginRunAsync(), doEndLuminosityBlockAsync(), doEndRunAsync(), and processAsync().

655  {
656  SelectedProducts const& keptVector = keptProducts()[type];
657  for(auto const& item : keptVector) {
658  BranchDescription const& desc = *item.first;
659  ProductResolverBase const* parentProductResolver = parentPrincipal.getProductResolver(desc.branchID());
660  if(parentProductResolver != nullptr) {
661  ProductResolverBase* productResolver = principal.getModifiableProductResolver(desc.branchID());
662  if(productResolver != nullptr) {
663  //Propagate the per event(run)(lumi) data for this product to the subprocess.
664  //First, the product itself.
665  productResolver->connectTo(*parentProductResolver, &parentPrincipal);
666  }
667  }
668  }
669  }
type
Definition: HCALResponse.h:21
SelectedProductsForBranchType const & keptProducts() const
Definition: SubProcess.h:71
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
def principal(options)
void edm::SubProcess::respondToCloseInputFile ( FileBlock const &  fb)
inline

Definition at line 142 of file SubProcess.h.

References edm::for_all(), and cmsPerfStripChart::operate().

142  {
144  schedule_->respondToCloseInputFile(fb);
145  for_all(subProcesses_, [&fb](auto& subProcess) { subProcess.respondToCloseInputFile(fb); });
146  }
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:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 678 of file SubProcess.cc.

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

678  {
680  schedule_->respondToOpenInputFile(fb);
681  for_all(subProcesses_, [&fb](auto& subProcess){ subProcess.respondToOpenInputFile(fb); });
682  }
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:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::selectProducts ( ProductRegistry const &  preg,
ThinnedAssociationsHelper const &  parentThinnedAssociationsHelper,
std::map< BranchID, bool > &  keepAssociation 
)

Definition at line 262 of file SubProcess.cc.

References edm::ProductRegistry::allBranchDescriptions(), TrackValidation_cff::association, 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().

264  {
265  if(productSelector_.initialized()) return;
266  productSelector_.initialize(productSelectorRules_, preg.allBranchDescriptions());
267 
268  // TODO: See if we can collapse keptProducts_ and productSelector_ into a
269  // single object. See the notes in the header for ProductSelector
270  // for more information.
271 
272  std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
273  std::vector<BranchDescription const*> associationDescriptions;
274  std::set<BranchID> keptProductsInEvent;
275 
276  for(auto const& it : preg.productList()) {
277  BranchDescription const& desc = it.second;
278  if(desc.transient()) {
279  // if the class of the branch is marked transient, output nothing
280  } else if(!desc.present() && !desc.produced()) {
281  // else if the branch containing the product has been previously dropped,
282  // output nothing
283  } else if(desc.unwrappedType() == typeid(ThinnedAssociation)) {
284  associationDescriptions.push_back(&desc);
285  } else if(productSelector_.selected(desc)) {
286  keepThisBranch(desc, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
287  }
288  }
289 
290  parentThinnedAssociationsHelper.selectAssociationProducts(associationDescriptions,
291  keptProductsInEvent,
292  keepAssociation);
293 
294  for(auto association : associationDescriptions) {
295  if(keepAssociation[association->branchID()]) {
296  keepThisBranch(*association, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
297  }
298  }
299 
300  // Now fill in a mapping needed in the case that a branch was dropped while its EDAlias was kept.
301  ProductSelector::fillDroppedToKept(preg, trueBranchIDToKeptBranchDesc, droppedBranchIDToKeptBranchID_);
302  }
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:304
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)
bool edm::SubProcess::shouldWeCloseOutput ( ) const
inline

Definition at line 149 of file SubProcess.h.

References cmsPerfStripChart::operate().

149  {
151  if(schedule_->shouldWeCloseOutput()) {
152  return true;
153  }
154  for(auto const& subProcess : subProcesses_) {
155  if(subProcess.shouldWeCloseOutput()) {
156  return true;
157  }
158  }
159  return false;
160  }
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:257
def operate(timelog, memlog, json_f, num)
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 212 of file SubProcess.h.

References cmsPerfStripChart::operate().

212  {
214  if(schedule_->terminate()) {
215  return true;
216  }
217  for(auto const& subProcess : subProcesses_) {
218  if(subProcess.terminate()) {
219  return true;
220  }
221  }
222  return false;
223  }
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:257
def operate(timelog, memlog, json_f, num)
std::shared_ptr<ThinnedAssociationsHelper const> edm::SubProcess::thinnedAssociationsHelper ( ) const
inlineprivate

Definition at line 253 of file SubProcess.h.

References edm::get_underlying_safe().

Referenced by SubProcess().

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

References edm::get_underlying_safe().

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

172  {
173  return schedule_->totalEvents();
174  }
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 184 of file SubProcess.h.

References cmsPerfStripChart::operate().

184  {
186  return schedule_->totalEventsFailed();
187  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:257
def operate(timelog, memlog, json_f, num)
int edm::SubProcess::totalEventsPassed ( ) const
inline

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

Definition at line 177 of file SubProcess.h.

References cmsPerfStripChart::operate().

177  {
179  return schedule_->totalEventsPassed();
180  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:277
ServiceToken serviceToken_
Definition: SubProcess.h:257
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::updateBranchIDListHelper ( BranchIDLists const &  branchIDLists)

Definition at line 671 of file SubProcess.cc.

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

Referenced by SubProcess().

671  {
672  branchIDListHelper_->updateFromParent(branchIDLists);
673  for_all(subProcesses_, [this](auto& subProcess){ subProcess.updateBranchIDListHelper(branchIDListHelper_->branchIDLists()); });
674  }
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:260
void edm::SubProcess::writeLumiAsync ( WaitingTaskHolder  task,
LuminosityBlockPrincipal principal 
)

Definition at line 541 of file SubProcess.cc.

References actReg_, edm::WaitingTaskHolder::doneWaiting(), edm::LuminosityBlockPrincipal::index(), inUseLumiPrincipals_, checklumidiff::l, edm::make_waiting_task(), cmsPerfStripChart::operate(), processContext_, alignCSCRings::s, schedule_, serviceToken_, and subProcesses_.

541  {
543 
544  auto l =inUseLumiPrincipals_[principal.index()];
545  auto subTasks = edm::make_waiting_task(tbb::task::allocate_root(), [this,l, task](std::exception_ptr const* iExcept) mutable {
546  if( iExcept) {
547  task.doneWaiting(*iExcept);
548  } else {
550  for(auto& s: subProcesses_) {
551  s.writeLumiAsync(task, *l);
552  }
553  }
554  });
555  schedule_->writeLumiAsync(WaitingTaskHolder(subTasks),*l, &processContext_, actReg_.get());
556  }
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:257
def principal(options)
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
Definition: SubProcess.h:275
FunctorWaitingTask< F > * make_waiting_task(ALLOC &&iAlloc, F f)
Definition: WaitingTask.h:92
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:256
ProcessContext processContext_
Definition: SubProcess.h:265
def operate(timelog, memlog, json_f, num)
void edm::SubProcess::writeRunAsync ( edm::WaitingTaskHolder  task,
ProcessHistoryID const &  parentPhID,
int  runNumber,
MergeableRunProductMetadata const *  mergeableRunProductMetadata 
)

Definition at line 468 of file SubProcess.cc.

References actReg_, edm::WaitingTaskHolder::doneWaiting(), edm::make_waiting_task(), cmsPerfStripChart::operate(), parentToChildPhID_, principalCache_, processContext_, edm::PrincipalCache::runPrincipal(), alignCSCRings::s, schedule_, serviceToken_, and subProcesses_.

469  {
471  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
472  assert(it != parentToChildPhID_.end());
473  auto const& childPhID = it->second;
474 
475  auto subTasks = edm::make_waiting_task(tbb::task::allocate_root(), [this,childPhID,runNumber, task, mergeableRunProductMetadata](std::exception_ptr const* iExcept) mutable {
476  if( iExcept) {
477  task.doneWaiting(*iExcept);
478  } else {
480  for(auto& s: subProcesses_) {
481  s.writeRunAsync(task, childPhID, runNumber, mergeableRunProductMetadata);
482  }
483  }
484  });
485  schedule_->writeRunAsync(WaitingTaskHolder(subTasks),principalCache_.runPrincipal(childPhID, runNumber),
486  &processContext_, actReg_.get(), mergeableRunProductMetadata);
487  }
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:257
void doneWaiting(std::exception_ptr iExcept)
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:278
FunctorWaitingTask< F > * make_waiting_task(ALLOC &&iAlloc, F f)
Definition: WaitingTask.h:92
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:256
ProcessContext processContext_
Definition: SubProcess.h:265
PrincipalCache principalCache_
Definition: SubProcess.h:273
RunPrincipal & runPrincipal(ProcessHistoryID const &phid, RunNumber_t run) const
def operate(timelog, memlog, json_f, num)

Member Data Documentation

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

Definition at line 263 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 256 of file SubProcess.h.

Referenced by beginJob(), SubProcess(), writeLumiAsync(), and writeRunAsync().

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 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 272 of file SubProcess.h.

Referenced by doBeginRunAsync(), and SubProcess().

unsigned int edm::SubProcess::historyLumiOffset_
private

Definition at line 269 of file SubProcess.h.

Referenced by doBeginLuminosityBlockAsync(), and SubProcess().

unsigned int edm::SubProcess::historyRunOffset_
private

Definition at line 270 of file SubProcess.h.

Referenced by doBeginRunAsync(), and SubProcess().

std::vector<std::shared_ptr<LuminosityBlockPrincipal> > edm::SubProcess::inUseLumiPrincipals_
private
SelectedProductsForBranchType edm::SubProcess::keptProducts_
private

Definition at line 286 of file SubProcess.h.

Referenced by keepThisBranch().

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

Definition at line 258 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 deleteRunFromCache(), doBeginRunAsync(), and writeRunAsync().

PathsAndConsumesOfModules edm::SubProcess::pathsAndConsumesOfModules_
private

Definition at line 266 of file SubProcess.h.

Referenced by beginJob().

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

Definition at line 259 of file SubProcess.h.

Referenced by beginJob(), doBeginRunAsync(), and SubProcess().

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

Definition at line 264 of file SubProcess.h.

Referenced by beginJob(), doBeginRunAsync(), and SubProcess().

ProcessContext edm::SubProcess::processContext_
private

Definition at line 265 of file SubProcess.h.

Referenced by beginJob(), SubProcess(), writeLumiAsync(), and writeRunAsync().

std::vector<ProcessHistoryRegistry> edm::SubProcess::processHistoryRegistries_
private
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<SubProcessParentageHelper> > edm::SubProcess::subProcessParentageHelper_
private

Definition at line 262 of file SubProcess.h.

Referenced by SubProcess().

edm::propagate_const<std::shared_ptr<ThinnedAssociationsHelper> > edm::SubProcess::thinnedAssociationsHelper_
private

Definition at line 261 of file SubProcess.h.

Referenced by SubProcess().

bool edm::SubProcess::wantAllEvents_
private

Definition at line 291 of file SubProcess.h.

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