ROOT logo
//_________________________________________________________________________
// Macro to create the tag files from:
// i)  AliESDs that are stored locally.
// ii) AliESDs that are stored in the CAF.
// iii)AliESDs that are stored in alien.
// The tag files are stored according to the value set in the SetStorage method
// Use Case : 
//          SetStorage(0) --> store the tags locally
//          SetStorage(1) --> store the tags in the grid
//          else the program will abort!!!                                    
//                                             
// As a final step the user can create a single merged tag file.         
//_________________________________________________________________________
void CreateTags() {
  TStopwatch timer;
  timer.Start();

  //___________________________________//
  //__Connect to AliEn's API services__//
  //___________________________________//
  //TGrid::Connect("alien://pcapiserv01.cern.ch:10000","pchrista"); 
  //TGrid::Connect("alien://");
    
  //___________________________________//
  //__Create an AliTagCreator object___//
  //___________________________________//
  AliTagCreator *t = new AliTagCreator(); 
    
  //___________________________________//
  //_____ Storage of the tag files:____//
  //________0-->local, 1-->alien_______//
  //___________________________________//
  t->SetStorage(0);
  //Define the grid's path where the tag files will be stored
  //t->SetGridPath("Tags/output");
  //Define the SE where the tag files will be stored
  //t->SetSE("ALICE::CERN::se01");

  //___________________________________//
  //________Locally stored ESDs________//
  //___________________________________//
  t->ReadLocalCollection("/home/pchrist/ALICE/Alien/Local/Tags");

  //___________________________________//
  //__________CAF stored ESDs__________//
  //___________________________________//
  //t->ReadCAFCollection("ESD1.txt");
  
  //___________________________________//
  //_________Alien stored ESDs_________//
  //___________________________________//
  //XML collection
  //TAlienCollection *collection = TAlienCollection::Open("pp.xml");
  //TGridResult* result = collection->GetGridResult("");
  //Read the TGridResult, create the tags and store them
  //t->ReadGridCollection(result);

  //___________________________________//
  //___________Merge the tags__________//
  //___________________________________//
  //Merge the tags and store the merged file
  t->MergeTags();

  timer.Stop();
  timer.Print();
}

 CreateTags.C:1
 CreateTags.C:2
 CreateTags.C:3
 CreateTags.C:4
 CreateTags.C:5
 CreateTags.C:6
 CreateTags.C:7
 CreateTags.C:8
 CreateTags.C:9
 CreateTags.C:10
 CreateTags.C:11
 CreateTags.C:12
 CreateTags.C:13
 CreateTags.C:14
 CreateTags.C:15
 CreateTags.C:16
 CreateTags.C:17
 CreateTags.C:18
 CreateTags.C:19
 CreateTags.C:20
 CreateTags.C:21
 CreateTags.C:22
 CreateTags.C:23
 CreateTags.C:24
 CreateTags.C:25
 CreateTags.C:26
 CreateTags.C:27
 CreateTags.C:28
 CreateTags.C:29
 CreateTags.C:30
 CreateTags.C:31
 CreateTags.C:32
 CreateTags.C:33
 CreateTags.C:34
 CreateTags.C:35
 CreateTags.C:36
 CreateTags.C:37
 CreateTags.C:38
 CreateTags.C:39
 CreateTags.C:40
 CreateTags.C:41
 CreateTags.C:42
 CreateTags.C:43
 CreateTags.C:44
 CreateTags.C:45
 CreateTags.C:46
 CreateTags.C:47
 CreateTags.C:48
 CreateTags.C:49
 CreateTags.C:50
 CreateTags.C:51
 CreateTags.C:52
 CreateTags.C:53
 CreateTags.C:54
 CreateTags.C:55
 CreateTags.C:56
 CreateTags.C:57
 CreateTags.C:58
 CreateTags.C:59
 CreateTags.C:60
 CreateTags.C:61
 CreateTags.C:62
 CreateTags.C:63
 CreateTags.C:64
 CreateTags.C:65
 CreateTags.C:66
 CreateTags.C:67
 CreateTags.C:68