]>
Commit | Line | Data |
---|---|---|
5481c137 | 1 | ///////////////////////////////////////////////// |
2 | // Macro to test the IceF2k conversion job class | |
f67e2651 | 3 | // |
4 | // To run this macro in batch, just do | |
5 | // | |
5481c137 | 6 | // root -b -q icef2k.cc |
7 | // | |
f5b75967 | 8 | // For more details and a more user friendly |
9 | // output file setting, see the docs of class IceF2k | |
f67e2651 | 10 | // |
11 | // NvE 11-mar-2005 Utrecht University | |
5481c137 | 12 | ///////////////////////////////////////////////// |
f67e2651 | 13 | { |
14 | gSystem->Load("ralice"); | |
15 | gSystem->Load("icepack"); | |
16 | gSystem->Load("iceconvert"); | |
17 | ||
5481c137 | 18 | IceF2k q("IceF2k","Test of IceF2k conversion job"); |
f67e2651 | 19 | |
20 | // Limit the number of entries for testing | |
5481c137 | 21 | q.SetMaxEvents(100); |
f67e2651 | 22 | |
23 | // Print frequency to produce a short summary print every printfreq events | |
5481c137 | 24 | q.SetPrintFreq(10); |
f67e2651 | 25 | |
88b8d522 | 26 | // The F2K input filename(s) |
27 | q.AddInputFile("run7825.f2k"); | |
f67e2651 | 28 | |
5481c137 | 29 | // Output file for the event structures |
30 | TFile* ofile=new TFile("events.root","RECREATE","F2K data in IceEvent structure"); | |
31 | q.SetOutputFile(ofile); | |
32 | ||
33 | /////////////////////////////////////////////////////////////////// | |
34 | // Here the user can specify his/her sub-tasks to be executed | |
35 | // on an event-by-event basis after the IceEvent structure | |
36 | // has been filled and before the data is written out. | |
37 | // Sub-tasks (i.e. a user classes derived from TTask) are entered | |
38 | // as follows : | |
39 | // | |
40 | // MyXtalk task1("task1","Cross talk correction"); | |
41 | // MyClean task2("task2","Hit cleaning"); | |
42 | // q.Add(&task1); | |
43 | // q.Add(&task2); | |
44 | // | |
45 | // The sub-tasks will be executed in the order as they are entered. | |
46 | /////////////////////////////////////////////////////////////////// | |
f67e2651 | 47 | |
5481c137 | 48 | // Perform the conversion |
49 | q.ExecuteJob(); | |
f67e2651 | 50 | |
51 | // Select various objects to be added to the output file | |
52 | ||
1c9018c6 | 53 | ofile->cd(); // Switch to the output file directory |
54 | ||
f67e2651 | 55 | AliObjMatrix* omdb=q.GetOMdbase(); |
56 | if (omdb) omdb->Write(); | |
57 | ||
58 | AliDevice* fitdefs=q.GetFitdefs(); | |
59 | if (fitdefs) fitdefs->Write(); | |
60 | ||
61 | TDatabasePDG* pdg=q.GetPDG(); | |
62 | if (pdg) pdg->Write(); | |
5481c137 | 63 | |
f5b75967 | 64 | // Flush additional objects to the output file. |
9f575717 | 65 | // The output file is not explicitly closed here |
f5b75967 | 66 | // to allow interactive investigation of the data tree |
9f575717 | 67 | // when this macro is run in an interactive ROOT/CINT session. |
f67e2651 | 68 | ofile->Write(); |
f67e2651 | 69 | } |