Corrected overloading of operator new (icc)
[u/mrichter/AliRoot.git] / RALICE / icepack / iceconvert / macros / icef2k.cc
CommitLineData
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//
8// For more details see the docs of class IceF2k
f67e2651 9//
10// NvE 11-mar-2005 Utrecht University
5481c137 11/////////////////////////////////////////////////
f67e2651 12{
13 gSystem->Load("ralice");
14 gSystem->Load("icepack");
15 gSystem->Load("iceconvert");
16
5481c137 17 IceF2k q("IceF2k","Test of IceF2k conversion job");
f67e2651 18
19 // Limit the number of entries for testing
5481c137 20 q.SetMaxEvents(100);
f67e2651 21
22 // Print frequency to produce a short summary print every printfreq events
5481c137 23 q.SetPrintFreq(10);
f67e2651 24
5481c137 25 // The F2K input filename
26 q.SetInputFile("run7825.f2k");
f67e2651 27
5481c137 28 // Output file for the event structures
29 TFile* ofile=new TFile("events.root","RECREATE","F2K data in IceEvent structure");
30 q.SetOutputFile(ofile);
31
32 ///////////////////////////////////////////////////////////////////
33 // Here the user can specify his/her sub-tasks to be executed
34 // on an event-by-event basis after the IceEvent structure
35 // has been filled and before the data is written out.
36 // Sub-tasks (i.e. a user classes derived from TTask) are entered
37 // as follows :
38 //
39 // MyXtalk task1("task1","Cross talk correction");
40 // MyClean task2("task2","Hit cleaning");
41 // q.Add(&task1);
42 // q.Add(&task2);
43 //
44 // The sub-tasks will be executed in the order as they are entered.
45 ///////////////////////////////////////////////////////////////////
f67e2651 46
5481c137 47 // Perform the conversion
48 q.ExecuteJob();
f67e2651 49
50 // Select various objects to be added to the output file
51
52 AliObjMatrix* omdb=q.GetOMdbase();
53 if (omdb) omdb->Write();
54
55 AliDevice* fitdefs=q.GetFitdefs();
56 if (fitdefs) fitdefs->Write();
57
58 TDatabasePDG* pdg=q.GetPDG();
59 if (pdg) pdg->Write();
5481c137 60
f67e2651 61 // Close output file
62 ofile->Write();
63 ofile->Close();
64}