Int_t nEntries = fresult->GetEntries();
TString alienUrl;
- const char* guid;
- const char* md5;
- const char* turl;
- Long64_t size = -1;
+// const char* guid;
+// const char* md5;
+// const char* turl;
+// Long64_t size = -1;
Int_t counter = 0;
for(Int_t i = 0; i < nEntries; i++) {
alienUrl = fresult->GetKey(i,"turl");
- guid = fresult->GetKey(i,"guid");
- if(fresult->GetKey(i,"size")) size = atol (fresult->GetKey(i,"size"));
- md5 = fresult->GetKey(i,"md5");
- turl = fresult->GetKey(i,"turl");
- if(md5 && !strlen(guid)) md5 = 0;
- if(guid && !strlen(guid)) guid = 0;
+// guid = fresult->GetKey(i,"guid");
+// if(fresult->GetKey(i,"size")) size = atol (fresult->GetKey(i,"size"));
+// md5 = fresult->GetKey(i,"md5");
+// turl = fresult->GetKey(i,"turl");
+// if(md5 && !strlen(guid)) md5 = 0;
+// if(guid && !strlen(guid)) guid = 0;
fChain->Add(alienUrl);
//fGUIDList->Add(new TObjString(guid));
// case where it finds an AliESDs.root file it creates the tags
void *dira = gSystem->OpenDirectory(localpath);
- Char_t fPath[256];
+ Char_t fPath[512];
const char * dirname = 0x0;
const char * filename = 0x0;
const char * pattern = "AliESDs.root";
Int_t counter = 0;
while((dirname = gSystem->GetDirEntry(dira))) {
- sprintf(fPath,"%s/%s",localpath,dirname);
+ snprintf(fPath, 512,"%s/%s",localpath,dirname);
void *dirb = gSystem->OpenDirectory(fPath);
while((filename = gSystem->GetDirEntry(dirb))) {
if(strstr(filename,pattern)) {
if(iRunNumber != iInitRunNumber) AliFatal("Inconsistency of run numbers in the AliESD - You are trying to merge different runs!!!");
TFile *file = chain->GetFile();
- const TUrl *url = file->GetEndpointUrl();
+ // const TUrl *url = file->GetEndpointUrl();
fguid = file->GetUUID().AsString();
if (foldguid == fguid) {
}
else {
AliFileTag *nftag = new AliFileTag();
+ nftag->SetGUID(fguid);
- if(fSession == "grid") {
- TString fturltemp = "alien://"; fturltemp += url->GetFile();
- fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
- }
- else fturl = url->GetFile();
+// if(fSession == "grid") {
+// TString fturltemp = "alien://"; fturltemp += url->GetFile();
+// fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
+// }
+// else fturl = url->GetFile();
+ fturl = file->GetName();
if(fSession == "grid") {
nftag->SetMD5("");
else lastEvent = fLastEvent;
char fileName[256];
- sprintf(fileName, "Run%d.Event%d_%d.ESD.tag.root",
+ snprintf(fileName, 256, "Run%d.Event%d_%d.ESD.tag.root",
iInitRunNumber,fFirstEvent,lastEvent);
AliInfo(Form("writing tags to file %s", fileName));
AliDebug(1, Form("writing tags to file %s", fileName));
TFile* ftag = TFile::Open(fileName, "recreate");
-
+
AliRunTag *tag = new AliRunTag();
AliEventTag *evTag = new AliEventTag();
TTree * ttag = new TTree("T","A Tree with event tags");
if (iEventNumber == fFirstEvent) {
TFile *file = b->GetCurrentFile();
- const TUrl *url = file->GetEndpointUrl();
+// const TUrl *url = file->GetEndpointUrl();
fguid = file->GetUUID().AsString();
- if(fStorage == 1) {
- TString fturltemp = "alien://"; fturltemp += url->GetFile();
- fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
- }
- else fturl = url->GetFile();
+
+// if(fStorage == 1) {
+// TString fturltemp = "alien://"; fturltemp += url->GetFile();
+// fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
+// }
+// else fturl = url->GetFile();
+ fturl = file->GetName();
// evTag->SetGUID(fguid);
((AliFileTag *) tag->GetFileTag(tag->GetNFiles()-1))->SetGUID(fguid);
Int_t iFirstEvent = 0;
char fileName[256];
- sprintf(fileName, "Run%d.Event%d_%d.ESD.tag.root",
+ snprintf(fileName, 256, "Run%d.Event%d_%d.ESD.tag.root",
iInitRunNumber,iFirstEvent,iNumberOfEvents);
AliInfo(Form("writing tags to file %s", fileName));
AliDebug(1, Form("writing tags to file %s", fileName));
if(iRunNumber != iInitRunNumber) AliFatal("Inconsistency of run numbers in the AliESD!!!");
TFile *file = chain->GetCurrentFile();
- const TUrl *url = file->GetEndpointUrl();
+ // const TUrl *url = file->GetName();
fguid = file->GetUUID().AsString();
- if(fStorage == 1) {
- TString fturltemp = "alien://"; fturltemp += url->GetFile();
- fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
- }
- else fturl = url->GetFile();
+ fturl = file->GetName();
+// if(fStorage == 1) {
+// TString fturltemp = "alien://"; fturltemp += url->GetFile();
+// fturl = fturltemp(0,fturltemp.Index(".root",5,0,TString::kExact)+5);
+// }
+// else fturl = url->GetFile();
if (fturl.CompareTo(fturlold)) {
fChain->SetBranchStatus(Form("%s%s%s","*", str.Data(), "*"), 0);
AliInfo(Form("Branch %s switched off \n", str.Data()));
}
+ delete tokens;
}
//_____________________________________________________________________________