1 #ifndef FWCore_Framework_SubProcess_h
2 #define FWCore_Framework_SubProcess_h
27 class BranchDescription;
28 class BranchIDListHelper;
29 class HistoryAppender;
32 class ProductRegistry;
33 class PreallocationConfiguration;
34 class ThinnedAssociationsHelper;
36 namespace eventsetup {
37 class EventSetupsController;
43 std::shared_ptr<ProductRegistry const> parentProductRegistry,
44 std::shared_ptr<BranchIDListHelper const> parentBranchIDListHelper,
63 std::map<BranchID, bool>& keepAssociation);
108 subProcess.closeOutputFiles();
119 subProcess.openNewOutputFilesIfNeeded();
130 subProcess.openOutputFiles(fb);
146 subProcess.respondToCloseInputFile(fb);
159 if(subProcess.shouldWeCloseOutput()) {
172 subProcess.preForkReleaseResources();
179 schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
182 subProcess.postForkReacquireResources(iChildIndex, iNumberOfChildren);
221 subProcess.enableEndPaths(active);
248 if(subProcess.terminate()) {
262 subProcess.clearCounters();
279 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
280 std::set<BranchID>& keptProductsInEvent);
298 std::shared_ptr<ProductRegistry const>
preg_;
unsigned int historyRunOffset_
unsigned int historyLumiOffset_
ParameterSetID selector_config_id_
std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper()
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_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
void beginRun(RunPrincipal const &r, IOVSyncValue const &ts)
PathsAndConsumesOfModules pathsAndConsumesOfModules_
void updateBranchIDListHelper(BranchIDLists const &)
std::unique_ptr< std::vector< ParameterSet > > popSubProcessVParameterSet(ParameterSet ¶meterSet)
SelectedProductsForBranchType const & keptProducts() const
void doEndStream(unsigned int)
SubProcess & operator=(SubProcess const &)=delete
void doEvent(EventPrincipal const &principal)
void openOutputFiles(FileBlock &fb)
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
edm::propagate_const< std::unique_ptr< std::vector< SubProcess > > > subProcesses_
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.
void openNewOutputFilesIfNeeded()
ServiceToken serviceToken_
void deleteRunFromCache(ProcessHistoryID const &parentPhID, int runNumber)
bool shouldWeCloseOutput() const
SelectedProductsForBranchType keptProducts_
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, std::map< BranchID, bool > &keepAssociation)
void process(EventPrincipal const &e)
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_
void doEndRun(RunPrincipal const &principal, IOVSyncValue const &ts, bool cleaningUpAfterException)
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
ProductSelector productSelector_
boost::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
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)
bool hasSubProcesses() const
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_