f67e2651 |
1 | ////////////////////////////////////////////// |
2 | // Macro to test new IceF2k conversion class |
3 | // |
4 | // To run this macro in batch, just do |
5 | // |
6 | // root -b -q |
7 | // |
8 | // NvE 11-mar-2005 Utrecht University |
9 | ////////////////////////////////////////////// |
10 | { |
11 | gSystem->Load("ralice"); |
12 | gSystem->Load("icepack"); |
13 | gSystem->Load("iceconvert"); |
14 | |
15 | // Output file for the event structures |
16 | TFile* ofile=new TFile("events.root","RECREATE","F2K data in IceEvent structure"); |
17 | TTree* otree=new TTree("T","Data of an Amanda run"); |
18 | |
19 | // Limit the number of entries for testing |
20 | Int_t nentries=5; |
21 | |
22 | // Print frequency to produce a short summary print every printfreq events |
23 | Int_t printfreq=1; |
24 | |
25 | // Split level for the output structures |
26 | Int_t split=2; |
27 | |
28 | // Buffer size for the output structures |
29 | Int_t bsize=32000; |
30 | |
31 | IceF2k q("run7825.f2k",split,bsize); |
32 | q.Loop(otree,nentries,printfreq); |
33 | |
34 | // Select various objects to be added to the output file |
35 | |
36 | AliObjMatrix* omdb=q.GetOMdbase(); |
37 | if (omdb) omdb->Write(); |
38 | |
39 | AliDevice* fitdefs=q.GetFitdefs(); |
40 | if (fitdefs) fitdefs->Write(); |
41 | |
42 | TDatabasePDG* pdg=q.GetPDG(); |
43 | if (pdg) pdg->Write(); |
44 | |
45 | // Close output file |
46 | ofile->Write(); |
47 | ofile->Close(); |
48 | } |