//_________________________________________________________________________
-// 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();
}
+