|
|
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),
92 std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
93 std::vector<BranchDescription const*> associationDescriptions;
94 std::set<BranchID> keptProductsInEvent;
95 std::set<std::string> processesWithSelectedMergeableRunProducts;
99 if (
desc.transient()) {
101 }
else if (!
desc.present() && !
desc.produced()) {
105 associationDescriptions.push_back(&
desc);
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) {
162 std::vector<std::string> missingDictionaries;
164 std::string context(
"Calling OutputModuleBase::keepThisBranch, checking dictionaries for kept types");
168 switch (
desc.branchType()) {
170 if (
desc.produced()) {
171 keptProductsInEvent.insert(
desc.originalBranchID());
173 keptProductsInEvent.insert(
desc.branchID());
208 bool seenFirst =
false;
228 std::vector<ProductResolverIndexAndSkipBit> returnValue;
230 auto const n =
s.numberOfTokens();
231 returnValue.reserve(
n);
233 for (
unsigned int i = 0;
i <
n; ++
i) {
247 return s.wantEvent(
e);
367 bool anyProductProduced) {
370 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 updateBranchIDListsWithKeptAliases()
virtual void reallyCloseFile()
ModuleDescription const & description() const
ParameterSetID selector_config_id_
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)
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
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
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 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
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &)
std::string process_name_
virtual void doRespondToOpenInputFile_(FileBlock 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.
static void fillDescription(ParameterSetDescription &desc)
OutputModuleBase(ParameterSet const &pset)
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
virtual void writeRun(RunForOutput const &)=0
void setConsumer(EDConsumerBase const *iConsumer)
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 bool isFileOpen() const
void insertSelectedProcesses(BranchDescription const &desc, std::set< std::string > &processes)
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 *)