46 remainingEvents_(maxEvents_),
48 hasNewlyDroppedBranch_(),
50 productSelectorRules_(pset,
"outputCommands",
"OutputModule"),
53 wantAllEvents_(
false),
55 selector_config_id_(),
56 droppedBranchIDToKeptBranchID_(),
99 std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
100 std::vector<BranchDescription const*> associationDescriptions;
101 std::set<BranchID> keptProductsInEvent;
111 associationDescriptions.push_back(&desc);
113 keepThisBranch(desc, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
140 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
141 std::set<BranchID>& keptProductsInEvent) {
144 trueBranchIDToKeptBranchDesc);
148 std::vector<std::string> missingDictionaries;
150 std::string context(
"Calling OutputModuleBase::keepThisBranch, checking dictionaries for kept types");
160 keptProductsInEvent.insert(desc.
branchID());
196 std::vector<std::shared_ptr<SerialTaskQueue>>(1, std::make_shared<SerialTaskQueue>())};
203 bool seenFirst =
false;
231 return s.wantEvent(e);
340 branchID = iter->second;
344 return branchIDLists_.get();
390 bool anyProductProduced) {
393 outputModulePathPositions,
static const std::string kBaseType("EDAnalyzer")
bool selected(BranchDescription const &desc) const
ModuleDescription const & description() const
BranchType const & branchType() const
std::vector< BranchIDList > BranchIDLists
void throwMissingDictionariesException(std::vector< std::string > &missingDictionaries, std::string const &context)
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
static void fillDroppedToKept(ProductRegistry const &preg, std::map< BranchID, BranchDescription const * > const &trueBranchIDToKeptBranchDesc, std::map< BranchID::value_type, BranchID::value_type > &droppedBranchIDToKeptBranchID_)
SelectedProductsForBranchType keptProducts_
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *)
ModuleDescription moduleDescription_
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *)
static void prevalidate(ConfigurationDescriptions &)
ParameterSet selectEvents_
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
ParameterSetID id() const
SubProcessParentageHelper const * subProcessParentageHelper_
void configure(OutputModuleDescription const &desc)
ParameterSet const & getParameterSet(ParameterSetID const &id)
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
bool doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
std::string const & processName() const
static void fillDescription(ParameterSetDescription &desc, char const *parameterName, std::vector< std::string > const &defaultStrings=defaultSelectionStrings())
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
virtual void doBeginLuminosityBlock_(LuminosityBlockForOutput const &)
ProductSelectorRules productSelectorRules_
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &)
BranchIDLists const * branchIDLists_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual void doRespondToCloseInputFile_(FileBlock const &)
ProductList const & productList() const
virtual void doRespondToOpenInputFile_(FileBlock const &)
virtual void openFile(FileBlock const &)
void selectAssociationProducts(std::vector< BranchDescription const * > const &associationDescriptions, std::set< BranchID > const &keptProductsInEvent, std::map< BranchID, bool > &keepAssociation) const
virtual void doEndRun_(RunForOutput const &)
virtual void write(EventForOutput const &)=0
void addDefault(ParameterSetDescription const &psetDescription)
std::string const & className() const
std::atomic< int > remainingEvents_
std::string const & moduleLabel() const
std::string const & productInstanceName() const
bool checkDictionary(std::vector< std::string > &missingDictionaries, TypeID const &typeID)
bool selected(BranchDescription const &desc) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
virtual void reallyCloseFile()
TypeID unwrappedTypeID() const
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
std::vector< BranchDescription const * > allBranchDescriptions() const
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector, ConsumesCollector &&iC)
BranchID const & branchID() const
TypeWithDict const & unwrappedType() const
static void fillDescription(ParameterSetDescription &desc)
SubProcessParentageHelper const * subProcessParentageHelper_
bool prePrefetchSelection(StreamID id, EventPrincipal const &, ModuleCallingContext const *)
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
SharedResourcesAcquirer resourcesAcquirer_
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
OutputModuleBase(ParameterSet const &pset)
std::vector< detail::TriggerResultsBasedEventSelector > selectors_
virtual void writeRun(RunForOutput const &)=0
virtual void doEndLuminosityBlock_(LuminosityBlockForOutput const &)
void doRespondToCloseInputFile(FileBlock const &fb)
virtual SharedResourcesAcquirer createAcquirer()
void doRespondToOpenInputFile(FileBlock const &fb)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual void doBeginRun_(RunForOutput const &)
std::vector< BranchID::value_type > BranchIDList
bool doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
virtual void writeLuminosityBlock(LuminosityBlockForOutput const &)=0
std::vector< std::string > const & getAllTriggerNames()
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
unsigned int numberOfStreams() const
static const std::string & baseType()
void doPreallocate(PreallocationConfiguration const &)
void setConsumer(EDConsumerBase const *iConsumer)
std::string process_name_
void doOpenFile(FileBlock const &fb)
BranchIDLists const * origBranchIDLists_
BranchID const & originalBranchID() const
bool doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
ParameterSetID registerProperSelectionInfo(edm::ParameterSet const &iInitial, std::string const &iLabel, std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
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_
ParameterSet const & registerIt()
virtual ~OutputModuleBase()
ParameterSetID selector_config_id_
edm::propagate_const< std::unique_ptr< BranchIDLists > > branchIDLists_
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)
BranchIDLists const * branchIDLists()
bool doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
std::map< BranchID, bool > keepAssociation_