]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/CreateTags.C
small fix
[u/mrichter/AliRoot.git] / STEER / CreateTags.C
CommitLineData
bc15652b 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
4// Use Case :
5// SetStorage(0) --> store the tgs locally
6// SetStorage(1) --> store the tgs in the grid
7// else the program will abort!!!
8//
9// As a final step the user can create a single merged tag file.
10//_________________________________________________________________________
11void CreateTags()
12{
13 TStopwatch timer;
14 timer.Start();
15
16 //connect to AliEn's API services
17 TGrid::Connect("alien://");
18
19 //create an AliTagCreator object
20 AliTagCreator *t = new AliTagCreator();
21
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","","");
25
26 //Store the tag files in AliEn's file catalog
27 t->SetStorage(1);
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
35 t->MergeTags();
36
37 timer.Stop();
38 timer.Print();
39}