]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Update of the macro that creates the tag files: all 3 cases (locally, CAF and alien...
authorpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Aug 2006 11:31:55 +0000 (11:31 +0000)
committerpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Aug 2006 11:31:55 +0000 (11:31 +0000)
STEER/CreateTags.C

index fc82475d91383ba2ce34a5d75dab91506e10ff80..6f6fad8e925a6332dfcc97d8eb554e47a818f794 100644 (file)
@@ -1,39 +1,67 @@
 //_________________________________________________________________________
-// Macro to create the tag files from an ESD collection.
+// Macro to create the tag files from:
+// i)  AliESDs that are stored locally.
+// ii) AliESDs that are stored in the CAF.
+// iii)AliESDs that are stored in alien.
 // The tag files are stored according to the value set in the SetStorage method
 // Use Case : 
-//          SetStorage(0) --> store the tgs locally
-//          SetStorage(1) --> store the tgs in the grid
+//          SetStorage(0) --> store the tags locally
+//          SetStorage(1) --> store the tags in the grid
 //          else the program will abort!!!                                    
 //                                             
 // As a final step the user can create a single merged tag file.         
 //_________________________________________________________________________
-void CreateTags()
-{
+void CreateTags() {
   TStopwatch timer;
   timer.Start();
 
-  //connect to AliEn's API services
-  TGrid::Connect("alien://");
-
-  //create an AliTagCreator object
+  //___________________________________//
+  //__Connect to AliEn's API services__//
+  //___________________________________//
+  //TGrid::Connect("alien://pcapiserv01.cern.ch:10000","pchrista"); 
+  //TGrid::Connect("alien://");
+    
+  //___________________________________//
+  //__Create an AliTagCreator object___//
+  //___________________________________//
   AliTagCreator *t = new AliTagCreator(); 
-  
-  //Query the file catalog and get a TGridResult
-  //TGridResult* result = gGrid->Query("/alice/cern.ch/user/p/peters/analysis/undcent1","*.root","","-l 150 -Opublicaccess=1");  
-  TGridResult* result = gGrid->Query("/alice/cern.ch/user/p/pchrista/PDC05/pp/*","AliESDs.root","",""); 
-  
-  //Store the tag files in AliEn's file catalog
-  t->SetStorage(1);
-  //Define the SE where the tag files will be stored
-  t->SetSE("ALICE::CERN::se01");
+    
+  //___________________________________//
+  //_____ Storage of the tag files:____//
+  //________0-->local, 1-->alien_______//
+  //___________________________________//
+  t->SetStorage(0);
   //Define the grid's path where the tag files will be stored
-  t->SetGridPath("PDC05/pp/Tags");
+  //t->SetGridPath("Tags/output");
+  //Define the SE where the tag files will be stored
+  //t->SetSE("ALICE::CERN::se01");
+
+  //___________________________________//
+  //________Locally stored ESDs________//
+  //___________________________________//
+  t->ReadLocalCollection("/home/pchrist/ALICE/Alien/Local/Tags");
+
+  //___________________________________//
+  //__________CAF stored ESDs__________//
+  //___________________________________//
+  //t->ReadCAFCollection("ESD1.txt");
+  
+  //___________________________________//
+  //_________Alien stored ESDs_________//
+  //___________________________________//
+  //XML collection
+  //TAlienCollection *collection = TAlienCollection::Open("pp.xml");
+  //TGridResult* result = collection->GetGridResult("",1);
   //Read the TGridResult, create the tags and store them
-  t->ReadESDCollection(result);
+  //t->ReadGridCollection(result);
+
+  //___________________________________//
+  //___________Merge the tags__________//
+  //___________________________________//
   //Merge the tags and store the merged file
   t->MergeTags();
+
   timer.Stop();
   timer.Print();
 }
+