|
|
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;
99 std::set<std::string> processesWithKeptProcessBlockProducts;
103 if (
desc.transient()) {
105 }
else if (!
desc.present() && !
desc.produced()) {
109 associationDescriptions.push_back(&
desc);
113 desc, processesWithSelectedMergeableRunProducts, processesWithKeptProcessBlockProducts);
151 std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter =
154 branchID = iter->second;
162 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
163 std::set<BranchID>& keptProductsInEvent) {
168 std::vector<std::string> missingDictionaries;
170 std::string context(
"Calling OutputModuleBase::keepThisBranch, checking dictionaries for kept types");
174 switch (
desc.branchType()) {
176 if (
desc.produced()) {
177 keptProductsInEvent.insert(
desc.originalBranchID());
179 keptProductsInEvent.insert(
desc.branchID());
214 bool seenFirst =
false;
234 std::vector<ProductResolverIndexAndSkipBit> returnValue;
236 auto const n =
s.numberOfTokens();
237 returnValue.reserve(
n);
239 for (
unsigned int i = 0;
i <
n; ++
i) {
253 return s.wantEvent(
e);
389 bool anyProductProduced) {
392 outputModulePathPositions,
ParameterSet const & registerIt()
static const std::string kBaseType("EDAnalyzer")
virtual void doBeginRun_(RunForOutput const &)
BranchIDLists const * branchIDLists() const
void throwMissingDictionariesException(std::vector< std::string > &missingDictionaries, std::string const &context)
std::vector< std::string > const & getAllTriggerNames()
ProductSelectorRules productSelectorRules_
bool doEndLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
virtual void setProcessesWithSelectedMergeableRunProducts(std::set< std::string > const &)
bool needToRunSelection() const
void insertSelectedProcesses(BranchDescription const &desc, std::set< std::string > &processes, std::set< std::string > &processesWithKeptProcessBlockProducts)
void updateBranchIDListsWithKeptAliases()
virtual void reallyCloseFile()
ModuleDescription const & description() const
ParameterSetID selector_config_id_
void setConsumer(EDConsumerBase const *iConsumer)
StreamID streamID() const
bool prePrefetchSelection(StreamID id, EventPrincipal const &, ModuleCallingContext const *)
void configure(OutputModuleDescription const &desc)
int remainingEvents() const
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
void doAcquire(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *, WaitingTaskWithArenaHolder &)
constexpr element_type const * get() const
static void fillDescriptions(ConfigurationDescriptions &descriptions)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
bool selected(BranchDescription const &desc) const
ParameterSetID id() const
virtual void doEndLuminosityBlock_(LuminosityBlockForOutput const &)
~OutputModuleBase() override
bool doEndRun(RunTransitionInfo const &, ModuleCallingContext const *)
virtual void preallocate(PreallocationConfiguration const &)
unsigned int numberOfLuminosityBlocks() const
ProductResolverIndexAndSkipBit uncheckedIndexFrom(EDGetToken) const
ModuleDescription moduleDescription_
BranchIDLists const * origBranchIDLists_
std::vector< BranchID::value_type > BranchIDList
std::vector< ProductResolverIndexAndSkipBit > productsUsedBySelection() const
virtual void writeProcessBlock(ProcessBlockForOutput const &)
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)
void selectAssociationProducts(std::vector< BranchDescription const * > const &associationDescriptions, std::set< BranchID > const &keptProductsInEvent, std::map< BranchID, bool > &keepAssociation) const
SelectedProductsForBranchType keptProducts_
void doPreallocate(PreallocationConfiguration const &)
virtual void preallocStreams(unsigned int)
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
virtual void openFile(FileBlock const &)
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
virtual void doEndRun_(RunForOutput const &)
void doOpenFile(FileBlock const &fb)
static void fillDescription(ParameterSetDescription &desc, char const *parameterName, std::vector< std::string > const &defaultStrings=defaultSelectionStrings())
virtual void doRespondToCloseInputFile_(FileBlock const &)
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &, ProcessBlockHelperBase const &)
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int >>> const &outputModulePathPositions, bool anyProductProduced)
std::map< BranchID, bool > keepAssociation_
std::vector< BranchDescription const * > allBranchDescriptions() const
OutputProcessBlockHelper outputProcessBlockHelper_
std::string process_name_
virtual void doRespondToOpenInputFile_(FileBlock const &)
void updateAfterProductSelection(std::set< std::string > const &processesWithKeptProcessBlockProducts, ProcessBlockHelperBase const &)
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *, MergeableRunProductMetadata const *)
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector, ConsumesCollector &&iC)
static const std::string & baseType()
ParameterSet selectEvents_
ParameterSet const & getParameterSet(ParameterSetID const &id)
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 doRespondToOpenInputFile(FileBlock const &fb)
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
static void fillDescription(ParameterSetDescription &desc)
bool doBeginLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
ProductSelector productSelector_
void doCloseFile()
Tell the OutputModule that is must end the current file.
void doWriteProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
static void fillDescription(ParameterSetDescription &desc)
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
OutputModuleBase(ParameterSet const &pset)
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
virtual void writeRun(RunForOutput const &)=0
virtual void writeLuminosityBlock(LuminosityBlockForOutput const &)=0
unsigned int numberOfStreams() const
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
std::atomic< int > remainingEvents_
bool selected(BranchDescription const &desc) const
bool checkDictionary(std::vector< std::string > &missingDictionaries, TypeID const &typeID)
virtual void doAcquire_(StreamID, EventForOutput const &, WaitingTaskWithArenaHolder &)
virtual bool isFileOpen() const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::propagate_const< std::unique_ptr< BranchIDLists > > branchIDLists_
static void prevalidate(ConfigurationDescriptions &)
virtual void doBeginLuminosityBlock_(LuminosityBlockForOutput const &)
void addDefault(ParameterSetDescription const &psetDescription)
void doRespondToCloseInputFile(FileBlock const &fb)
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
bool doBeginRun(RunTransitionInfo const &, ModuleCallingContext const *)
virtual void preallocLumis(unsigned int)
std::vector< detail::TriggerResultsBasedEventSelector > selectors_
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *)
virtual void write(EventForOutput const &)=0
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)