|
|
Go to the documentation of this file.
45 remainingEvents_(maxEvents_),
47 hasNewlyDroppedBranch_(),
49 productSelectorRules_(
pset,
"outputCommands",
"OutputModule"),
52 wantAllEvents_(
false),
54 selector_config_id_(),
55 droppedBranchIDToKeptBranchID_(),
57 origBranchIDLists_(nullptr),
59 queue_(
pset.getUntrackedParameter<unsigned
int>(
"concurrencyLimit")) {
93 std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
94 std::vector<BranchDescription const*> associationDescriptions;
95 std::set<BranchID> keptProductsInEvent;
96 std::set<std::string> processesWithSelectedMergeableRunProducts;
100 if (
desc.transient()) {
102 }
else if (!
desc.present() && !
desc.produced()) {
106 associationDescriptions.push_back(&
desc);
146 std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter =
149 branchID = iter->second;
157 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
158 std::set<BranchID>& keptProductsInEvent) {
163 std::vector<std::string> missingDictionaries;
165 std::string context(
"Calling OutputModuleBase::keepThisBranch, checking dictionaries for kept types");
169 switch (
desc.branchType()) {
171 if (
desc.produced()) {
172 keptProductsInEvent.insert(
desc.originalBranchID());
174 keptProductsInEvent.insert(
desc.branchID());
209 bool seenFirst =
false;
229 std::vector<ProductResolverIndexAndSkipBit> returnValue;
231 auto const n =
s.numberOfTokens();
232 returnValue.reserve(
n);
234 for (
unsigned int i = 0;
i <
n; ++
i) {
248 return s.wantEvent(
e);
359 desc.addUntracked<
unsigned int>(
"concurrencyLimit", 1);
369 bool anyProductProduced) {
372 outputModulePathPositions,
ParameterSet const & registerIt()
bool doBeginRun(RunTransitionInfo const &, ModuleCallingContext const *)
void doOpenFile(FileBlock const &fb)
void throwMissingDictionariesException(std::vector< std::string > &missingDictionaries, std::string const &context)
std::vector< std::string > const & getAllTriggerNames()
virtual void preallocLumis(unsigned int)
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
virtual void preallocate(PreallocationConfiguration const &)
virtual bool isFileOpen() const
static void fillDescription(ParameterSetDescription &desc)
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
BranchIDLists const * branchIDLists() const
constexpr element_type const * get() 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
bool doEndLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext 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 &)
unsigned int numberOfLuminosityBlocks() const
ParameterSet selectEvents_
ProductResolverIndexAndSkipBit uncheckedIndexFrom(EDGetToken) const
ModuleDescription moduleDescription_
ProductSelectorRules productSelectorRules_
virtual void reallyCloseFile()
OutputModuleBase(ParameterSet const &pset)
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_
void selectAssociationProducts(std::vector< BranchDescription const * > const &associationDescriptions, std::set< BranchID > const &keptProductsInEvent, std::map< BranchID, bool > &keepAssociation) const
bool doBeginLuminosityBlock(LumiTransitionInfo const &, 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 &)
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
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
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
static void fillDescription(ParameterSetDescription &desc)
std::atomic< int > remainingEvents_
std::string process_name_
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 &)
bool checkDictionary(std::vector< std::string > &missingDictionaries, TypeID const &typeID)
bool doEndRun(RunTransitionInfo const &, ModuleCallingContext 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 &)
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 &)