1 // Macro to make a tag file for a full run directly from ESDs and the GRP
2 // Takes as parameters a text file with the location of all ESD files
3 // for a given run (can be modified to work on any chain of ESDs)
4 // Second argument is the run number, for which the GRP will be retrieved
5 // Suitable for a GRID job - runs with pure ROOT to minimize memory
6 // consumption but needs ALIROOT package location to load only necessary
9 // Author: Adam.Kisiel@cern.ch
11 AliGRPObject *GetGRPForRun(Int_t runno) {
12 AliCDBManager* man = AliCDBManager::Instance();
13 man->SetDefaultStorage("raw://");
15 AliCDBEntry* e = man->Get("GRP/GRP/Data");
16 AliGRPObject* o = (AliGRPObject*)e->GetObject();
21 void ReMakeTagsFullRun(const char *esdfile, Int_t runno)
23 gSystem->Load("libProofPlayer.so");
24 gSystem->Load("libVMC.so");
25 gSystem->Load("libSTEERBase.so");
26 gSystem->Load("libESD.so");
27 gSystem->Load("libAOD.so");
28 gSystem->Load("libANALYSIS.so");
29 gSystem->Load("libANALYSISalice.so");
30 gSystem->Load("libGui.so");
31 gSystem->Load("libCDB.so");
33 gSystem->Load("libMinuit.so");
34 gSystem->Load("libRAWDatabase.so");
36 gSystem->Load("libSTEER.so");
37 gSystem->Load("libXMLParser.so");
39 TGrid::Connect("alien://");
42 AliGRPObject *grpo = GetGRPForRun(runno);
44 AliESDTagCreator *tagCre = new AliESDTagCreator();
45 tagCre->SetStorage(0);
48 TChain *chain = new TChain("esdTree");;
49 ifstream *istr = new ifstream(esdfile);
53 while (!istr->eof()) {
56 if (strlen(fname) > 10) {
57 sprintf(pname, "alien://%s", fname);
62 tagCre->CreateESDTagsFullRun(chain, grpo, 0, 0, 0, 0);