1 #if !defined(__CINT__) || defined(__MAKECINT__)
3 #include "AliTPCBuffer.h"
7 void AliTPCDDL(char* FileName,Int_t eth=0){
9 //Digits stored into a file have an amplitude value greater than "eth"
10 TFile *cf=TFile::Open(FileName);
11 // old geometry (3.07)
12 //AliTPCParamSR *param =(AliTPCParamSR *)cf->Get("75x40_100x60");
13 // if new geometry comment out the line above and uncomment the one below
14 AliTPCParamSR *param =(AliTPCParamSR *)cf->Get("75x40_100x60_150x60");
15 AliTPCDigitsArray *digarr=new AliTPCDigitsArray;
19 //sprintf(cname,"TreeD_75x40_100x60_%d",eventn);
20 // if new geometry comment out the line above and uncomment the one below
22 sprintf(cname,"TreeD_75x40_100x60_150x60_%d",eventn);
23 digarr->ConnectTree(cname);
24 AliTPCBuffer *b=new AliTPCBuffer("AliTPCDDL.dat");
29 // 2: txt files with digits
30 //BE CAREFUL, verbose level 2 MUST be used only for debugging and
31 //it is highly suggested to use this mode only for debugging digits files
32 //reasonably small, because otherwise the size of the txt files can reach
33 //quickly several MB wasting time and disk space.
37 Int_t nrows=Int_t(digarr->GetTree()->GetEntries());
38 cout<<"Number of entries "<<nrows<<endl;
41 for (Int_t n=0; n<nrows; n++) {
42 AliSimDigits *digrow=(AliSimDigits*)digarr->LoadEntry(n);
44 Int_t sec,row; // sector and row number (in the TPC)
45 param->AdjustSectorRow(digrow->GetID(),sec,row);
46 // cout<<sec<<" row "<<row<<endl;
55 //the whole row is written into the output file
56 b->WriteRowBinary(eth,digrow,0,0,0,sec,SubSec,row);
58 //only the pads in the range [37;48] are written into the output file
59 b->WriteRowBinary(eth,digrow,37,48,1,sec,SubSec,row);
61 //only the pads outside the range [37;48] are written into the output file
62 b->WriteRowBinary(eth,digrow,37,48,2,sec,SubSec,row);
66 //outer sector [36;71]
68 if((row!=27)&&(row!=76))
69 b->WriteRowBinary(eth,digrow,0,0,0,sec,SubSec,row);
72 //only the pads outside the range [43;46] are written into the output file
73 b->WriteRowBinary(eth,digrow,43,46,2,sec,SubSec,row);
75 //only the pads in the range [43;46] are written into the output file
76 b->WriteRowBinary(eth,digrow,43,46,1,sec,SubSec,row);
79 //only the pads outside the range [33;88] are written into the output file
80 b->WriteRowBinary(eth,digrow,33,88,2,sec,SubSec,row);
82 //only the pads in the range [33;88] are written into the output file
83 b->WriteRowBinary(eth,digrow,33,88,1,sec,SubSec,row);
89 cout<<"File created !"<<endl;
90 cout<<"Total number of digits: "<<b->GetDigNumber()<<endl;
93 }//end AliTPCDataChallenge