]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/exa/ddl2binary.C
replaces AliPHOSAliEnFile: references to AliEn removed
[u/mrichter/AliRoot.git] / HLT / exa / ddl2binary.C
CommitLineData
240d63be 1// $Id$
2
3/**
4 Macro for converting DDL (digit) files into HLT RawData.
5 In "inpath" expected are the ddl files (called Ev0TPCslice
6 followed by number), the compressed HLT files will be
7 in "outpath", and can be used as the input to the tracker.
8 Singlepatch uses one file per slice (sp=kTRUE) (which
9 is probably what we want if we run it on the GDCs)
10
11 Note: event is not used yet.
12*/
13
14
15ddl2binary(Char_t* inpath,Char_t *outpath,Int_t first=0,Int_t last=35,Bool_t sp=kTRUE,Int_t event=-1){
16
17 AliL3Transform::Init(inpath); //expect l3transform.config in "inpath"
18
19 Int_t patchfrom = 0;
20 Int_t patchend = 6;
21 if(sp){
22 patchfrom = -1;
23 patchend = 0;
24 }
25
26 Char_t name[256];
27 sprintf(name,"%s/Ev0TPCslice",inpath);
28
29 //create the file handler
30 AliL3DDLDataFileHandler *fFileHandler = new AliL3DDLDataFileHandler();
31 fFileHandler->SetReaderInput(name);
32
33 for(Int_t slice=first; slice<=last; slice++){
34 for(Int_t patch=patchfrom;patch<patchend;patch++){
35 cerr<<"reading slice: "<<slice<<" patch: "<<patch<<" and storing to: "<<outpath<<"/ddl_digits_"<<slice<<"_"<<patch<<".raw"<<endl;
36 fFileHandler->Init(slice,patch);
37 sprintf(name,"%s/digits_%d_%d_%d.raw",outpath,event,slice,patch);
38 fFileHandler->SetBinaryOutput(name);
39 fFileHandler->DDLData2CompBinary(event);
40 fFileHandler->CloseBinaryOutput();
41 cerr<<" done"<<endl;
42 }
43 }
44 fFileHandler->CloseReaderInput();
45
46 delete fFileHandler;
47}