1 #ifndef FWCore_Framework_SubProcess_h
2 #define FWCore_Framework_SubProcess_h
29 class BranchDescription;
30 class BranchIDListHelper;
31 class HistoryAppender;
34 class ProductRegistry;
35 class PreallocationConfiguration;
36 class ThinnedAssociationsHelper;
39 namespace eventsetup {
40 class EventSetupsController;
46 std::shared_ptr<ProductRegistry const> parentProductRegistry,
47 std::shared_ptr<BranchIDListHelper const> parentBranchIDListHelper,
66 std::map<BranchID, bool>& keepAssociation);
146 if(subProcess.shouldWeCloseOutput()) {
161 schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
162 for_all(
subProcesses_, [iChildIndex, iNumberOfChildren](
auto& subProcess){ subProcess.postForkReacquireResources(iChildIndex, iNumberOfChildren); });
221 if(subProcess.terminate()) {
247 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
248 std::set<BranchID>& keptProductsInEvent);
262 std::shared_ptr<ProductRegistry const>
preg_;
unsigned int historyRunOffset_
unsigned int historyLumiOffset_
ParameterSetID selector_config_id_
std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper()
void doEventAsync(WaitingTaskHolder iHolder, EventPrincipal const &principal)
void enableEndPaths(bool active)
void respondToOpenInputFile(FileBlock const &fb)
void doStreamEndLuminosityBlock(unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
std::vector< BranchIDList > BranchIDLists
void doBeginRun(RunPrincipal const &principal, IOVSyncValue const &ts)
void writeLumi(ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber)
int totalEventsFailed() const
std::shared_ptr< BranchIDListHelper const > branchIDListHelper() const
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
std::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
std::vector< SubProcess > subProcesses_
void beginRun(RunPrincipal const &r, IOVSyncValue const &ts)
PathsAndConsumesOfModules pathsAndConsumesOfModules_
void updateBranchIDListHelper(BranchIDLists const &)
SelectedProductsForBranchType const & keptProducts() const
void doEndStream(unsigned int)
SubProcess & operator=(SubProcess const &)=delete
void openOutputFiles(FileBlock &fb)
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
void doBeginLuminosityBlock(LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
int totalEventsPassed() const
Return the number of events which have been passed by one or more trigger paths.
bool endPathsEnabled() const
Return true if end_paths are active, and false if they are inactive.
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
void openNewOutputFilesIfNeeded()
ServiceToken serviceToken_
void deleteRunFromCache(ProcessHistoryID const &parentPhID, int runNumber)
bool shouldWeCloseOutput() const
void processAsync(WaitingTaskHolder iHolder, EventPrincipal const &e)
SelectedProductsForBranchType keptProducts_
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, std::map< BranchID, bool > &keepAssociation)
ProductSelectorRules productSelectorRules_
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
Return a vector allowing const access to all the ModuleDescriptions for this SubProcess.
edm::propagate_const< std::unique_ptr< ParameterSet > > processParameterSet_
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
void beginLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts)
void preForkReleaseResources()
std::unique_ptr< ExceptionToActionTable const > act_table_
std::vector< ParameterSet > popSubProcessVParameterSet(ParameterSet ¶meterSet)
void doEndRun(RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
ProductSelector productSelector_
detail::TriggerResultsBasedEventSelector selectors_
void doStreamBeginLuminosityBlock(unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts)
void doStreamEndRun(unsigned int iID, RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
void respondToCloseInputFile(FileBlock const &fb)
std::shared_ptr< ActivityRegistry > actReg_
void deleteLumiFromCache(ProcessHistoryID const &parentPhID, int runNumber, int lumiNumber)
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
void endRun(RunPrincipal const &r, IOVSyncValue const &ts, bool cleaningUpAfterException)
void getTriggerReport(TriggerReport &rep) const
std::vector< HistoryAppender > historyAppenders_
void endLuminosityBlock(LuminosityBlockPrincipal const &lb, IOVSyncValue const &ts, bool cleaningUpAfterException)
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
void doBeginStream(unsigned int)
std::shared_ptr< ProductRegistry const > parentPreg_
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
std::shared_ptr< BranchIDListHelper > & branchIDListHelper()
ProcessContext processContext_
void writeRun(ProcessHistoryID const &parentPhID, int runNumber)
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper() const
SubProcess(ParameterSet ¶meterSet, 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)
void clearCounters()
Clear all the counters in the trigger report.
std::shared_ptr< ProductRegistry const > preg_
PrincipalCache principalCache_
ParameterSet const & parameterSet(Provenance const &provenance)
void doStreamBeginRun(unsigned int iID, RunPrincipal const &principal, IOVSyncValue const &ts)
void doEndLuminosityBlock(LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
std::shared_ptr< ProcessConfiguration const > processConfiguration_