From 6e2eae7e1342799242fe1d42937778643fd3ea5b Mon Sep 17 00:00:00 2001 From: schutz Date: Tue, 19 Dec 2006 10:22:56 +0000 Subject: [PATCH] New AddFile method --- STEER/AliTagAnalysis.cxx | 25 +++++++++++++++++++++++++ STEER/AliTagAnalysis.h | 1 + 2 files changed, 26 insertions(+) diff --git a/STEER/AliTagAnalysis.cxx b/STEER/AliTagAnalysis.cxx index 867aa49cd15..0a1bec4f979 100644 --- a/STEER/AliTagAnalysis.cxx +++ b/STEER/AliTagAnalysis.cxx @@ -60,6 +60,29 @@ AliTagAnalysis::~AliTagAnalysis() { //Default destructor for a AliTagAnalysis } +//___________________________________________________________________________ +Bool_t AliTagAnalysis::AddTagsFile(const char *alienUrl) { + + // Add a single tags file to the chain + + Bool_t rv = kTRUE ; + + if (! fgChain || ! fChain ) { + TChain *fgChain = new TChain("T"); + fChain = fgChain; + } + + TFile *f = TFile::Open(alienUrl,"READ"); + fChain->Add(alienUrl); + AliInfo(Form("Chained tag files: %d ",fChain->GetEntries())); + delete f; + + if (fChain->GetEntries() == 0 ) + rv = kFALSE ; + + return rv ; +} + //___________________________________________________________________________ void AliTagAnalysis::ChainLocalTags(const char *dirname) { //Searches the entries of the provided direcory @@ -220,6 +243,8 @@ Bool_t AliTagAnalysis::CreateXMLCollection(const char* name, AliRunTagCuts *RunT collection->SetCollectionName(name); collection->WriteHeader(); + //Event list + //TEntryList *fEventList = new TEntryList(); TString guid = 0x0; TString turl = 0x0; TString lfn = 0x0; diff --git a/STEER/AliTagAnalysis.h b/STEER/AliTagAnalysis.h index 34fb9965256..f523cec3f69 100644 --- a/STEER/AliTagAnalysis.h +++ b/STEER/AliTagAnalysis.h @@ -39,6 +39,7 @@ class AliTagAnalysis : public TObject { AliTagAnalysis(); ~AliTagAnalysis(); + Bool_t AddTagsFile(const char *alienUrl); void ChainLocalTags(const char *dirname); void ChainGridTags(TGridResult *result); -- 2.43.0