LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "RootOutputFile.h"
Classes | |
struct | OutputItem |
Public Types | |
enum | ClosureRequestMode { ClosureRequestMode::MaxEvents, ClosureRequestMode::MaxSize, ClosureRequestMode::Unset } |
using | RootOutputTreePtrArray = std::array< std::unique_ptr< RootOutputTree >, NumBranchTypes > |
using | OutputItemList = std::set< OutputItem > |
using | OutputItemListArray = std::array< OutputItemList, NumBranchTypes > |
Public Member Functions | |
RootOutputFile (OutputModule *, std::string const &fileName, ClosingCriteria const &fileSwitchCriteria, int const compressionLevel, int64_t const saveMemoryObjectThreshold, int64_t const treeMaxVirtualSize, int const splitLevel, int const basketSize, DropMetaData dropMetaData, bool dropMetaDataForDroppedData, bool fastCloningRequested) | |
void | writeTTrees () |
void | writeOne (EventPrincipal const &) |
void | writeSubRun (SubRunPrincipal const &) |
void | writeRun (RunPrincipal const &) |
void | writeFileFormatVersion () |
void | writeFileIndex () |
void | writeEventHistory () |
void | writeProcessConfigurationRegistry () |
void | writeProcessHistoryRegistry () |
void | writeParameterSetRegistry () |
void | writeProductDescriptionRegistry () |
void | writeParentageRegistry () |
void | writeProductDependencies () |
void | writeFileCatalogMetadata (FileStatsCollector const &stats, FileCatalogMetadata::collection_type const &, FileCatalogMetadata::collection_type const &) |
void | writeResults (ResultsPrincipal &resp) |
void | setRunAuxiliaryRangeSetID (RangeSet const &) |
void | setSubRunAuxiliaryRangeSetID (RangeSet const &) |
void | beginInputFile (RootFileBlock const *, bool fastClone) |
void | incrementInputFileNumber () |
void | respondToCloseInputFile (FileBlock const &) |
bool | requestsToCloseFile () |
void | setFileStatus (OutputFileStatus const ofs) |
void | selectProducts () |
std::string const & | currentFileName () const |
bool | maxEventsPerFileReached (FileIndex::EntryNumber_t const maxEventsPerFile) const |
bool | maxSizeReached (unsigned const maxFileSize) const |
template<BranchType BT> | |
std::enable_if_t<!RangeSetsSupported< BT >::value, art::EDProduct const * > | getProduct (art::OutputHandle const &oh, art::RangeSet const &, std::string const &wrappedName) |
template<BranchType BT> | |
std::enable_if_t< RangeSetsSupported< BT >::value, art::EDProduct const * > | getProduct (art::OutputHandle const &oh, art::RangeSet const &prunedProductRS, std::string const &wrappedName) |
Private Member Functions | |
void | createDatabaseTables () |
template<BranchType > | |
void | fillBranches (Principal const &, std::vector< ProductProvenance > *) |
template<BranchType BT> | |
std::enable_if_t<!detail::RangeSetsSupported< BT >::value, art::EDProduct const * > | getProduct (OutputHandle const &, RangeSet const &productRS, std::string const &wrappedName) |
template<BranchType BT> | |
std::enable_if_t< detail::RangeSetsSupported< BT >::value, art::EDProduct const * > | getProduct (OutputHandle const &, RangeSet const &productRS, std::string const &wrappedName) |
Definition at line 50 of file RootOutputFile.h.
using art::RootOutputFile::OutputItemList = std::set<OutputItem> |
Definition at line 76 of file RootOutputFile.h.
using art::RootOutputFile::OutputItemListArray = std::array<OutputItemList, NumBranchTypes> |
Definition at line 77 of file RootOutputFile.h.
using art::RootOutputFile::RootOutputTreePtrArray = std::array<std::unique_ptr<RootOutputTree>, NumBranchTypes> |
Definition at line 54 of file RootOutputFile.h.
|
strong |
Enumerator | |
---|---|
MaxEvents | |
MaxSize | |
Unset |
Definition at line 52 of file RootOutputFile.h.
|
explicit |
Definition at line 312 of file RootOutputFile.cc.
References basketSize_, compressionLevel_, createDatabaseTables(), dropMetaData_, dropMetaDataForDroppedData_, art::rootNames::eventHistoryBranchName(), eventHistoryTree_, art::rootNames::eventHistoryTreeName(), fastCloningEnabledAtConstruction_, art::errors::FatalRootError, file_, fileIndexTree_, art::rootNames::fileIndexTreeName(), filePtr_, fileSwitchCriteria_, art::ServiceHandle< T, SCOPE >::get(), art::InEvent, art::InResults, art::InRun, art::InSubRun, art::RootOutputTree::makeTTree(), metaDataTree_, art::rootNames::metaDataTreeName(), art::Open, parentageTree_, art::rootNames::parentageTreeName(), pEventAux_, pEventProductProvenanceVector_, pHistory_, pResultsAux_, pResultsProductProvenanceVector_, pRunAux_, pRunProductProvenanceVector_, pSubRunAux_, pSubRunProductProvenanceVector_, rootFileDB_, saveMemoryObjectThreshold_, splitLevel_, treeMaxVirtualSize_, and treePointers_.
void art::RootOutputFile::beginInputFile | ( | RootFileBlock const * | rfb, |
bool | fastClone | ||
) |
Definition at line 477 of file RootOutputFile.cc.
References fastCloningEnabledAtConstruction_, art::InEvent, selectProducts(), art::detail::shouldFastClone(), treePointers_, and wasFastCloned_.
|
private |
Definition at line 415 of file RootOutputFile.cc.
References rootFileDB_.
Referenced by currentFileName(), and RootOutputFile().
|
inline |
Definition at line 125 of file RootOutputFile.h.
References createDatabaseTables(), file_, fillBranches(), getProduct(), maxEventsPerFileReached(), maxSizeReached(), and fhicl::detail::atom::value().
|
private |
Definition at line 833 of file RootOutputFile.cc.
References branchesWithStoredHistory_, dropMetaData_, dropMetaDataForDroppedData_, art::DropMetaData::DropNone, art::productstatus::dropped(), art::DropMetaData::DropPrior, art::Principal::getForOutput(), art::InEvent, art::RangeSet::is_valid(), art::productstatus::neverCreated(), art::OutputHandle::productProvenance(), rootFileDB_, art::Principal::seenRanges(), selectedOutputItemList_, treePointers_, art::productstatus::unknown(), fhicl::detail::atom::value(), and wasFastCloned_.
Referenced by currentFileName().
|
private |
Referenced by currentFileName().
|
private |
std::enable_if_t<!RangeSetsSupported<BT>::value, art::EDProduct const*> art::RootOutputFile::getProduct | ( | art::OutputHandle const & | oh, |
art::RangeSet const & | , | ||
std::string const & | wrappedName | ||
) |
Definition at line 915 of file RootOutputFile.cc.
References dummyProductCache_, art::OutputHandle::isValid(), art::detail::DummyProductCache::product(), fhicl::detail::atom::value(), and art::OutputHandle::wrapper().
std::enable_if_t<RangeSetsSupported<BT>::value, art::EDProduct const*> art::RootOutputFile::getProduct | ( | art::OutputHandle const & | oh, |
art::RangeSet const & | prunedProductRS, | ||
std::string const & | wrappedName | ||
) |
Definition at line 924 of file RootOutputFile.cc.
References dummyProductCache_, art::RangeSet::is_valid(), art::OutputHandle::isValid(), art::detail::DummyProductCache::product(), and art::OutputHandle::wrapper().
void art::RootOutputFile::incrementInputFileNumber | ( | ) |
Definition at line 518 of file RootOutputFile.cc.
References fp_, art::Granularity::InputFile, and art::FileProperties::update().
bool art::RootOutputFile::maxEventsPerFileReached | ( | FileIndex::EntryNumber_t const | maxEventsPerFile | ) | const |
Referenced by currentFileName().
bool art::RootOutputFile::maxSizeReached | ( | unsigned const | maxFileSize | ) | const |
Referenced by currentFileName().
bool art::RootOutputFile::requestsToCloseFile | ( | ) |
Definition at line 530 of file RootOutputFile.cc.
References beginTime_, filePtr_, fileSwitchCriteria_, fp_, art::ClosingCriteria::should_close(), art::FileProperties::updateAge(), and art::FileProperties::updateSize().
void art::RootOutputFile::respondToCloseInputFile | ( | FileBlock const & | ) |
Definition at line 524 of file RootOutputFile.cc.
References treePointers_.
void art::RootOutputFile::selectProducts | ( | ) |
Definition at line 446 of file RootOutputFile.cc.
References art::checkDictionaries(), art::InEvent, art::InResults, art::OutputModule::keptProducts(), art::NumBranchTypes, om_, selectedOutputItemList_, and treePointers_.
Referenced by beginInputFile(), and setFileStatus().
|
inline |
void art::RootOutputFile::setRunAuxiliaryRangeSetID | ( | RangeSet const & | ranges | ) |
Definition at line 905 of file RootOutputFile.cc.
References art::InRun, rootFileDB_, art::RangeSet::run(), runRSID_, and fhicl::detail::atom::value().
void art::RootOutputFile::setSubRunAuxiliaryRangeSetID | ( | RangeSet const & | ranges | ) |
Definition at line 896 of file RootOutputFile.cc.
References art::InSubRun, rootFileDB_, art::RangeSet::run(), and subRunRSID_.
void art::RootOutputFile::writeEventHistory | ( | ) |
Definition at line 658 of file RootOutputFile.cc.
References eventHistoryTree_, and art::RootOutputTree::writeTTree().
void art::RootOutputFile::writeFileCatalogMetadata | ( | FileStatsCollector const & | stats, |
FileCatalogMetadata::collection_type const & | md, | ||
FileCatalogMetadata::collection_type const & | ssmd | ||
) |
Definition at line 690 of file RootOutputFile.cc.
References art::FileStatsCollector::eventsThisFile(), art::getFileFormatEra(), art::getFileFormatVersion(), art::FileStatsCollector::highestEventID(), art::FileStatsCollector::lowestEventID(), art::FileStatsCollector::outputFileOpenTime(), art::FileStatsCollector::parents(), rootFileDB_, art::FileStatsCollector::seenSubRuns(), and art::to_string().
void art::RootOutputFile::writeFileFormatVersion | ( | ) |
Definition at line 629 of file RootOutputFile.cc.
References basketSize_, art::getFileFormatEra(), art::getFileFormatVersion(), and metaDataTree_.
void art::RootOutputFile::writeFileIndex | ( | ) |
Definition at line 641 of file RootOutputFile.cc.
References basketSize_, fileIndex_, fileIndexTree_, and art::FileIndex::sortBy_Run_SubRun_Event().
void art::RootOutputFile::writeOne | ( | EventPrincipal const & | e | ) |
Definition at line 540 of file RootOutputFile.cc.
References art::FileIndex::addEntry(), art::History::addEventSelectionEntry(), art::EventPrincipal::aux(), dataTypeReported_, e, art::Granularity::Event, art::FileProperties::eventEntryNumber(), eventHistoryTree_, art::errors::FatalRootError, fileIndex_, fp_, art::EventAuxiliary::id(), art::EventAuxiliary::isRealData(), om_, pEventAux_, pEventProductProvenanceVector_, pHistory_, art::EventObserverBase::selectorConfig(), status_, and art::FileProperties::update().
void art::RootOutputFile::writeParameterSetRegistry | ( | ) |
Definition at line 772 of file RootOutputFile.cc.
References fhicl::ParameterSetRegistry::exportTo(), and rootFileDB_.
void art::RootOutputFile::writeParentageRegistry | ( | ) |
Definition at line 597 of file RootOutputFile.cc.
References basketSize_, art::errors::FatalRootError, art::thread_safe_registry_via_id< K, M >::get(), art::rootNames::parentageBranchName(), art::rootNames::parentageIDBranchName(), and parentageTree_.
void art::RootOutputFile::writeProcessConfigurationRegistry | ( | ) |
Definition at line 664 of file RootOutputFile.cc.
void art::RootOutputFile::writeProcessHistoryRegistry | ( | ) |
Definition at line 671 of file RootOutputFile.cc.
References basketSize_, art::thread_safe_registry_via_id< K, M >::get(), art::errors::LogicError, and metaDataTree_.
void art::RootOutputFile::writeProductDependencies | ( | ) |
Definition at line 801 of file RootOutputFile.cc.
References basketSize_, art::OutputModule::branchChildren(), metaDataTree_, and om_.
void art::RootOutputFile::writeProductDescriptionRegistry | ( | ) |
Definition at line 778 of file RootOutputFile.cc.
References basketSize_, branchesWithStoredHistory_, evd::details::end(), art::ProductMetaData::instance(), metaDataTree_, and art::ProductRegistry::productList_.
void art::RootOutputFile::writeResults | ( | ResultsPrincipal & | resp | ) |
Definition at line 812 of file RootOutputFile.cc.
References art::ResultsPrincipal::aux(), pResultsAux_, and pResultsProductProvenanceVector_.
void art::RootOutputFile::writeRun | ( | RunPrincipal const & | r | ) |
Definition at line 586 of file RootOutputFile.cc.
References art::FileIndex::addEntry(), art::RunPrincipal::aux(), fileIndex_, fp_, art::RunAuxiliary::id(), art::EventID::invalidEvent(), pRunAux_, pRunProductProvenanceVector_, art::Granularity::Run, art::FileProperties::runEntryNumber(), runRSID_, art::RunAuxiliary::setRangeSetID(), status_, and art::FileProperties::update().
void art::RootOutputFile::writeSubRun | ( | SubRunPrincipal const & | sr | ) |
Definition at line 575 of file RootOutputFile.cc.
References art::FileIndex::addEntry(), art::SubRunPrincipal::aux(), fileIndex_, fp_, art::SubRunAuxiliary::id(), art::EventID::invalidEvent(), pSubRunAux_, pSubRunProductProvenanceVector_, art::SubRunAuxiliary::setRangeSetID(), status_, art::Granularity::SubRun, art::FileProperties::subRunEntryNumber(), subRunRSID_, and art::FileProperties::update().
void art::RootOutputFile::writeTTrees | ( | ) |
Definition at line 819 of file RootOutputFile.cc.
References fileIndexTree_, art::InEvent, metaDataTree_, art::NumBranchTypes, parentageTree_, treePointers_, and art::RootOutputTree::writeTTree().
|
private |
Definition at line 163 of file RootOutputFile.h.
Referenced by RootOutputFile(), writeFileFormatVersion(), writeFileIndex(), writeParentageRegistry(), writeProcessHistoryRegistry(), writeProductDependencies(), and writeProductDescriptionRegistry().
|
private |
Definition at line 203 of file RootOutputFile.h.
Referenced by requestsToCloseFile().
|
private |
Definition at line 194 of file RootOutputFile.h.
Referenced by fillBranches(), and writeProductDescriptionRegistry().
|
private |
Definition at line 159 of file RootOutputFile.h.
Referenced by RootOutputFile().
|
private |
Definition at line 193 of file RootOutputFile.h.
Referenced by writeOne().
|
private |
Definition at line 164 of file RootOutputFile.h.
Referenced by fillBranches(), and RootOutputFile().
|
private |
Definition at line 165 of file RootOutputFile.h.
Referenced by fillBranches(), and RootOutputFile().
|
private |
Definition at line 200 of file RootOutputFile.h.
Referenced by getProduct().
|
private |
Definition at line 174 of file RootOutputFile.h.
Referenced by RootOutputFile(), writeEventHistory(), and writeOne().
|
private |
Definition at line 179 of file RootOutputFile.h.
|
private |
Definition at line 166 of file RootOutputFile.h.
Referenced by beginInputFile(), and RootOutputFile().
|
private |
Definition at line 156 of file RootOutputFile.h.
Referenced by currentFileName(), and RootOutputFile().
|
private |
Definition at line 169 of file RootOutputFile.h.
Referenced by writeFileIndex(), writeOne(), writeRun(), and writeSubRun().
|
private |
Definition at line 172 of file RootOutputFile.h.
Referenced by RootOutputFile(), writeFileIndex(), and writeTTrees().
|
private |
Definition at line 168 of file RootOutputFile.h.
Referenced by requestsToCloseFile(), and RootOutputFile().
|
private |
Definition at line 157 of file RootOutputFile.h.
Referenced by requestsToCloseFile(), and RootOutputFile().
|
private |
Definition at line 170 of file RootOutputFile.h.
Referenced by incrementInputFileNumber(), requestsToCloseFile(), writeOne(), writeRun(), and writeSubRun().
|
private |
Definition at line 171 of file RootOutputFile.h.
Referenced by RootOutputFile(), writeFileFormatVersion(), writeProcessHistoryRegistry(), writeProductDependencies(), writeProductDescriptionRegistry(), and writeTTrees().
|
private |
Definition at line 155 of file RootOutputFile.h.
Referenced by selectProducts(), writeOne(), and writeProductDependencies().
|
private |
Definition at line 173 of file RootOutputFile.h.
Referenced by RootOutputFile(), writeParentageRegistry(), and writeTTrees().
|
private |
Definition at line 175 of file RootOutputFile.h.
Referenced by RootOutputFile(), and writeOne().
|
private |
Definition at line 183 of file RootOutputFile.h.
Referenced by RootOutputFile(), and writeOne().
|
private |
Definition at line 191 of file RootOutputFile.h.
Referenced by RootOutputFile(), and writeOne().
|
private |
Definition at line 178 of file RootOutputFile.h.
Referenced by RootOutputFile(), and writeResults().
|
private |
Definition at line 189 of file RootOutputFile.h.
Referenced by RootOutputFile(), and writeResults().
|
private |
Definition at line 177 of file RootOutputFile.h.
Referenced by RootOutputFile(), and writeRun().
|
private |
Definition at line 187 of file RootOutputFile.h.
Referenced by RootOutputFile(), and writeRun().
|
private |
Definition at line 176 of file RootOutputFile.h.
Referenced by RootOutputFile(), and writeSubRun().
|
private |
Definition at line 185 of file RootOutputFile.h.
Referenced by RootOutputFile(), and writeSubRun().
|
private |
Definition at line 182 of file RootOutputFile.h.
|
private |
Definition at line 195 of file RootOutputFile.h.
Referenced by createDatabaseTables(), fillBranches(), RootOutputFile(), setRunAuxiliaryRangeSetID(), setSubRunAuxiliaryRangeSetID(), writeFileCatalogMetadata(), and writeParameterSetRegistry().
|
private |
Definition at line 181 of file RootOutputFile.h.
|
private |
Definition at line 202 of file RootOutputFile.h.
Referenced by setRunAuxiliaryRangeSetID(), and writeRun().
|
private |
Definition at line 160 of file RootOutputFile.h.
Referenced by RootOutputFile().
|
private |
Definition at line 199 of file RootOutputFile.h.
Referenced by fillBranches(), and selectProducts().
|
private |
Definition at line 162 of file RootOutputFile.h.
Referenced by RootOutputFile().
|
private |
Definition at line 158 of file RootOutputFile.h.
Referenced by setFileStatus(), writeOne(), writeRun(), and writeSubRun().
|
private |
Definition at line 180 of file RootOutputFile.h.
|
private |
Definition at line 201 of file RootOutputFile.h.
Referenced by setSubRunAuxiliaryRangeSetID(), and writeSubRun().
|
private |
Definition at line 161 of file RootOutputFile.h.
Referenced by RootOutputFile().
|
private |
Definition at line 192 of file RootOutputFile.h.
Referenced by beginInputFile(), fillBranches(), respondToCloseInputFile(), RootOutputFile(), selectProducts(), and writeTTrees().
|
private |
Definition at line 167 of file RootOutputFile.h.
Referenced by beginInputFile(), and fillBranches().