]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/ITSfastrecpoints.C
Buffer Size can be defined
[u/mrichter/AliRoot.git] / ITS / ITSfastrecpoints.C
CommitLineData
077403c2 1#include "iostream.h"
2
3void ITSfastrecpoints (Int_t evNumber1=0,Int_t evNumber2=0,Int_t nsignal =25, Int_t size=-1)
4{
5/////////////////////////////////////////////////////////////////////////
6// This macro is a small example of a ROOT macro
7// illustrating how to read the output of GALICE
8// and do some analysis.
9//
10/////////////////////////////////////////////////////////////////////////
11
12// Dynamically link some shared libs
13
14 if (gClassTable->GetID("AliRun") < 0) {
15 gROOT->LoadMacro("loadlibs.C");
16 loadlibs();
17 }
18
19
20// Connect the Root Galice file containing Geometry, Kine and Hits
21
22 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
23 printf("file %p\n",file);
24 if (file) file->Close();
25 file = new TFile("galice.root","UPDATE");
26 file->ls();
27
28 printf ("I'm after Map \n");
29
30// Get AliRun object from file or create it if not on file
31
32 if (!gAlice) {
33 gAlice = (AliRun*)file->Get("gAlice");
34 if (gAlice) printf("AliRun object found on file\n");
35 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
36 }
37 printf ("I'm after gAlice \n");
38
39 AliITS *ITS = (AliITS*) gAlice->GetModule("ITS");
40 if (!ITS) return;
41
42//
43// Event Loop
44//
45
46 Int_t nbgr_ev=0;
47
48 for (int ev=evNumber1; ev<= evNumber2; ev++) {
49 Int_t nparticles = gAlice->GetEvent(ev);
50 cout << "event " <<ev<<endl;
51 cout << "nparticles " <<nparticles<<endl;
52 if (ev < evNumber1) continue;
53 if (nparticles <= 0) return;
54
55 Int_t bgr_ev=Int_t(ev/nsignal);
56 //printf("bgr_ev %d\n",bgr_ev);
57 ITS->HitsToFastRecPoints(ev,bgr_ev,evNumber2,size," ","All"," ");
58 //ITS->HitsToDigits(ev,bgr_ev,evNumber2,size," ","SSD"," ");
59 } // event loop
60
61 file->Close();
62}
63
64
65
66
67
68
69
70
71
72
73
74
75
76