test
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 doEvent (EventPrincipal const &principal)
 
void doStreamBeginLuminosityBlock (unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
 
void doStreamBeginRun (unsigned int iID, RunPrincipal const &principal, IOVSyncValue const &ts)
 
void doStreamEndLuminosityBlock (unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void doStreamEndRun (unsigned int iID, RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
 
void enableEndPaths (bool active)
 
bool endPathsEnabled () const
 Return true if end_paths are active, and false if they are inactive. More...
 
std::vector< ModuleDescription
const * > 
getAllModuleDescriptions () const
 Return a vector allowing const access to all the ModuleDescriptions for this SubProcess. More...
 
void getTriggerReport (TriggerReport &rep) const
 
SelectedProductsForBranchType
const & 
keptProducts () const
 
void openNewOutputFilesIfNeeded ()
 
void openOutputFiles (FileBlock &fb)
 
SubProcessoperator= (SubProcess const &)=delete
 
SubProcessoperator= (SubProcess &&)=default
 
void postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
void preForkReleaseResources ()
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToOpenInputFile (FileBlock const &fb)
 
void selectProducts (ProductRegistry const &preg, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, std::map< BranchID, bool > &keepAssociation)
 
bool shouldWeCloseOutput () const
 
 SubProcess (ParameterSet &parameterSet, ParameterSet const &topLevelParameterSet, std::shared_ptr< ProductRegistry const > parentProductRegistry, std::shared_ptr< BranchIDListHelper const > parentBranchIDListHelper, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy, PreallocationConfiguration const &preallocConfig, ProcessContext const *parentProcessContext)
 
 SubProcess (SubProcess const &)=delete
 
 SubProcess (SubProcess &&)=default
 
bool terminate () const
 
int totalEvents () const
 
int totalEventsFailed () const
 
int totalEventsPassed () const
 Return the number of events which have been passed by one or more trigger paths. More...
 
void updateBranchIDListHelper (BranchIDLists const &)
 
void writeLumi (ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber)
 
void writeRun (ProcessHistoryID const &parentPhID, int runNumber)
 
virtual ~SubProcess ()
 
- 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 process (EventPrincipal const &e)
 
void propagateProducts (BranchType type, Principal const &parentPrincipal, Principal &principal) const
 
std::shared_ptr
< ThinnedAssociationsHelper
const > 
thinnedAssociationsHelper () const
 
std::shared_ptr
< ThinnedAssociationsHelper
thinnedAssociationsHelper ()
 

Private Attributes

std::unique_ptr
< ExceptionToActionTable const > 
act_table_
 
std::shared_ptr< ActivityRegistryactReg_
 
edm::propagate_const
< std::shared_ptr
< BranchIDListHelper > > 
branchIDListHelper_
 
std::map< BranchID::value_type,
BranchID::value_type
droppedBranchIDToKeptBranchID_
 
edm::propagate_const
< std::shared_ptr
< eventsetup::EventSetupProvider > > 
esp_
 
std::vector< HistoryAppenderhistoryAppenders_
 
unsigned int historyLumiOffset_
 
unsigned int historyRunOffset_
 
SelectedProductsForBranchType keptProducts_
 
std::shared_ptr
< ProductRegistry const > 
parentPreg_
 
std::map< ProcessHistoryID,
ProcessHistoryID
parentToChildPhID_
 
PathsAndConsumesOfModules pathsAndConsumesOfModules_
 
std::shared_ptr
< ProductRegistry const > 
preg_
 
PrincipalCache principalCache_
 
std::shared_ptr
< ProcessConfiguration const > 
processConfiguration_
 
ProcessContext processContext_
 
std::vector
< ProcessHistoryRegistry
processHistoryRegistries_
 
edm::propagate_const
< std::unique_ptr
< ParameterSet > > 
processParameterSet_
 
ProductSelector productSelector_
 
ProductSelectorRules productSelectorRules_
 
edm::propagate_const
< std::unique_ptr< Schedule > > 
schedule_
 
ParameterSetID selector_config_id_
 
detail::TriggerResultsBasedEventSelector selectors_
 
ServiceToken serviceToken_
 
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 41 of file SubProcess.h.

Constructor & Destructor Documentation

edm::SubProcess::SubProcess ( ParameterSet parameterSet,
ParameterSet const &  topLevelParameterSet,
std::shared_ptr< ProductRegistry const >  parentProductRegistry,
std::shared_ptr< BranchIDListHelper const >  parentBranchIDListHelper,
ThinnedAssociationsHelper const &  parentThinnedAssociationsHelper,
eventsetup::EventSetupsController esController,
ActivityRegistry parentActReg,
ServiceToken const &  token,
serviceregistry::ServiceLegacy  iLegacy,
PreallocationConfiguration const &  preallocConfig,
ProcessContext const *  parentProcessContext 
)

Definition at line 37 of file SubProcess.cc.

References edm::ScheduleItems::act_table_, act_table_, edm::ScheduleItems::actReg_, actReg_, edm::ScheduleItems::addCPRandTNS(), edm::ScheduleItems::branchIDListHelper(), branchIDListHelper(), branchIDListHelper_, edm::detail::configureEventSelector(), edm::ActivityRegistry::connectToSubProcess(), 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_.

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

Definition at line 192 of file SubProcess.cc.

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

Member Function Documentation

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

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

206  {
207  // If event selection is being used, the SubProcess class reads TriggerResults
208  // object(s) in the parent process from the event. This next call is needed for
209  // getByToken to work properly. Normally, this is done by the worker, but since
210  // a SubProcess is not a module, it has no worker.
211  updateLookup(InEvent, *parentPreg_->productLookup(InEvent),false);
212 
213  if(!droppedBranchIDToKeptBranchID().empty()) {
215  }
218  //NOTE: this may throw
220  actReg_->preBeginJobSignal_(pathsAndConsumesOfModules_, processContext_);
221  schedule_->beginJob(*preg_);
222  for_all(subProcesses_, [](auto& subProcess){ subProcess.doBeginJob(); });
223  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
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:248
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
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:258
void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const &iPnC, bool iPrintDependencies)
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:257
std::shared_ptr< ProductRegistry const > parentPreg_
Definition: SubProcess.h:259
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:305
ProcessContext processContext_
Definition: SubProcess.h:265
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:260
void edm::SubProcess::beginLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
IOVSyncValue const &  ts 
)
private

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

432  {
433  auto aux = std::make_shared<LuminosityBlockAuxiliary>(principal.aux());
434  aux->setProcessHistoryID(principal.processHistoryID());
435  auto lbpp = std::make_shared<LuminosityBlockPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyLumiOffset_+principal.index()]),principal.index(),false);
436  auto & processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_+principal.index()];
437  processHistoryRegistry.registerProcessHistory(principal.processHistory());
438  lbpp->fillLuminosityBlockPrincipal(processHistoryRegistry, principal.reader());
439  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
440  principalCache_.insert(lbpp);
441  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
443  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> Traits;
444  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts));
445  for_all(subProcesses_, [&lbp, &ts](auto& subProcess){ subProcess.doBeginLuminosityBlock(lbp, ts); });
446  }
unsigned int historyLumiOffset_
Definition: SubProcess.h:269
void insert(std::shared_ptr< RunPrincipal > rp)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:271
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
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:274
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:543
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:260
PrincipalCache principalCache_
Definition: SubProcess.h:273
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:264
void edm::SubProcess::beginRun ( RunPrincipal const &  r,
IOVSyncValue const &  ts 
)
private

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

369  {
370  auto aux = std::make_shared<RunAuxiliary>(principal.aux());
371  aux->setProcessHistoryID(principal.processHistoryID());
372  auto rpp = std::make_shared<RunPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyRunOffset_+principal.index()]),principal.index(),false);
373  auto & processHistoryRegistry = processHistoryRegistries_[historyRunOffset_+principal.index()];
374  processHistoryRegistry.registerProcessHistory(principal.processHistory());
375  rpp->fillRunPrincipal(processHistoryRegistry, principal.reader());
376  principalCache_.insert(rpp);
377 
378  ProcessHistoryID const& parentInputReducedPHID = principal.reducedProcessHistoryID();
379  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
380 
381  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
382 
383  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
385  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> Traits;
386  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts));
387  for_all(subProcesses_, [&rp, &ts](auto& subProcess){ subProcess.doBeginRun(rp, ts); });
388  }
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:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
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:274
Hash< ProcessHistoryType > ProcessHistoryID
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:276
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:543
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:260
PrincipalCache principalCache_
Definition: SubProcess.h:273
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:264
std::shared_ptr<BranchIDListHelper const> edm::SubProcess::branchIDListHelper ( ) const
inlineprivate

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

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

Clear all the counters in the trigger report.

Definition at line 227 of file SubProcess.h.

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

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

Definition at line 105 of file SubProcess.h.

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

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

Definition at line 475 of file SubProcess.cc.

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

475  {
476  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
477  assert(it != parentToChildPhID_.end());
478  auto const& childPhID = it->second;
479  principalCache_.deleteLumi(childPhID, runNumber, lumiNumber);
480  for_all(subProcesses_, [&childPhID, runNumber, lumiNumber](auto& subProcess){ subProcess.deleteLumiFromCache(childPhID, runNumber, lumiNumber); });
481  }
void deleteLumi(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi)
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
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:276
PrincipalCache principalCache_
Definition: SubProcess.h:273
void edm::SubProcess::deleteRunFromCache ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 417 of file SubProcess.cc.

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

417  {
418  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
419  assert(it != parentToChildPhID_.end());
420  auto const& childPhID = it->second;
421  principalCache_.deleteRun(childPhID, runNumber);
422  for_all(subProcesses_, [&childPhID, runNumber](auto& subProcess){ subProcess.deleteRunFromCache(childPhID, runNumber); });
423  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
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:276
void deleteRun(ProcessHistoryID const &phid, RunNumber_t run)
PrincipalCache principalCache_
Definition: SubProcess.h:273
void edm::SubProcess::doBeginJob ( )

Definition at line 195 of file SubProcess.cc.

References beginJob().

195  {
196  this->beginJob();
197  }
void edm::SubProcess::doBeginLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 426 of file SubProcess.cc.

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

426  {
429  }
ServiceToken serviceToken_
Definition: SubProcess.h:258
void beginLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts)
Definition: SubProcess.cc:432
void edm::SubProcess::doBeginRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 363 of file SubProcess.cc.

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

363  {
365  beginRun(principal,ts);
366  }
void beginRun(RunPrincipal const &r, IOVSyncValue const &ts)
Definition: SubProcess.cc:369
ServiceToken serviceToken_
Definition: SubProcess.h:258
void edm::SubProcess::doBeginStream ( unsigned int  iID)

Definition at line 484 of file SubProcess.cc.

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

484  {
486  schedule_->beginStream(iID);
487  for_all(subProcesses_, [iID](auto& subProcess){ subProcess.doBeginStream(iID); });
488  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:258
void edm::SubProcess::doEndJob ( )

Definition at line 200 of file SubProcess.cc.

References endJob().

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

200  {
201  endJob();
202  }
void edm::SubProcess::doEndLuminosityBlock ( LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 449 of file SubProcess.cc.

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

449  {
451  endLuminosityBlock(principal,ts,cleaningUpAfterException);
452  }
ServiceToken serviceToken_
Definition: SubProcess.h:258
void endLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:455
void edm::SubProcess::doEndRun ( RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 391 of file SubProcess.cc.

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

391  {
393  endRun(principal,ts,cleaningUpAfterException);
394  }
ServiceToken serviceToken_
Definition: SubProcess.h:258
void endRun(RunPrincipal const &r, IOVSyncValue const &ts, bool cleaningUpAfterException)
Definition: SubProcess.cc:397
void edm::SubProcess::doEndStream ( unsigned int  iID)

Definition at line 491 of file SubProcess.cc.

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

491  {
493  schedule_->endStream(iID);
494  for_all(subProcesses_, [iID](auto& subProcess){ subProcess.doEndStream(iID); });
495  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:258
void edm::SubProcess::doEvent ( EventPrincipal const &  principal)

Definition at line 320 of file SubProcess.cc.

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

320  {
322  /* BEGIN relevant bits from OutputModule::doEvent */
323  if(!wantAllEvents_) {
324  EventForOutput e(ep, ModuleDescription(), nullptr);
325  e.setConsumer(this);
326  if(!selectors_.wantEvent(e)) {
327  return;
328  }
329  }
330  process(ep);
331  /* END relevant bits from OutputModule::doEvent */
332  }
ServiceToken serviceToken_
Definition: SubProcess.h:258
void process(EventPrincipal const &e)
Definition: SubProcess.cc:335
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:291
void edm::SubProcess::doStreamBeginLuminosityBlock ( unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 520 of file SubProcess.cc.

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

520  {
522  {
523  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
524  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> Traits;
525  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts));
526  for_all(subProcesses_, [id, &lbp, &ts](auto& subProcess){ subProcess.doStreamBeginLuminosityBlock(id,lbp, ts); });
527  }
528  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:258
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:274
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:273
void edm::SubProcess::doStreamBeginRun ( unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts 
)

Definition at line 498 of file SubProcess.cc.

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

498  {
500  {
501  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
502  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> Traits;
503  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts));
504  for_all(subProcesses_, [id, &rp, &ts](auto& subProcess){ subProcess.doStreamBeginRun(id,rp, ts); });
505  }
506  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:258
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:274
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
PrincipalCache principalCache_
Definition: SubProcess.h:273
void edm::SubProcess::doStreamEndLuminosityBlock ( unsigned int  iID,
LuminosityBlockPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 531 of file SubProcess.cc.

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

531  {
533  {
534  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
535  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd> Traits;
536  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
537  for_all(subProcesses_, [id, &lbp, &ts, cleaningUpAfterException](auto& subProcess){ subProcess.doStreamEndLuminosityBlock(id,lbp, ts,cleaningUpAfterException); });
538  }
539  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:258
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:274
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:273
void edm::SubProcess::doStreamEndRun ( unsigned int  iID,
RunPrincipal const &  principal,
IOVSyncValue const &  ts,
bool  cleaningUpAfterException 
)

Definition at line 509 of file SubProcess.cc.

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

509  {
511  {
512  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
513  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> Traits;
514  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
515  for_all(subProcesses_, [id, &rp, &ts, cleaningUpAfterException](auto& subProcess){ subProcess.doStreamEndRun(id,rp, ts,cleaningUpAfterException); });
516  }
517  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:258
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:274
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
PrincipalCache principalCache_
Definition: SubProcess.h:273
std::map<BranchID::value_type, BranchID::value_type> const& edm::SubProcess::droppedBranchIDToKeptBranchID ( )
inlineprivate

Definition at line 248 of file SubProcess.h.

References droppedBranchIDToKeptBranchID_.

Referenced by beginJob().

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

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

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

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

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

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

455  {
456  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
457  lbp.setComplete();
459  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> Traits;
460  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
461  for_all(subProcesses_, [&lbp, &ts, cleaningUpAfterException](auto& subProcess){ subProcess.doEndLuminosityBlock(lbp, ts, cleaningUpAfterException); });
462  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
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:274
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:543
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:273
bool edm::SubProcess::endPathsEnabled ( ) const
inline

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

Definition at line 199 of file SubProcess.h.

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

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

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

397  {
398  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
399  rp.setComplete();
401  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> Traits;
402  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
403  for_all(subProcesses_, [&rp, &ts, cleaningUpAfterException](auto& subProcess){ subProcess.doEndRun(rp, ts, cleaningUpAfterException); });
404  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
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:274
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:543
PrincipalCache principalCache_
Definition: SubProcess.h:273
void edm::SubProcess::fixBranchIDListsForEDAliases ( std::map< BranchID::value_type, BranchID::value_type > const &  droppedBranchIDToKeptBranchID)
private

Definition at line 305 of file SubProcess.cc.

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

Referenced by beginJob().

305  {
306  // Check for branches dropped while an EDAlias was kept.
307  // Replace BranchID of each dropped branch with that of the kept alias.
308  for(BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
309  for(BranchID::value_type& branchID : branchIDList) {
310  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
311  if(iter != droppedBranchIDToKeptBranchID.end()) {
312  branchID = iter->second;
313  }
314  }
315  }
316  for_all(subProcesses_, [&droppedBranchIDToKeptBranchID](auto& subProcess){ subProcess.fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID); });
317  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:248
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:261
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 206 of file SubProcess.h.

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

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

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

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

Definition at line 67 of file SubProcess.h.

References keptProducts_.

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

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

Definition at line 112 of file SubProcess.h.

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

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

Definition at line 119 of file SubProcess.h.

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

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

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

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

Definition at line 151 of file SubProcess.h.

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

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

Definition at line 335 of file SubProcess.cc.

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

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), doEvent(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::dumpPython(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::open(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_PATFILTER(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), ConfigBuilder.ConfigBuilder::scheduleSequence(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProcess(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProperty().

335  {
336  EventAuxiliary aux(principal.aux());
337  aux.setProcessHistoryID(principal.processHistoryID());
338 
339  EventSelectionIDVector esids{principal.eventSelectionIDs()};
340  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
341  esids.push_back(selector_config_id_);
342  }
343 
344  EventPrincipal& ep = principalCache_.eventPrincipal(principal.streamID().value());
345  auto & processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
346  processHistoryRegistry.registerProcessHistory(principal.processHistory());
347  BranchListIndexes bli(principal.branchListIndexes());
348  branchIDListHelper_->fixBranchListIndexes(bli);
349  ep.fillEventPrincipal(aux,
350  processHistoryRegistry,
351  std::move(esids),
352  std::move(bli),
353  *(principal.productProvenanceRetrieverPtr()),//NOTE: this transfers the per product provenance
354  principal.reader());
355  ep.setLuminosityBlockPrincipal(principalCache_.lumiPrincipalPtr());
357  schedule_->processOneEvent(ep.streamID().value(),ep, esp_->eventSetup());
358  for_all(subProcesses_, [&ep](auto& subProcess){ subProcess.doEvent(ep); });
359  ep.clearEventPrincipal();
360  }
ParameterSetID selector_config_id_
Definition: SubProcess.h:290
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:271
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
std::vector< EventSelectionID > EventSelectionIDVector
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
std::vector< BranchListIndex > BranchListIndexes
def move
Definition: eostools.py:510
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:274
EventPrincipal & eventPrincipal(unsigned int iStreamIndex) const
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:261
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:543
std::shared_ptr< LuminosityBlockPrincipal > const & lumiPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run, LuminosityBlockNumber_t lumi) const
PrincipalCache principalCache_
Definition: SubProcess.h:273
void edm::SubProcess::propagateProducts ( BranchType  type,
Principal const &  parentPrincipal,
Principal principal 
) const
private

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

543  {
544  SelectedProducts const& keptVector = keptProducts()[type];
545  for(auto const& item : keptVector) {
546  BranchDescription const& desc = *item.first;
547  ProductResolverBase const* parentProductResolver = parentPrincipal.getProductResolver(desc.branchID());
548  if(parentProductResolver != nullptr) {
549  ProductResolverBase* productResolver = principal.getModifiableProductResolver(desc.branchID());
550  if(productResolver != nullptr) {
551  //Propagate the per event(run)(lumi) data for this product to the subprocess.
552  //First, the product itself.
553  productResolver->connectTo(*parentProductResolver, &parentPrincipal);
554  }
555  }
556  }
557  }
type
Definition: HCALResponse.h:21
SelectedProductsForBranchType const & keptProducts() const
Definition: SubProcess.h:67
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
void edm::SubProcess::respondToCloseInputFile ( FileBlock const &  fb)
inline

Definition at line 131 of file SubProcess.h.

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

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

Definition at line 566 of file SubProcess.cc.

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

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

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

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

Definition at line 138 of file SubProcess.h.

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

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

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

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

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

References edm::get_underlying_safe(), and thinnedAssociationsHelper_.

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

References schedule_.

173  {
174  return schedule_->totalEvents();
175  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
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 185 of file SubProcess.h.

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

185  {
187  return schedule_->totalEventsFailed();
188  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
ServiceToken serviceToken_
Definition: SubProcess.h:258
int edm::SubProcess::totalEventsPassed ( ) const
inline

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

Definition at line 178 of file SubProcess.h.

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

178  {
180  return schedule_->totalEventsPassed();
181  }
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
ServiceToken serviceToken_
Definition: SubProcess.h:258
void edm::SubProcess::updateBranchIDListHelper ( BranchIDLists const &  branchIDLists)

Definition at line 559 of file SubProcess.cc.

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

Referenced by SubProcess().

559  {
560  branchIDListHelper_->updateFromParent(branchIDLists);
561  for_all(subProcesses_, [this](auto& subProcess){ subProcess.updateBranchIDListHelper(branchIDListHelper_->branchIDLists()); });
562  }
std::vector< SubProcess > subProcesses_
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< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:261
void edm::SubProcess::writeLumi ( ProcessHistoryID const &  parentPhID,
int  runNumber,
int  lumiNumber 
)

Definition at line 465 of file SubProcess.cc.

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

465  {
467  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
468  assert(it != parentToChildPhID_.end());
469  auto const& childPhID = it->second;
470  schedule_->writeLumi(principalCache_.lumiPrincipal(childPhID, runNumber, lumiNumber), &processContext_);
471  for_all(subProcesses_, [&childPhID, runNumber, lumiNumber](auto& subProcess){ subProcess.writeLumi(childPhID, runNumber, lumiNumber); });
472  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
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:275
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:258
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:276
ProcessContext processContext_
Definition: SubProcess.h:265
PrincipalCache principalCache_
Definition: SubProcess.h:273
void edm::SubProcess::writeRun ( ProcessHistoryID const &  parentPhID,
int  runNumber 
)

Definition at line 407 of file SubProcess.cc.

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

407  {
409  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
410  assert(it != parentToChildPhID_.end());
411  auto const& childPhID = it->second;
413  for_all(subProcesses_, [&childPhID, runNumber](auto& subProcess){ subProcess.writeRun(childPhID, runNumber); });
414  }
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:277
assert(m_qm.get())
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:275
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
ServiceToken serviceToken_
Definition: SubProcess.h:258
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:276
ProcessContext processContext_
Definition: SubProcess.h:265
PrincipalCache principalCache_
Definition: SubProcess.h:273
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 263 of file SubProcess.h.

Referenced by SubProcess().

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

Definition at line 257 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 295 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 272 of file SubProcess.h.

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

unsigned int edm::SubProcess::historyLumiOffset_
private

Definition at line 269 of file SubProcess.h.

Referenced by beginLuminosityBlock().

unsigned int edm::SubProcess::historyRunOffset_
private

Definition at line 270 of file SubProcess.h.

Referenced by beginRun(), and SubProcess().

SelectedProductsForBranchType edm::SubProcess::keptProducts_
private

Definition at line 284 of file SubProcess.h.

Referenced by keepThisBranch(), and keptProducts().

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

Definition at line 259 of file SubProcess.h.

Referenced by beginJob().

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

Definition at line 276 of file SubProcess.h.

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

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

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

ProcessContext edm::SubProcess::processContext_
private

Definition at line 265 of file SubProcess.h.

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

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

Definition at line 271 of file SubProcess.h.

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

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

Definition at line 278 of file SubProcess.h.

Referenced by SubProcess().

ProductSelector edm::SubProcess::productSelector_
private

Definition at line 286 of file SubProcess.h.

Referenced by selectProducts().

ProductSelectorRules edm::SubProcess::productSelectorRules_
private

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

Referenced by process(), and SubProcess().

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

Definition at line 291 of file SubProcess.h.

Referenced by doEvent(), 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 262 of file SubProcess.h.

Referenced by SubProcess(), and thinnedAssociationsHelper().

bool edm::SubProcess::wantAllEvents_
private

Definition at line 289 of file SubProcess.h.

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