From 90fb81f16a0f353ffa180fb75e5c8182b89a7e0a Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Sat, 6 Feb 2021 19:05:40 +0100 Subject: [PATCH] add new method GetTypeOfPath to TMusrRunHeader. It allows deduce the type of a given path-name. --- src/external/MusrRoot/TMusrRunHeader.cpp | 62 ++++++++++++++++++++++++ src/external/MusrRoot/TMusrRunHeader.h | 2 + 2 files changed, 64 insertions(+) diff --git a/src/external/MusrRoot/TMusrRunHeader.cpp b/src/external/MusrRoot/TMusrRunHeader.cpp index 58872ba3..dab7e10f 100644 --- a/src/external/MusrRoot/TMusrRunHeader.cpp +++ b/src/external/MusrRoot/TMusrRunHeader.cpp @@ -394,6 +394,68 @@ Bool_t TMusrRunHeader::FillFolder(TFolder *folder) return true; } +//-------------------------------------------------------------------------- +// GetTypeOfPath (public) +//-------------------------------------------------------------------------- +/** + *

Get type of path-name, e.g. RunInfo/Sample Name. + * + * @param pathName path-name for which the type is requested + * + * @return the type, or 'undef' if path-name is not found. + */ +TString TMusrRunHeader::GetTypeOfPath(TString pathName) +{ + TString type("undef"); + + // find pathName + for (Int_t i=0; i