#include "RootOutputTree.h"
|
static TTree * | makeTTree (TFile *, std::string const &name, int splitLevel) |
|
static void | writeTTree (TTree *) noexcept(false) |
|
Definition at line 24 of file RootOutputTree.h.
template<typename Aux >
art::RootOutputTree::RootOutputTree |
( |
cet::exempt_ptr< TFile > |
filePtr, |
|
|
BranchType const |
branchType, |
|
|
Aux const *& |
pAux, |
|
|
ProductProvenances *& |
pProductProvenanceVector, |
|
|
int const |
bufSize, |
|
|
int const |
splitLevel, |
|
|
int64_t const |
treeMaxVirtualSize, |
|
|
int64_t const |
saveMemoryObjectThreshold |
|
) |
| |
|
inline |
Definition at line 35 of file RootOutputTree.h.
References addOutputBranch(), auxBranch_, basketSize_, art::BranchTypeToAuxiliaryBranchName(), art::BranchTypeToMetaDataTreeName(), art::BranchTypeToProductTreeName(), checkSplitLevelAndBasketSize(), fastCloneTree(), fillTree(), isValid(), makeTTree(), metaBranches_, metaTree_, operator=(), productProvenanceBranch_, art::productProvenanceBranchName(), readBranches_, resetOutputBranchAddress(), saveMemoryObjectThreshold_, setOutputBranchAddress(), splitLevel_, tree_, and writeTree().
54 if (treeMaxVirtualSize >= 0) {
55 tree_->SetMaxVirtualSize(treeMaxVirtualSize);
64 &pProductProvenanceVector,
std::string const & BranchTypeToProductTreeName(BranchType const bt)
std::string const & productProvenanceBranchName(BranchType const bt)
std::vector< TBranch * > readBranches_
std::string const & BranchTypeToMetaDataTreeName(BranchType const bt)
cet::exempt_ptr< TFile > filePtr_
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const bt)
TBranch * productProvenanceBranch_
static TTree * makeTTree(TFile *, std::string const &name, int splitLevel)
int64_t saveMemoryObjectThreshold_
std::vector< TBranch * > metaBranches_
void art::RootOutputTree::addOutputBranch |
( |
BranchDescription const & |
pd, |
|
|
void const *& |
pProd |
|
) |
| |
void art::RootOutputTree::beginInputFile |
( |
bool |
fastCloning | ) |
|
|
inline |
bool art::RootOutputTree::checkSplitLevelAndBasketSize |
( |
cet::exempt_ptr< TTree const > |
inputTree | ) |
const |
Definition at line 45 of file RootOutputTree.cc.
References GetBranch().
Referenced by RootOutputTree().
49 if (inputTree ==
nullptr) {
53 if (outputBranch ==
nullptr) {
56 TBranch* inputBranch =
57 const_cast<TTree*
>(inputTree.get())->
GetBranch(outputBranch->GetName());
58 if (inputBranch ==
nullptr) {
61 if ((inputBranch->GetSplitLevel() != outputBranch->GetSplitLevel()) ||
62 (inputBranch->GetBasketSize() != outputBranch->GetBasketSize())) {
64 <<
"Fast Cloning disabled because split level or basket size " ntuple GetBranch("organID") -> SetAddress(&xx)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::vector< TBranch * > readBranches_
bool art::RootOutputTree::fastCloneTree |
( |
cet::exempt_ptr< TTree const > |
intree | ) |
|
Definition at line 94 of file RootOutputTree.cc.
Referenced by RootOutputTree().
103 if (intree->GetEntries() != 0) {
104 TTreeCloner cloner(const_cast<TTree*>(intree.get()),
107 TTreeCloner::kIgnoreMissingTopLevel |
108 TTreeCloner::kNoWarnings |
109 TTreeCloner::kNoFileCache);
110 if (cloner.IsValid()) {
111 tree_->SetEntries(
tree_->GetEntries() + intree->GetEntries());
117 <<
"INFO: Unable to fast clone tree " << intree->GetName() <<
'\n' 118 <<
"INFO: ROOT reason is:\n" 119 <<
"INFO: " << cloner.GetWarning() <<
'\n' 120 <<
"INFO: Processing will continue, tree will be slow cloned.";
124 if (val->GetEntries() !=
tree_->GetEntries()) {
std::set< std::string > unclonedReadBranchNames_
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::vector< TBranch * > readBranches_
std::vector< TBranch * > unclonedReadBranches_
void art::RootOutputTree::fillTree |
( |
| ) |
|
Definition at line 148 of file RootOutputTree.cc.
References art::fillTreeBranches().
Referenced by RootOutputTree().
std::vector< TBranch * > readBranches_
static void fillTreeBranches(TTree *, vector< TBranch * > const &branches, bool saveMemory, int64_t threshold)
std::vector< TBranch * > producedBranches_
std::vector< TBranch * > unclonedReadBranches_
int64_t saveMemoryObjectThreshold_
std::vector< TBranch * > metaBranches_
bool art::RootOutputTree::isValid |
( |
| ) |
const |
TTree * art::RootOutputTree::makeTTree |
( |
TFile * |
filePtr, |
|
|
std::string const & |
name, |
|
|
int |
splitLevel |
|
) |
| |
|
static |
TTree* art::RootOutputTree::metaTree |
( |
| ) |
const |
|
inline |
void art::RootOutputTree::setEntries |
( |
| ) |
|
|
inline |
void art::RootOutputTree::setOutputBranchAddress |
( |
BranchDescription const & |
pd, |
|
|
void const *& |
pProd |
|
) |
| |
TTree* art::RootOutputTree::tree |
( |
| ) |
const |
|
inline |
bool art::RootOutputTree::uncloned |
( |
std::string const & |
branchName | ) |
const |
|
inline |
void art::RootOutputTree::writeTree |
( |
| ) |
const |
void art::RootOutputTree::writeTTree |
( |
TTree * |
tree | ) |
|
|
staticnoexcept |
TBranch* art::RootOutputTree::auxBranch_ {nullptr} |
|
private |
int art::RootOutputTree::basketSize_ |
|
private |
bool art::RootOutputTree::fastCloningEnabled_ {false} |
|
private |
cet::exempt_ptr<TFile> art::RootOutputTree::filePtr_ |
|
private |
std::vector<TBranch*> art::RootOutputTree::metaBranches_ {} |
|
private |
TTree* const art::RootOutputTree::metaTree_ |
|
private |
int art::RootOutputTree::nEntries_ {0} |
|
private |
std::vector<TBranch*> art::RootOutputTree::producedBranches_ {} |
|
private |
TBranch* art::RootOutputTree::productProvenanceBranch_ {nullptr} |
|
private |
std::vector<TBranch*> art::RootOutputTree::readBranches_ {} |
|
private |
int64_t art::RootOutputTree::saveMemoryObjectThreshold_ |
|
private |
int art::RootOutputTree::splitLevel_ |
|
private |
TTree* const art::RootOutputTree::tree_ |
|
private |
std::vector<TBranch*> art::RootOutputTree::unclonedReadBranches_ {} |
|
private |
std::set<std::string> art::RootOutputTree::unclonedReadBranchNames_ {} |
|
private |
The documentation for this class was generated from the following files: