]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding the lfn in the xml collection
authorpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Nov 2006 10:49:17 +0000 (10:49 +0000)
committerpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Nov 2006 10:49:17 +0000 (10:49 +0000)
STEER/AliTagAnalysis.cxx
STEER/AliXMLCollection.cxx
STEER/AliXMLCollection.h

index 78f75285aeedc59d4e8f0c7c4b72eda599e20c79..b9e38ef4be660dd495c4f20cbe5077f543ba9713 100644 (file)
@@ -220,6 +220,7 @@ Bool_t AliTagAnalysis::CreateXMLCollection(const char* name, AliRunTagCuts *RunT
   TEventList *fEventList = new TEventList();
   TString guid = 0x0;
   TString turl = 0x0;
+  TString lfn = 0x0;
   
   //Defining tag objects
   AliRunTag *tag = new AliRunTag;
@@ -235,9 +236,10 @@ Bool_t AliTagAnalysis::CreateXMLCollection(const char* name, AliRunTagCuts *RunT
        evTag = (AliEventTag *) tagList->At(i);
        guid = evTag->GetGUID(); 
        turl = evTag->GetTURL(); 
+       lfn = turl(8,turl.Length());
        if(EvTagCuts->IsAccepted(evTag)) fEventList->Enter(i);
       }//event loop
-      collection->WriteBody(iTagFiles+1,guid,turl,fEventList);
+      collection->WriteBody(iTagFiles+1,guid,lfn,turl,fEventList);
       fEventList->Clear();
     }//run tag cuts
   }//tag file loop
@@ -261,6 +263,7 @@ Bool_t AliTagAnalysis::CreateXMLCollection(const char* name, const char *fRunCut
   TEventList *fEventList = new TEventList();
   TString guid = 0x0;
   TString turl = 0x0;
+  TString lfn = 0x0;
   
   //Defining tag objects
   AliRunTag *tag = new AliRunTag;
@@ -285,9 +288,10 @@ Bool_t AliTagAnalysis::CreateXMLCollection(const char* name, const char *fRunCut
        evTag = (AliEventTag *) tagList->At(i);
        guid = evTag->GetGUID(); 
        turl = evTag->GetTURL(); 
+       lfn = turl(8,turl.Length());
        if(fEventFormula->EvalInstance(i) == 1) fEventList->Enter(i);
       }//event loop
-      collection->WriteBody(iTagFiles+1,guid,turl,fEventList);
+      collection->WriteBody(iTagFiles+1,guid,lfn,turl,fEventList);
       fEventList->Clear();
     }//run tag cuts
   }//tag file loop
index e9805139a3173ac24614a282b8f97b4f336eb78f..440f48b8a2f4c0a87eb203d93f2691a558d7860a 100644 (file)
@@ -60,14 +60,14 @@ Bool_t AliXMLCollection::WriteHeader() {
   // Open the output stream
   fout.open(xmlName);
   fout<<"<?xml version=\"1.0\"?>\n";
-  fout<<"<tags>\n";
+  fout<<"<alien>\n";
   fout<<"  "<<collectionHeader<<"\n";  
 
   return kTRUE;
 }
 
 //___________________________________________________________________________
-Bool_t AliXMLCollection::WriteBody(Int_t counter, const char* guid, const char* turl, TEventList *list) {
+Bool_t AliXMLCollection::WriteBody(Int_t counter, const char* guid, const char* lfn, const char* turl, TEventList *list) {
   //Writes the body of the xml collection
   TString listline;
   for(Int_t i = 0; i < list->GetN(); i++) {
@@ -84,6 +84,9 @@ Bool_t AliXMLCollection::WriteBody(Int_t counter, const char* guid, const char*
   line1 += "guid=\"";
   line1 += guid;
   line1 += "\" ";
+  line1 += "lfn=\"";
+  line1 += lfn;
+  line1 += "\" ";
   line1 += "turl=\"";
   line1 += turl;
   line1 += "\" ";
@@ -103,7 +106,7 @@ Bool_t AliXMLCollection::WriteBody(Int_t counter, const char* guid, const char*
 Bool_t AliXMLCollection::Export() {
   //Closes the stream
   fout<<"  "<<"</collection>\n";
-  fout<<"</tags>\n";
+  fout<<"</alien>\n";
 
   fout.close();
 
index 468c94b8357cd0bf7152ecde25bd6a451737994c..1b14712169320df905347ecb45008accc9805e45 100644 (file)
@@ -28,7 +28,7 @@ class AliXMLCollection : public TObject {
   
   //____________________________________________________//
   Bool_t WriteHeader();
-  Bool_t WriteBody(Int_t counter, const char* guid, const char *turl, TEventList *fEventList);
+  Bool_t WriteBody(Int_t counter, const char* guid, const char *lfn, const char *turl, TEventList *fEventList);
   Bool_t Export();
 
   void SetCollectionName(const char* name) {fCollectionName = name;}