1 #ifndef FWCore_Framework_global_OutputModuleBase_h
2 #define FWCore_Framework_global_OutputModuleBase_h
46 class ModuleCallingContext;
47 class PreallocationConfiguration;
49 class ProductRegistry;
50 class ThinnedAssociationsHelper;
55 template<
typename T>
class ModuleHolderT;
63 template <
typename T>
friend class ::edm::WorkerT;
64 template <
typename T>
friend class ::edm::OutputModuleCommunicatorT;
145 bool anyProductProduced);
182 std::vector<detail::TriggerResultsBasedEventSelector>
selectors_;
266 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
267 std::set<BranchID>& keptProductsInEvent);
void doStreamBeginLuminosityBlock(StreamID id, LuminosityBlockPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
std::string process_name_
virtual void doBeginRunSummary_(Run const &, EventSetup const &)
virtual void writeLuminosityBlock(LuminosityBlockPrincipal const &, ModuleCallingContext const *)=0
virtual void postForkReacquireResources(unsigned int, unsigned int)
void doCloseFile()
Tell the OutputModule that is must end the current file.
SelectedProductsForBranchType const & keptProducts() const
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
ModuleDescription const & description() const
BranchIDLists const * origBranchIDLists_
std::string workerType() const
void doRespondToOpenInputFile(FileBlock const &fb)
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &)
void setModuleDescription(ModuleDescription const &md)
std::vector< BranchIDList > BranchIDLists
virtual void preallocStreams(unsigned int)
void doStreamEndLuminosityBlock(StreamID id, LuminosityBlockPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *)
virtual bool isFileOpen() const
void doBeginStream(StreamID id)
OutputModuleBase(ParameterSet const &pset)
virtual void reallyOpenFile()
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
OutputModuleBase ModuleType
std::vector< detail::TriggerResultsBasedEventSelector > selectors_
virtual void openFile(FileBlock const &)
void doPreForkReleaseResources()
virtual void doBeginStream_(StreamID)
ParameterSetID selector_config_id_
virtual void doRespondToOpenInputFile_(FileBlock const &)
std::string const & processName() const
SelectedProductsForBranchType keptProducts_
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
BranchIDLists const * branchIDLists()
void registerProductsAndCallbacks(OutputModuleBase const *, ProductRegistry const *)
ParameterSet selectEvents_
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
void doRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)
OutputModuleBase & operator=(OutputModuleBase const &)=delete
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
ModuleDescription moduleDescription_
int remainingEvents() const
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
bool prePrefetchSelection(StreamID id, EventPrincipal const &, ModuleCallingContext const *)
virtual ~OutputModuleBase()
virtual void doEndRun_(RunPrincipal const &, ModuleCallingContext const *)
virtual void doEndStream_(StreamID)
virtual void doStreamEndRun_(StreamID, Run const &, EventSetup const &)
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
void doStreamEndRun(StreamID id, RunPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
void doPreallocate(PreallocationConfiguration const &)
std::map< BranchID, bool > keepAssociation_
bool selected(BranchDescription const &desc) const
virtual void doStreamEndRunSummary_(StreamID, Run const &, EventSetup const &)
const ModuleDescription & moduleDescription() const
virtual void doStreamBeginLuminosityBlock_(StreamID, LuminosityBlock const &, EventSetup const &)
edm::propagate_const< std::unique_ptr< BranchIDLists > > branchIDLists_
static void prevalidate(ConfigurationDescriptions &)
static const std::string & baseType()
void configure(OutputModuleDescription const &desc)
static void fillDescription(ParameterSetDescription &desc)
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
bool limitReached() const
ProductSelector productSelector_
static void fillDescriptions(ConfigurationDescriptions &descriptions)
ParameterSetID selectorConfig() const
virtual void doBeginRun_(RunPrincipal const &, ModuleCallingContext const *)
ProductSelectorRules productSelectorRules_
boost::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
void doRespondToCloseInputFile(FileBlock const &fb)
bool wantAllEvents() const
std::atomic< int > remainingEvents_
virtual void reallyCloseFile()
virtual void write(EventPrincipal const &e, ModuleCallingContext const *)=0
bool doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
bool doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext 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()
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *)
bool doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
virtual void doEndLuminosityBlockSummary_(LuminosityBlock const &, EventSetup const &)
void doEndStream(StreamID id)
virtual void doRespondToCloseInputFile_(FileBlock const &)
virtual void doStreamBeginRun_(StreamID, Run const &, EventSetup const &)
virtual void preForkReleaseResources()
virtual void doEndRunSummary_(Run const &, EventSetup const &)
bool doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
void doStreamBeginRun(StreamID id, RunPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
void doOpenFile(FileBlock const &fb)
virtual void doBeginLuminosityBlock_(LuminosityBlockPrincipal const &, ModuleCallingContext const *)
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
virtual void writeRun(RunPrincipal const &, ModuleCallingContext const *)=0
virtual void doStreamEndLuminosityBlock_(StreamID, LuminosityBlock const &, EventSetup const &)
virtual void doStreamEndLuminosityBlockSummary_(StreamID, LuminosityBlock const &, EventSetup const &)
virtual void doBeginLuminosityBlockSummary_(LuminosityBlock const &, EventSetup const &)
virtual void doEndLuminosityBlock_(LuminosityBlockPrincipal const &, ModuleCallingContext const *)