]>
Commit | Line | Data |
---|---|---|
fd337011 | 1 | /* $Id$ */ |
2 | ||
3 | /** | |
4 | Macro for converting AliRoot digits into L3 RawData. Binary create for each patch its own file. singlepatch uses one file per slice. | |
5 | */ | |
6 | ||
1144a40d | 7 | Binary(char* in,int first, int last,char *path="."){ |
f2793c29 | 8 | char name[256]; |
eb13caca | 9 | const Int_t npatch = 6; |
fd337011 | 10 | AliL3Logger l; |
11 | //l.UnSet(AliL3Logger::kDebug); | |
12 | //l.UnSet(AliL3Logger::kAll); | |
13 | //l.Set(AliL3Logger::kInformational); | |
14 | l.UseStdout(); | |
15 | //l.UseStream(); | |
16 | ||
17 | AliL3FileHandler *fFileHandler = new AliL3FileHandler(); | |
18 | fFileHandler->SetAliInput(in); | |
4ab9f8f0 | 19 | AliL3Transform::Init(path); |
fd337011 | 20 | |
f2793c29 | 21 | for(int slice=first; slice<=last; slice++){ |
eb13caca | 22 | for(int patch=0;patch<npatch;patch++){ |
fd337011 | 23 | cerr<<"reading slice: "<<slice<<" patch: "<<patch<<" and storing to: "<<path<<"digits_"<<slice<<"_"<<patch<<".raw"<<endl; |
8f25fe14 | 24 | fFileHandler->Free(); |
058d766f | 25 | fFileHandler->Init(slice,patch); |
fd337011 | 26 | sprintf(name,"%s/digits_%d_%d.raw",path,slice,patch); |
f2793c29 | 27 | fFileHandler->SetBinaryOutput(name); |
28 | fFileHandler->AliDigits2CompBinary(); | |
29 | fFileHandler->CloseBinaryOutput(); | |
30 | cerr<<" done"<<endl; | |
31 | } | |
32 | } | |
33 | fFileHandler->CloseAliInput(); | |
34 | } | |
8f25fe14 | 35 | |
36 | void singlepatch(char* in,int first, int last,char *path="",int event=0) | |
37 | { | |
38 | AliL3Logger l; | |
fd337011 | 39 | //l.UnSet(AliL3Logger::kDebug); |
40 | //l.UnSet(AliL3Logger::kAll); | |
41 | //l.Set(AliL3Logger::kInformational); | |
8f25fe14 | 42 | //l.UseStdout(); |
43 | l.UseStream(); | |
44 | ||
45 | char fname[100]; | |
46 | sprintf(fname,"%sevent_%d/",path,event); | |
47 | char name[256]; | |
48 | AliL3FileHandler *fFileHandler = new AliL3FileHandler(); | |
49 | fFileHandler->SetAliInput(in); | |
50 | Int_t srow[2] = {0,175}; | |
51 | int patch=0; | |
52 | for(int slice=first; slice<=last; slice++) | |
53 | { | |
54 | cerr<<"reading slice: "<<slice; | |
55 | fFileHandler->Free(); | |
56 | fFileHandler->Init(slice,patch,srow); | |
57 | sprintf(name,"%sdigits_%d_%d.raw",fname,slice,patch); | |
58 | fFileHandler->SetBinaryOutput(name); | |
59 | fFileHandler->AliDigits2CompBinary(event); | |
60 | fFileHandler->CloseBinaryOutput(); | |
61 | cerr<<" done"<<endl; | |
62 | } | |
63 | fFileHandler->CloseAliInput(); | |
64 | ||
65 | } |