|
|
Go to the documentation of this file.
44 remainingEvents_(maxEvents_),
46 hasNewlyDroppedBranch_(),
48 productSelectorRules_(
pset,
"outputCommands",
"OutputModule"),
51 wantAllEvents_(
false),
53 selector_config_id_(),
54 droppedBranchIDToKeptBranchID_(),
56 origBranchIDLists_(nullptr),
58 queue_(
pset.getUntrackedParameter<unsigned
int>(
"concurrencyLimit")) {
92 std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
93 std::vector<BranchDescription const*> associationDescriptions;
94 std::set<BranchID> keptProductsInEvent;
95 std::set<std::string> processesWithSelectedMergeableRunProducts;
105 associationDescriptions.push_back(&desc);
107 keepThisBranch(desc, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
145 std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter =
148 branchID = iter->second;
156 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
157 std::set<BranchID>& keptProductsInEvent) {
166 keptProductsInEvent.insert(desc.
branchID());
196 bool seenFirst =
false;
216 std::vector<ProductResolverIndexAndSkipBit> returnValue;
218 auto const n =
s.numberOfTokens();
219 returnValue.reserve(
n);
221 for (
unsigned int i = 0;
i <
n; ++
i) {
235 return s.wantEvent(
e);
360 std::map<
std::string, std::vector<std::pair<std::string, int> > >
const& outputModulePathPositions,
361 bool anyProductProduced) {
364 outputModulePathPositions,
ParameterSet const & registerIt()
void doOpenFile(FileBlock const &fb)
std::string const & productInstanceName() const
bool doEndRun(RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *)
std::vector< std::string > const & getAllTriggerNames()
virtual void preallocLumis(unsigned int)
bool doBeginRun(RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *)
BranchIDLists const * branchIDLists_
virtual void preallocate(PreallocationConfiguration const &)
TypeWithDict const & unwrappedType() const
virtual bool isFileOpen() const
static void fillDescription(ParameterSetDescription &desc)
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
bool doEvent(EventPrincipal const &ep, EventSetupImpl const &c, ActivityRegistry *, ModuleCallingContext const *)
BranchIDLists const * branchIDLists() const
virtual void writeRun(RunForOutput const &)=0
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
bool selected(BranchDescription const &desc) const
void doRespondToCloseInputFile(FileBlock const &fb)
ModuleDescription const & description() const
ParameterSetID id() const
virtual void doEndLuminosityBlock_(LuminosityBlockForOutput const &)
bool needToRunSelection() const
std::vector< detail::TriggerResultsBasedEventSelector > selectors_
virtual void openFile(FileBlock const &) const
static const std::string & baseType()
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &)
bool doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *)
unsigned int numberOfLuminosityBlocks() const
ParameterSet selectEvents_
ProductResolverIndexAndSkipBit uncheckedIndexFrom(EDGetToken) const
element_type const * get() const
ModuleDescription moduleDescription_
ProductSelectorRules productSelectorRules_
virtual void reallyCloseFile()
OutputModuleBase(ParameterSet const &pset)
std::string const & processName() const
std::vector< BranchID::value_type > BranchIDList
std::vector< ProductResolverIndexAndSkipBit > productsUsedBySelection() const
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)
SelectedProductsForBranchType keptProducts_
BranchID const & originalBranchID() const
void selectAssociationProducts(std::vector< BranchDescription const * > const &associationDescriptions, std::set< BranchID > const &keptProductsInEvent, std::map< BranchID, bool > &keepAssociation) const
TypeID unwrappedTypeID() const
bool doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *)
static void fillDroppedToKept(ProductRegistry const &preg, std::map< BranchID, BranchDescription const * > const &trueBranchIDToKeptBranchDesc, std::map< BranchID::value_type, BranchID::value_type > &droppedBranchIDToKeptBranchID_)
std::vector< BranchIDList > BranchIDLists
edm::propagate_const< std::unique_ptr< BranchIDLists > > branchIDLists_
static void prevalidate(ConfigurationDescriptions &)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
~OutputModuleBase() override
static const std::string kBaseType("EDAnalyzer")
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
static void fillDescription(ParameterSetDescription &desc, char const *parameterName, std::vector< std::string > const &defaultStrings=defaultSelectionStrings())
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
ParameterSetID selector_config_id_
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
virtual void write(EventForOutput const &)=0
void doCloseFile()
Tell the OutputModule that is must end the current file.
std::vector< BranchDescription const * > allBranchDescriptions() const
BranchType const & branchType() const
virtual void writeLuminosityBlock(LuminosityBlockForOutput const &)=0
void configure(OutputModuleDescription const &desc)
bool prePrefetchSelection(StreamID id, EventPrincipal const &, ModuleCallingContext const *)
virtual void doRespondToOpenInputFile_(FileBlock const &)
ProductSelector productSelector_
int remainingEvents() const
BranchIDLists const * origBranchIDLists_
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector, ConsumesCollector &&iC)
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *)
ParameterSet const & getParameterSet(ParameterSetID const &id)
void doPreallocate(PreallocationConfiguration 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)
ProductList const & productList() const
static void fillDescription(ParameterSetDescription &desc)
std::atomic< int > remainingEvents_
std::string process_name_
std::string const & moduleLabel() const
void doRespondToOpenInputFile(FileBlock const &fb)
void updateBranchIDListsWithKeptAliases()
bool selected(BranchDescription const &desc) const
virtual void preallocStreams(unsigned int)
void setConsumer(EDConsumerBase const *iConsumer)
unsigned int numberOfStreams() const
virtual void doBeginLuminosityBlock_(LuminosityBlockForOutput const &)
virtual void setProcessesWithSelectedMergeableRunProducts(std::set< std::string > const &)
void insertSelectedProcesses(BranchDescription const &desc, std::set< std::string > &processes)
std::map< BranchID, bool > keepAssociation_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void addDefault(ParameterSetDescription const &psetDescription)
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *, MergeableRunProductMetadata const *)
virtual void doEndRun_(RunForOutput const &)
BranchID const & branchID() const
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
virtual void doRespondToCloseInputFile_(FileBlock const &)
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int >>> const &outputModulePathPositions, bool anyProductProduced)
virtual void doBeginRun_(RunForOutput const &)