◆ ParallelFileMerger()
ParallelFileMerger::ParallelFileMerger |
( |
const char * |
filename, |
|
|
int |
compress = ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault |
|
) |
| |
|
inline |
◆ ~ParallelFileMerger()
ParallelFileMerger::~ParallelFileMerger |
( |
| ) |
|
|
inline |
◆ GetName()
const char* ParallelFileMerger::GetName |
( |
| ) |
const |
|
inline |
◆ Hash()
ULong_t ParallelFileMerger::Hash |
( |
| ) |
const |
|
inline |
◆ MergeTrees()
Bool_t ParallelFileMerger::MergeTrees |
( |
TFile * |
input | ) |
|
|
inline |
Definition at line 125 of file AthenaRootSharedWriterSvc.cxx.
128 TIter nextKey(
input->GetListOfKeys());
129 while (TKey*
key =
static_cast<TKey*
>(nextKey())) {
130 TClass*
cl = TClass::GetClass(
key->GetClassName());
131 if (
cl !=
nullptr &&
cl->InheritsFrom(
"TTree")) {
132 TTree* outCollTree =
static_cast<TTree*
>(
fMerger.GetOutputFile()->Get(
key->GetName()));
133 TTree* inCollTree =
static_cast<TTree*
>(
input->Get(
key->GetName()));
134 if (inCollTree !=
nullptr && outCollTree !=
nullptr) {
143 Bool_t
result =
fMerger.PartialMerge(TFileMerger::kIncremental | TFileMerger::kResetable | TFileMerger::kKeepCompression);
144 nextKey =
input->GetListOfKeys();
145 while (TKey*
key =
static_cast<TKey*
>(nextKey())) {
146 TClass*
cl = TClass::GetClass(
key->GetClassName());
147 if (
cl !=
nullptr && 0 !=
cl->GetResetAfterMerge()) {
149 input->GetListOfKeys()->Remove(
key);
◆ syncBranches()
bool ParallelFileMerger::syncBranches |
( |
TTree * |
fromTree, |
|
|
TTree * |
toTree |
|
) |
| |
|
inline |
Definition at line 80 of file AthenaRootSharedWriterSvc.cxx.
83 const TObjArray* fromBranches = fromTree->GetListOfBranches();
84 const TObjArray* toBranches = toTree->GetListOfBranches();
85 int nBranches = fromBranches->GetEntriesFast();
86 for (
int k = 0;
k < nBranches; ++
k) {
87 TBranch*
branch =
static_cast<TBranch*
>(fromBranches->UncheckedAt(
k));
88 if (toBranches->FindObject(
branch->GetName()) ==
nullptr) {
89 TBranch* newBranch =
nullptr;
90 TClass*
cl = TClass::GetClass(
branch->GetClassName());
94 if (strlen(
branch->GetClassName()) > 0) {
95 newBranch = toTree->Branch(
branch->GetName(),
branch->GetClassName(),
nullptr,
branch->GetBasketSize(),
branch->GetSplitLevel());
96 newBranch->SetAddress(empty);
98 TObjArray* outLeaves =
branch->GetListOfLeaves();
99 TLeaf* leaf =
static_cast<TLeaf*
>(outLeaves->UncheckedAt(0));
100 std::string
type = leaf->GetTypeName();
101 std::string attr = leaf->GetName();
102 if (
type ==
"Int_t")
type = attr +
"/I";
103 else if (
type ==
"Short_t")
type = attr +
"/S";
104 else if (
type ==
"Long_t")
type = attr +
"/L";
105 else if (
type ==
"UInt_t")
type = attr +
"/i";
106 else if (
type ==
"UShort_t")
type = attr +
"/s";
107 else if (
type ==
"UShort_t")
type = attr +
"/s";
108 else if (
type ==
"Float_t")
type = attr +
"/F";
109 else if (
type ==
"Double_t")
type = attr +
"/D";
110 else if (
type ==
"Char_t")
type = attr +
"/B";
111 else if (
type ==
"UChar_t")
type = attr +
"/b";
112 else if (
type ==
"Bool_t")
type = attr +
"/O";
113 newBranch = toTree->Branch(
branch->GetName(),
buff,
type.c_str(), 2048);
115 int nEntries = toTree->GetEntries();
117 newBranch->BackFill();
◆ fFilename
TString ParallelFileMerger::fFilename |
◆ fMerger
TFileMerger ParallelFileMerger::fMerger |
The documentation for this struct was generated from the following file: