]>
Commit | Line | Data |
---|---|---|
38300302 | 1 | ///////////////////////////////////////// |
2 | // Class for SSD raw2digits conv // | |
3 | // // | |
4 | // Author: Enrico Fragiacomo // | |
5 | // Date: October 2004 // | |
6 | //////////////////////////////////////// | |
7 | ||
8 | #include "AliITSdigitSSD.h" | |
9 | #include "AliRawReaderDate.h" | |
10 | #include "AliITSRawStreamSSDv1.h" | |
11 | #include "AliITSBeamTestDigSSD.h" | |
12 | #include "AliITSBeamTest.h" | |
13 | ||
14 | ClassImp(AliITSBeamTestDigSSD) | |
15 | ||
16 | //_____________________________________________________________ | |
17 | AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(): AliITSBeamTestDig() { | |
18 | // | |
19 | // Constructor | |
20 | // | |
21 | } | |
22 | ||
23 | //_____________________________________________________________ | |
24 | AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title) { | |
25 | // | |
26 | // Constructor | |
27 | // | |
28 | } | |
29 | ||
30 | //__________________________________________________________________ | |
31 | AliITSBeamTestDigSSD::~AliITSBeamTestDigSSD() { | |
32 | // | |
33 | // Destructor | |
34 | // | |
35 | } | |
36 | ||
37 | //_______________________________________________________________________ | |
38 | void AliITSBeamTestDigSSD::Exec(Option_t* /*opt*/) { | |
39 | //Reads raw data for SSD, fill SSD digits tree, returns 1 if real data, | |
40 | //returns 2 if calibration (injector) data, returns 3 if calibration (test pul //se) event | |
41 | ||
42 | TBranch* branch = fTreeD->GetBranch("ITSDigitSSD"); | |
43 | ||
44 | TClonesArray** newdigits = new TClonesArray*[fBt->GetNSSD()]; | |
45 | ||
46 | Int_t* idig = new Int_t[fBt->GetNSSD()]; | |
47 | ||
48 | for (Int_t idet =0; idet < fBt->GetNSSD();idet++) { | |
49 | newdigits[idet] = new TClonesArray("AliITSdigitSSD"); | |
50 | idig[idet]=0; | |
51 | } | |
52 | ||
53 | // this constructor sets the flag to select SSD data only | |
54 | // the Next method below will then jump to SSD data for this event | |
55 | ||
56 | AliITSRawStreamSSDv1 str(fReaderDate); | |
57 | ||
58 | // no selection of equipment | |
59 | //fReaderDate->SelectEquipment(-1); | |
60 | //fReaderDate->SelectEquipment(17,102,102); | |
61 | ||
62 | while(str.Next()){ | |
63 | ||
64 | //if((str.GetADModule()!=2)&&(str.GetADModule()!=6)) continue; | |
65 | ||
66 | Int_t side = str.GetSideFlag(); | |
67 | Int_t strip = str.GetStrip(); | |
68 | Int_t signal = str.GetSignal(); | |
69 | Int_t module = str.GetModuleID(); | |
70 | if( (module<10) || (module>13) ) continue; | |
71 | const Int_t kdgt[3]={side,strip,signal}; | |
72 | ||
73 | // SSD modules 10, 11, 12 and 13 | |
74 | new ( (*newdigits[module-10])[idig[module-10]] ) AliITSdigitSSD(kdgt); | |
75 | idig[module-10]++; | |
76 | ||
77 | } // end while | |
78 | ||
79 | for(Int_t n=0;n<fBt->GetNSSD();n++){ | |
80 | branch->SetAddress(&newdigits[n]); | |
81 | branch->Fill(); | |
82 | } | |
83 | ||
84 | fTreeD->SetEntries(fBt->GetNSPD()+fBt->GetNSDD()+fBt->GetNSSD()); | |
85 | ||
86 | fReaderDate->Reset(); | |
87 | ||
88 | fTreeD->AutoSave(); | |
89 | ||
90 | for(Int_t n=0;n<fBt->GetNSSD();n++){ | |
91 | delete newdigits[n]; | |
92 | } | |
93 | ||
94 | } | |
95 | ||
96 | ||
97 |