]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/TagMacros/MergeESDTags.C
Updated computation of truncated mean of dE/dx from ITS layers (F. Prino)
[u/mrichter/AliRoot.git] / ANALYSIS / TagMacros / MergeESDTags.C
1 void MergeESDTags()
2 {
3   char spath[2048];
4   char sglob[1024];
5   sprintf(spath,"");
6   sprintf(sglob,"");
7   for (int i=0; i< gApplication->Argc();i++){
8     if (!(strcmp(gApplication->Argv(i),"--path")))
9       sprintf(spath, gApplication->Argv(i+1));
10     if (!(strcmp(gApplication->Argv(i),"--glob")))
11       sprintf(sglob, gApplication->Argv(i+1));
12   }
13
14   if (!strcmp(sglob, "")) sprintf(sglob, "ESD.tag.root");
15
16   printf("*** Connect to AliEn ***\n");
17   TGrid::Connect("alien://");
18   gSystem->Load("libProofPlayer.so");
19   gSystem->Load("libANALYSIS.so");
20   gSystem->Load("libANALYSISalice.so");
21   
22   // Create A tag creator object 
23   AliESDTagCreator *tagCre = new AliESDTagCreator();
24   tagCre->SetStorage(0);
25
26   // Find all the event tag files in the GRID directory
27   TGridResult* tagResult = gGrid->Query(spath,"ESD.tag.root");
28
29   // Merge the tags     
30   tagCre->MergeTagsForRun("ESD",tagResult);
31
32   return;
33 }