From 0d82bd92012fe7c39d2b2acfa52af29d415b6f74 Mon Sep 17 00:00:00 2001 From: alla Date: Thu, 14 Feb 2008 11:25:00 +0000 Subject: [PATCH] bug in online lokup table fixed --- T0/AliT0Parameters.cxx | 23 +++++++----------- T0/AliT0RawReader.cxx | 55 ++++++++++++++++++++++++------------------ 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/T0/AliT0Parameters.cxx b/T0/AliT0Parameters.cxx index 2ed41a6d33c..5e44b2b1e82 100644 --- a/T0/AliT0Parameters.cxx +++ b/T0/AliT0Parameters.cxx @@ -31,14 +31,16 @@ #include "AliT0CalibWalk.h" #include "AliT0CalibTimeEq.h" #include "AliT0LookUpValue.h" -#include "AliT0LookUpKey.h" #include #include +#include #include +#include +#include #include #include -#include #include +#include AliT0CalibTimeEq* AliT0Parameters::fgCalibData = 0; AliT0CalibData* AliT0Parameters::fgLookUp = 0; @@ -146,8 +148,8 @@ void AliT0Parameters::InitIfOnline() // for switching to this one should write // AliT0RawReader myrawreader(rawReader); // myrawreader.SetOnlineMode(kTRUE); - - if (fIsInit) return; +cout<<" AliT0Parameters::InitIfOnline() "<SetChain(chain); lookvalue->SetChannel(channel); lookkey->SetKey(ik); + fgLookUp->GetMapLookup()->Add((TObject*)lookvalue,(TObject*)lookkey); if (channel<6) channel +=2; else {channel = 0; tdc++;} - if(ik==57) { tdc=0; channel=0; chain = 1;} + if(ik==56) { tdc=0; channel=0; chain = 1;} - fgLookUp->GetMapLookup()->Add((TObject*)lookvalue,(TObject*)lookkey); } fIsInit=kTRUE; @@ -194,7 +196,6 @@ AliT0Parameters::GetTimeDelayCFD(Int_t ipmt) TGraph *AliT0Parameters::GetAmpLEDRec(Int_t ipmt) const { - // get walk correction by LED-CFD vs CFD graph if (!fSlewCorr) { AliError("No slewing correction is available!"); return (TGraph*)fAmpLEDRec.At(ipmt); @@ -206,7 +207,6 @@ TGraph *AliT0Parameters::GetAmpLEDRec(Int_t ipmt) const TGraph *AliT0Parameters::GetWalk(Int_t ipmt) const { - // get walk correction by QTC vs CFD if (!fSlewCorr) { AliError("No walk correction is available!"); return (TGraph*)fWalk.At(ipmt); @@ -218,8 +218,7 @@ TGraph *AliT0Parameters::GetWalk(Int_t ipmt) const Float_t AliT0Parameters::GetWalkVal(Int_t ipmt, Float_t mv) const { - // get walk correction by QTC vs CFD - if (!fSlewCorr) { + if (!fSlewCorr) { return ((TGraph*)fWalk.At(ipmt))->Eval(mv); } return fgSlewCorr -> GetWalkVal(ipmt, mv) ; @@ -230,7 +229,6 @@ Float_t AliT0Parameters::GetWalkVal(Int_t ipmt, Float_t mv) const void AliT0Parameters::SetPMTeff(Int_t ipmt) { - // PMT quantum efficiency Float_t lambda[50]; Float_t eff[50 ] = {0, 0, 0.23619, 0.202909, 0.177913, 0.175667, 0.17856, 0.190769, 0.206667, 0.230286, @@ -252,7 +250,6 @@ AliT0Parameters::SetPMTeff(Int_t ipmt) Int_t AliT0Parameters::GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel) { - // get logical number of channel according physical address if (fgLookUp) { AliT0LookUpValue key(trm,tdc,chain,channel); @@ -274,8 +271,6 @@ AliT0Parameters::GetChannel(Int_t trm, Int_t tdc, Int_t chain, Int_t channel) //__________________________________________________________________ TMap *AliT0Parameters::GetMapLookup() { - // get LookUp Table - if (!fgLookUp){ cout<<" No look up table in OCDB"; return 0; diff --git a/T0/AliT0RawReader.cxx b/T0/AliT0RawReader.cxx index f146111ef63..cca35faa4d8 100644 --- a/T0/AliT0RawReader.cxx +++ b/T0/AliT0RawReader.cxx @@ -19,16 +19,16 @@ // // T0 // Class for reading T0 RAW data in TOF data format -// Alla.Maevskaya@cern.ch // -//____________________________________________________________________ - #include "AliT0RawReader.h" #include "AliT0Parameters.h" #include "AliBitPacking.h" #include "TBits.h" -//#include +#include +#include "TMath.h" +#include "TH1F.h" +#include "TArrayI.h" #include "AliLog.h" ClassImp(AliT0RawReader) @@ -58,6 +58,15 @@ ClassImp(AliT0RawReader) { // } +/* +AliT0RawReader::AliT0RawReader(const AliT0RawReader& o): TTask(o), + fRawReader(rawReader), + fData(NULL), + fPosition(0) +{ + // +} +*/ Bool_t AliT0RawReader::Next() @@ -94,8 +103,8 @@ Bool_t AliT0RawReader::Next() Int_t numberOfWordsInTRM=0, iTRM=0; Int_t tdcTime, koef,hit=0; Int_t koefhits[110]; - Int_t trmChainHeader = 0x00000000; - Int_t trmChainTrailer = 0x10000000; + Int_t trm_chain_header = 0x00000000; + Int_t trm_chain_trailer = 0x10000000; Int_t filler = 0x70000000; Bool_t correct=kTRUE; @@ -113,12 +122,11 @@ Bool_t AliT0RawReader::Next() } while (fRawReader->GetDataSize() == 0); fPosition = 0; - // cout.setf( ios_base::hex, ios_base::basefield ); + cout.setf( ios_base::hex, ios_base::basefield ); //DRM header for (Int_t i=0; i<6; i++) { word = GetNextWord(); - if(i==0 && AliBitPacking::UnpackWord(word,4,20) ==7) fNTRM=0; // cout<<" DRM header "<AddMajorErrorLog(kWrongChain0Header,Form("w=%x",word)); break; } word = GetNextWord(); - // cout<<" next "<AddMajorErrorLog(kWrongChain0Trailer,Form("w=%x",word)); @@ -213,7 +222,7 @@ Bool_t AliT0RawReader::Next() } } //TRM loop word = GetNextWord(); // - // cout<<" after TRM trailer "<AddFatalErrorLog(kWrongDRMTrailer,Form("w=%x",word)); } - // cout.setf( ios_base::dec, ios_base::basefield ); - + cout.setf( ios_base::dec, ios_base::basefield ); + return kTRUE; } //_____________________________________________________________________________ -- 2.43.0