4 Macro for converting AliRoot digits into L3 RawData.
5 Binary creates for each patch its own file.
6 Singlepatch uses one file per slice (sp=kTRUE).
9 Binary(char* in,int first, int last,char *path=".",Bool_t sp=kFALSE){
12 singlepatch(in,first,last,path);
17 const Int_t npatch = 6;
19 //l.UnSet(AliL3Logger::kDebug);
20 //l.UnSet(AliL3Logger::kAll);
21 //l.Set(AliL3Logger::kInformational);
25 AliL3FileHandler *fFileHandler = new AliL3FileHandler();
26 fFileHandler->SetAliInput(in);
27 AliL3Transform::Init(path);
29 for(int slice=first; slice<=last; slice++){
30 for(int patch=0;patch<npatch;patch++){
31 cerr<<"reading slice: "<<slice<<" patch: "<<patch<<" and storing to: "<<path<<"/digits_"<<slice<<"_"<<patch<<".raw"<<endl;
33 fFileHandler->Init(slice,patch);
34 sprintf(name,"%s/digits_%d_%d.raw",path,slice,patch);
35 fFileHandler->SetBinaryOutput(name);
36 fFileHandler->AliDigits2CompBinary();
37 fFileHandler->CloseBinaryOutput();
41 fFileHandler->CloseAliInput();
44 void singlepatch(char* in,int first=0, int last=0,char *path=".",int event=0)
47 //l.UnSet(AliL3Logger::kDebug);
48 //l.UnSet(AliL3Logger::kAll);
49 //l.Set(AliL3Logger::kInformational);
54 AliL3FileHandler *fFileHandler = new AliL3FileHandler();
55 fFileHandler->SetAliInput(in);
56 AliL3Transform::Init(path);
58 Int_t srow[2] = {0,175};
60 for(int slice=first; slice<=last; slice++)
62 cerr<<"reading slice: "<<slice;
64 fFileHandler->Init(slice,patch,srow);
65 sprintf(name,"%s/digits_%d_%d.raw",path,slice,patch);
66 fFileHandler->SetBinaryOutput(name);
67 fFileHandler->AliDigits2CompBinary(event);
68 fFileHandler->CloseBinaryOutput();
71 fFileHandler->CloseAliInput();