X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGHF%2Fhfe%2FAliHFEtools.cxx;h=5bc40ce5b8af78f56c907154862cdb33c0bd024e;hb=5c62ca8f0d5b85d99e55b87467c9e2efbff0d01f;hp=b03db05b0ef85b3ee5d874a32c8b16c472609d35;hpb=d4894cf3608f317f7d2dd766e86791e3d3c9d1d6;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGHF/hfe/AliHFEtools.cxx b/PWGHF/hfe/AliHFEtools.cxx index b03db05b0ef..5bc40ce5b8a 100644 --- a/PWGHF/hfe/AliHFEtools.cxx +++ b/PWGHF/hfe/AliHFEtools.cxx @@ -490,6 +490,34 @@ TList *AliHFEtools::GetHFEResultList(const TString str){ return returnlist; } + +//_________________________________________________________________________ +//Function AliHFEtools::GetHFEQAList() - opens file from argument and returns TList Object containing String "QA" +//_________________________________________________________________________ +TList *AliHFEtools::GetHFEQAList(const TString str){ + + TFile *f = TFile::Open(str.Data()); + if(!f || f->IsZombie()){ + printf("Could not read file %s\n",str.Data()); + return NULL ; + } + gROOT->cd(); + TKey *k; + TIter next(f->GetListOfKeys()); + while ((k = dynamic_cast(next()))){ + TString s(k->GetName()); + if(s.Contains("QA")) break; + } + if(!k){ + printf("Output container not found\n"); + f->Close(); delete f; + return NULL; + } + TList *returnlist = dynamic_cast(k->ReadObj()); + f->Close(); delete f; + return returnlist; +} + //__________________________________________ void AliHFEtools::NormaliseBinWidth(TH1 *histo){ //