|
| NanoAODOutputModule (edm::ParameterSet const &pset) |
|
| ~NanoAODOutputModule () override |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
const OutputModule & | operator= (const OutputModule &)=delete |
|
| OutputModule (edm::ParameterSet const &iPSet) |
|
| OutputModule (const OutputModule &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const noexcept final |
|
bool | wantsGlobalRuns () const noexcept final |
|
bool | wantsInputProcessBlocks () const noexcept final |
|
bool | wantsProcessBlocks () const noexcept final |
|
OutputModuleBase & | operator= (OutputModuleBase const &)=delete |
|
| OutputModuleBase (ParameterSet const &pset) |
|
| OutputModuleBase (OutputModuleBase const &)=delete |
|
SharedResourcesAcquirer & | sharedResourcesAcquirer () |
|
SubProcessParentageHelper const * | subProcessParentageHelper () const |
|
bool | wantsStreamLuminosityBlocks () const noexcept |
|
bool | wantsStreamRuns () const noexcept |
|
BranchIDLists const * | branchIDLists () const |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
std::array< bool, NumBranchTypes > const & | hasNewlyDroppedBranch () const |
|
SelectedProductsForBranchType const & | keptProducts () const |
|
int | maxEvents () const |
|
const ModuleDescription & | moduleDescription () const |
|
OutputModuleCore & | operator= (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 |
|
std::vector< ConsumesInfo > | consumesInfo () 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 |
|
ESResolverIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESResolverIndex > 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 |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
bool | registeredToConsume (ProductResolverIndex, bool, 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::ESRecordsToProductResolverIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef OutputModuleBase | ModuleType |
|
typedef OutputModuleCore | ModuleType |
|
typedef ProductLabels | Labels |
|
void | configure (OutputModuleDescription const &desc) |
|
void | doBeginJob () |
|
bool | doEvent (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *) |
|
void | doPreallocate (PreallocationConfiguration const &) |
|
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) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (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 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) |
|
std::atomic< int > | remainingEvents_ |
|
Definition at line 51 of file NanoAODOutputModule.cc.
Reimplemented from edm::core::OutputModuleCore.
Definition at line 287 of file NanoAODOutputModule.cc.
References NanoAODOutputModule::CommonEventBranches::branch(), NanoAODOutputModule::CommonLumiBranches::branch(), NanoAODOutputModule::CommonRunBranches::branch(), edm::createGlobalIdentifier(), edm::core::OutputModuleCore::description(), cms::Digest::digest(), Exception, edm::InEvent, edm::InLumi, edm::InRun, runTheMatrix::keep, edm::core::OutputModuleCore::keptProducts(), m_commonBranches, m_commonLumiBranches, m_commonRunBranches, m_compressionAlgorithm, m_compressionLevel, m_evstrings, m_fakeName, m_file, m_fileName, m_jrToken, m_logicalFileName, m_lumiTables, m_lumiTables2, m_lumiTree, m_metaDataTree, m_nanoMetadata, m_parameterSetsTree, m_runFlatTables, m_runTables, m_runTree, m_tables, m_tree, m_triggers, m_triggers_areSorted, m_writeProvenance, edm::poolNames::metaDataTreeName(), HerwigMaxPtPartonFilter_cfi::moduleLabel, edm::poolNames::parameterSetsTreeName(), AlCaHLTBitMon_QueryRunRegistry::string, and cms::MD5Result::toString().
294 m_fakeName ?
"PoolOutputModule" :
"NanoAODOutputModule",
299 std::vector<std::string>());
302 m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kZLIB);
304 m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kLZMA);
306 m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kZSTD);
308 m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kLZ4);
311 <<
"NanoAODOutputModule configured with unknown compression algorithm '" <<
m_compressionAlgorithm <<
"'\n" 312 <<
"Allowed compression algorithms are ZLIB, LZMA, ZSTD, and LZ4\n";
325 if (
keep.first->className() ==
"nanoaod::FlatTable")
327 else if (
keep.first->className() ==
"edm::TriggerResults") {
329 }
else if (
keep.first->className() ==
"std::basic_string<char,std::char_traits<char> >" &&
330 keep.first->productInstanceName() ==
"genModel") {
333 throw cms::Exception(
"Configuration",
"NanoAODOutputModule cannot handle class " +
keep.first->className());
337 if (
keep.first->className() ==
"nanoaod::MergeableCounterTable")
339 else if (
keep.first->className() ==
"nanoaod::UniqueString" &&
keep.first->moduleLabel() ==
"nanoMetadata")
341 else if (
keep.first->className() ==
"nanoaod::FlatTable")
346 "NanoAODOutputModule cannot handle class " +
keep.first->className() +
" in LuminosityBlock branch");
350 if (
keep.first->className() ==
"nanoaod::MergeableCounterTable")
352 else if (
keep.first->className() ==
"nanoaod::UniqueString" &&
keep.first->moduleLabel() ==
"nanoMetadata")
354 else if (
keep.first->className() ==
"nanoaod::FlatTable")
358 "NanoAODOutputModule cannot handle class " +
keep.first->className() +
" in Run branch");
362 m_tree = std::make_unique<TTree>(
"Events",
"Events");
367 m_lumiTree = std::make_unique<TTree>(
"LuminosityBlocks",
"LuminosityBlocks");
371 m_runTree = std::make_unique<TTree>(
"Runs",
"Runs");
std::unique_ptr< TTree > m_runTree
std::vector< TableOutputBranches > m_runFlatTables
std::string const & metaDataTreeName()
std::unique_ptr< TTree > m_lumiTree
std::vector< SummaryTableOutputBranches > m_lumiTables
std::unique_ptr< TTree > m_tree
ModuleDescription const & description() const
std::unique_ptr< TTree > m_parameterSetsTree
class NanoAODOutputModule::CommonLumiBranches m_commonLumiBranches
std::unique_ptr< TTree > m_metaDataTree
std::unique_ptr< TFile > m_file
std::vector< EventStringOutputBranches > m_evstrings
std::vector< SummaryTableOutputBranches > m_runTables
std::string const & parameterSetsTreeName()
std::vector< TableOutputBranches > m_tables
std::vector< TriggerOutputBranches > m_triggers
std::vector< std::pair< std::string, edm::EDGetToken > > m_nanoMetadata
bool m_triggers_areSorted
std::vector< LumiOutputBranches > m_lumiTables2
std::string createGlobalIdentifier(bool binary=false)
std::string m_logicalFileName
SelectedProductsForBranchType const & keptProducts() const
class NanoAODOutputModule::CommonRunBranches m_commonRunBranches
edm::JobReport::Token m_jrToken
class NanoAODOutputModule::CommonEventBranches m_commonBranches
std::string toString() const
std::string m_compressionAlgorithm
Implements edm::core::OutputModuleCore.
Definition at line 169 of file NanoAODOutputModule.cc.
References a, b, events, edm::JobReport::eventWrittenToFile(), NanoAODOutputModule::CommonEventBranches::fill(), spr::find(), iEvent, m_autoFlush, m_commonBranches, m_eventsSinceFlush, m_evstrings, m_firstFlush, m_jrToken, m_processHistoryRegistry, m_tables, m_tree, m_triggers, m_triggers_areSorted, AlCaHLTBitMon_ParallelJobs::p, edm::ProcessHistoryRegistry::registerProcessHistory(), jetUpdater_cfi::sort, and submitPVValidationJobs::t.
183 maxMemory =
static_cast<float>(
m_tree->GetTotBytes()) / percentClusterDone;
184 }
else if (
m_tree->GetZipBytes() == 0) {
185 maxMemory = 100 * 1024 * 1024;
188 float cxnRatio =
m_tree->GetTotBytes() /
static_cast<float>(
m_tree->GetZipBytes());
190 float percentBytesDone = -
m_tree->GetZipBytes() /
static_cast<float>(
m_autoFlush);
198 m_tree->OptimizeBaskets(static_cast<uint32_t>(maxMemory), 1,
"");
209 for (
unsigned int extensions = 0; extensions <= 1; ++extensions) {
214 std::vector<std::string> pnames;
215 for (
auto&
p :
iEvent.processHistory())
216 pnames.push_back(
p.processName());
218 return ((
std::find(pnames.begin(), pnames.end(),
a.processName()) - pnames.begin()) >
219 (
std::find(pnames.begin(), pnames.end(),
b.processName()) - pnames.begin()));
229 tbb::this_task_arena::isolate([&] {
m_tree->Fill(); });
std::unique_ptr< TTree > m_tree
bool registerProcessHistory(ProcessHistory const &processHistory)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< EventStringOutputBranches > m_evstrings
std::vector< TableOutputBranches > m_tables
static constexpr int m_firstFlush
std::vector< TriggerOutputBranches > m_triggers
bool m_triggers_areSorted
void eventWrittenToFile(Token fileToken, RunNumber_t run, EventNumber_t event)
void fill(const edm::EventAuxiliary &aux)
edm::JobReport::Token m_jrToken
class NanoAODOutputModule::CommonEventBranches m_commonBranches
edm::ProcessHistoryRegistry m_processHistoryRegistry