fixed missing TDirectory handling of RunSummary in dump_header.cpp

This commit is contained in:
2026-01-26 19:52:41 +01:00
parent 65efb389c3
commit 2eb0cf28d5

View File

@@ -270,9 +270,14 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
}
// summary as well?
if (summary && (fileType == DH_MUSR_ROOT)) {
if (summary && ((fileType == DH_MUSR_ROOT) || (fileType == DH_MUSR_ROOT_DIR))) {
TObjArray *runSum=nullptr;
runSum = static_cast<TObjArray*>(folder->FindObject("RunSummary"));
if (fileType == DH_MUSR_ROOT) // TFolder
runSum = static_cast<TObjArray*>(folder->FindObject("RunSummary"));
else // TDirectory
f.GetObject("RunHeader/RunSummary", runSum);
if (!runSum) { // something is wrong!!
std::cerr << std::endl << "**ERROR** Couldn't obtain RunSummary " << fileName << std::endl;
f.Close();