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;
37 class SubProcessParentageHelper;
40 namespace eventsetup {
41 class EventSetupsController;
47 std::shared_ptr<ProductRegistry const> parentProductRegistry,
48 std::shared_ptr<BranchIDListHelper const> parentBranchIDListHelper,
68 std::map<BranchID, bool>& keepAssociation);
89 void doBeginStream(
unsigned int);
90 void doEndStream(
unsigned int);
97 void doStreamEndRun(
unsigned int iID,
RunPrincipal const& principal,
IOVSyncValue const& ts,
bool cleaningUpAfterException);
101 bool cleaningUpAfterException);
114 bool cleaningUpAfterException);
120 void deleteLumiFromCache(
ProcessHistoryID const& parentPhID,
int runNumber,
int lumiNumber);
130 schedule_->closeOutputFiles();
131 for_all(subProcesses_, [](
auto& subProcess) { subProcess.closeOutputFiles(); });
137 schedule_->openNewOutputFilesIfNeeded();
138 for_all(subProcesses_, [](
auto& subProcess) { subProcess.openNewOutputFilesIfNeeded(); });
144 schedule_->openOutputFiles(fb);
145 for_all(subProcesses_, [&fb](
auto& subProcess) { subProcess.openOutputFiles(fb); });
156 schedule_->respondToCloseInputFile(fb);
157 for_all(subProcesses_, [&fb](
auto& subProcess) { subProcess.respondToCloseInputFile(fb); });
163 if(schedule_->shouldWeCloseOutput()) {
166 for(
auto const& subProcess : subProcesses_) {
167 if(subProcess.shouldWeCloseOutput()) {
176 schedule_->preForkReleaseResources();
177 for_all(subProcesses_, [](
auto& subProcess){ subProcess.preForkReleaseResources(); });
182 schedule_->postForkReacquireResources(iChildIndex, iNumberOfChildren);
183 for_all(subProcesses_, [iChildIndex, iNumberOfChildren](
auto& subProcess){ subProcess.postForkReacquireResources(iChildIndex, iNumberOfChildren); });
191 std::vector<ModuleDescription const*> getAllModuleDescriptions()
const;
197 return schedule_->totalEvents();
203 return schedule_->totalEventsPassed();
210 return schedule_->totalEventsFailed();
217 schedule_->enableEndPaths(active);
218 for_all(subProcesses_, [active](
auto& subProcess){ subProcess.enableEndPaths(active); });
224 return schedule_->endPathsEnabled();
231 schedule_->getTriggerReport(rep);
238 if(schedule_->terminate()) {
241 for(
auto const& subProcess : subProcesses_) {
242 if(subProcess.terminate()) {
252 schedule_->clearCounters();
253 for_all(subProcesses_, [](
auto& subProcess){ subProcess.clearCounters(); });
266 void fixBranchIDListsForEDAliases(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_;
283 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)
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
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_
bool shouldWeCloseOutput() const
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)
void preForkReleaseResources()
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_
def operate(timelog, memlog, json_f, num)