How to create the tag files
- Interactive creation of the tags for locally stored ESDs
- Interactive creation of the tags for grid stored ESDs
- Interactive Creation of the tags for the ESDs stored on the CAF
How to create the tag files
The tag files can be created from two independent processes:
- On the fly: The tag files are created as a last step of the reconstruction code, after the AliESDs.root is filled. This is the way the "official" tag files are created.
- Post process: The tag files are created in an independent process after the AliESDs.root files are created and registered in the file catalog. This is the way each individual user can create his/her own tag files for analysis purposes.
Every user can use the officially created tag files!!!
This page addresses the second issue: the post creation of the tag files by individual users. The class that deals with this creation procedure is the AliESDTagCreator which can be found under the STEER module of $ALICE_ROOT. It provides the functionality to every user to create his/her own tag files according to where the ESDs are stored:
- The AliESDs.root files are stored locally (case where for debugging or other reasons a user has a few ESD files stored locally).
- The AliESDs.root files are stored in the CAF.
- The AliESDs.root files are stored in the file catalog.
Interactive creation of the tags for locally stored ESDs
We suppose that a few ESDs are stored locally under the path $HOME/ALICE/PDC06. One level down, the file system structure could be:
- XXX/AliESDs.root
- YYY/AliESDs.root
- ZZZ/AliESDs.root
Then we proceed as follows:
- Create an AliTagCreator Object
AliESDTagCreator *t = new AliESDTagCreator(); - Set the storage to 0 (store the tags locally)
t->SetStorage(0); - Read the (locally stored) ESDs and create the tag files by providing the upper level directory where the ESDs are stored
t->ReadLocalCollection("$HOME/ALICE/PDC06/pp14TeV/"); - Merge all the tag files into one single merged file
t->MergeTags();
Interactive creation of the tags for grid stored ESDs
In the case where the AliESDs.root files are already registered in the file catalog and a user for his/her own analysis reasons wants to create tag files for these ESDs, then the first step is to query the file catalog in order to retrieve the collection of files that he/she is interested in.
- Create an AliTagCreator Object
AliESDTagCreator *t = new AliESDTagCreator(); - Set the storage to 0 (store the tags locally)
t->SetStorage(0); - Open the xml collection and convert it to a TGridResult
TAlienCollection *collection = TAlienCollection::Open("pp.xml");
TGridResult* result = collection->GetGridResult("",0,0); - Read the entries of the TGridResult and create the tag files
t->ReadGridCollection(result); - Merge all the tag files into one single merged file
t->MergeTags();
Interactive Creation of the tags for the ESDs stored in the CAF
In the case where the ESDs are stored in the CAF, we take as an input an ascii file which holds the information about the location of the files in the storage element (ESD1.txt). Then we follow the next steps:
- Create an AliTagCreator Object
AliESDTagCreator *t = new AliESDTagCreator(); - Set the storage to 0 (store the tags locally)
t->SetStorage(0); - Read the (CAF stored) ESDs and create the tag files by providing the ascii file ESD1.txt
t->ReadCAFCollection("ESD1.txt"); - Merge all the tag files into one single merged file
t->MergeTags();
The macro CreateTags.C, is a simple example that demonstrates all the previous cases/steps.