]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSDDLRawData.C
Removing obsolete macros
[u/mrichter/AliRoot.git] / ITS / AliITSDDLRawData.C
CommitLineData
2e9f335b 1#if !defined(__CINT__) || defined(__MAKECINT__)
2
3#include <iostream.h>
4#include "AliITSDDLRawData.h"
5#endif
6
7/*
a79660fb 8Before running this macro it is necessary to comment the following line of the method
2e9f335b 9AddDigit in the class AliITSsimulationSDD
10//if( fResponse->Do10to8() ) signal = Convert8to10( signal );
11In this way the amplitude value for signal coming from SDD takes only 8 bits and not 10.
12*/
13
14void AliITSDDLRawData(char* DigitsFile="galice.root"){
15 #ifdef __NOCOMPILED__
16 if (gClassTable->GetID("AliRun") < 0) {
17 gROOT->LoadMacro("loadlibs.C");
18 loadlibs();
19 }
20 else {
21#endif
22 if(gAlice){
23 delete gAlice;
24 gAlice=0;
25 }
26#ifdef __NOCOMPILED__
27 }
28#endif
a79660fb 29 // Connect the Root input file containing Geometry, Kine and Hits
2e9f335b 30 // galice.root file by default
31 char* filename="galice.root";
32 // TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
33 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(DigitsFile);
34 if (!file){
35 // file = new TFile(filename);
36 file = new TFile(DigitsFile);
37 cout<<"NEW FILE CREATED !!!"<<endl;
38 }//end if
39 file->ls();
40 // Get AliRun object from file
41 if (!gAlice) {
42 gAlice = (AliRun*)file->Get("gAlice");
43 if (gAlice)cout<<"AliRun object found on file "<<filename<<endl;
44 if(!gAlice){
45 cout<<"Can't access AliRun object on file "<<filename<<endl;
46 cout<<"Macro execution stopped!!!"<<endl;
47 }
48 }
49 // gAlice->SetTreeDFileName("digits.root");
50 gAlice->SetTreeDFileName(DigitsFile);
51 Int_t nparticles = gAlice->GetEvent(0);
52 //
53 // ITS
54 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
55 Int_t nmodules;
56 ITS->InitModules(-1,nmodules);
57
58 cout<<"Number of ITS modules= "<<nmodules<<endl;
59 //cout<<"Filling modules... It takes a while, now. Please be patient"<<endl;
60 //ITS->FillModules(0,0,nmodules," "," ");
61 //cout<<"ITS modules .... DONE!"<<endl;
62 // DIGITS
63 TTree *TD = gAlice->TreeD();
64
65 AliITSDDLRawData *util=new AliITSDDLRawData();
66 TStopwatch timer;
67
68 //SILICON PIXEL DETECTOR
69 cout<<"Formatting data for SPD"<<endl;
70 timer.Start();
71 util->RawDataSPD(ITS,TD);
72 timer.Stop();
73 timer.Print();
a79660fb 74 //util->TestFormat();
2e9f335b 75
76 //SILICON DRIFT DETECTOR
77 cout<<"Formatting data for SDD"<<endl;
78 timer.Start();
79 util->RawDataSDD(ITS,TD);
80 timer.Stop();
81 timer.Print();
82
83 //SILICON STRIP DETECTOR
84 cout<<"Formatting data for SSD"<<endl;
85 timer.Start();
86 util->RawDataSSD(ITS,TD);
87 timer.Stop();
88 timer.Print();
89
90 delete util;
91 return;
92}