1 #ifndef FWCore_Framework_one_OutputModuleBase_h
2 #define FWCore_Framework_one_OutputModuleBase_h
49 class ModuleCallingContext;
50 class PreallocationConfiguration;
52 class ProductRegistry;
53 class ThinnedAssociationsHelper;
55 template <
typename T>
class OutputModuleCommunicatorT;
58 template<
typename T>
class ModuleHolderT;
66 template <
typename T>
friend class ::edm::WorkerT;
67 template <
typename T>
friend class ::edm::OutputModuleCommunicatorT;
128 bool anyProductProduced);
165 std::vector<detail::TriggerResultsBasedEventSelector>
selectors_;
241 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
242 std::set<BranchID>& keptProductsInEvent);
void doPreForkReleaseResources()
ModuleDescription const & description() const
bool wantAllEvents() const
std::vector< BranchIDList > BranchIDLists
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
SelectedProductsForBranchType keptProducts_
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *)
ModuleDescription moduleDescription_
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *)
static boost::mutex mutex
static void prevalidate(ConfigurationDescriptions &)
ParameterSet selectEvents_
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
void configure(OutputModuleDescription const &desc)
void registerProductsAndCallbacks(OutputModuleBase const *, ProductRegistry const *)
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
virtual void doEndRun_(RunPrincipal const &, ModuleCallingContext const *)
bool doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
ParameterSetID selectorConfig() const
ProductSelectorRules productSelectorRules_
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &)
virtual void doBeginRun_(RunPrincipal const &, ModuleCallingContext const *)
virtual void doRespondToCloseInputFile_(FileBlock const &)
virtual void doRespondToOpenInputFile_(FileBlock const &)
virtual void openFile(FileBlock const &)
int remainingEvents() const
std::atomic< int > remainingEvents_
bool selected(BranchDescription const &desc) const
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
virtual void reallyCloseFile()
virtual void reallyOpenFile()
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
virtual void writeRun(RunPrincipal const &, ModuleCallingContext const *)=0
SelectedProductsForBranchType const & keptProducts() const
virtual void preForkReleaseResources()
std::string workerType() const
bool prePrefetchSelection(StreamID id, EventPrincipal const &, ModuleCallingContext const *)
OutputModuleBase ModuleType
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
SharedResourcesAcquirer resourcesAcquirer_
virtual void doBeginLuminosityBlock_(LuminosityBlockPrincipal const &, ModuleCallingContext const *)
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
OutputModuleBase(ParameterSet const &pset)
std::vector< detail::TriggerResultsBasedEventSelector > selectors_
virtual void doEndLuminosityBlock_(LuminosityBlockPrincipal const &, ModuleCallingContext const *)
void setModuleDescription(ModuleDescription const &md)
const ModuleDescription & moduleDescription() const
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
boost::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
void doRespondToCloseInputFile(FileBlock const &fb)
virtual SharedResourcesAcquirer createAcquirer()
void doRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)
void doRespondToOpenInputFile(FileBlock const &fb)
std::string const & processName() const
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual void write(EventPrincipal const &e, ModuleCallingContext const *)=0
bool doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
OutputModuleBase & operator=(OutputModuleBase const &)=delete
static const std::string & baseType()
void doPreallocate(PreallocationConfiguration const &)
std::string process_name_
void doOpenFile(FileBlock const &fb)
virtual void writeLuminosityBlock(LuminosityBlockPrincipal const &, ModuleCallingContext const *)=0
virtual void postForkReacquireResources(unsigned int, unsigned int)
BranchIDLists const * origBranchIDLists_
bool doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
virtual bool shouldWeCloseFile() const
Ask the OutputModule if we should end the current file.
void doCloseFile()
Tell the OutputModule that is must end the current file.
static void fillDescription(ParameterSetDescription &desc)
virtual bool isFileOpen() const
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
ProductSelector productSelector_
virtual ~OutputModuleBase()
ParameterSetID selector_config_id_
edm::propagate_const< std::unique_ptr< BranchIDLists > > branchIDLists_
BranchIDLists const * branchIDLists()
bool limitReached() const
bool doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
std::map< BranchID, bool > keepAssociation_