]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/MergeTags.C
Removing extern call to gROOT to allow compilation with ROOT6.
[u/mrichter/AliRoot.git] / STEER / MergeTags.C
1 //_________________________________________________________________________
2 // Macro to merge 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 //_________________________________________________________________________
11 void MergeTags(const char* fCollectionName) {
12   //connect to AliEn's API services
13   TGrid::Connect("alien://pcapiserv01.cern.ch:10000","pchrist");  
14   //TGrid::Connect("alien://"); 
15     
16   //___________________________________//
17   //__Create an AliTagCreator object___//
18   //___________________________________//
19   AliTagCreator *t = new AliTagCreator(); 
20     
21   //___________________________________//
22   //_____ Storage of the tag files:____//
23   //________0-->local, 1-->alien_______//
24   //___________________________________//
25   t->SetStorage(0);
26
27   //___________________________________//
28   //__________Merge tag files__________//
29   //___________________________________//
30   //XML collection
31   TAlienCollection *collection = TAlienCollection::Open(fCollectionName);
32   TGridResult* result = collection->GetGridResult("");
33   //Read the TGridResult and merge the tags
34   t->MergeTags(result);
35 }