]>
Commit | Line | Data |
---|---|---|
bc15652b | 1 | //_________________________________________________________________________ |
120f88d8 | 2 | // Macro to create the tag files from: |
3 | // i) AliESDs that are stored locally. | |
4 | // ii) AliESDs that are stored in the CAF. | |
5 | // iii)AliESDs that are stored in alien. | |
bc15652b | 6 | // The tag files are stored according to the value set in the SetStorage method |
7 | // Use Case : | |
120f88d8 | 8 | // SetStorage(0) --> store the tags locally |
9 | // SetStorage(1) --> store the tags in the grid | |
bc15652b | 10 | // else the program will abort!!! |
11 | // | |
12 | // As a final step the user can create a single merged tag file. | |
13 | //_________________________________________________________________________ | |
120f88d8 | 14 | void CreateTags() { |
bc15652b | 15 | TStopwatch timer; |
16 | timer.Start(); | |
17 | ||
120f88d8 | 18 | //___________________________________// |
19 | //__Connect to AliEn's API services__// | |
20 | //___________________________________// | |
21 | //TGrid::Connect("alien://pcapiserv01.cern.ch:10000","pchrista"); | |
22 | //TGrid::Connect("alien://"); | |
23 | ||
24 | //___________________________________// | |
25 | //__Create an AliTagCreator object___// | |
26 | //___________________________________// | |
bc15652b | 27 | AliTagCreator *t = new AliTagCreator(); |
120f88d8 | 28 | |
29 | //___________________________________// | |
30 | //_____ Storage of the tag files:____// | |
31 | //________0-->local, 1-->alien_______// | |
32 | //___________________________________// | |
33 | t->SetStorage(0); | |
bc15652b | 34 | //Define the grid's path where the tag files will be stored |
120f88d8 | 35 | //t->SetGridPath("Tags/output"); |
36 | //Define the SE where the tag files will be stored | |
37 | //t->SetSE("ALICE::CERN::se01"); | |
38 | ||
39 | //___________________________________// | |
40 | //________Locally stored ESDs________// | |
41 | //___________________________________// | |
42 | t->ReadLocalCollection("/home/pchrist/ALICE/Alien/Local/Tags"); | |
43 | ||
44 | //___________________________________// | |
45 | //__________CAF stored ESDs__________// | |
46 | //___________________________________// | |
47 | //t->ReadCAFCollection("ESD1.txt"); | |
48 | ||
49 | //___________________________________// | |
50 | //_________Alien stored ESDs_________// | |
51 | //___________________________________// | |
52 | //XML collection | |
53 | //TAlienCollection *collection = TAlienCollection::Open("pp.xml"); | |
bfef3b5f | 54 | //TGridResult* result = collection->GetGridResult(""); |
bc15652b | 55 | //Read the TGridResult, create the tags and store them |
120f88d8 | 56 | //t->ReadGridCollection(result); |
57 | ||
58 | //___________________________________// | |
59 | //___________Merge the tags__________// | |
60 | //___________________________________// | |
bc15652b | 61 | //Merge the tags and store the merged file |
62 | t->MergeTags(); | |
120f88d8 | 63 | |
bc15652b | 64 | timer.Stop(); |
65 | timer.Print(); | |
66 | } | |
120f88d8 | 67 |