CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
edm::PoolOutputModule Class Reference

#include <PoolOutputModule.h>

Inheritance diagram for edm::PoolOutputModule:
edm::one::OutputModule< WatchInputFiles > edm::one::OutputModuleBase edm::core::OutputModuleCore edm::EDConsumerBase edm::TimeoutPoolOutputModule dqmservices::JsonWritingTimeoutPoolOutputModule

Classes

struct  AuxItem
 
struct  OutputItem
 
struct  SpecialSplitLevelForBranch
 

Public Types

using AuxItemArray = std::array< AuxItem, numberOfRunLumiEventProductTrees >
 
enum  DropMetaData { DropNone, DropDroppedPrior, DropPrior, DropAll }
 
using OutputItemList = std::vector< OutputItem >
 
- Public Types inherited from edm::one::OutputModuleBase
typedef OutputModuleBase ModuleType
 
- Public Types inherited from edm::core::OutputModuleCore
typedef OutputModuleCore ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

AuxItemArray const & auxItems () const
 
std::string const & basketOrder () const
 
int basketSize () const
 
BranchChildren const & branchChildren () const
 
std::string const & catalog () const
 
bool compactEventAuxiliary () const
 
std::string const & compressionAlgorithm () const
 
int compressionLevel () const
 
std::string const & currentFileName () const
 
DropMetaData const & dropMetaData () const
 
int eventAutoFlushSize () const
 
int eventAuxiliaryBasketSize () const
 
std::string const & fileName () const
 
int inputFileCount () const
 
std::string const & logicalFileName () const
 
unsigned int maxFileSize () const
 
bool mergeJob () const
 
std::string const & moduleLabel () const
 
PoolOutputModuleoperator= (PoolOutputModule const &)=delete
 
bool overrideInputFileSplitLevels () const
 
 PoolOutputModule (ParameterSet const &ps)
 
 PoolOutputModule (PoolOutputModule const &)=delete
 
std::vector< OutputItemList > const & selectedOutputItemList () const
 
std::vector< OutputItemList > & selectedOutputItemList ()
 
int splitLevel () const
 
int treeMaxVirtualSize () const
 
int whyNotFastClonable () const
 
 ~PoolOutputModule () override
 
- Public Member Functions inherited from edm::one::OutputModule< WatchInputFiles >
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const OutputModuleoperator= (const OutputModule &)=delete
 
 OutputModule (edm::ParameterSet const &iPSet)
 
 OutputModule (const OutputModule &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::OutputModuleBase
OutputModuleBaseoperator= (OutputModuleBase const &)=delete
 
 OutputModuleBase (ParameterSet const &pset)
 
 OutputModuleBase (OutputModuleBase const &)=delete
 
SharedResourcesAcquirersharedResourcesAcquirer ()
 
SubProcessParentageHelper const * subProcessParentageHelper () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
- Public Member Functions inherited from edm::core::OutputModuleCore
BranchIDLists const * branchIDLists () const
 
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch () const
 
SelectedProductsForBranchType const & keptProducts () const
 
int maxEvents () const
 
const ModuleDescriptionmoduleDescription () const
 
OutputModuleCoreoperator= (OutputModuleCore const &)=delete
 
 OutputModuleCore (ParameterSet const &pset)
 
 OutputModuleCore (OutputModuleCore const &)=delete
 
OutputProcessBlockHelper const & outputProcessBlockHelper () const
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts (ProductRegistry const &preg, ThinnedAssociationsHelper const &, ProcessBlockHelperBase const &)
 
ThinnedAssociationsHelper const * thinnedAssociationsHelper () const
 
bool wantAllEvents () const
 
 ~OutputModuleCore () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescription (ParameterSetDescription &desc)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::core::OutputModuleCore
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Protected Member Functions

virtual void doExtrasAfterCloseFile ()
 
virtual std::pair< std::string, std::string > physicalAndLogicalNameForNewFile ()
 
bool shouldWeCloseFile () const override
 allow inheriting classes to override but still be able to call this method in the overridden version More...
 
void write (EventForOutput const &e) override
 
- Protected Member Functions inherited from edm::one::OutputModuleBase
void configure (OutputModuleDescription const &desc)
 
void doBeginJob ()
 
bool doEvent (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration const &)
 
- Protected Member Functions inherited from edm::core::OutputModuleCore
void configure (OutputModuleDescription const &desc)
 
ModuleDescription const & description () const
 
void doAccessInputProcessBlock (ProcessBlockPrincipal const &, ModuleCallingContext const *)
 
void doBeginJob_ ()
 
bool doBeginLuminosityBlock (LumiTransitionInfo const &, ModuleCallingContext const *)
 
void doBeginProcessBlock (ProcessBlockPrincipal const &, ModuleCallingContext const *)
 
bool doBeginRun (RunTransitionInfo const &, ModuleCallingContext const *)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LumiTransitionInfo const &, ModuleCallingContext const *)
 
void doEndProcessBlock (ProcessBlockPrincipal const &, ModuleCallingContext const *)
 
bool doEndRun (RunTransitionInfo const &, ModuleCallingContext const *)
 
bool doEvent_ (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate_ (PreallocationConfiguration const &)
 
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID ()
 
virtual void preallocLumis (unsigned int)
 
ParameterSetID selectorConfig () const
 
void setEventSelectionInfo (std::map< std::string, std::vector< std::pair< std::string, int >>> const &outputModulePathPositions, bool anyProductProduced)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Types

using BranchParents = std::map< BranchID, std::set< ParentageID > >
 

Private Member Functions

void beginInputFile (FileBlock const &fb)
 
void beginJob () override
 
void fillDependencyGraph ()
 
void fillSelectedItemList (BranchType branchtype, std::string const &processName, TTree *theInputTree, OutputItemList &)
 
void finishEndFile ()
 
bool isFileOpen () const override
 
void openFile (FileBlock const &fb) override
 
void preActionBeforeRunEventAsync (WaitingTaskHolder iTask, ModuleCallingContext const &iModuleCallingContext, Principal const &iPrincipal) const override
 
void reallyCloseFile () override
 
void reallyOpenFile ()
 
void respondToCloseInputFile (FileBlock const &fb) override
 
void respondToOpenInputFile (FileBlock const &fb) override
 
void setProcessesWithSelectedMergeableRunProducts (std::set< std::string > const &) override
 
void startEndFile ()
 
void updateBranchParents (EventForOutput const &e)
 
void updateBranchParentsForOneBranch (ProductProvenanceRetriever const *provRetriever, BranchID const &branchID)
 
void writeBranchIDListRegistry ()
 
void writeEventAuxiliary ()
 
void writeFileFormatVersion ()
 
void writeFileIdentifier ()
 
void writeIndexIntoFile ()
 
void writeLuminosityBlock (LuminosityBlockForOutput const &) override
 
void writeParameterSetRegistry ()
 
void writeParentageRegistry ()
 
void writeProcessBlock (ProcessBlockForOutput const &) override
 
void writeProcessBlockHelper ()
 
void writeProcessHistoryRegistry ()
 
void writeProductDependencies ()
 
void writeProductDescriptionRegistry ()
 
void writeRun (RunForOutput const &) override
 
void writeStoredMergeableRunProductMetadata ()
 
void writeThinnedAssociationsHelper ()
 

Private Attributes

AuxItemArray auxItems_
 
std::string basketOrder_
 
int const basketSize_
 
BranchChildren branchChildren_
 
BranchParents branchParents_
 
std::string const catalog_
 
bool compactEventAuxiliary_
 
std::string const compressionAlgorithm_
 
int const compressionLevel_
 
DropMetaData dropMetaData_
 
int const eventAutoFlushSize_
 
int const eventAuxBasketSize_
 
std::string const fileName_
 
bool initializedFromInput_
 
int inputFileCount_
 
std::string const logicalFileName_
 
unsigned int const maxFileSize_
 
bool mergeJob_
 
std::string const moduleLabel_
 
int outputFileCount_
 
std::string overrideGUID_
 
bool overrideInputFileSplitLevels_
 
std::vector< std::string > processesWithSelectedMergeableRunProducts_
 
std::vector< BranchIDproducedBranches_
 
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_
 
RootServiceChecker rootServiceChecker_
 
std::vector< OutputItemListselectedOutputItemList_
 
std::vector< SpecialSplitLevelForBranchspecialSplitLevelForBranches_
 
int const splitLevel_
 
std::string statusFileName_
 
int const treeMaxVirtualSize_
 
int whyNotFastClonable_
 

Additional Inherited Members

- Protected Attributes inherited from edm::core::OutputModuleCore
std::atomic< int > remainingEvents_
 

Detailed Description

Definition at line 41 of file PoolOutputModule.h.

Member Typedef Documentation

◆ AuxItemArray

Definition at line 80 of file PoolOutputModule.h.

◆ BranchParents

using edm::PoolOutputModule::BranchParents = std::map<BranchID, std::set<ParentageID> >
private

Definition at line 162 of file PoolOutputModule.h.

◆ OutputItemList

Definition at line 116 of file PoolOutputModule.h.

Member Enumeration Documentation

◆ DropMetaData

Constructor & Destructor Documentation

◆ PoolOutputModule() [1/2]

edm::PoolOutputModule::PoolOutputModule ( ParameterSet const &  ps)
explicit

Definition at line 36 of file PoolOutputModule.cc.

References edm::errors::Configuration, DropAll, DropDroppedPrior, dropMetaData(), dropMetaData_, DropNone, DropPrior, edm::FileBlock::EventSelectionUsed, Exception, moduleLabel_, muonDTDigis_cfi::pset, alignCSCRings::s, specialSplitLevelForBranches_, statusFileName_, AlCaHLTBitMon_QueryRunRegistry::string, edm::core::OutputModuleCore::wantAllEvents(), and whyNotFastClonable_.

38  one::OutputModule<WatchInputFiles>(pset),
40  auxItems_(),
42  fileName_(pset.getUntrackedParameter<std::string>("fileName")),
43  logicalFileName_(pset.getUntrackedParameter<std::string>("logicalFileName")),
44  catalog_(pset.getUntrackedParameter<std::string>("catalog")),
45  maxFileSize_(pset.getUntrackedParameter<int>("maxSize")),
46  compressionLevel_(pset.getUntrackedParameter<int>("compressionLevel")),
47  compressionAlgorithm_(pset.getUntrackedParameter<std::string>("compressionAlgorithm")),
48  basketSize_(pset.getUntrackedParameter<int>("basketSize")),
49  eventAuxBasketSize_(pset.getUntrackedParameter<int>("eventAuxiliaryBasketSize")),
50  eventAutoFlushSize_(pset.getUntrackedParameter<int>("eventAutoFlushCompressedSize")),
51  splitLevel_(std::min<int>(pset.getUntrackedParameter<int>("splitLevel") + 1, 99)),
52  basketOrder_(pset.getUntrackedParameter<std::string>("sortBaskets")),
53  treeMaxVirtualSize_(pset.getUntrackedParameter<int>("treeMaxVirtualSize")),
54  whyNotFastClonable_(pset.getUntrackedParameter<bool>("fastCloning") ? FileBlock::CanFastClone
57  moduleLabel_(pset.getParameter<std::string>("@module_label")),
58  initializedFromInput_(false),
60  inputFileCount_(0),
63  overrideInputFileSplitLevels_(pset.getUntrackedParameter<bool>("overrideInputFileSplitLevels")),
64  compactEventAuxiliary_(pset.getUntrackedParameter<bool>("compactEventAuxiliary")),
65  mergeJob_(pset.getUntrackedParameter<bool>("mergeJob")),
68  overrideGUID_(pset.getUntrackedParameter<std::string>("overrideGUID")) {
69  if (pset.getUntrackedParameter<bool>("writeStatusFile")) {
70  std::ostringstream statusfilename;
71  statusfilename << moduleLabel_ << '_' << getpid();
72  statusFileName_ = statusfilename.str();
73  }
74 
75  std::string dropMetaData(pset.getUntrackedParameter<std::string>("dropMetaData"));
76  if (dropMetaData.empty())
78  else if (dropMetaData == std::string("NONE"))
80  else if (dropMetaData == std::string("DROPPED"))
82  else if (dropMetaData == std::string("PRIOR"))
84  else if (dropMetaData == std::string("ALL"))
86  else {
87  throw edm::Exception(errors::Configuration, "Illegal dropMetaData parameter value: ")
88  << dropMetaData << ".\n"
89  << "Legal values are 'NONE', 'DROPPED', 'PRIOR', and 'ALL'.\n";
90  }
91 
92  if (!wantAllEvents()) {
94  }
95 
96  auto const& specialSplit{pset.getUntrackedParameterSetVector("overrideBranchesSplitLevel")};
97 
98  specialSplitLevelForBranches_.reserve(specialSplit.size());
99  for (auto const& s : specialSplit) {
100  specialSplitLevelForBranches_.emplace_back(s.getUntrackedParameter<std::string>("branch"),
101  s.getUntrackedParameter<int>("splitLevel"));
102  }
103 
104  // We don't use this next parameter, but we read it anyway because it is part
105  // of the configuration of this module. An external parser creates the
106  // configuration by reading this source code.
107  pset.getUntrackedParameterSet("dataset");
108  }
std::string const compressionAlgorithm_
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_
std::string const catalog_
std::vector< SpecialSplitLevelForBranch > specialSplitLevelForBranches_
BranchChildren branchChildren_
std::string const moduleLabel_
std::vector< OutputItemList > selectedOutputItemList_
BranchParents branchParents_
DropMetaData const & dropMetaData() const
OutputModuleBase(ParameterSet const &pset)
unsigned int const maxFileSize_
std::string const fileName_
std::string const logicalFileName_
RootServiceChecker rootServiceChecker_

◆ ~PoolOutputModule()

edm::PoolOutputModule::~PoolOutputModule ( )
override

Definition at line 292 of file PoolOutputModule.cc.

292 {}

◆ PoolOutputModule() [2/2]

edm::PoolOutputModule::PoolOutputModule ( PoolOutputModule const &  )
delete

Member Function Documentation

◆ auxItems()

AuxItemArray const& edm::PoolOutputModule::auxItems ( ) const
inline

Definition at line 81 of file PoolOutputModule.h.

References auxItems_.

81 { return auxItems_; }

◆ basketOrder()

std::string const& edm::PoolOutputModule::basketOrder ( ) const
inline

Definition at line 56 of file PoolOutputModule.h.

References basketOrder_.

56 { return basketOrder_; }

◆ basketSize()

int edm::PoolOutputModule::basketSize ( ) const
inline

Definition at line 52 of file PoolOutputModule.h.

References basketSize_.

52 { return basketSize_; }

◆ beginInputFile()

void edm::PoolOutputModule::beginInputFile ( FileBlock const &  fb)
private

Definition at line 230 of file PoolOutputModule.cc.

References edm::FileBlock::branchChildren(), branchChildren_, edm::BranchChildren::childLookup(), edm::BranchChildren::insertChild(), isFileOpen(), edm::core::OutputModuleCore::remainingEvents(), and rootOutputFile_.

Referenced by openFile(), and respondToOpenInputFile().

230  {
231  if (isFileOpen()) {
232  //Faster to read ChildrenBranches directly from input
233  // file than to build it every event
234  auto const& branchToChildMap = fb.branchChildren().childLookup();
235  for (auto const& parentToChildren : branchToChildMap) {
236  for (auto const& child : parentToChildren.second) {
237  branchChildren_.insertChild(parentToChildren.first, child);
238  }
239  }
240  rootOutputFile_->beginInputFile(fb, remainingEvents());
241  }
242  }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_
BranchChildren branchChildren_
void insertChild(BranchID parent, BranchID child)
bool isFileOpen() const override

◆ beginJob()

void edm::PoolOutputModule::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::core::OutputModuleCore.

Definition at line 110 of file PoolOutputModule.cc.

References submitPVResolutionJobs::desc, edm::InEvent, dumpMFGeometry_cfg::prod, and producedBranches_.

110  {
112  for (auto const& prod : reg->productList()) {
113  BranchDescription const& desc = prod.second;
114  if (desc.produced() && desc.branchType() == InEvent && !desc.isAlias()) {
115  producedBranches_.emplace_back(desc.branchID());
116  }
117  }
118  }
std::vector< BranchID > producedBranches_

◆ branchChildren()

BranchChildren const& edm::PoolOutputModule::branchChildren ( ) const
inline

Definition at line 134 of file PoolOutputModule.h.

References branchChildren_.

134 { return branchChildren_; }
BranchChildren branchChildren_

◆ catalog()

std::string const& edm::PoolOutputModule::catalog ( ) const
inline

Definition at line 62 of file PoolOutputModule.h.

References catalog_.

62 { return catalog_; }
std::string const catalog_

◆ compactEventAuxiliary()

bool edm::PoolOutputModule::compactEventAuxiliary ( ) const
inline

Definition at line 59 of file PoolOutputModule.h.

References compactEventAuxiliary_.

◆ compressionAlgorithm()

std::string const& edm::PoolOutputModule::compressionAlgorithm ( ) const
inline

Definition at line 51 of file PoolOutputModule.h.

References compressionAlgorithm_.

51 { return compressionAlgorithm_; }
std::string const compressionAlgorithm_

◆ compressionLevel()

int edm::PoolOutputModule::compressionLevel ( ) const
inline

Definition at line 50 of file PoolOutputModule.h.

References compressionLevel_.

50 { return compressionLevel_; }

◆ currentFileName()

std::string const & edm::PoolOutputModule::currentFileName ( ) const

Definition at line 120 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by edm::TimeoutPoolOutputModule::shouldWeCloseFile().

120 { return rootOutputFile_->fileName(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ doExtrasAfterCloseFile()

void edm::PoolOutputModule::doExtrasAfterCloseFile ( )
protectedvirtual

Reimplemented in dqmservices::JsonWritingTimeoutPoolOutputModule.

Definition at line 357 of file PoolOutputModule.cc.

Referenced by reallyCloseFile().

357 {}

◆ dropMetaData()

DropMetaData const& edm::PoolOutputModule::dropMetaData ( ) const
inline

Definition at line 61 of file PoolOutputModule.h.

References dropMetaData_.

Referenced by PoolOutputModule().

61 { return dropMetaData_; }

◆ eventAutoFlushSize()

int edm::PoolOutputModule::eventAutoFlushSize ( ) const
inline

Definition at line 54 of file PoolOutputModule.h.

References eventAutoFlushSize_.

Referenced by edm::RootOutputFile::RootOutputFile().

54 { return eventAutoFlushSize_; }

◆ eventAuxiliaryBasketSize()

int edm::PoolOutputModule::eventAuxiliaryBasketSize ( ) const
inline

Definition at line 53 of file PoolOutputModule.h.

References eventAuxBasketSize_.

53 { return eventAuxBasketSize_; }

◆ fileName()

std::string const& edm::PoolOutputModule::fileName ( ) const
inline

Definition at line 48 of file PoolOutputModule.h.

References fileName_.

Referenced by physicalAndLogicalNameForNewFile().

48 { return fileName_; }
std::string const fileName_

◆ fillDependencyGraph()

void edm::PoolOutputModule::fillDependencyGraph ( )
private

Definition at line 439 of file PoolOutputModule.cc.

References branchChildren_, branchParents_, edm::ParentageRegistry::getMapped(), edm::BranchChildren::insertChild(), edm::ParentageRegistry::instance(), class-composition::parent, parents, and edm::Parentage::parents().

Referenced by reallyCloseFile().

439  {
440  for (auto const& branchParent : branchParents_) {
441  BranchID const& child = branchParent.first;
442  std::set<ParentageID> const& eIds = branchParent.second;
443  for (auto const& eId : eIds) {
444  Parentage entryDesc;
445  ParentageRegistry::instance()->getMapped(eId, entryDesc);
446  std::vector<BranchID> const& parents = entryDesc.parents();
447  for (auto const& parent : parents) {
449  }
450  }
451  }
452  }
TPRegexp parents
Definition: eve_filter.cc:21
BranchChildren branchChildren_
void insertChild(BranchID parent, BranchID child)
bool getMapped(key_type const &k, value_type &result) const
BranchParents branchParents_
static ParentageRegistry * instance()

◆ fillDescription()

void edm::PoolOutputModule::fillDescription ( ParameterSetDescription desc)
static

Definition at line 454 of file PoolOutputModule.cc.

References edm::ParameterSetDescription::addUntracked(), EgammaPostProcessor_cfi::dataSet, submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::TimeoutPoolOutputModule::fillDescriptions(), and fillDescriptions().

454  {
455  std::string defaultString;
456 
457  desc.setComment("Writes runs, lumis, and events into EDM/ROOT files.");
458  desc.addUntracked<std::string>("fileName")->setComment("Name of output file.");
459  desc.addUntracked<std::string>("logicalFileName", defaultString)
460  ->setComment("Passed to job report. Otherwise unused by module.");
461  desc.addUntracked<std::string>("catalog", defaultString)
462  ->setComment("Passed to job report. Otherwise unused by module.");
463  desc.addUntracked<int>("maxSize", 0x7f000000)
464  ->setComment(
465  "Maximum output file size, in kB.\n"
466  "If over maximum, new output file will be started at next input file transition.");
467  desc.addUntracked<int>("compressionLevel", 4)->setComment("ROOT compression level of output file.");
468  desc.addUntracked<std::string>("compressionAlgorithm", "ZSTD")
469  ->setComment(
470  "Algorithm used to compress data in the ROOT output file, allowed values are ZLIB, LZMA, LZ4, and ZSTD");
471  desc.addUntracked<int>("basketSize", 16384)->setComment("Default ROOT basket size in output file.");
472  desc.addUntracked<int>("eventAuxiliaryBasketSize", 16384)
473  ->setComment("Default ROOT basket size in output file for EventAuxiliary branch.");
474  desc.addUntracked<int>("eventAutoFlushCompressedSize", 20 * 1024 * 1024)
475  ->setComment(
476  "Set ROOT auto flush stored data size (in bytes) for event TTree. The value sets how large the compressed "
477  "buffer is allowed to get. The uncompressed buffer can be quite a bit larger than this depending on the "
478  "average compression ratio. The value of -1 just uses ROOT's default value. The value of 0 turns off this "
479  "feature.");
480  desc.addUntracked<int>("splitLevel", 99)->setComment("Default ROOT branch split level in output file.");
481  desc.addUntracked<std::string>("sortBaskets", std::string("sortbasketsbyoffset"))
482  ->setComment(
483  "Legal values: 'sortbasketsbyoffset', 'sortbasketsbybranch', 'sortbasketsbyentry'.\n"
484  "Used by ROOT when fast copying. Affects performance.");
485  desc.addUntracked<int>("treeMaxVirtualSize", -1)
486  ->setComment("Size of ROOT TTree TBasket cache. Affects performance.");
487  desc.addUntracked<bool>("fastCloning", true)
488  ->setComment(
489  "True: Allow fast copying, if possible.\n"
490  "False: Disable fast copying.");
491  desc.addUntracked("mergeJob", false)
492  ->setComment(
493  "If set to true and fast copying is disabled, copy input file compression and basket sizes to the output "
494  "file.");
495  desc.addUntracked<bool>("compactEventAuxiliary", false)
496  ->setComment(
497  "False: Write EventAuxiliary as we go like any other event metadata branch.\n"
498  "True: Optimize the file layout by deferring writing the EventAuxiliary branch until the output file is "
499  "closed.");
500  desc.addUntracked<bool>("overrideInputFileSplitLevels", false)
501  ->setComment(
502  "False: Use branch split levels and basket sizes from input file, if possible.\n"
503  "True: Always use specified or default split levels and basket sizes.");
504  desc.addUntracked<bool>("writeStatusFile", false)
505  ->setComment("Write a status file. Intended for use by workflow management.");
506  desc.addUntracked<std::string>("dropMetaData", defaultString)
507  ->setComment(
508  "Determines handling of per product per event metadata. Options are:\n"
509  "'NONE': Keep all of it.\n"
510  "'DROPPED': Keep it for products produced in current process and all kept products. Drop it for dropped "
511  "products produced in prior processes.\n"
512  "'PRIOR': Keep it for products produced in current process. Drop it for products produced in prior "
513  "processes.\n"
514  "'ALL': Drop all of it.");
515  desc.addUntracked<std::string>("overrideGUID", defaultString)
516  ->setComment(
517  "Allows to override the GUID of the file. Intended to be used only in Tier0 for re-creating files.\n"
518  "The GUID needs to be of the proper format. If a new output file is started (see maxSize), the GUID of\n"
519  "the first file only is overridden, i.e. the subsequent output files have different, generated GUID.");
520  {
522  dataSet.setAllowAnything();
523  desc.addUntracked<ParameterSetDescription>("dataset", dataSet)
524  ->setComment("PSet is only used by Data Operations and not by this module.");
525  }
526  {
527  ParameterSetDescription specialSplit;
528  specialSplit.addUntracked<std::string>("branch")->setComment(
529  "Name of branch needing a special split level. The name can contain wildcards '*' and '?'");
530  specialSplit.addUntracked<int>("splitLevel")->setComment("The special split level for the branch");
531  desc.addVPSetUntracked("overrideBranchesSplitLevel", specialSplit, std::vector<ParameterSet>());
532  }
533  OutputModule::fillDescription(desc);
534  }

◆ fillDescriptions()

void edm::PoolOutputModule::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 536 of file PoolOutputModule.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and fillDescription().

536  {
539  descriptions.add("edmOutput", desc);
540  }
static void fillDescription(ParameterSetDescription &desc)

◆ fillSelectedItemList()

void edm::PoolOutputModule::fillSelectedItemList ( BranchType  branchtype,
std::string const &  processName,
TTree *  theInputTree,
OutputItemList outputItemList 
)
private

Definition at line 173 of file PoolOutputModule.cc.

References auxItems_, b, edm::PoolOutputModule::OutputItem::basketSize(), edm::PoolOutputModule::AuxItem::basketSize_, edm::PoolOutputModule::OutputItem::basketSize_, edm::BranchTypeToAuxiliaryBranchName(), eventAuxBasketSize_, edm::InEvent, edm::InProcess, edm::BranchDescription::invalidBasketSize, edm::BranchDescription::invalidSplitLevel, edm::core::OutputModuleCore::keptProducts(), overrideInputFileSplitLevels_, edm::core::OutputModuleCore::processName(), dumpMFGeometry_cfg::prod, edm::sort_all(), specialSplitLevelForBranches_, edm::PoolOutputModule::OutputItem::splitLevel(), and edm::PoolOutputModule::OutputItem::splitLevel_.

Referenced by respondToOpenInputFile().

176  {
177  SelectedProducts const& keptVector = keptProducts()[branchType];
178 
179  if (branchType != InProcess) {
180  AuxItem& auxItem = auxItems_[branchType];
181 
182  auto basketSize = (InEvent == branchType) ? eventAuxBasketSize_ : basketSize_;
183 
184  // Fill AuxItem
185  if (theInputTree != nullptr && !overrideInputFileSplitLevels_) {
186  TBranch* auxBranch = theInputTree->GetBranch(BranchTypeToAuxiliaryBranchName(branchType).c_str());
187  if (auxBranch) {
188  auxItem.basketSize_ = auxBranch->GetBasketSize();
189  } else {
190  auxItem.basketSize_ = basketSize;
191  }
192  } else {
193  auxItem.basketSize_ = basketSize;
194  }
195  }
196 
197  // Fill outputItemList with an entry for each branch.
198  for (auto const& kept : keptVector) {
201 
202  BranchDescription const& prod = *kept.first;
203  if (branchType == InProcess && processName != prod.processName()) {
204  continue;
205  }
206  TBranch* theBranch = ((!prod.produced() && theInputTree != nullptr && !overrideInputFileSplitLevels_)
207  ? theInputTree->GetBranch(prod.branchName().c_str())
208  : nullptr);
209 
210  if (theBranch != nullptr) {
211  splitLevel = theBranch->GetSplitLevel();
212  basketSize = theBranch->GetBasketSize();
213  } else {
214  splitLevel = (prod.splitLevel() == BranchDescription::invalidSplitLevel ? splitLevel_ : prod.splitLevel());
215  for (auto const& b : specialSplitLevelForBranches_) {
216  if (b.match(prod.branchName())) {
217  splitLevel = b.splitLevel_;
218  }
219  }
220  basketSize = (prod.basketSize() == BranchDescription::invalidBasketSize ? basketSize_ : prod.basketSize());
221  }
222  outputItemList.emplace_back(&prod, kept.second, splitLevel, basketSize);
223  }
224 
225  // Sort outputItemList to allow fast copying.
226  // The branches in outputItemList must be in the same order as in the input tree, with all new branches at the end.
227  sort_all(outputItemList, OutputItem::Sorter(theInputTree));
228  }
static int const invalidSplitLevel
std::vector< SpecialSplitLevelForBranch > specialSplitLevelForBranches_
static int const invalidBasketSize
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
SelectedProductsForBranchType const & keptProducts() const
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:92
double b
Definition: hdecay.h:118
std::string const & processName() const
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
Definition: BranchType.cc:116

◆ finishEndFile()

void edm::PoolOutputModule::finishEndFile ( )
private

Definition at line 353 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

353  {
354  rootOutputFile_->finishEndFile();
355  rootOutputFile_ = nullptr;
356  } // propagate_const<T> has no reset() function
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ inputFileCount()

int edm::PoolOutputModule::inputFileCount ( ) const
inline

Definition at line 65 of file PoolOutputModule.h.

References inputFileCount_.

◆ isFileOpen()

bool edm::PoolOutputModule::isFileOpen ( ) const
overrideprivatevirtual

Reimplemented from edm::core::OutputModuleCore.

Definition at line 358 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by beginInputFile(), and openFile().

358 { return rootOutputFile_.get() != nullptr; }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ logicalFileName()

std::string const& edm::PoolOutputModule::logicalFileName ( ) const
inline

Definition at line 49 of file PoolOutputModule.h.

References logicalFileName_.

Referenced by physicalAndLogicalNameForNewFile().

49 { return logicalFileName_; }
std::string const logicalFileName_

◆ maxFileSize()

unsigned int edm::PoolOutputModule::maxFileSize ( ) const
inline

Definition at line 64 of file PoolOutputModule.h.

References maxFileSize_.

64 { return maxFileSize_; }
unsigned int const maxFileSize_

◆ mergeJob()

bool edm::PoolOutputModule::mergeJob ( ) const
inline

Definition at line 60 of file PoolOutputModule.h.

References mergeJob_.

60 { return mergeJob_; }

◆ moduleLabel()

std::string const& edm::PoolOutputModule::moduleLabel ( ) const
inline

Definition at line 63 of file PoolOutputModule.h.

References moduleLabel_.

63 { return moduleLabel_; }
std::string const moduleLabel_

◆ openFile()

void edm::PoolOutputModule::openFile ( FileBlock const &  fb)
overrideprivatevirtual

Reimplemented from edm::core::OutputModuleCore.

Definition at line 244 of file PoolOutputModule.cc.

References beginInputFile(), isFileOpen(), and reallyOpenFile().

244  {
245  if (!isFileOpen()) {
246  reallyOpenFile();
247  beginInputFile(fb);
248  }
249  }
bool isFileOpen() const override
void beginInputFile(FileBlock const &fb)

◆ operator=()

PoolOutputModule& edm::PoolOutputModule::operator= ( PoolOutputModule const &  )
delete

◆ overrideInputFileSplitLevels()

bool edm::PoolOutputModule::overrideInputFileSplitLevels ( ) const
inline

Definition at line 58 of file PoolOutputModule.h.

References overrideInputFileSplitLevels_.

◆ physicalAndLogicalNameForNewFile()

std::pair< std::string, std::string > edm::PoolOutputModule::physicalAndLogicalNameForNewFile ( )
protectedvirtual

Reimplemented in dqmservices::JsonWritingTimeoutPoolOutputModule.

Definition at line 361 of file PoolOutputModule.cc.

References relativeConstraints::empty, Exception, fileName(), inputFileCount_, logicalFileName(), edm::errors::LogicError, hltrates_dqm_sourceclient-live_cfg::offset, outputFileCount_, AlCaHLTBitMon_QueryRunRegistry::string, and makePlotsFromDump::suffix.

Referenced by reallyOpenFile().

361  {
362  if (inputFileCount_ == 0) {
363  throw edm::Exception(errors::LogicError) << "Attempt to open output file before input file. "
364  << "Please report this to the core framework developers.\n";
365  }
366  std::string suffix(".root");
368  bool ext = (offset == fileName().size() - suffix.size());
369  if (!ext)
370  suffix.clear();
371  std::string fileBase(ext ? fileName().substr(0, offset) : fileName());
372  std::ostringstream ofilename;
373  std::ostringstream lfilename;
374  ofilename << fileBase;
375  lfilename << logicalFileName();
376  if (outputFileCount_) {
377  ofilename << std::setw(3) << std::setfill('0') << outputFileCount_;
378  if (!logicalFileName().empty()) {
379  lfilename << std::setw(3) << std::setfill('0') << outputFileCount_;
380  }
381  }
382  ofilename << suffix;
384 
385  return std::make_pair(ofilename.str(), lfilename.str());
386  }
uint16_t size_type
std::string const & logicalFileName() const
std::string const & fileName() const
Definition: memstream.h:15

◆ preActionBeforeRunEventAsync()

void edm::PoolOutputModule::preActionBeforeRunEventAsync ( WaitingTaskHolder  iTask,
ModuleCallingContext const &  iModuleCallingContext,
Principal const &  iPrincipal 
) const
overrideprivatevirtual

Reimplemented from edm::one::OutputModuleBase.

Definition at line 425 of file PoolOutputModule.cc.

References runTheMatrix::const, DropAll, dropMetaData_, and SiStripBadComponentsDQMServiceTemplate_cfg::ep.

427  {
428  if (DropAll != dropMetaData_) {
429  auto const* ep = dynamic_cast<EventPrincipal const*>(&iPrincipal);
430  if (ep) {
431  auto pr = ep->productProvenanceRetrieverPtr();
432  if (pr) {
433  pr->readProvenanceAsync(iTask, &iModuleCallingContext);
434  }
435  }
436  }
437  }

◆ reallyCloseFile()

void edm::PoolOutputModule::reallyCloseFile ( )
overrideprivatevirtual

Reimplemented from edm::core::OutputModuleCore.

Definition at line 312 of file PoolOutputModule.cc.

References branchChildren_, branchParents_, edm::BranchChildren::clear(), doExtrasAfterCloseFile(), fillDependencyGraph(), finishEndFile(), startEndFile(), writeBranchIDListRegistry(), writeEventAuxiliary(), writeFileFormatVersion(), writeFileIdentifier(), writeIndexIntoFile(), writeParameterSetRegistry(), writeParentageRegistry(), writeProcessBlockHelper(), writeProcessHistoryRegistry(), writeProductDependencies(), writeProductDescriptionRegistry(), writeStoredMergeableRunProductMetadata(), and writeThinnedAssociationsHelper().

312  {
315  branchParents_.clear();
316  startEndFile();
327  writeProductDependencies(); //branchChildren used here
330  finishEndFile();
331 
333  }
BranchChildren branchChildren_
virtual void doExtrasAfterCloseFile()
void writeStoredMergeableRunProductMetadata()
BranchParents branchParents_

◆ reallyOpenFile()

void edm::PoolOutputModule::reallyOpenFile ( )
private

Definition at line 388 of file PoolOutputModule.cc.

References names, overrideGUID_, physicalAndLogicalNameForNewFile(), processesWithSelectedMergeableRunProducts_, and rootOutputFile_.

Referenced by openFile().

388  {
390  rootOutputFile_ = std::make_unique<RootOutputFile>(this,
391  names.first,
392  names.second,
394  overrideGUID_); // propagate_const<T> has no reset() function
395  // Override the GUID of the first file only, in order to avoid two
396  // output files from one Output Module to have identical GUID.
397  overrideGUID_.clear();
398  }
virtual std::pair< std::string, std::string > physicalAndLogicalNameForNewFile()
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_
const std::string names[nVars_]
std::vector< std::string > processesWithSelectedMergeableRunProducts_

◆ respondToCloseInputFile()

void edm::PoolOutputModule::respondToCloseInputFile ( FileBlock const &  fb)
overrideprivate

Definition at line 283 of file PoolOutputModule.cc.

References rootOutputFile_.

283  {
284  if (rootOutputFile_)
285  rootOutputFile_->respondToCloseInputFile(fb);
286  }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ respondToOpenInputFile()

void edm::PoolOutputModule::respondToOpenInputFile ( FileBlock const &  fb)
overrideprivate

Definition at line 251 of file PoolOutputModule.cc.

References beginInputFile(), fillSelectedItemList(), mps_fire::i, edm::InEvent, initializedFromInput_, edm::InLumi, edm::InProcess, inputFileCount_, dqmdumpme::k, edm::FileBlock::lumiTree(), edm::numberOfRunLumiEventProductTrees, edm::NumBranchTypes, edm::core::OutputModuleCore::outputProcessBlockHelper(), edm::FileBlock::processBlockTree(), edm::OutputProcessBlockHelper::processesWithProcessBlockProducts(), edm::core::OutputModuleCore::processName(), edm::FileBlock::runTree(), selectedOutputItemList_, AlCaHLTBitMon_QueryRunRegistry::string, and edm::FileBlock::tree().

251  {
252  if (!initializedFromInput_) {
253  std::vector<std::string> const& processesWithProcessBlockProducts =
255  unsigned int numberOfProcessesWithProcessBlockProducts = processesWithProcessBlockProducts.size();
256  unsigned int numberOfTTrees = numberOfRunLumiEventProductTrees + numberOfProcessesWithProcessBlockProducts;
257  selectedOutputItemList_.resize(numberOfTTrees);
258 
259  for (unsigned int i = InEvent; i < NumBranchTypes; ++i) {
260  BranchType branchType = static_cast<BranchType>(i);
261  if (branchType != InProcess) {
263  TTree* theInputTree =
264  (branchType == InEvent ? fb.tree() : (branchType == InLumi ? fb.lumiTree() : fb.runTree()));
265  OutputItemList& outputItemList = selectedOutputItemList_[branchType];
266  fillSelectedItemList(branchType, processName, theInputTree, outputItemList);
267  } else {
268  // Handle output items in ProcessBlocks
269  for (unsigned int k = InProcess; k < numberOfTTrees; ++k) {
270  OutputItemList& outputItemList = selectedOutputItemList_[k];
271  std::string const& processName = processesWithProcessBlockProducts[k - InProcess];
272  TTree* theInputTree = fb.processBlockTree(processName);
273  fillSelectedItemList(branchType, processName, theInputTree, outputItemList);
274  }
275  }
276  }
277  initializedFromInput_ = true;
278  }
279  ++inputFileCount_;
280  beginInputFile(fb);
281  }
OutputProcessBlockHelper const & outputProcessBlockHelper() const
constexpr unsigned int numberOfRunLumiEventProductTrees
Definition: BranchType.h:15
std::vector< std::string > const & processesWithProcessBlockProducts() const
BranchType
Definition: BranchType.h:11
std::vector< OutputItemList > selectedOutputItemList_
std::string const & processName() const
void beginInputFile(FileBlock const &fb)
std::vector< OutputItem > OutputItemList
void fillSelectedItemList(BranchType branchtype, std::string const &processName, TTree *theInputTree, OutputItemList &)

◆ selectedOutputItemList() [1/2]

std::vector<OutputItemList> const& edm::PoolOutputModule::selectedOutputItemList ( ) const
inline

Definition at line 130 of file PoolOutputModule.h.

References selectedOutputItemList_.

Referenced by edm::RootOutputFile::RootOutputFile().

130 { return selectedOutputItemList_; }
std::vector< OutputItemList > selectedOutputItemList_

◆ selectedOutputItemList() [2/2]

std::vector<OutputItemList>& edm::PoolOutputModule::selectedOutputItemList ( )
inline

Definition at line 132 of file PoolOutputModule.h.

References selectedOutputItemList_.

132 { return selectedOutputItemList_; }
std::vector< OutputItemList > selectedOutputItemList_

◆ setProcessesWithSelectedMergeableRunProducts()

void edm::PoolOutputModule::setProcessesWithSelectedMergeableRunProducts ( std::set< std::string > const &  processes)
overrideprivatevirtual

Reimplemented from edm::core::OutputModuleCore.

Definition at line 288 of file PoolOutputModule.cc.

References dqmiodatasetharvest::processes, and processesWithSelectedMergeableRunProducts_.

288  {
290  }
std::vector< std::string > processesWithSelectedMergeableRunProducts_

◆ shouldWeCloseFile()

bool edm::PoolOutputModule::shouldWeCloseFile ( ) const
overrideprotectedvirtual

allow inheriting classes to override but still be able to call this method in the overridden version

Reimplemented from edm::core::OutputModuleCore.

Reimplemented in edm::TimeoutPoolOutputModule.

Definition at line 359 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by edm::TimeoutPoolOutputModule::shouldWeCloseFile().

359 { return rootOutputFile_->shouldWeCloseFile(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ splitLevel()

int edm::PoolOutputModule::splitLevel ( ) const
inline

Definition at line 55 of file PoolOutputModule.h.

References splitLevel_.

55 { return splitLevel_; }

◆ startEndFile()

void edm::PoolOutputModule::startEndFile ( )
private

Definition at line 336 of file PoolOutputModule.cc.

Referenced by reallyCloseFile().

336 {}

◆ treeMaxVirtualSize()

int edm::PoolOutputModule::treeMaxVirtualSize ( ) const
inline

Definition at line 57 of file PoolOutputModule.h.

References treeMaxVirtualSize_.

57 { return treeMaxVirtualSize_; }

◆ updateBranchParents()

void edm::PoolOutputModule::updateBranchParents ( EventForOutput const &  e)
private

Definition at line 412 of file PoolOutputModule.cc.

References MillePedeFileConverter_cfg::e, producedBranches_, edm::one::OutputModuleBase::subProcessParentageHelper(), and updateBranchParentsForOneBranch().

Referenced by write().

412  {
413  ProductProvenanceRetriever const* provRetriever = e.productProvenanceRetrieverPtr();
414  for (auto const& bid : producedBranches_) {
415  updateBranchParentsForOneBranch(provRetriever, bid);
416  }
417  SubProcessParentageHelper const* helper = subProcessParentageHelper();
418  if (helper) {
419  for (auto const& bid : subProcessParentageHelper()->producedProducts()) {
420  updateBranchParentsForOneBranch(provRetriever, bid);
421  }
422  }
423  }
Definition: helper.py:1
void updateBranchParentsForOneBranch(ProductProvenanceRetriever const *provRetriever, BranchID const &branchID)
std::vector< BranchID > producedBranches_
SubProcessParentageHelper const * subProcessParentageHelper() const

◆ updateBranchParentsForOneBranch()

void edm::PoolOutputModule::updateBranchParentsForOneBranch ( ProductProvenanceRetriever const *  provRetriever,
BranchID const &  branchID 
)
private

Definition at line 400 of file PoolOutputModule.cc.

References edm::PoolOutputModule::OutputItem::branchID(), edm::ProductProvenanceLookup::branchIDToProvenanceForProducedOnly(), branchParents_, and edm::ProductProvenance::parentageID().

Referenced by updateBranchParents().

401  {
402  ProductProvenance const* provenance = provRetriever->branchIDToProvenanceForProducedOnly(branchID);
403  if (provenance != nullptr) {
404  BranchParents::iterator it = branchParents_.find(branchID);
405  if (it == branchParents_.end()) {
406  it = branchParents_.insert(std::make_pair(branchID, std::set<ParentageID>())).first;
407  }
408  it->second.insert(provenance->parentageID());
409  }
410  }
BranchParents branchParents_

◆ whyNotFastClonable()

int edm::PoolOutputModule::whyNotFastClonable ( ) const
inline

Definition at line 66 of file PoolOutputModule.h.

References whyNotFastClonable_.

◆ write()

void edm::PoolOutputModule::write ( EventForOutput const &  e)
overrideprotectedvirtual

Implements edm::core::OutputModuleCore.

Reimplemented in edm::TimeoutPoolOutputModule.

Definition at line 294 of file PoolOutputModule.cc.

References MillePedeFileConverter_cfg::e, rootOutputFile_, statusFileName_, and updateBranchParents().

Referenced by edm::TimeoutPoolOutputModule::write().

294  {
296  rootOutputFile_->writeOne(e);
297  if (!statusFileName_.empty()) {
298  std::ofstream statusFile(statusFileName_.c_str());
299  statusFile << e.id() << " time: " << std::setprecision(3) << TimeOfDay() << '\n';
300  statusFile.close();
301  }
302  }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_
void updateBranchParents(EventForOutput const &e)

◆ writeBranchIDListRegistry()

void edm::PoolOutputModule::writeBranchIDListRegistry ( )
private

Definition at line 348 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

348 { rootOutputFile_->writeBranchIDListRegistry(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeEventAuxiliary()

void edm::PoolOutputModule::writeEventAuxiliary ( )
private

Definition at line 351 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

351 { rootOutputFile_->writeEventAuxiliary(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeFileFormatVersion()

void edm::PoolOutputModule::writeFileFormatVersion ( )
private

Definition at line 338 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

338 { rootOutputFile_->writeFileFormatVersion(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeFileIdentifier()

void edm::PoolOutputModule::writeFileIdentifier ( )
private

Definition at line 339 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

339 { rootOutputFile_->writeFileIdentifier(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeIndexIntoFile()

void edm::PoolOutputModule::writeIndexIntoFile ( )
private

Definition at line 340 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

340 { rootOutputFile_->writeIndexIntoFile(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeLuminosityBlock()

void edm::PoolOutputModule::writeLuminosityBlock ( LuminosityBlockForOutput const &  lb)
overrideprivatevirtual

Implements edm::core::OutputModuleCore.

Definition at line 304 of file PoolOutputModule.cc.

References rootOutputFile_.

304  {
305  rootOutputFile_->writeLuminosityBlock(lb);
306  }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeParameterSetRegistry()

void edm::PoolOutputModule::writeParameterSetRegistry ( )
private

Definition at line 345 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

345 { rootOutputFile_->writeParameterSetRegistry(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeParentageRegistry()

void edm::PoolOutputModule::writeParentageRegistry ( )
private

Definition at line 347 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

347 { rootOutputFile_->writeParentageRegistry(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeProcessBlock()

void edm::PoolOutputModule::writeProcessBlock ( ProcessBlockForOutput const &  pb)
overrideprivatevirtual

Reimplemented from edm::core::OutputModuleCore.

Definition at line 310 of file PoolOutputModule.cc.

References rootOutputFile_.

310 { rootOutputFile_->writeProcessBlock(pb); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeProcessBlockHelper()

void edm::PoolOutputModule::writeProcessBlockHelper ( )
private

Definition at line 352 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

352 { rootOutputFile_->writeProcessBlockHelper(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeProcessHistoryRegistry()

void edm::PoolOutputModule::writeProcessHistoryRegistry ( )
private

Definition at line 344 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

344 { rootOutputFile_->writeProcessHistoryRegistry(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeProductDependencies()

void edm::PoolOutputModule::writeProductDependencies ( )
private

Definition at line 350 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

350 { rootOutputFile_->writeProductDependencies(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeProductDescriptionRegistry()

void edm::PoolOutputModule::writeProductDescriptionRegistry ( )
private

Definition at line 346 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

346 { rootOutputFile_->writeProductDescriptionRegistry(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeRun()

void edm::PoolOutputModule::writeRun ( RunForOutput const &  r)
overrideprivatevirtual

Implements edm::core::OutputModuleCore.

Definition at line 308 of file PoolOutputModule.cc.

References alignCSCRings::r, and rootOutputFile_.

308 { rootOutputFile_->writeRun(r); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeStoredMergeableRunProductMetadata()

void edm::PoolOutputModule::writeStoredMergeableRunProductMetadata ( )
private

Definition at line 341 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

341  {
342  rootOutputFile_->writeStoredMergeableRunProductMetadata();
343  }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

◆ writeThinnedAssociationsHelper()

void edm::PoolOutputModule::writeThinnedAssociationsHelper ( )
private

Definition at line 349 of file PoolOutputModule.cc.

References rootOutputFile_.

Referenced by reallyCloseFile().

349 { rootOutputFile_->writeThinnedAssociationsHelper(); }
edm::propagate_const< std::unique_ptr< RootOutputFile > > rootOutputFile_

Member Data Documentation

◆ auxItems_

AuxItemArray edm::PoolOutputModule::auxItems_
private

Definition at line 190 of file PoolOutputModule.h.

Referenced by auxItems(), and fillSelectedItemList().

◆ basketOrder_

std::string edm::PoolOutputModule::basketOrder_
private

Definition at line 203 of file PoolOutputModule.h.

Referenced by basketOrder().

◆ basketSize_

int const edm::PoolOutputModule::basketSize_
private

Definition at line 199 of file PoolOutputModule.h.

Referenced by basketSize().

◆ branchChildren_

BranchChildren edm::PoolOutputModule::branchChildren_
private

◆ branchParents_

BranchParents edm::PoolOutputModule::branchParents_
private

◆ catalog_

std::string const edm::PoolOutputModule::catalog_
private

Definition at line 195 of file PoolOutputModule.h.

Referenced by catalog().

◆ compactEventAuxiliary_

bool edm::PoolOutputModule::compactEventAuxiliary_
private

Definition at line 215 of file PoolOutputModule.h.

Referenced by compactEventAuxiliary().

◆ compressionAlgorithm_

std::string const edm::PoolOutputModule::compressionAlgorithm_
private

Definition at line 198 of file PoolOutputModule.h.

Referenced by compressionAlgorithm().

◆ compressionLevel_

int const edm::PoolOutputModule::compressionLevel_
private

Definition at line 197 of file PoolOutputModule.h.

Referenced by compressionLevel().

◆ dropMetaData_

DropMetaData edm::PoolOutputModule::dropMetaData_
private

◆ eventAutoFlushSize_

int const edm::PoolOutputModule::eventAutoFlushSize_
private

Definition at line 201 of file PoolOutputModule.h.

Referenced by eventAutoFlushSize().

◆ eventAuxBasketSize_

int const edm::PoolOutputModule::eventAuxBasketSize_
private

Definition at line 200 of file PoolOutputModule.h.

Referenced by eventAuxiliaryBasketSize(), and fillSelectedItemList().

◆ fileName_

std::string const edm::PoolOutputModule::fileName_
private

Definition at line 193 of file PoolOutputModule.h.

Referenced by fileName().

◆ initializedFromInput_

bool edm::PoolOutputModule::initializedFromInput_
private

Definition at line 208 of file PoolOutputModule.h.

Referenced by respondToOpenInputFile().

◆ inputFileCount_

int edm::PoolOutputModule::inputFileCount_
private

◆ logicalFileName_

std::string const edm::PoolOutputModule::logicalFileName_
private

Definition at line 194 of file PoolOutputModule.h.

Referenced by logicalFileName().

◆ maxFileSize_

unsigned int const edm::PoolOutputModule::maxFileSize_
private

Definition at line 196 of file PoolOutputModule.h.

Referenced by maxFileSize().

◆ mergeJob_

bool edm::PoolOutputModule::mergeJob_
private

Definition at line 216 of file PoolOutputModule.h.

Referenced by mergeJob().

◆ moduleLabel_

std::string const edm::PoolOutputModule::moduleLabel_
private

◆ outputFileCount_

int edm::PoolOutputModule::outputFileCount_
private

Definition at line 209 of file PoolOutputModule.h.

Referenced by physicalAndLogicalNameForNewFile().

◆ overrideGUID_

std::string edm::PoolOutputModule::overrideGUID_
private

Definition at line 219 of file PoolOutputModule.h.

Referenced by reallyOpenFile().

◆ overrideInputFileSplitLevels_

bool edm::PoolOutputModule::overrideInputFileSplitLevels_
private

Definition at line 214 of file PoolOutputModule.h.

Referenced by fillSelectedItemList(), and overrideInputFileSplitLevels().

◆ processesWithSelectedMergeableRunProducts_

std::vector<std::string> edm::PoolOutputModule::processesWithSelectedMergeableRunProducts_
private

◆ producedBranches_

std::vector<BranchID> edm::PoolOutputModule::producedBranches_
private

Definition at line 213 of file PoolOutputModule.h.

Referenced by beginJob(), and updateBranchParents().

◆ rootOutputFile_

edm::propagate_const<std::unique_ptr<RootOutputFile> > edm::PoolOutputModule::rootOutputFile_
private

◆ rootServiceChecker_

RootServiceChecker edm::PoolOutputModule::rootServiceChecker_
private

Definition at line 189 of file PoolOutputModule.h.

◆ selectedOutputItemList_

std::vector<OutputItemList> edm::PoolOutputModule::selectedOutputItemList_
private

Definition at line 191 of file PoolOutputModule.h.

Referenced by respondToOpenInputFile(), and selectedOutputItemList().

◆ specialSplitLevelForBranches_

std::vector<SpecialSplitLevelForBranch> edm::PoolOutputModule::specialSplitLevelForBranches_
private

Definition at line 192 of file PoolOutputModule.h.

Referenced by fillSelectedItemList(), and PoolOutputModule().

◆ splitLevel_

int const edm::PoolOutputModule::splitLevel_
private

Definition at line 202 of file PoolOutputModule.h.

Referenced by splitLevel().

◆ statusFileName_

std::string edm::PoolOutputModule::statusFileName_
private

Definition at line 218 of file PoolOutputModule.h.

Referenced by PoolOutputModule(), and write().

◆ treeMaxVirtualSize_

int const edm::PoolOutputModule::treeMaxVirtualSize_
private

Definition at line 204 of file PoolOutputModule.h.

Referenced by treeMaxVirtualSize().

◆ whyNotFastClonable_

int edm::PoolOutputModule::whyNotFastClonable_
private

Definition at line 205 of file PoolOutputModule.h.

Referenced by PoolOutputModule(), and whyNotFastClonable().