1 #ifndef FWCore_Framework_SubProcess_h 2 #define FWCore_Framework_SubProcess_h 30 class BranchDescription;
31 class BranchIDListHelper;
33 class HistoryAppender;
35 class MergeableRunProductMetadata;
37 class ProductRegistry;
38 class PreallocationConfiguration;
39 class ThinnedAssociationsHelper;
40 class SubProcessParentageHelper;
43 namespace eventsetup {
44 class EventSetupsController;
50 std::shared_ptr<ProductRegistry const> parentProductRegistry,
51 std::shared_ptr<BranchIDListHelper const> parentBranchIDListHelper,
71 std::map<BranchID, bool>& keepAssociation);
80 std::vector<std::shared_ptr<const EventSetupImpl>>
const*);
85 std::vector<std::shared_ptr<const EventSetupImpl>>
const*);
90 std::vector<std::shared_ptr<const EventSetupImpl>>
const*,
91 bool cleaningUpAfterException);
96 std::vector<std::shared_ptr<const EventSetupImpl>>
const*);
101 std::vector<std::shared_ptr<const EventSetupImpl>>
const*,
102 bool cleaningUpAfterException);
104 void doBeginStream(
unsigned int);
105 void doEndStream(
unsigned int);
110 std::vector<std::shared_ptr<const EventSetupImpl>>
const*);
116 std::vector<std::shared_ptr<const EventSetupImpl>>
const*,
117 bool cleaningUpAfterException);
123 std::vector<std::shared_ptr<const EventSetupImpl>>
const*);
129 std::vector<std::shared_ptr<const EventSetupImpl>>
const*,
130 bool cleaningUpAfterException);
148 schedule_->closeOutputFiles();
149 for_all(subProcesses_, [](
auto& subProcess) { subProcess.closeOutputFiles(); });
155 schedule_->openOutputFiles(fb);
156 for_all(subProcesses_, [&fb](
auto& subProcess) { subProcess.openOutputFiles(fb); });
167 schedule_->respondToCloseInputFile(fb);
168 for_all(subProcesses_, [&fb](
auto& subProcess) { subProcess.respondToCloseInputFile(fb); });
174 if (schedule_->shouldWeCloseOutput()) {
177 for (
auto const& subProcess : subProcesses_) {
178 if (subProcess.shouldWeCloseOutput()) {
190 std::vector<ModuleDescription const*> getAllModuleDescriptions()
const;
200 return schedule_->totalEventsPassed();
207 return schedule_->totalEventsFailed();
214 schedule_->enableEndPaths(active);
215 for_all(subProcesses_, [active](
auto& subProcess) { subProcess.enableEndPaths(active); });
221 return schedule_->endPathsEnabled();
228 schedule_->getTriggerReport(rep);
235 if (schedule_->terminate()) {
238 for (
auto const& subProcess : subProcesses_) {
239 if (subProcess.terminate()) {
249 schedule_->clearCounters();
250 for_all(subProcesses_, [](
auto& subProcess) { subProcess.clearCounters(); });
258 std::vector<std::shared_ptr<const EventSetupImpl>>
const*);
265 void fixBranchIDListsForEDAliases(
266 std::map<BranchID::value_type, BranchID::value_type>
const& droppedBranchIDToKeptBranchID);
268 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
269 std::set<BranchID>& keptProductsInEvent);
272 return droppedBranchIDToKeptBranchID_;
289 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)
std::vector< BranchIDList > BranchIDLists
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_
PathsAndConsumesOfModules pathsAndConsumesOfModules_
SelectedProductsForBranchType const & keptProducts() const
void openOutputFiles(FileBlock &fb)
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
ServiceToken serviceToken_
bool shouldWeCloseOutput() const
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
SelectedProductsForBranchType keptProducts_
ProductSelectorRules productSelectorRules_
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
edm::propagate_const< std::unique_ptr< ParameterSet > > processParameterSet_
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::unique_ptr< ExceptionToActionTable const > act_table_
std::vector< ParameterSet > popSubProcessVParameterSet(ParameterSet ¶meterSet)
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
ProductSelector productSelector_
detail::TriggerResultsBasedEventSelector selectors_
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
void respondToCloseInputFile(FileBlock const &fb)
std::shared_ptr< ActivityRegistry > actReg_
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
void getTriggerReport(TriggerReport &rep) const
std::vector< HistoryAppender > historyAppenders_
std::shared_ptr< ProductRegistry const > parentPreg_
std::shared_ptr< BranchIDListHelper > & branchIDListHelper()
ProcessContext processContext_
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper() const
void clearCounters()
Clear all the counters in the trigger report.
std::shared_ptr< ProductRegistry const > preg_
PrincipalCache principalCache_
ParameterSet const & parameterSet(Provenance const &provenance)
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
std::shared_ptr< ProcessConfiguration const > processConfiguration_