commented define _ClusterTopology_ - to be used only for the special productions
[u/mrichter/AliRoot.git] / ITS / AliITSDDLRawData.C
... / ...
CommitLineData
1#if !defined(__CINT__)
2#include <Riostream.h>
3#include "AliITSDDLRawData.h"
4#include "AliRunLoader.h"
5#include "AliLoader.h"
6#include "AliITS.h"
7#endif
8
9//DigitsFile is the input file that contains digits
10
11void AliITSDDLRawData(Int_t eventNumber=0){
12
13 Int_t spdLDCs=2;
14 Int_t sddLDCs=4;
15 Int_t ssdLDCs=2;
16 Int_t eventn=0;
17 const char * inFile_new = "galice.root";
18 AliRunLoader *rl = AliRunLoader::Open(inFile_new,"Event","read");
19 rl->LoadgAlice();
20 gAlice=rl->GetAliRun();
21 Int_t nevents=rl->GetNumberOfEvents();
22 cout<<"Number of Events:"<<nevents<<endl;
23 while (eventNumber<=0 || eventNumber>nevents){
24 cout<<"Insert the event number:";
25 cin>>eventNumber;
26 cout<<endl;
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);
41 ITS->GetDetTypeSim()->SetTreeAddressD(TD,"ITS");
42
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();
58 util->RawDataSPD(ITS,TD,spdLDCs,eventNumber);
59 timer.Stop();
60 timer.Print();
61 //ONLY FOR DEBUGGING
62 // util->TestFormat(eventNumber);
63
64 //SILICON DRIFT DETECTOR
65 cout<<"Formatting data for SDD"<<endl;
66 timer.Start();
67 util->RawDataSDD(ITS,TD,sddLDCs,eventNumber);
68 timer.Stop();
69 timer.Print();
70
71 //SILICON STRIP DETECTOR
72 cout<<"Formatting data for SSD"<<endl;
73 timer.Start();
74 util->RawDataSSD(ITS,TD,ssdLDCs,eventNumber);
75 timer.Stop();
76 timer.Print();
77
78 delete util;
79
80 return;
81}