|
|
Go to the documentation of this file.
47 remainingEvents_(maxEvents_),
49 hasNewlyDroppedBranch_(),
51 productSelectorRules_(
pset,
"outputCommands",
"OutputModule"),
54 wantAllEvents_(
false),
56 selector_config_id_(),
57 droppedBranchIDToKeptBranchID_(),
59 origBranchIDLists_(nullptr),
95 std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
96 std::vector<BranchDescription const*> associationDescriptions;
97 std::set<BranchID> keptProductsInEvent;
98 std::set<std::string> processesWithSelectedMergeableRunProducts;
102 if (
desc.transient()) {
104 }
else if (!
desc.present() && !
desc.produced()) {
108 associationDescriptions.push_back(&
desc);
140 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
141 std::set<BranchID>& keptProductsInEvent) {
146 std::vector<std::string> missingDictionaries;
148 std::string context(
"Calling OutputModuleBase::keepThisBranch, checking dictionaries for kept types");
152 switch (
desc.branchType()) {
154 if (
desc.produced()) {
155 keptProductsInEvent.insert(
desc.originalBranchID());
157 keptProductsInEvent.insert(
desc.branchID());
190 std::vector<std::shared_ptr<SerialTaskQueue>>(1, std::make_shared<SerialTaskQueue>())};
199 bool seenFirst =
false;
221 std::vector<ProductResolverIndexAndSkipBit> returnValue;
223 auto const n =
s.numberOfTokens();
224 returnValue.reserve(
n);
226 for (
unsigned int i = 0;
i <
n; ++
i) {
240 return s.wantEvent(
e);
324 std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter =
327 branchID = iter->second;
351 std::vector<std::string>
const& defaultOutputCommands) {
363 bool anyProductProduced) {
366 outputModulePathPositions,
ParameterSet const & registerIt()
SelectedProductsForBranchType keptProducts_
virtual void doBeginRun_(RunForOutput const &)
void throwMissingDictionariesException(std::vector< std::string > &missingDictionaries, std::string const &context)
virtual bool isFileOpen() const
std::vector< std::string > const & getAllTriggerNames()
ModuleDescription moduleDescription_
ProductSelector productSelector_
bool doBeginLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
virtual void doEndLuminosityBlock_(LuminosityBlockForOutput const &)
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
static void prevalidate(ConfigurationDescriptions &)
bool needToRunSelection() const
void doRespondToOpenInputFile(FileBlock const &fb)
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
std::atomic< int > remainingEvents_
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &)
constexpr element_type const * get() const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
bool selected(BranchDescription const &desc) const
static void fillDescriptions(ConfigurationDescriptions &descriptions)
ParameterSetID id() const
virtual void doBeginLuminosityBlock_(LuminosityBlockForOutput const &)
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
static const std::string & baseType()
bool doBeginRun(RunTransitionInfo const &, ModuleCallingContext const *)
OutputModuleBase(ParameterSet const &pset)
virtual void doRespondToCloseInputFile_(FileBlock const &)
unsigned int numberOfLuminosityBlocks() const
ProductResolverIndexAndSkipBit uncheckedIndexFrom(EDGetToken) const
std::map< BranchID, bool > keepAssociation_
virtual void writeRun(RunForOutput const &)=0
std::vector< BranchID::value_type > BranchIDList
SubProcessParentageHelper const * subProcessParentageHelper_
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)
ProductSelectorRules productSelectorRules_
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
void selectAssociationProducts(std::vector< BranchDescription const * > const &associationDescriptions, std::set< BranchID > const &keptProductsInEvent, std::map< BranchID, bool > &keepAssociation) const
void doPreallocate(PreallocationConfiguration const &)
virtual void setProcessesWithSelectedMergeableRunProducts(std::set< std::string > const &)
static void fillDescription(ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
virtual void doRespondToOpenInputFile_(FileBlock const &)
void doCloseFile()
Tell the OutputModule that is must end the current file.
~OutputModuleBase() override
static void fillDroppedToKept(ProductRegistry const &preg, std::map< BranchID, BranchDescription const * > const &trueBranchIDToKeptBranchDesc, std::map< BranchID::value_type, BranchID::value_type > &droppedBranchIDToKeptBranchID_)
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *)
BranchIDLists const * origBranchIDLists_
std::vector< BranchIDList > BranchIDLists
std::string process_name_
ParameterSet selectEvents_
bool doEndLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
edm::propagate_const< std::unique_ptr< BranchIDLists > > branchIDLists_
SharedResourcesAcquirer resourcesAcquirer_
static void fillDescription(ParameterSetDescription &desc, char const *parameterName, std::vector< std::string > const &defaultStrings=defaultSelectionStrings())
virtual void openFile(FileBlock const &)
BranchIDLists const * branchIDLists()
void doOpenFile(FileBlock const &fb)
std::vector< BranchDescription const * > allBranchDescriptions() const
ParameterSetID selector_config_id_
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector, ConsumesCollector &&iC)
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
virtual void preallocLumis(unsigned int)
ParameterSet const & getParameterSet(ParameterSetID const &id)
ModuleDescription const & description() 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
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *, MergeableRunProductMetadata const *)
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
virtual SharedResourcesAcquirer createAcquirer()
static void fillDescription(ParameterSetDescription &desc)
static const std::string kBaseType("EDAnalyzer")
std::vector< detail::TriggerResultsBasedEventSelector > selectors_
void configure(OutputModuleDescription const &desc)
virtual void writeLuminosityBlock(LuminosityBlockForOutput const &)=0
std::vector< ProductResolverIndexAndSkipBit > productsUsedBySelection() const
void setConsumer(EDConsumerBase const *iConsumer)
unsigned int numberOfStreams() const
bool prePrefetchSelection(StreamID id, EventPrincipal const &, ModuleCallingContext const *)
bool checkDictionary(std::vector< std::string > &missingDictionaries, TypeID const &typeID)
virtual void doEndRun_(RunForOutput const &)
virtual void write(EventForOutput const &)=0
bool doEndRun(RunTransitionInfo const &, ModuleCallingContext const *)
void insertSelectedProcesses(BranchDescription const &desc, std::set< std::string > &processes)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual void reallyCloseFile()
void addDefault(ParameterSetDescription const &psetDescription)
bool selected(BranchDescription const &desc) const
void doRespondToCloseInputFile(FileBlock const &fb)
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int >>> const &outputModulePathPositions, bool anyProductProduced)