From 8df1f8f59e8b1235f751e69243c45a0994301068 Mon Sep 17 00:00:00 2001 From: cblume Date: Mon, 6 Dec 2010 12:22:17 +0000 Subject: [PATCH] Remove AliTRDrawStreamBase --- TRD/AliTRDCalibPadStatus.cxx | 232 +-------------------------------- TRD/AliTRDCalibPadStatus.h | 11 +- TRD/AliTRDCalibraFillHisto.cxx | 223 +------------------------------ TRD/AliTRDCalibraFillHisto.h | 6 +- TRD/AliTRDQADataMakerRec.cxx | 5 +- TRD/AliTRDReconstructor.cxx | 4 +- TRD/AliTRDclusterizer.cxx | 3 +- TRD/AliTRDclusterizer.h | 4 +- TRD/AliTRDqaBlackEvents.cxx | 1 + TRD/AliTRDrawData.cxx | 8 +- TRD/AliTRDrawStream.h | 4 +- TRD/AliTRDrawStreamBase.cxx | 139 -------------------- TRD/AliTRDrawStreamBase.h | 135 ------------------- TRD/AliTRDrawStreamOld.cxx | 8 +- TRD/AliTRDrawStreamOld.h | 8 +- TRD/AliTRDrecoParam.cxx | 3 +- TRD/TRDPEDESTALda.cxx | 4 +- TRD/TRDVDRIFTda.cxx | 4 +- TRD/TRDbaseLinkDef.h | 1 - TRD/libTRDbase.pkg | 1 - 20 files changed, 33 insertions(+), 771 deletions(-) delete mode 100644 TRD/AliTRDrawStreamBase.cxx delete mode 100644 TRD/AliTRDrawStreamBase.h diff --git a/TRD/AliTRDCalibPadStatus.cxx b/TRD/AliTRDCalibPadStatus.cxx index b5fd6e0c271..832e64009c8 100644 --- a/TRD/AliTRDCalibPadStatus.cxx +++ b/TRD/AliTRDCalibPadStatus.cxx @@ -82,7 +82,6 @@ //header file #include "AliLog.h" #include "AliTRDCalibPadStatus.h" -#include "AliTRDrawStreamBase.h" #include "AliTRDgeometry.h" #include "AliTRDCommonParam.h" #include "./Cal/AliTRDCalROC.h" @@ -211,41 +210,6 @@ void AliTRDCalibPadStatus::Destroy() } //_____________________________________________________________________ Int_t AliTRDCalibPadStatus::UpdateHisto(const Int_t icdet, /*FOLD00*/ - const Int_t icRow, - const Int_t icCol, - const Int_t csignal, - const Int_t crowMax, - const Int_t ccold, - const Int_t icMcm) -{ - // - // Signal filling methode - // - Int_t nbchannel = icRow+icCol*crowMax; - - // now the case of double read channel - if(ccold > 0){ - nbchannel = (((ccold-1)*8+ icMcm)*crowMax+icRow)+144*crowMax; - //printf("nbchannel %d, ccold %d, icMcm %d, crowMax %d, icRow %d\n",nbchannel,ccold,icMcm,crowMax,icRow); - } - - // fast filling methode. - // Attention: the entry counter of the histogram is not increased - // this means that e.g. the colz draw option gives an empty plot - - Int_t bin = 0; - - if ( !(((Int_t)csignal>=fAdcMax ) || ((Int_t)csignalFill(csignal,nbchannel); - - GetHisto(icdet,kTRUE)->GetArray()[bin]++; - - return 0; -} -//_____________________________________________________________________ -Int_t AliTRDCalibPadStatus::UpdateHisto2(const Int_t icdet, /*FOLD00*/ const Int_t icRow, const Int_t icCol, const Int_t csignal, @@ -284,169 +248,7 @@ Int_t AliTRDCalibPadStatus::UpdateHisto2(const Int_t icdet, /*FOLD00*/ return 0; } //_____________________________________________________________________ -Int_t AliTRDCalibPadStatus::ProcessEvent(AliTRDrawStreamBase *rawStream, Bool_t nocheck) -{ - // - // Event Processing loop - AliTRDRawStreamCosmic - // 0 time bin problem or zero suppression - // 1 no input - // 2 input - // - - // - // Raw version number: - // [3,31] non zero suppressed - // 2,4 and [32,63] zero suppressed - // - - Int_t withInput = 1; - - rawStream->SetSharedPadReadout(kTRUE); - - if(!nocheck) { - - // Check the raw version and if all have the same number of timebins. - - while (rawStream->Next()) { - - Int_t rawversion = rawStream->GetRawVersion(); // current raw version - //printf("Raw version is %d\n",rawversion); - - // Could eventually change, have to check with time - if((rawversion < 3) || (rawversion > 31)) { - AliInfo(Form("this is not no-zero-suppressed data, the version is %d",rawversion)); - return 0; - } - Int_t idetector = rawStream->GetDet(); // current detector - Int_t iRow = rawStream->GetRow(); // current row - Int_t iRowMax = rawStream->GetMaxRow(); // current rowmax - Int_t iCol = rawStream->GetCol(); // current col - Int_t iADC = 21-rawStream->GetADC(); // current ADC - - // It goes in the opposite direction - Int_t col = 0; - if(iADC == 1) col = 1; - else { - col = TMath::Max(0,(Int_t)(iADC-19)); - if(col > 0) col++; - } - Int_t mcm = (Int_t)(iCol/18); // current group of 18 col pads - if(col > 1) mcm -= 1; - if(col ==1) mcm += 1; - - // printf to check - //Bool_t shared = rawStream->IsCurrentPadShared(); - //printf("ADC %d, iCol %d, col %d, mcm %d, shared %d\n",iADC,iCol,col,mcm,(Int_t)shared); - - // Take the signal - Int_t *signal = rawStream->GetSignals(); // current ADC signal - Int_t nbtimebin = rawStream->GetNumberOfTimeBins(); // number of time bins read from data - - if((fDetector != -1) && (nbtimebin != fNumberOfTimeBins)) { - AliInfo(Form("the number of time bins is %d, is different from the previous one %d",nbtimebin,fNumberOfTimeBins)); - return 0; - } - fNumberOfTimeBins = nbtimebin; - fDetector = idetector; - - for(Int_t k = 0; k < fNumberOfTimeBins; k++){ - if(signal[k]>0 && iCol != -1) UpdateHisto(idetector,iRow,iCol,signal[k],iRowMax,col,mcm); - } - - withInput = 2; - } - } - else { - - while (rawStream->Next()) { - - Int_t idetector = rawStream->GetDet(); // current detector - Int_t iRow = rawStream->GetRow(); // current row - Int_t iRowMax = rawStream->GetMaxRow(); // current rowmax - Int_t iCol = rawStream->GetCol(); // current col - Int_t iADC = 21-rawStream->GetADC(); // current ADC - - // It goes in the opposite direction - Int_t col = 0; - if(iADC == 1) col = 1; - else { - col = TMath::Max(0,(Int_t)(iADC-19)); - if(col > 0) col++; - } - Int_t mcm = (Int_t)(iCol/18); // current group of 18 col pads - if(col > 1) mcm -= 1; - if(col ==1) mcm += 1; - - // Take the signal - Int_t *signal = rawStream->GetSignals(); // current ADC signal - Int_t nbtimebin = rawStream->GetNumberOfTimeBins(); // number of time bins read from data - - - //printf("det %d, row %d, signal[0] %d, signal[1] %d, signal [2] %d\n", idetector, iRow, signal[0], signal[1], signal[2]); - - for(Int_t k = 0; k < nbtimebin; k++){ - if(signal[k]>0 && iCol != -1) { - UpdateHisto(idetector,iRow,iCol,signal[k],iRowMax,col,mcm); - //printf("Update with det %d, row %d, col %d, signal %d, rowmax %d, col %d, mcm %d\n",idetector,iRow,iCol,signal[n],iRowMax,col,mcm); - } - } - - withInput = 2; - } - } - - return withInput; -} -//_____________________________________________________________________ -Int_t AliTRDCalibPadStatus::ProcessEvent(AliRawReader *rawReader, Bool_t nocheck) -{ - // - // Event processing loop - AliRawReader - // - - Int_t result; - - rawReader->Select("TRD"); - - AliTRDrawStreamBase *pstream = AliTRDrawStreamBase::GetRawStream(rawReader); - - result = ProcessEvent(pstream, nocheck); - - delete pstream; - - return result; -} - -//_________________________________________________________________________ -Int_t AliTRDCalibPadStatus::ProcessEvent( -#ifdef ALI_DATE - const eventHeaderStruct *event, - Bool_t nocheck -#else - const eventHeaderStruct* /*event*/, - Bool_t /*nocheck*/ - -#endif - ) -{ - // - // process date event - // -#ifdef ALI_DATE - AliRawReader *rawReader = new AliRawReaderDate((void*)event); - Bool_t result=ProcessEvent(rawReader, nocheck); - delete rawReader; - return result; -#else - Fatal("AliTRDCalibPadStatus", "this class was compiled without DATE"); - return 0; -#endif - -} - -//_____________________________________________________________________ - -Int_t AliTRDCalibPadStatus::ProcessEvent2(AliRawReader *rawReader) +Int_t AliTRDCalibPadStatus::ProcessEvent(AliRawReader *rawReader) { // // RawReader = AliTRDrawStream (Jochen Klein) @@ -517,7 +319,7 @@ Int_t AliTRDCalibPadStatus::ProcessEvent2(AliRawReader *rawReader) signal = digits->GetData(iRow,iCol,k); if(signal>0) { - UpdateHisto2(idetector,iRow,iCol,signal,iRowMax,col,mcm,rob); + UpdateHisto(idetector,iRow,iCol,signal,iRowMax,col,mcm,rob); } } @@ -553,7 +355,7 @@ Int_t AliTRDCalibPadStatus::ProcessEvent2(AliRawReader *rawReader) signal = digits->GetDataByAdcCol(iRow,extCol,k); if(signal>0) { - UpdateHisto2(idetector,iRow,iCol,signal,iRowMax,col,mcm,rob); + UpdateHisto(idetector,iRow,iCol,signal,iRowMax,col,mcm,rob); } } } //shared pads end @@ -572,34 +374,6 @@ Int_t AliTRDCalibPadStatus::ProcessEvent2(AliRawReader *rawReader) } - -//_____________________________________________________________________ -Bool_t AliTRDCalibPadStatus::TestEventHisto(Int_t nevent, Int_t sm, Int_t ch) /*FOLD00*/ -{ - // - // Test event loop - // fill one oroc and one iroc with random gaus - // - - gRandom->SetSeed(0); - - for (Int_t ism=sm; ismGetRowMax(ipl,ich,ism); irow++){ - for(Int_t icol = 0; icol < fGeo->GetColMax(ipl); icol++){ - for (Int_t iTimeBin=0; iTimeBin<(30*nevent); iTimeBin++){ - Int_t signal=TMath::Nint(gRandom->Gaus(10,1.5)); - if ( signal>0 )UpdateHisto((ipl+ich*6+ism*6*5),irow,icol,signal,fGeo->GetRowMax(ipl,ich,ism),0,0); - } - } - } - } - } - } - return kTRUE; -} - //_____________________________________________________________________ TH2F* AliTRDCalibPadStatus::GetHisto(Int_t det, TObjArray *arr, /*FOLD00*/ Int_t nbinsY, Float_t ymin, Float_t ymax, diff --git a/TRD/AliTRDCalibPadStatus.h b/TRD/AliTRDCalibPadStatus.h index 7467c568632..0d50e63f962 100644 --- a/TRD/AliTRDCalibPadStatus.h +++ b/TRD/AliTRDCalibPadStatus.h @@ -20,7 +20,6 @@ class AliTRDCalDet; class AliTRDCalPad; class AliTRDCalROC; class AliTRDCalPadStatus; -class AliTRDrawStreamBase; class AliTRDgeometry; class AliTRDdigitsManager; @@ -38,16 +37,10 @@ public: AliTRDCalibPadStatus& operator = (const AliTRDCalibPadStatus &source); - Int_t ProcessEvent(AliTRDrawStreamBase *rawStream, Bool_t nocheck = kFALSE); - Int_t ProcessEvent(AliRawReader *rawReader, Bool_t nocheck = kFALSE); - Int_t ProcessEvent(const eventHeaderStruct *event, Bool_t nocheck = kFALSE); - Int_t ProcessEvent2(AliRawReader *rawReader); + Int_t ProcessEvent(AliRawReader *rawReader); void Destroy(); Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol, - const Int_t signal, const Int_t crowMax, const Int_t ccold, const Int_t icMcm); - - Int_t UpdateHisto2(const Int_t idet, const Int_t iRow, const Int_t iCol, const Int_t signal, const Int_t crowMax, const Int_t ccold, const Int_t icMcm, const Int_t icRob); void AnalyseHisto(); @@ -78,8 +71,6 @@ public: void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range - Bool_t TestEventHisto(Int_t nevent, Int_t sm, Int_t ch); //test the fast approach to fill histograms - private: // Geometry diff --git a/TRD/AliTRDCalibraFillHisto.cxx b/TRD/AliTRDCalibraFillHisto.cxx index 165b4011eec..1de42df1794 100644 --- a/TRD/AliTRDCalibraFillHisto.cxx +++ b/TRD/AliTRDCalibraFillHisto.cxx @@ -63,7 +63,6 @@ #include "AliTRDcluster.h" #include "AliTRDtrack.h" #include "AliTRDtrackV1.h" -#include "AliTRDrawStreamBase.h" #include "AliRawReader.h" #include "AliRawReaderDate.h" #include "AliTRDgeometry.h" @@ -2442,227 +2441,7 @@ void AliTRDCalibraFillHisto::FillTheInfoOfTheTrackPH() // DAQ process functions ///////////////////////////////////////////////////////////////////////////////////////// //_____________________________________________________________________ -Int_t AliTRDCalibraFillHisto::ProcessEventDAQ(AliTRDrawStreamBase *rawStream, Bool_t nocheck) -{ - // - // Event Processing loop - AliTRDrawStreamBase - // TestBeam 2007 version - // 0 timebin problem - // 1 no input - // 2 input - // Same algorithm as TestBeam but different reader - // - - rawStream->SetSharedPadReadout(kFALSE); - - Int_t withInput = 1; - - Double_t phvalue[16][144][36]; - for(Int_t k = 0; k < 36; k++){ - for(Int_t j = 0; j < 16; j++){ - for(Int_t c = 0; c < 144; c++){ - phvalue[j][c][k] = 0.0; - } - } - } - - fDetectorPreviousTrack = -1; - fMCMPrevious = -1; - fROBPrevious = -1; - Int_t nbtimebin = 0; - Int_t baseline = 10; - //printf("------------Detector\n"); - - if(!nocheck){ - - fTimeMax = 0; - - while (rawStream->Next()) { - - Int_t idetector = rawStream->GetDet(); // current detector - Int_t imcm = rawStream->GetMCM(); // current MCM - Int_t irob = rawStream->GetROB(); // current ROB - - //printf("Detector %d\n",idetector); - - if((fDetectorPreviousTrack != idetector) && (fDetectorPreviousTrack != -1)){ - - // Fill - withInput = TMath::Max(FillDAQ(phvalue),withInput); - - - // reset - for(Int_t k = 0; k < 36; k++){ - for(Int_t j = 0; j < 16; j++){ - for(Int_t c = 0; c < 144; c++){ - phvalue[j][c][k] = 0.0; - } - } - } - } - - fDetectorPreviousTrack = idetector; - fMCMPrevious = imcm; - fROBPrevious = irob; - - nbtimebin = rawStream->GetNumberOfTimeBins(); // number of time bins read from data - if(nbtimebin == 0) return 0; - if((fTimeMax != 0) && (nbtimebin != fTimeMax)) return 0; - fTimeMax = nbtimebin; - - //baseline = rawStream->GetCommonAdditive(); // common additive baseline - fNumberClustersf = fTimeMax; - fNumberClusters = (Int_t)(fNumberClustersProcent*fTimeMax); - - - Int_t *signal = rawStream->GetSignals(); // current ADC signal - Int_t col = rawStream->GetCol(); - Int_t row = rawStream->GetRow(); - - - // printf("detector %d, signal[0] %d, signal[1] %d, signal[2] %d, baseline %d\n",idetector,signal[0],signal[1],signal[2], baseline); - - - for(Int_t itime = 0; itime < nbtimebin; itime++){ - phvalue[row][col][itime] = signal[itime]-baseline; - } - } - - // fill the last one - if(fDetectorPreviousTrack != -1){ - - // Fill - withInput = TMath::Max(FillDAQ(phvalue),withInput); - - // reset - for(Int_t k = 0; k < 36; k++){ - for(Int_t j = 0; j < 16; j++){ - for(Int_t c = 0; c < 144; c++){ - phvalue[j][c][k] = 0.0; - } - } - } - } - - } - else{ - - while (rawStream->Next()) { //iddetecte - - Int_t idetector = rawStream->GetDet(); // current detector - Int_t imcm = rawStream->GetMCM(); // current MCM - Int_t irob = rawStream->GetROB(); // current ROB - - //printf("Detector %d\n",idetector); - - if((fDetectorPreviousTrack != idetector) && (fDetectorPreviousTrack != -1)){ - - // Fill - withInput = TMath::Max(FillDAQ(phvalue),withInput); - - // reset - for(Int_t k = 0; k < 36; k++){ - for(Int_t j = 0; j < 16; j++){ - for(Int_t c = 0; c < 144; c++){ - phvalue[j][c][k] = 0.0; - } - } - } - } - - fDetectorPreviousTrack = idetector; - fMCMPrevious = imcm; - fROBPrevious = irob; - - //baseline = rawStream->GetCommonAdditive(); // common baseline - - fTimeMax = rawStream->GetNumberOfTimeBins(); // number of time bins read from data - fNumberClustersf = fTimeMax; - fNumberClusters = (Int_t)(fNumberClustersProcent*fTimeMax); - Int_t *signal = rawStream->GetSignals(); // current ADC signal - Int_t col = rawStream->GetCol(); - Int_t row = rawStream->GetRow(); - - - //printf("detector %d, signal[0] %d, signal[1] %d, signal[2] %d, baseline %d\n",idetector,signal[0],signal[1],signal[2], baseline); - - for(Int_t itime = 0; itime < fTimeMax; itime++){ - phvalue[row][col][itime] = signal[itime]-baseline; - /*if(phvalue[row][col][itime] >= 20) { - printf("----------> phvalue[%d][%d][%d] %d baseline %d \n", - row, - col, - itime, - signal[itime], - baseline); - }*/ - } - } - - // fill the last one - if(fDetectorPreviousTrack != -1){ - - // Fill - withInput = TMath::Max(FillDAQ(phvalue),withInput); - - // reset - for(Int_t k = 0; k < 36; k++){ - for(Int_t j = 0; j < 16; j++){ - for(Int_t c = 0; c < 144; c++){ - phvalue[j][c][k] = 0.0; - } - } - } - } - } - - return withInput; - -} -//_____________________________________________________________________ -Int_t AliTRDCalibraFillHisto::ProcessEventDAQ(AliRawReader *rawReader, Bool_t nocheck) -{ - // - // Event processing loop - AliRawReader - // Testbeam 2007 version - // - - AliTRDrawStreamBase rawStream(rawReader); - - rawReader->Select("TRD"); - - return ProcessEventDAQ(&rawStream, nocheck); -} - -//_________________________________________________________________________ -Int_t AliTRDCalibraFillHisto::ProcessEventDAQ( -#ifdef ALI_DATE - const eventHeaderStruct *event, - Bool_t nocheck -#else - const eventHeaderStruct* /*event*/, - Bool_t /*nocheck*/ - -#endif - ) -{ - // - // process date event - // Testbeam 2007 version - // -#ifdef ALI_DATE - AliRawReader *rawReader = new AliRawReaderDate((void*)event); - Int_t result=ProcessEventDAQ(rawReader, nocheck); - delete rawReader; - return result; -#else - Fatal("AliTRDCalibraFillHisto", "this class was compiled without DATE"); - return 0; -#endif - -} -//_____________________________________________________________________ -Int_t AliTRDCalibraFillHisto::ProcessEventDAQ2(AliRawReader *rawReader) +Int_t AliTRDCalibraFillHisto::ProcessEventDAQ(AliRawReader *rawReader) { //main // // Event Processing loop - AliTRDrawStream diff --git a/TRD/AliTRDCalibraFillHisto.h b/TRD/AliTRDCalibraFillHisto.h index 4285ea27db1..e7bf9e43254 100644 --- a/TRD/AliTRDCalibraFillHisto.h +++ b/TRD/AliTRDCalibraFillHisto.h @@ -34,7 +34,6 @@ class AliRawReader; class AliTRDCalibraMode; class AliTRDCalibraVector; class AliTRDCalibraVdriftLinearFit; -class AliTRDrawStreamBase; class AliTRDcluster; class AliTRDtrackV1; class AliTRDtrack; @@ -70,10 +69,7 @@ class AliTRDCalibraFillHisto : public TObject { Bool_t UpdateHistogramsV1(const AliTRDtrackV1 *t); // Process events DAQ - Int_t ProcessEventDAQ(AliTRDrawStreamBase *rawStream, Bool_t nocheck = kFALSE); - Int_t ProcessEventDAQ(AliRawReader *rawReader, Bool_t nocheck = kFALSE); - Int_t ProcessEventDAQ(const eventHeaderStruct *event, Bool_t nocheck = kFALSE); - Int_t ProcessEventDAQ2(AliRawReader *rawReader); + Int_t ProcessEventDAQ(AliRawReader *rawReader); // Is Pad on Bool_t IsPadOn(Int_t detector, Int_t row, Int_t col) const; diff --git a/TRD/AliTRDQADataMakerRec.cxx b/TRD/AliTRDQADataMakerRec.cxx index 48a6c16ed53..6e88d8f858d 100644 --- a/TRD/AliTRDQADataMakerRec.cxx +++ b/TRD/AliTRDQADataMakerRec.cxx @@ -42,7 +42,7 @@ #include "AliTRDcluster.h" #include "AliTRDQADataMakerRec.h" #include "AliTRDgeometry.h" -#include "AliTRDrawStreamBase.h" +#include "AliTRDrawStream.h" #include "AliTRDdigitsManager.h" #include "AliTRDSignalIndex.h" @@ -732,8 +732,7 @@ void AliTRDQADataMakerRec::MakeRaws(AliRawReader* rawReader) rawReader->SelectEquipment(0, 1024, 1041); rawReader->Select("TRD"); - AliTRDrawStreamBase::SetRawStreamVersion("FAST"); - AliTRDrawStreamBase *data = AliTRDrawStreamBase::GetRawStream(rawReader); + AliTRDrawStream *data = new AliTRDrawStream(rawReader); data->SetSharedPadReadout(kFALSE); // build data manager diff --git a/TRD/AliTRDReconstructor.cxx b/TRD/AliTRDReconstructor.cxx index 6b1e018467b..1fdacd42529 100644 --- a/TRD/AliTRDReconstructor.cxx +++ b/TRD/AliTRDReconstructor.cxx @@ -34,7 +34,7 @@ #include "AliTRDReconstructor.h" #include "AliTRDclusterizer.h" #include "AliTRDrawData.h" -#include "AliTRDrawStreamBase.h" +#include "AliTRDrawStream.h" #include "AliTRDdigitsManager.h" #include "AliTRDtrackerV1.h" @@ -166,7 +166,6 @@ void AliTRDReconstructor::ConvertDigits(AliRawReader *rawReader AliTRDrawData rawData; rawReader->Reset(); rawReader->Select("TRD"); - AliTRDrawStreamBase::SetRawStreamVersion(GetRecoParam()->GetRawStreamVersion()->Data()); AliTRDdigitsManager *manager = rawData.Raw2Digits(rawReader); manager->MakeBranch(digitsTree); manager->WriteDigits(); @@ -187,7 +186,6 @@ void AliTRDReconstructor::Reconstruct(AliRawReader *rawReader rawReader->Reset(); rawReader->Select("TRD"); - AliTRDrawStreamBase::SetRawStreamVersion(GetRecoParam()->GetRawStreamVersion()->Data()); if(!fClusterizer){ AliFatal("Clusterizer not available!"); diff --git a/TRD/AliTRDclusterizer.cxx b/TRD/AliTRDclusterizer.cxx index d2b4305d324..d615d2b8a62 100644 --- a/TRD/AliTRDclusterizer.cxx +++ b/TRD/AliTRDclusterizer.cxx @@ -41,7 +41,6 @@ #include "AliTRDcalibDB.h" #include "AliTRDtransform.h" #include "AliTRDSignalIndex.h" -#include "AliTRDrawStreamBase.h" #include "AliTRDrawStream.h" #include "AliTRDfeeParam.h" #include "AliTRDtrackletWord.h" @@ -637,7 +636,7 @@ Bool_t AliTRDclusterizer::Raw2ClustersChamber(AliRawReader *rawReader) } if(!fRawStream) - fRawStream = AliTRDrawStreamBase::GetRawStream(rawReader); + fRawStream = new AliTRDrawStream(rawReader); else fRawStream->SetReader(rawReader); diff --git a/TRD/AliTRDclusterizer.h b/TRD/AliTRDclusterizer.h index dfedd19f028..0b305f49785 100644 --- a/TRD/AliTRDclusterizer.h +++ b/TRD/AliTRDclusterizer.h @@ -31,7 +31,7 @@ class AliTRDtransform; class AliTRDCalROC; class AliTRDReconstructor; class AliTRDCalSingleChamberStatus; -class AliTRDrawStreamBase; +class AliTRDrawStream; class AliTRDrecoParam; class AliTRDclusterizer : public TNamed @@ -166,7 +166,7 @@ protected: Int_t firstClusterROC; // The number of cluster in a given ROC Int_t fNoOfClusters; // Number of Clusters already processed and still owned by the clusterizer Int_t fBaseline; // Baseline of the ADC values - AliTRDrawStreamBase *fRawStream; // Currently used RawStream + AliTRDrawStream *fRawStream; // Raw data streamer ClassDef(AliTRDclusterizer,6) // TRD clusterfinder diff --git a/TRD/AliTRDqaBlackEvents.cxx b/TRD/AliTRDqaBlackEvents.cxx index 35479dd3524..29b2f8cfdc3 100644 --- a/TRD/AliTRDqaBlackEvents.cxx +++ b/TRD/AliTRDqaBlackEvents.cxx @@ -35,6 +35,7 @@ #include "TStyle.h" #include "TGraph.h" +#include "AliLog.h" #include "AliRawReader.h" #include "AliTRDrawStreamOld.h" diff --git a/TRD/AliTRDrawData.cxx b/TRD/AliTRDrawData.cxx index 9c5d0f46c8a..bbbb27641bb 100644 --- a/TRD/AliTRDrawData.cxx +++ b/TRD/AliTRDrawData.cxx @@ -37,7 +37,7 @@ #include "AliTRDgeometry.h" #include "AliTRDarrayDictionary.h" #include "AliTRDarrayADC.h" -#include "AliTRDrawStreamBase.h" +#include "AliTRDrawStream.h" #include "AliTRDcalibDB.h" #include "AliTRDSignalIndex.h" #include "AliTRDfeeParam.h" @@ -192,7 +192,7 @@ Bool_t AliTRDrawData::Digits2Raw(AliTRDdigitsManager *digitsManager) for (Int_t sect = 0; sect < fGeo->Nsector(); sect++) { char name[1024]; - snprintf(name,1024,"TRD_%d.ddl",sect + AliTRDrawStreamBase::kDDLOffset); + snprintf(name,1024,"TRD_%d.ddl",sect + AliTRDrawStream::kDDLOffset); AliFstream* of = new AliFstream(name); @@ -551,8 +551,8 @@ AliTRDdigitsManager *AliTRDrawData::Raw2Digits(AliRawReader *rawReader) memset(fTrackletContainer[1], 0, kTrackletChmb*sizeof(UInt_t)); //jkl } - AliTRDrawStreamBase *pinput = AliTRDrawStreamBase::GetRawStream(rawReader); - AliTRDrawStreamBase &input = *pinput; + AliTRDrawStream *pinput = new AliTRDrawStream(rawReader); + AliTRDrawStream &input = *pinput; input.SetRawVersion( fFee->GetRAWversion() ); //<= ADDED by MinJung AliInfo(Form("Stream version: %s", input.IsA()->GetName())); diff --git a/TRD/AliTRDrawStream.h b/TRD/AliTRDrawStream.h index 5883621cad2..8660e15befe 100644 --- a/TRD/AliTRDrawStream.h +++ b/TRD/AliTRDrawStream.h @@ -11,7 +11,7 @@ #ifndef ALITRDRAWSTREAM_H #define ALITRDRAWSTREAM_H -#include "AliTRDrawStreamBase.h" +#include "TObject.h" #include "TClonesArray.h" #include "TTree.h" @@ -31,7 +31,7 @@ class AliTRDtrackletContainer; #define TRDMAXMCM 4 * 16 #define MAXTRACKLETSPERHC 256 -class AliTRDrawStream : public AliTRDrawStreamBase +class AliTRDrawStream : public TObject { public: AliTRDrawStream(AliRawReader *rawReader = 0x0); diff --git a/TRD/AliTRDrawStreamBase.cxx b/TRD/AliTRDrawStreamBase.cxx deleted file mode 100644 index 8af1fd5786e..00000000000 --- a/TRD/AliTRDrawStreamBase.cxx +++ /dev/null @@ -1,139 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * * - * Author: The ALICE Off-line Project. * - * Contributors are mentioned in the code where appropriate. * - * * - * Permission to use, copy, modify and distribute this software and its * - * documentation strictly for non-commercial purposes is hereby granted * - * without fee, provided that the above copyright notice appears in all * - * copies and that both the copyright notice and this permission notice * - * appear in the supporting documentation. The authors make no claims * - * about the suitability of this software for any purpose. It is * - * provided "as is" without express or implied warranty. * - **************************************************************************/ - -/* $Id: AliTRDrawStreamBase.cxx 23387 2008-01-17 17:25:16Z cblume $ */ - -/////////////////////////////////////////////////////////////////////////////// -// // -// This class defines access to TRD digits in raw data. // -// // -// It loops over all TRD digits in the raw data given by the AliRawReader. // -// The Next method goes to the next digit. If there are no digits left // -// it returns kFALSE. // -// Several getters provide information about the current digit. // -// // -// Author: M. Ploskon (ploskon@ikf.uni-frankfurt.de) // -// // -/////////////////////////////////////////////////////////////////////////////// - -#include "AliTRDrawStream.h" -#include "AliTRDrawStreamBase.h" - -//-------------------------------------------------------- -ClassImp(AliTRDrawStreamBase) - -Int_t AliTRDrawStreamBase::fgRawStreamVersion = AliTRDrawStreamBase::kTRDdefaultStream; - -//_____________________________________________________________________________ -AliTRDrawStreamBase::AliTRDrawStreamBase() - : TObject() -{ - // - // this is just for API - // - ; -} - -//_____________________________________________________________________________ -AliTRDrawStreamBase::AliTRDrawStreamBase(AliRawReader */*rawReader*/) - : TObject() -{ - // - // this is just for API - // - ; -} - -//_____________________________________________________________________________ -AliTRDrawStreamBase::AliTRDrawStreamBase(const AliTRDrawStreamBase& /*st*/) - : TObject() -{ - // - // copy - // - TRD_NOIMP(); - ; -} - -//_____________________________________________________________________________ -AliTRDrawStreamBase::~AliTRDrawStreamBase() -{ - // - // destructor - // - ; -} - -//_____________________________________________________________________________ -AliTRDrawStreamBase & -AliTRDrawStreamBase::operator=(const AliTRDrawStreamBase &) -{ - // - // we are not using this functionality - // - TRD_NOIMP(); - return *this; -} - -//_____________________________________________________________________________ -AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream() -{ - // - // Returns the selected raw stream implementation - // - - // Always use the new one! - return new AliTRDrawStream(); - -} - -//_____________________________________________________________________________ -AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream(AliRawReader *reader) -{ - // - // Returns the selected raw stream implementation - // - - // Always use the new one! - return new AliTRDrawStream(reader); - -} - -//_____________________________________________________________________________ -void AliTRDrawStreamBase::SetRawStreamVersion(const char *opt) -{ - // - // Sets the raw stream version - // - - fgRawStreamVersion = 0; - - if (strstr(opt, "sim" ) != 0 || strstr(opt, "SIM") != 0) - fgRawStreamVersion = kTRDsimStream; - - if (strstr(opt, "tb" ) != 0 || strstr(opt, "TB") != 0) - fgRawStreamVersion = kTRDrealStream; - - if (strstr(opt, "real" ) != 0 || strstr(opt, "REAL") != 0) - fgRawStreamVersion = kTRDrealStream; - - //if (strstr(opt, "fast" ) != 0 || strstr(opt, "FAST") != 0) - // fgRawStreamVersion = kTRDfastStream; - - if (strstr(opt, "default" ) != 0 || strstr(opt, "DEFAULT") != 0) - fgRawStreamVersion = kTRDdefaultStream; - -} - diff --git a/TRD/AliTRDrawStreamBase.h b/TRD/AliTRDrawStreamBase.h deleted file mode 100644 index 54aeae19f06..00000000000 --- a/TRD/AliTRDrawStreamBase.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef ALITRDRAWSTREAMBASE_H -#define ALITRDRAWSTREAMBASE_H - -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -/* $Id: AliTRDrawStreamBase.h 23387 2008-01-17 17:25:16Z cblume $ */ - -/////////////////////////////////////////////////////////////////////////////// -// // -// This base class defines access to TRD digits in raw data. // -// // -/////////////////////////////////////////////////////////////////////////////// - -#include "TObject.h" -#include "AliLog.h" - -class AliRawReader; -class AliTRDdigitsManager; - -#define TRDMAXTBINS 63 -#define TRDMAXADC 21 -#define TRDMAXMCM 4 * 16 -#define MAXTRACKLETSPERHC 256 - -#define TRD_NOIMP() AliFatal("Not Implemented for this class. Use inherited."); - -class AliTRDrawStreamBase : public TObject -{ // class def begin - - public: - - AliTRDrawStreamBase(); - AliTRDrawStreamBase(AliRawReader *rawReader); - virtual ~AliTRDrawStreamBase(); - - AliTRDrawStreamBase(const AliTRDrawStreamBase& st); - AliTRDrawStreamBase &operator=(const AliTRDrawStreamBase &); - - //-------------------------------------------------------- - - enum STREAMTYPE - { - kTRDsimStream = 0, - kTRDrealStream = 1, - kTRDdefaultStream = 2 - }; - - enum { kDDLOffset = 0x400 }; // Offset for DDL numbers - - static AliTRDrawStreamBase *GetRawStream(); - static AliTRDrawStreamBase *GetRawStream(AliRawReader *reader); - - static void SetRawStreamVersion(Int_t iver) { fgRawStreamVersion = iver; } - static void SetRawStreamVersion(const char *opt); - - // this is a temporary solution!^M - // baseline should come with the HC header word 2 (count from 0!)^M - - virtual Bool_t Next() {TRD_NOIMP(); return 0;} - //virtual Int_t NextChamber(AliTRDdigitsManager */*man*/) {TRD_NOIMP(); return 0;} - //virtual Int_t NextChamber(AliTRDdigitsManager */*man*/, UInt_t **/*trackletContainer*/=NULL) {TRD_NOIMP(); return 0;} - virtual Int_t NextChamber(AliTRDdigitsManager */*man*/, UInt_t **/*trackletContainer*/=NULL, UShort_t **/*errorCodeContainer*/=NULL) {TRD_NOIMP(); return 0;} - virtual Bool_t Init() {TRD_NOIMP(); return -1;} - - virtual Bool_t SetRawVersion(Int_t /*fraw*/) {TRD_NOIMP(); return 0;} - virtual void SetNoErrorWarning() {TRD_NOIMP();} - - virtual Bool_t IsCurrentPadShared() const {TRD_NOIMP(); return 0;} - virtual void SetSharedPadReadout(Bool_t /*fv*/) {TRD_NOIMP();} - virtual Bool_t IsDataZeroSuppressed() const {TRD_NOIMP(); return 0;} - - virtual Bool_t SetReader(AliRawReader */*reader*/) {TRD_NOIMP(); return 0;} - - virtual Bool_t IsTrackletEnableBitSet() const {TRD_NOIMP(); return 0;} - virtual Bool_t IsStackActive(Int_t /*is*/) const {TRD_NOIMP(); return 0;} - virtual Int_t GetNofActiveStacks() const {TRD_NOIMP(); return 0;} - virtual UInt_t *GetSMstreamPosition() const {TRD_NOIMP(); return 0;} - - virtual Bool_t IsSMbufferClean() const {TRD_NOIMP(); return 0;} - - virtual Bool_t IsLinkActiveInStack(Int_t /*is*/, Int_t /*il*/) const {TRD_NOIMP(); return 0;} - virtual Int_t GetActiveLinksInStack(Int_t /*is*/) const {TRD_NOIMP(); return 0;} - - virtual Int_t GetSpecialRawVersion() const {TRD_NOIMP(); return 0;} - virtual Int_t GetMajorRawVersion() const {TRD_NOIMP(); return 0;} - virtual Int_t GetRawVersion() const {TRD_NOIMP(); return 0;} - virtual Int_t GetMinorRawVersion() const {TRD_NOIMP(); return 0;} - - virtual Int_t GetSM() const {TRD_NOIMP(); return 0;} - virtual Int_t GetLayer() const {TRD_NOIMP(); return 0;} - virtual Int_t GetStack() const {TRD_NOIMP(); return 0;} - virtual Int_t GetSide() const {TRD_NOIMP(); return 0;} - virtual Int_t GetDCS() const {TRD_NOIMP(); return 0;} - - virtual Int_t GetROC() const {TRD_NOIMP(); return 0;} - virtual Int_t GetNumberOfTimeBins() const {TRD_NOIMP(); return 0;} - virtual UInt_t GetBunchCrossCounter() const {TRD_NOIMP(); return 0;} - virtual UInt_t GetPreTriggerCounter() const {TRD_NOIMP(); return 0;} - virtual UInt_t GetPreTriggerPhase() const {TRD_NOIMP(); return 0;} - - virtual Int_t GetRow() const {TRD_NOIMP(); return 0;} - virtual Int_t GetCol() const {TRD_NOIMP(); return 0;} - virtual Int_t GetRowMax() const {TRD_NOIMP(); return 0;} - virtual Int_t GetColMax() const {TRD_NOIMP(); return 0;} - - // compatibility - virtual Int_t GetMaxRow() const {TRD_NOIMP(); return 0;} - virtual Int_t GetMaxCol() const {TRD_NOIMP(); return 0;} - - virtual Int_t GetDET() const {TRD_NOIMP(); return 0;} - virtual Int_t GetDet() const {TRD_NOIMP(); return 0;} - - virtual Int_t GetROB() const {TRD_NOIMP(); return 0;} - virtual Int_t GetMCM() const {TRD_NOIMP(); return 0;} - virtual Int_t GetEventNumber() const {TRD_NOIMP(); return 0;} - virtual Int_t IsMCMcorrupted() const {TRD_NOIMP(); return 0;} - - virtual Int_t *GetSignals() const {TRD_NOIMP(); return 0;} - virtual Int_t GetADC() const {TRD_NOIMP(); return 0;} - virtual Int_t GetTimeBin() const {TRD_NOIMP(); return 0;} - - virtual Int_t GetCommonAdditive() const {TRD_NOIMP(); return 0;} - - //---------------------------------------------------------- - - private: - - static Int_t fgRawStreamVersion; // Raw stream version number - - ClassDef(AliTRDrawStreamBase, 0) // TRD raw stream base class - -}; //clas def end - -#endif diff --git a/TRD/AliTRDrawStreamOld.cxx b/TRD/AliTRDrawStreamOld.cxx index 7a51b0f3dbf..add4c603183 100644 --- a/TRD/AliTRDrawStreamOld.cxx +++ b/TRD/AliTRDrawStreamOld.cxx @@ -42,7 +42,7 @@ #include "AliTRDSignalIndex.h" #include "AliTRDdigitsParam.h" -//#include "AliLog.h" +#include "AliLog.h" #include "AliRawReader.h" #define END_OF_TRACKLET_MARKEROLD 0xaaaaaaaa @@ -142,7 +142,7 @@ Bool_t AliTRDrawStreamOld::fgDumpingEnable = kFALSE; AliTRDrawStreamOld::AliTRDrawStreamOld() - : AliTRDrawStreamBase() + : TObject() , fSM() , fStack(0) , fHC(0) @@ -184,7 +184,7 @@ AliTRDrawStreamOld::AliTRDrawStreamOld() //-------------------------------------------------------- AliTRDrawStreamOld::AliTRDrawStreamOld(AliRawReader *rawReader) - : AliTRDrawStreamBase(rawReader) + : TObject() , fSM() , fStack(0) , fHC(0) @@ -232,7 +232,7 @@ AliTRDrawStreamOld::AliTRDrawStreamOld(AliRawReader *rawReader) //------------------------------------------------------------ AliTRDrawStreamOld::AliTRDrawStreamOld(const AliTRDrawStreamOld& /*st*/) - : AliTRDrawStreamBase() + : TObject() , fSM() , fStack(0) , fHC(0) diff --git a/TRD/AliTRDrawStreamOld.h b/TRD/AliTRDrawStreamOld.h index ab87c1ca008..6a0f455725f 100644 --- a/TRD/AliTRDrawStreamOld.h +++ b/TRD/AliTRDrawStreamOld.h @@ -12,7 +12,7 @@ // // /////////////////////////////////////////////////////////////////////////////// -#include "AliTRDrawStreamBase.h" +#include "TObject.h" class AliTRDgeometry; class AliRawReader; @@ -20,8 +20,12 @@ class AliTRDdigitsManager; class TTreeSRedirector; class AliTRDfeeParam; +#define TRDMAXTBINS 63 +#define TRDMAXADC 21 +#define TRDMAXMCM 4 * 16 +#define MAXTRACKLETSPERHC 256 -class AliTRDrawStreamOld : public AliTRDrawStreamBase +class AliTRDrawStreamOld : public TObject { // class def begin public: diff --git a/TRD/AliTRDrecoParam.cxx b/TRD/AliTRDrecoParam.cxx index 5348daac047..9ff9cd06c37 100644 --- a/TRD/AliTRDrecoParam.cxx +++ b/TRD/AliTRDrecoParam.cxx @@ -25,8 +25,9 @@ // // /////////////////////////////////////////////////////////////////////////////// +#include "AliLog.h" + #include "AliTRDrecoParam.h" -#include "AliTRDrawStreamBase.h" ClassImp(AliTRDrecoParam) diff --git a/TRD/TRDPEDESTALda.cxx b/TRD/TRDPEDESTALda.cxx index 867ec1cd67f..667c968839c 100644 --- a/TRD/TRDPEDESTALda.cxx +++ b/TRD/TRDPEDESTALda.cxx @@ -37,8 +37,6 @@ extern "C" { // #include "AliRawReader.h" #include "AliRawReaderDate.h" -//#include "AliTRDrawFastStream.h" -//#include "AliTRDrawStreamBase.h" #include "AliTRDgeometry.h" #include "AliCDBManager.h" #include "AliLog.h" @@ -151,7 +149,7 @@ int main(int argc, char **argv) { // for debug //rawReader->SelectEquipment(-1,1024,1025); - Int_t result = calipad.ProcessEvent2((AliRawReader *) rawReader); + Int_t result = calipad.ProcessEvent((AliRawReader *) rawReader); // 0 error, 1 no input, 2 output if(result == 2) nevents++; if(result == 0) passpadstatus = kFALSE; diff --git a/TRD/TRDVDRIFTda.cxx b/TRD/TRDVDRIFTda.cxx index 97748453aaa..516eaaae22a 100644 --- a/TRD/TRDVDRIFTda.cxx +++ b/TRD/TRDVDRIFTda.cxx @@ -42,8 +42,6 @@ extern "C" { // #include "AliRawReader.h" #include "AliRawReaderDate.h" -//#include "AliTRDrawFastStream.h" -//#include "AliTRDrawStreamBase.h" #include "AliLog.h" // @@ -167,7 +165,7 @@ int main(int argc, char **argv) { AliRawReader *rawReader = new AliRawReaderDate((void*)event); rawReader->Select("TRD"); - Int_t result = calibra->ProcessEventDAQ2((AliRawReader *)rawReader); + Int_t result = calibra->ProcessEventDAQ((AliRawReader *)rawReader); if(!result) passvdrift = kFALSE; else nbvdrift += (Int_t) result/2; diff --git a/TRD/TRDbaseLinkDef.h b/TRD/TRDbaseLinkDef.h index 1e0b234d205..ff847d05edc 100644 --- a/TRD/TRDbaseLinkDef.h +++ b/TRD/TRDbaseLinkDef.h @@ -27,7 +27,6 @@ #pragma link C++ class AliTRDrawStreamOld+; #pragma link C++ class AliTRDrawStream+; -#pragma link C++ class AliTRDrawStreamBase+; #pragma link C++ class AliTRDrawStream::AliTRDrawStreamError+; #pragma link C++ class AliTRDrawStream::AliTRDrawStats+; #pragma link C++ class AliTRDrawStream::AliTRDrawStats::AliTRDrawStatsSector+; diff --git a/TRD/libTRDbase.pkg b/TRD/libTRDbase.pkg index 308776792d8..7a52e5d0866 100644 --- a/TRD/libTRDbase.pkg +++ b/TRD/libTRDbase.pkg @@ -11,7 +11,6 @@ SRCS= AliTRDarraySignal.cxx \ AliTRDrawData.cxx \ AliTRDpadPlane.cxx \ AliTRDrawStreamOld.cxx \ - AliTRDrawStreamBase.cxx \ AliTRDrawStream.cxx \ AliTRDCommonParam.cxx \ AliTRDfeeParam.cxx \ -- 2.43.0