]> git.uio.no Git - u/mrichter/AliRoot.git/blame - T0/DigitMaker.C
set LookUp table
[u/mrichter/AliRoot.git] / T0 / DigitMaker.C
CommitLineData
dc7ca31d 1void DigitMaker (Int_t evNumber=1)
2{
3 /////////////////////////////////////////////////////////////////////////
4 // This macro is a small example of a ROOT macro
5 // illustrating how to read the output of GALICE
6 // and fill some histograms.
7 //
8 // Root > .L anal.C //this loads the macro in memory
9 // Root > anal(); //by default process first event
10 // Root > anal(2); //process third event
11 //Begin_Html
12 /*
13 <img src="gif/anal.gif">
14 */
15 //End_Html
16 /////////////////////////////////////////////////////////////////////////
17
18
19 // Dynamically link some shared libs
20 if (gClassTable->GetID("AliRun") < 0) {
21 gROOT->LoadMacro("loadlibs.C");
22 loadlibs();
23 }
24
25 // Connect the Root Galice file containing Geometry, Kine and Hits
26 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
27 if (!file) file = new TFile("galice.root","UPDATE");
28
29 // Get AliRun object from file or create it if not on file
30 if (!gAlice) {
31 gAlice = (AliRun*)file->Get("gAlice");
32 if (gAlice) printf("AliRun object found on file\n");
33 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
34 }
35
36 TParticle *particle;
37 AliT0hit *startHit;
38
39 Int_t buffersize=256;
40 Int_t split=1;
41
42 digits= new AliT0digit();
43 TBranch *bDig=0;
44 printf("Branch\n");
45
46
47 AliT0 *T0 = (AliT0*) gAlice->GetDetector("T0");
48
49 // Event ------------------------- LOOP
50
51 for (j=0; j<evNumber; j++){
52
53
54 T0->Hit2digit(j);
55
56 }// event loop
57
58 file->Write();
59 file->Close();
60
61
62}//endmacro
63
64
65
66
67
68
69
70
71
72
73
74
75