1 /////////////////////////////////////////////////
2 // Macro to test the IceF2k conversion job class
4 // To run this macro in batch, just do
6 // root -b -q icef2k.cc
8 // For more details and a more user friendly
9 // output file setting, see the docs of class IceF2k
11 // NvE 11-mar-2005 Utrecht University
12 /////////////////////////////////////////////////
14 gSystem->Load("ralice");
15 gSystem->Load("icepack");
16 gSystem->Load("iceconvert");
18 IceF2k q("IceF2k","Test of IceF2k conversion job");
20 // Limit the number of entries for testing
23 // Print frequency to produce a short summary print every printfreq events
26 // The F2K input filename(s)
27 q.AddInputFile("run7825.f2k");
29 // Output file for the event structures
30 TFile* ofile=new TFile("events.root","RECREATE","F2K data in IceEvent structure");
31 q.SetOutputFile(ofile);
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
40 // MyXtalk task1("task1","Cross talk correction");
41 // MyClean task2("task2","Hit cleaning");
45 // The sub-tasks will be executed in the order as they are entered.
46 ///////////////////////////////////////////////////////////////////
48 // Perform the conversion
51 // Select various objects to be added to the output file
53 ofile->cd(); // Switch to the output file directory
55 AliObjMatrix* omdb=q.GetOMdbase();
56 if (omdb) omdb->Write();
58 AliDevice* fitdefs=q.GetFitdefs();
59 if (fitdefs) fitdefs->Write();
61 TDatabasePDG* pdg=q.GetPDG();
62 if (pdg) pdg->Write();
64 // Flush additional objects to the output file.
65 // The output file is not explicitly closed here
66 // to allow interactive investigation of the data tree
67 // when this macro is run in an interactive ROOT/CINT session.