Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
art::RootOutputFile Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Framework/IO/Root/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, bool const parentageEnabled, bool const rangesEnabled, bool const dbEnabled)
 
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
 

Private Member Functions

void writeRun_FileIndexPart (RunPrincipal const &)
 
void writeSubRun_FileIndexPart (SubRunPrincipal const &)
 
void writeOneEvent_EventPart (EventPrincipal const &)
 
void writeOneEvent_HistoryPart (EventPrincipal const &)
 
void writeOneEvent_FileIndexPart (EventPrincipal const &)
 
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)
 
void insertParents (std::set< ProductProvenance > &, Principal const &, std::vector< ProductID > const &)
 

Private Attributes

OutputModule const * om_
 
std::string file_
 
ClosingCriteria fileSwitchCriteria_
 
OutputFileStatus status_ {OutputFileStatus::Closed}
 
int const compressionLevel_
 
int64_t const saveMemoryObjectThreshold_
 
int64_t const treeMaxVirtualSize_
 
int const splitLevel_
 
int const basketSize_
 
DropMetaData dropMetaData_
 
bool dropMetaDataForDroppedData_
 
bool fastCloningEnabledAtConstruction_
 
bool wasFastCloned_ {false}
 
std::unique_ptr< TFile > filePtr_
 
FileIndex fileIndex_ {}
 
FileProperties fp_ {}
 
TTree * metaDataTree_ {nullptr}
 
TTree * fileIndexTree_ {nullptr}
 
TTree * parentageTree_ {nullptr}
 
TTree * eventHistoryTree_ {nullptr}
 
EventAuxiliary const * pEventAux_ {nullptr}
 
SubRunAuxiliary const * pSubRunAux_ {nullptr}
 
RunAuxiliary const * pRunAux_ {nullptr}
 
ResultsAuxiliary const * pResultsAux_ {nullptr}
 
ProductProvenances eventProductProvenanceVector_ {}
 
ProductProvenances subRunProductProvenanceVector_ {}
 
ProductProvenances runProductProvenanceVector_ {}
 
ProductProvenances resultsProductProvenanceVector_ {}
 
ProductProvenancespEventProductProvenanceVector_
 
ProductProvenancespSubRunProductProvenanceVector_
 
ProductProvenancespRunProductProvenanceVector_
 
ProductProvenancespResultsProductProvenanceVector_
 
History const * pHistory_ {nullptr}
 
RootOutputTreePtrArray treePointers_
 
bool dataTypeReported_ {false}
 
std::set< ProductIDbranchesWithStoredHistory_ {}
 
cet::sqlite::Connection rootFileDB_
 
OutputItemListArray selectedOutputItemList_ {{}}
 
detail::DummyProductCache dummyProductCache_ {}
 
unsigned subRunRSID_ {-1u}
 
unsigned runRSID_ {-1u}
 
std::chrono::steady_clock::time_point beginTime_
 
bool const parentageEnabled_ {true}
 
bool const rangesEnabled_ {true}
 
bool const dbEnabled_ {true}
 

Detailed Description

Definition at line 50 of file RootOutputFile.h.

Member Typedef Documentation

Definition at line 76 of file RootOutputFile.h.

Definition at line 77 of file RootOutputFile.h.

Definition at line 54 of file RootOutputFile.h.

Member Enumeration Documentation

Enumerator
MaxEvents 
MaxSize 
Unset 

Definition at line 52 of file RootOutputFile.h.

52 { MaxEvents, MaxSize, Unset };

Constructor & Destructor Documentation

art::RootOutputFile::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,
bool const  parentageEnabled,
bool const  rangesEnabled,
bool const  dbEnabled 
)
explicit

Member Function Documentation

void art::RootOutputFile::beginInputFile ( RootFileBlock const *  ,
bool  fastClone 
)
void art::RootOutputFile::createDatabaseTables ( )
private

Referenced by currentFileName().

std::string const& art::RootOutputFile::currentFileName ( ) const
inline
template<BranchType >
void art::RootOutputFile::fillBranches ( Principal const &  ,
std::vector< ProductProvenance > *   
)
private

Referenced by currentFileName().

template<BranchType BT>
std::enable_if_t<!detail::RangeSetsSupported<BT>::value, art::EDProduct const*> art::RootOutputFile::getProduct ( OutputHandle const &  ,
RangeSet const &  productRS,
std::string const &  wrappedName 
)
private

Referenced by currentFileName().

template<BranchType BT>
std::enable_if_t<detail::RangeSetsSupported<BT>::value, art::EDProduct const*> art::RootOutputFile::getProduct ( OutputHandle const &  ,
RangeSet const &  productRS,
std::string const &  wrappedName 
)
private
void art::RootOutputFile::incrementInputFileNumber ( )
void art::RootOutputFile::insertParents ( std::set< ProductProvenance > &  ,
Principal const &  ,
std::vector< ProductID > const &   
)
private

Referenced by currentFileName().

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 ( )
void art::RootOutputFile::respondToCloseInputFile ( FileBlock const &  )
void art::RootOutputFile::selectProducts ( )

Referenced by setFileStatus().

void art::RootOutputFile::setFileStatus ( OutputFileStatus const  ofs)
inline

Definition at line 120 of file RootOutputFile.h.

References selectProducts(), status_, and string.

121  {
122  status_ = ofs;
123  }
OutputFileStatus status_
void art::RootOutputFile::setRunAuxiliaryRangeSetID ( RangeSet const &  )
void art::RootOutputFile::setSubRunAuxiliaryRangeSetID ( RangeSet const &  )
void art::RootOutputFile::writeEventHistory ( )
void art::RootOutputFile::writeFileCatalogMetadata ( FileStatsCollector const &  stats,
FileCatalogMetadata::collection_type const &  ,
FileCatalogMetadata::collection_type const &   
)
void art::RootOutputFile::writeFileFormatVersion ( )
void art::RootOutputFile::writeFileIndex ( )
void art::RootOutputFile::writeOne ( EventPrincipal const &  )
void art::RootOutputFile::writeOneEvent_EventPart ( EventPrincipal const &  )
private

Referenced by currentFileName().

void art::RootOutputFile::writeOneEvent_FileIndexPart ( EventPrincipal const &  )
private

Referenced by currentFileName().

void art::RootOutputFile::writeOneEvent_HistoryPart ( EventPrincipal const &  )
private

Referenced by currentFileName().

void art::RootOutputFile::writeParameterSetRegistry ( )
void art::RootOutputFile::writeParentageRegistry ( )
void art::RootOutputFile::writeProcessConfigurationRegistry ( )
void art::RootOutputFile::writeProcessHistoryRegistry ( )
void art::RootOutputFile::writeProductDependencies ( )
void art::RootOutputFile::writeProductDescriptionRegistry ( )
void art::RootOutputFile::writeResults ( ResultsPrincipal resp)
void art::RootOutputFile::writeRun ( RunPrincipal const &  )
void art::RootOutputFile::writeRun_FileIndexPart ( RunPrincipal const &  )
private

Referenced by currentFileName().

void art::RootOutputFile::writeSubRun ( SubRunPrincipal const &  )
void art::RootOutputFile::writeSubRun_FileIndexPart ( SubRunPrincipal const &  )
private

Referenced by currentFileName().

void art::RootOutputFile::writeTTrees ( )

Member Data Documentation

int const art::RootOutputFile::basketSize_
private

Definition at line 175 of file RootOutputFile.h.

std::chrono::steady_clock::time_point art::RootOutputFile::beginTime_
private
Initial value:

Definition at line 215 of file RootOutputFile.h.

std::set<ProductID> art::RootOutputFile::branchesWithStoredHistory_ {}
private

Definition at line 206 of file RootOutputFile.h.

int const art::RootOutputFile::compressionLevel_
private

Definition at line 171 of file RootOutputFile.h.

bool art::RootOutputFile::dataTypeReported_ {false}
private

Definition at line 205 of file RootOutputFile.h.

bool const art::RootOutputFile::dbEnabled_ {true}
private

Definition at line 219 of file RootOutputFile.h.

DropMetaData art::RootOutputFile::dropMetaData_
private

Definition at line 176 of file RootOutputFile.h.

bool art::RootOutputFile::dropMetaDataForDroppedData_
private

Definition at line 177 of file RootOutputFile.h.

detail::DummyProductCache art::RootOutputFile::dummyProductCache_ {}
private

Definition at line 212 of file RootOutputFile.h.

TTree* art::RootOutputFile::eventHistoryTree_ {nullptr}
private

Definition at line 186 of file RootOutputFile.h.

ProductProvenances art::RootOutputFile::eventProductProvenanceVector_ {}
private

Definition at line 191 of file RootOutputFile.h.

bool art::RootOutputFile::fastCloningEnabledAtConstruction_
private

Definition at line 178 of file RootOutputFile.h.

std::string art::RootOutputFile::file_
private

Definition at line 168 of file RootOutputFile.h.

Referenced by currentFileName().

FileIndex art::RootOutputFile::fileIndex_ {}
private

Definition at line 181 of file RootOutputFile.h.

TTree* art::RootOutputFile::fileIndexTree_ {nullptr}
private

Definition at line 184 of file RootOutputFile.h.

std::unique_ptr<TFile> art::RootOutputFile::filePtr_
private

Definition at line 180 of file RootOutputFile.h.

ClosingCriteria art::RootOutputFile::fileSwitchCriteria_
private

Definition at line 169 of file RootOutputFile.h.

FileProperties art::RootOutputFile::fp_ {}
private

Definition at line 182 of file RootOutputFile.h.

TTree* art::RootOutputFile::metaDataTree_ {nullptr}
private

Definition at line 183 of file RootOutputFile.h.

OutputModule const* art::RootOutputFile::om_
private

Definition at line 167 of file RootOutputFile.h.

bool const art::RootOutputFile::parentageEnabled_ {true}
private

Definition at line 217 of file RootOutputFile.h.

TTree* art::RootOutputFile::parentageTree_ {nullptr}
private

Definition at line 185 of file RootOutputFile.h.

EventAuxiliary const* art::RootOutputFile::pEventAux_ {nullptr}
private

Definition at line 187 of file RootOutputFile.h.

ProductProvenances* art::RootOutputFile::pEventProductProvenanceVector_
private
Initial value:

Definition at line 195 of file RootOutputFile.h.

History const* art::RootOutputFile::pHistory_ {nullptr}
private

Definition at line 203 of file RootOutputFile.h.

ResultsAuxiliary const* art::RootOutputFile::pResultsAux_ {nullptr}
private

Definition at line 190 of file RootOutputFile.h.

ProductProvenances* art::RootOutputFile::pResultsProductProvenanceVector_
private
Initial value:

Definition at line 201 of file RootOutputFile.h.

RunAuxiliary const* art::RootOutputFile::pRunAux_ {nullptr}
private

Definition at line 189 of file RootOutputFile.h.

ProductProvenances* art::RootOutputFile::pRunProductProvenanceVector_
private
Initial value:

Definition at line 199 of file RootOutputFile.h.

SubRunAuxiliary const* art::RootOutputFile::pSubRunAux_ {nullptr}
private

Definition at line 188 of file RootOutputFile.h.

ProductProvenances* art::RootOutputFile::pSubRunProductProvenanceVector_
private
Initial value:

Definition at line 197 of file RootOutputFile.h.

bool const art::RootOutputFile::rangesEnabled_ {true}
private

Definition at line 218 of file RootOutputFile.h.

ProductProvenances art::RootOutputFile::resultsProductProvenanceVector_ {}
private

Definition at line 194 of file RootOutputFile.h.

cet::sqlite::Connection art::RootOutputFile::rootFileDB_
private

Definition at line 207 of file RootOutputFile.h.

ProductProvenances art::RootOutputFile::runProductProvenanceVector_ {}
private

Definition at line 193 of file RootOutputFile.h.

unsigned art::RootOutputFile::runRSID_ {-1u}
private

Definition at line 214 of file RootOutputFile.h.

int64_t const art::RootOutputFile::saveMemoryObjectThreshold_
private

Definition at line 172 of file RootOutputFile.h.

OutputItemListArray art::RootOutputFile::selectedOutputItemList_ {{}}
private

Definition at line 211 of file RootOutputFile.h.

int const art::RootOutputFile::splitLevel_
private

Definition at line 174 of file RootOutputFile.h.

OutputFileStatus art::RootOutputFile::status_ {OutputFileStatus::Closed}
private

Definition at line 170 of file RootOutputFile.h.

Referenced by setFileStatus().

ProductProvenances art::RootOutputFile::subRunProductProvenanceVector_ {}
private

Definition at line 192 of file RootOutputFile.h.

unsigned art::RootOutputFile::subRunRSID_ {-1u}
private

Definition at line 213 of file RootOutputFile.h.

int64_t const art::RootOutputFile::treeMaxVirtualSize_
private

Definition at line 173 of file RootOutputFile.h.

RootOutputTreePtrArray art::RootOutputFile::treePointers_
private

Definition at line 204 of file RootOutputFile.h.

bool art::RootOutputFile::wasFastCloned_ {false}
private

Definition at line 179 of file RootOutputFile.h.


The documentation for this class was generated from the following file: