1 //_________________________________________________________________________
2 // Macro to create the tag files from an ESD collection.
3 // The tag files are stored according to the value set in the SetStorage method
5 // SetStorage(0) --> store the tgs locally
6 // SetStorage(1) --> store the tgs in the grid
7 // else the program will abort!!!
9 // As a final step the user can create a single merged tag file.
10 //_________________________________________________________________________
16 //connect to AliEn's API services
17 TGrid::Connect("alien://");
19 //create an AliTagCreator object
20 AliTagCreator *t = new AliTagCreator();
22 //Query the file catalog and get a TGridResult
23 //TGridResult* result = gGrid->Query("/alice/cern.ch/user/p/peters/analysis/undcent1","*.root","","-l 150 -Opublicaccess=1");
24 TGridResult* result = gGrid->Query("/alice/cern.ch/user/p/pchrista/PDC05/pp/*","AliESDs.root","","");
26 //Store the tag files in AliEn's file catalog
28 //Define the SE where the tag files will be stored
29 t->SetSE("ALICE::CERN::se01");
30 //Define the grid's path where the tag files will be stored
31 t->SetGridPath("PDC05/pp/Tags");
32 //Read the TGridResult, create the tags and store them
33 t->ReadESDCollection(result);
34 //Merge the tags and store the merged file