]>
Commit | Line | Data |
---|---|---|
c9bd9d3d | 1 | #if !defined(__CINT__) |
2 | #include <Riostream.h> | |
2e9f335b | 3 | #include "AliITSDDLRawData.h" |
04fa961a | 4 | #include "AliRunLoader.h" |
5 | #include "AliLoader.h" | |
6 | #include "AliITS.h" | |
2e9f335b | 7 | #endif |
8 | ||
9f992f70 | 9 | //DigitsFile is the input file that contains digits |
2e9f335b | 10 | |
04fa961a | 11 | void AliITSDDLRawData(Int_t eventNumber=0){ |
12 | ||
c9bd9d3d | 13 | Int_t spdLDCs=2; |
14 | Int_t sddLDCs=4; | |
15 | Int_t ssdLDCs=2; | |
04fa961a | 16 | Int_t eventn=0; |
17 | const char * inFile_new = "galice.root"; | |
18 | AliRunLoader *rl = AliRunLoader::Open(inFile_new,"Event","read"); | |
19 | rl->LoadgAlice(); | |
7d62fb64 | 20 | gAlice=rl->GetAliRun(); |
04fa961a | 21 | Int_t nevents=rl->GetNumberOfEvents(); |
22 | cout<<"Number of Events:"<<nevents<<endl; | |
23 | while (eventNumber<=0 || eventNumber>nevents){ | |
c9bd9d3d | 24 | cout<<"Insert the event number:"; |
25 | cin>>eventNumber; | |
26 | cout<<endl; | |
04fa961a | 27 | } |
28 | rl->GetEvent(eventNumber-1); | |
29 | AliLoader *itsloader=rl->GetLoader("ITSLoader"); | |
30 | itsloader->LoadDigits(); | |
31 | TTree *TD=itsloader->TreeD(); | |
32 | gAlice=rl->GetAliRun(); | |
33 | if(!gAlice){ | |
34 | cout<<"gAlice is null"<<endl; | |
35 | return; | |
36 | } | |
37 | AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS"); | |
38 | ||
39 | Int_t nmodules; | |
40 | ITS->InitModules(-1,nmodules); | |
7d62fb64 | 41 | ITS->GetDetTypeSim()->SetTreeAddressD(TD,"ITS"); |
c9bd9d3d | 42 | |
9f992f70 | 43 | AliITSDDLRawData *util=new AliITSDDLRawData(); |
44 | //Verbose level | |
45 | // 0: Silent | |
46 | // 1: cout messages | |
47 | // 2: txt files with digits | |
48 | //BE CAREFUL, verbose level 2 MUST be used only for debugging and | |
49 | //it is highly suggested to use this mode only for debugging digits files | |
50 | //reasonably small, because otherwise the size of the txt files can reach | |
51 | //quickly several MB wasting time and disk space. | |
52 | util->SetVerbose(0); | |
53 | TStopwatch timer; | |
54 | ||
55 | //SILICON PIXEL DETECTOR | |
56 | cout<<"Formatting data for SPD"<<endl; | |
57 | timer.Start(); | |
c9bd9d3d | 58 | util->RawDataSPD(ITS,TD,spdLDCs,eventNumber); |
9f992f70 | 59 | timer.Stop(); |
60 | timer.Print(); | |
61 | //ONLY FOR DEBUGGING | |
c9bd9d3d | 62 | // util->TestFormat(eventNumber); |
63 | ||
9f992f70 | 64 | //SILICON DRIFT DETECTOR |
65 | cout<<"Formatting data for SDD"<<endl; | |
66 | timer.Start(); | |
c9bd9d3d | 67 | util->RawDataSDD(ITS,TD,sddLDCs,eventNumber); |
9f992f70 | 68 | timer.Stop(); |
69 | timer.Print(); | |
70 | ||
71 | //SILICON STRIP DETECTOR | |
72 | cout<<"Formatting data for SSD"<<endl; | |
73 | timer.Start(); | |
c9bd9d3d | 74 | util->RawDataSSD(ITS,TD,ssdLDCs,eventNumber); |
9f992f70 | 75 | timer.Stop(); |
76 | timer.Print(); | |
77 | ||
78 | delete util; | |
04fa961a | 79 | |
9f992f70 | 80 | return; |
2e9f335b | 81 | } |