X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=PHOS%2Fmacros%2FAliReadESD.C;h=fc2af000607cce894fe23b8e257c60dd5ee2bf86;hp=86e783f875c7597e929fc6cf8ee37c92662b2c6b;hb=HEAD;hpb=09b8645989802900a0d8becbc28cbf6d8e538a3a diff --git a/PHOS/macros/AliReadESD.C b/PHOS/macros/AliReadESD.C index 86e783f875c..fc2af000607 100644 --- a/PHOS/macros/AliReadESD.C +++ b/PHOS/macros/AliReadESD.C @@ -1,4 +1,4 @@ -#include "AliReadESD.h" +#include "macros/AliReadESD.h" //====================================================================================== TChain * AliReadESDfromdisk(const UInt_t eventsToRead, @@ -22,11 +22,13 @@ TChain * AliReadESDfromdisk(const UInt_t eventsToRead, rv = 0 ; } else{ // reading file names from directory - const char * file ; + const char * subdir ; // search all subdirectories witch matching pattern - while( (file = gSystem->GetDirEntry(from)) && - (cESDTree->GetEntries() < eventsToRead)) { - if ( strstr(file, pattern) != 0 ) { + while( (subdir = gSystem->GetDirEntry(from)) && + (cESDTree->GetEntries() < eventsToRead)) { + if ( strstr(subdir, pattern) != 0 ) { + char file[200] ; + sprintf(file, "%s%s/AliESDs.root", dirName.Data(), subdir); AliInfo( Form("Adding %s\n", file) ); cESDTree->Add(file) ; }