Go to the documentation of this file. 1 #ifndef FWCore_Framework_one_OutputModuleBase_h
2 #define FWCore_Framework_one_OutputModuleBase_h
52 class MergeableRunProductMetadata;
53 class ModuleCallingContext;
54 class PreallocationConfiguration;
56 class ThinnedAssociationsHelper;
57 class SubProcessParentageHelper;
60 class OutputModuleCommunicatorT;
74 friend class ::edm::WorkerT;
76 friend class ::edm::OutputModuleCommunicatorT;
152 bool anyProductProduced);
188 std::vector<detail::TriggerResultsBasedEventSelector>
selectors_;
270 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
271 std::set<BranchID>& keptProductsInEvent);
SelectedProductsForBranchType keptProducts_
int remainingEvents() const
const ModuleDescription & moduleDescription() const
void setModuleDescription(ModuleDescription const &md)
void doRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)
OutputModuleBase ModuleType
virtual void doBeginRun_(RunForOutput const &)
SubProcessParentageHelper const * subProcessParentageHelper() const
virtual bool isFileOpen() const
ModuleDescription moduleDescription_
virtual SerialTaskQueue * globalLuminosityBlocksQueue()
ProductSelector productSelector_
bool doBeginLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
virtual void doEndLuminosityBlock_(LuminosityBlockForOutput const &)
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
static const std::vector< std::string > & defaultSelectionStrings()
static void prevalidate(ConfigurationDescriptions &)
bool needToRunSelection() const
SerialTaskQueue runQueue_
void doRespondToOpenInputFile(FileBlock const &fb)
std::atomic< int > remainingEvents_
OutputProcessBlockHelper outputProcessBlockHelper_
virtual bool wantsGlobalRuns() const =0
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual void doBeginLuminosityBlock_(LuminosityBlockForOutput const &)
void doBeginProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
void doWriteProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
static const std::string & baseType()
bool doBeginRun(RunTransitionInfo const &, ModuleCallingContext const *)
OutputModuleBase(ParameterSet const &pset)
SharedResourcesAcquirer & sharedResourcesAcquirer()
virtual void doRespondToCloseInputFile_(FileBlock const &)
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &, ProcessBlockHelperBase const &)
virtual void preActionBeforeRunEventAsync(WaitingTaskHolder iTask, ModuleCallingContext const &iModuleCallingContext, Principal const &iPrincipal) const
ParameterSetID selectorConfig() const
std::map< BranchID, bool > keepAssociation_
virtual void writeRun(RunForOutput const &)=0
virtual void writeProcessBlock(ProcessBlockForOutput const &)
SubProcessParentageHelper const * subProcessParentageHelper_
ProductSelectorRules productSelectorRules_
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
bool wantAllEvents() const
void doPreallocate(PreallocationConfiguration const &)
virtual void setProcessesWithSelectedMergeableRunProducts(std::set< std::string > const &)
static void fillDescription(ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
virtual void doRespondToOpenInputFile_(FileBlock const &)
void doCloseFile()
Tell the OutputModule that is must end the current file.
~OutputModuleBase() override
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *)
virtual bool wantsGlobalLuminosityBlocks() const =0
BranchIDLists const * origBranchIDLists_
void doAccessInputProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
std::vector< BranchIDList > BranchIDLists
void doEndProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
std::string process_name_
ParameterSet selectEvents_
bool doEndLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
edm::propagate_const< std::unique_ptr< BranchIDLists > > branchIDLists_
SharedResourcesAcquirer resourcesAcquirer_
virtual void openFile(FileBlock const &)
SelectedProductsForBranchType const & keptProducts() const
BranchIDLists const * branchIDLists()
virtual bool wantsProcessBlocks() const =0
void registerProductsAndCallbacks(OutputModuleBase const *, ProductRegistry const *)
void doOpenFile(FileBlock const &fb)
SerialTaskQueue luminosityBlockQueue_
ParameterSetID selector_config_id_
std::string const & processName() const
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
virtual void preallocLumis(unsigned int)
ModuleDescription const & description() const
std::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *, MergeableRunProductMetadata const *)
virtual SharedResourcesAcquirer createAcquirer()
std::vector< detail::TriggerResultsBasedEventSelector > selectors_
void configure(OutputModuleDescription const &desc)
virtual void writeLuminosityBlock(LuminosityBlockForOutput const &)=0
bool wantsStreamLuminosityBlocks() const
virtual bool shouldWeCloseFile() const
Ask the OutputModule if we should end the current file.
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
std::vector< ProductResolverIndexAndSkipBit > productsUsedBySelection() const
OutputProcessBlockHelper const & outputProcessBlockHelper() const
bool hasAccumulator() const
OutputModuleBase & operator=(OutputModuleBase const &)=delete
bool prePrefetchSelection(StreamID id, EventPrincipal const &, ModuleCallingContext const *)
virtual void doEndRun_(RunForOutput const &)
virtual void write(EventForOutput const &)=0
bool doEndRun(RunTransitionInfo const &, ModuleCallingContext const *)
bool limitReached() const
virtual void reallyCloseFile()
virtual bool wantsInputProcessBlocks() const =0
virtual SerialTaskQueue * globalRunsQueue()
std::string workerType() const
bool selected(BranchDescription const &desc) const
bool wantsStreamRuns() const
void doRespondToCloseInputFile(FileBlock const &fb)
void doRespondToCloseOutputFile()
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int >>> const &outputModulePathPositions, bool anyProductProduced)