From: vestbo Date: Thu, 17 Oct 2002 09:54:00 +0000 (+0000) Subject: Added function that writes new rootfile with digits from the X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=cd234d8a5785913a4b870c177d6e5fa35b565aca;p=u%2Fmrichter%2FAliRoot.git Added function that writes new rootfile with digits from the binary files. This is done in order to get the same cuts; adc saturation, 45 degree cone etc, into the offline chain. --- diff --git a/HLT/exa/binary.C b/HLT/exa/binary.C index 6e42b403804..7dcfcea0aa6 100644 --- a/HLT/exa/binary.C +++ b/HLT/exa/binary.C @@ -8,6 +8,8 @@ binary(char* in,int first, int last,char *path=".",Bool_t sp=kFALSE){ + AliL3Transform::Init(path); + if(sp) { singlepatch(in,first,last,path); return; @@ -15,15 +17,9 @@ binary(char* in,int first, int last,char *path=".",Bool_t sp=kFALSE){ char name[256]; const Int_t npatch = 6; - AliL3Logger l; - //l.UnSet(AliL3Logger::kDebug); - //l.UnSet(AliL3Logger::kAll); - //l.Set(AliL3Logger::kInformational); - l.UseStderr(); - //l.UseStream(); - + //read init file - AliL3Transform::Init(path); + AliL3FileHandler *fFileHandler = new AliL3FileHandler(); fFileHandler->SetAliInput(in); @@ -31,17 +27,42 @@ binary(char* in,int first, int last,char *path=".",Bool_t sp=kFALSE){ for(int slice=first; slice<=last; slice++){ for(int patch=0;patchFree(); fFileHandler->Init(slice,patch); sprintf(name,"%s/digits_%d_%d.raw",path,slice,patch); fFileHandler->SetBinaryOutput(name); fFileHandler->AliDigits2CompBinary(); fFileHandler->CloseBinaryOutput(); + fFileHandler->Free(); cerr<<" done"<CloseAliInput(); } + +void write2rootfile(char *in,int first,int last,char *path) +{ + //Write new rootfile, using data from the binary files. + + AliL3Transform::Init(path); + char filename[1024]; + sprintf(filename,"%s/digitfile.root",path); + file = TFile::Open(filename,"READ"); + if(file->IsOpen()) + { + cout<<"Delete file "<WriteRootFile(filename,in); + delete c; + } + } + +} void singlepatch(char* in,int first=0, int last=0,char *path=".",int event=0) { @@ -52,9 +73,6 @@ void singlepatch(char* in,int first=0, int last=0,char *path=".",int event=0) l.UseStderr(); //l.UseStream(); - //read init file - AliL3Transform::Init(path); - char name[256]; AliL3FileHandler *fFileHandler = new AliL3FileHandler(); fFileHandler->SetAliInput(in);