//header file
#include "AliLog.h"
#include "AliTRDCalibPadStatus.h"
-#include "AliTRDrawStreamBase.h"
#include "AliTRDgeometry.h"
#include "AliTRDCommonParam.h"
#include "./Cal/AliTRDCalROC.h"
}
//_____________________________________________________________________
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)csignal<fAdcMin)) )
- bin = (nbchannel+1)*(fAdcMax-fAdcMin+2)+((Int_t)csignal-fAdcMin+1);
-
- //GetHisto(icdet,kTRUE)->Fill(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,
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)
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);
}
}
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
}
-
-//_____________________________________________________________________
-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; ism<sm+1; ism++){
- for (Int_t ich=ch; ich < ch+1; ich++){
- for (Int_t ipl=0; ipl < 6; ipl++){
- for(Int_t irow = 0; irow < fGeo->GetRowMax(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,
class AliTRDCalPad;
class AliTRDCalROC;
class AliTRDCalPadStatus;
-class AliTRDrawStreamBase;
class AliTRDgeometry;
class AliTRDdigitsManager;
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();
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
#include "AliTRDcluster.h"
#include "AliTRDtrack.h"
#include "AliTRDtrackV1.h"
-#include "AliTRDrawStreamBase.h"
#include "AliRawReader.h"
#include "AliRawReaderDate.h"
#include "AliTRDgeometry.h"
// 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
class AliTRDCalibraMode;
class AliTRDCalibraVector;
class AliTRDCalibraVdriftLinearFit;
-class AliTRDrawStreamBase;
class AliTRDcluster;
class AliTRDtrackV1;
class AliTRDtrack;
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;
#include "AliTRDcluster.h"
#include "AliTRDQADataMakerRec.h"
#include "AliTRDgeometry.h"
-#include "AliTRDrawStreamBase.h"
+#include "AliTRDrawStream.h"
#include "AliTRDdigitsManager.h"
#include "AliTRDSignalIndex.h"
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
#include "AliTRDReconstructor.h"
#include "AliTRDclusterizer.h"
#include "AliTRDrawData.h"
-#include "AliTRDrawStreamBase.h"
+#include "AliTRDrawStream.h"
#include "AliTRDdigitsManager.h"
#include "AliTRDtrackerV1.h"
AliTRDrawData rawData;
rawReader->Reset();
rawReader->Select("TRD");
- AliTRDrawStreamBase::SetRawStreamVersion(GetRecoParam()->GetRawStreamVersion()->Data());
AliTRDdigitsManager *manager = rawData.Raw2Digits(rawReader);
manager->MakeBranch(digitsTree);
manager->WriteDigits();
rawReader->Reset();
rawReader->Select("TRD");
- AliTRDrawStreamBase::SetRawStreamVersion(GetRecoParam()->GetRawStreamVersion()->Data());
if(!fClusterizer){
AliFatal("Clusterizer not available!");
#include "AliTRDcalibDB.h"
#include "AliTRDtransform.h"
#include "AliTRDSignalIndex.h"
-#include "AliTRDrawStreamBase.h"
#include "AliTRDrawStream.h"
#include "AliTRDfeeParam.h"
#include "AliTRDtrackletWord.h"
}
if(!fRawStream)
- fRawStream = AliTRDrawStreamBase::GetRawStream(rawReader);
+ fRawStream = new AliTRDrawStream(rawReader);
else
fRawStream->SetReader(rawReader);
class AliTRDCalROC;
class AliTRDReconstructor;
class AliTRDCalSingleChamberStatus;
-class AliTRDrawStreamBase;
+class AliTRDrawStream;
class AliTRDrecoParam;
class AliTRDclusterizer : public TNamed
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
#include "TStyle.h"
#include "TGraph.h"
+#include "AliLog.h"
#include "AliRawReader.h"
#include "AliTRDrawStreamOld.h"
#include "AliTRDgeometry.h"
#include "AliTRDarrayDictionary.h"
#include "AliTRDarrayADC.h"
-#include "AliTRDrawStreamBase.h"
+#include "AliTRDrawStream.h"
#include "AliTRDcalibDB.h"
#include "AliTRDSignalIndex.h"
#include "AliTRDfeeParam.h"
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);
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()));
#ifndef ALITRDRAWSTREAM_H
#define ALITRDRAWSTREAM_H
-#include "AliTRDrawStreamBase.h"
+#include "TObject.h"
#include "TClonesArray.h"
#include "TTree.h"
#define TRDMAXMCM 4 * 16
#define MAXTRACKLETSPERHC 256
-class AliTRDrawStream : public AliTRDrawStreamBase
+class AliTRDrawStream : public TObject
{
public:
AliTRDrawStream(AliRawReader *rawReader = 0x0);
+++ /dev/null
-/**************************************************************************
- * 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;
-
-}
-
+++ /dev/null
-#ifndef ALITRDRAWSTREAMBASE_H\r
-#define ALITRDRAWSTREAMBASE_H\r
-\r
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
- * See cxx source for full Copyright notice */\r
-\r
-/* $Id: AliTRDrawStreamBase.h 23387 2008-01-17 17:25:16Z cblume $ */\r
-\r
-///////////////////////////////////////////////////////////////////////////////\r
-// //\r
-// This base class defines access to TRD digits in raw data. //\r
-// //\r
-///////////////////////////////////////////////////////////////////////////////\r
-\r
-#include "TObject.h"\r
-#include "AliLog.h"\r
-\r
-class AliRawReader;\r
-class AliTRDdigitsManager;\r
-\r
-#define TRDMAXTBINS 63\r
-#define TRDMAXADC 21\r
-#define TRDMAXMCM 4 * 16\r
-#define MAXTRACKLETSPERHC 256\r
-\r
-#define TRD_NOIMP() AliFatal("Not Implemented for this class. Use inherited.");\r
-\r
-class AliTRDrawStreamBase : public TObject\r
-{ // class def begin\r
-\r
- public:\r
-\r
- AliTRDrawStreamBase();\r
- AliTRDrawStreamBase(AliRawReader *rawReader);\r
- virtual ~AliTRDrawStreamBase();\r
-\r
- AliTRDrawStreamBase(const AliTRDrawStreamBase& st);\r
- AliTRDrawStreamBase &operator=(const AliTRDrawStreamBase &);\r
-\r
- //--------------------------------------------------------\r
-\r
- enum STREAMTYPE\r
- {\r
- kTRDsimStream = 0,\r
- kTRDrealStream = 1,\r
- kTRDdefaultStream = 2\r
- };\r
-\r
- enum { kDDLOffset = 0x400 }; // Offset for DDL numbers\r
-\r
- static AliTRDrawStreamBase *GetRawStream();\r
- static AliTRDrawStreamBase *GetRawStream(AliRawReader *reader);\r
-\r
- static void SetRawStreamVersion(Int_t iver) { fgRawStreamVersion = iver; }\r
- static void SetRawStreamVersion(const char *opt);\r
-\r
- // this is a temporary solution!^M\r
- // baseline should come with the HC header word 2 (count from 0!)^M\r
-\r
- virtual Bool_t Next() {TRD_NOIMP(); return 0;} \r
- //virtual Int_t NextChamber(AliTRDdigitsManager */*man*/) {TRD_NOIMP(); return 0;} \r
- //virtual Int_t NextChamber(AliTRDdigitsManager */*man*/, UInt_t **/*trackletContainer*/=NULL) {TRD_NOIMP(); return 0;}\r
- virtual Int_t NextChamber(AliTRDdigitsManager */*man*/, UInt_t **/*trackletContainer*/=NULL, UShort_t **/*errorCodeContainer*/=NULL) {TRD_NOIMP(); return 0;}\r
- virtual Bool_t Init() {TRD_NOIMP(); return -1;} \r
-\r
- virtual Bool_t SetRawVersion(Int_t /*fraw*/) {TRD_NOIMP(); return 0;} \r
- virtual void SetNoErrorWarning() {TRD_NOIMP();}\r
- \r
- virtual Bool_t IsCurrentPadShared() const {TRD_NOIMP(); return 0;}\r
- virtual void SetSharedPadReadout(Bool_t /*fv*/) {TRD_NOIMP();} \r
- virtual Bool_t IsDataZeroSuppressed() const {TRD_NOIMP(); return 0;}\r
- \r
- virtual Bool_t SetReader(AliRawReader */*reader*/) {TRD_NOIMP(); return 0;} \r
- \r
- virtual Bool_t IsTrackletEnableBitSet() const {TRD_NOIMP(); return 0;}\r
- virtual Bool_t IsStackActive(Int_t /*is*/) const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetNofActiveStacks() const {TRD_NOIMP(); return 0;}\r
- virtual UInt_t *GetSMstreamPosition() const {TRD_NOIMP(); return 0;}\r
- \r
- virtual Bool_t IsSMbufferClean() const {TRD_NOIMP(); return 0;}\r
- \r
- virtual Bool_t IsLinkActiveInStack(Int_t /*is*/, Int_t /*il*/) const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetActiveLinksInStack(Int_t /*is*/) const {TRD_NOIMP(); return 0;}\r
- \r
- virtual Int_t GetSpecialRawVersion() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetMajorRawVersion() const {TRD_NOIMP(); return 0;} \r
- virtual Int_t GetRawVersion() const {TRD_NOIMP(); return 0;} \r
- virtual Int_t GetMinorRawVersion() const {TRD_NOIMP(); return 0;} \r
-\r
- virtual Int_t GetSM() const {TRD_NOIMP(); return 0;} \r
- virtual Int_t GetLayer() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetStack() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetSide() const {TRD_NOIMP(); return 0;} \r
- virtual Int_t GetDCS() const {TRD_NOIMP(); return 0;} \r
-\r
- virtual Int_t GetROC() const {TRD_NOIMP(); return 0;} \r
- virtual Int_t GetNumberOfTimeBins() const {TRD_NOIMP(); return 0;} \r
- virtual UInt_t GetBunchCrossCounter() const {TRD_NOIMP(); return 0;}\r
- virtual UInt_t GetPreTriggerCounter() const {TRD_NOIMP(); return 0;}\r
- virtual UInt_t GetPreTriggerPhase() const {TRD_NOIMP(); return 0;} \r
-\r
- virtual Int_t GetRow() const {TRD_NOIMP(); return 0;} \r
- virtual Int_t GetCol() const {TRD_NOIMP(); return 0;} \r
- virtual Int_t GetRowMax() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetColMax() const {TRD_NOIMP(); return 0;}\r
-\r
- // compatibility\r
- virtual Int_t GetMaxRow() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetMaxCol() const {TRD_NOIMP(); return 0;}\r
-\r
- virtual Int_t GetDET() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetDet() const {TRD_NOIMP(); return 0;}\r
- \r
- virtual Int_t GetROB() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetMCM() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetEventNumber() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t IsMCMcorrupted() const {TRD_NOIMP(); return 0;}\r
-\r
- virtual Int_t *GetSignals() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetADC() const {TRD_NOIMP(); return 0;}\r
- virtual Int_t GetTimeBin() const {TRD_NOIMP(); return 0;}\r
-\r
- virtual Int_t GetCommonAdditive() const {TRD_NOIMP(); return 0;}\r
- \r
- //----------------------------------------------------------\r
- \r
- private:\r
-\r
- static Int_t fgRawStreamVersion; // Raw stream version number\r
-\r
- ClassDef(AliTRDrawStreamBase, 0) // TRD raw stream base class\r
-\r
-}; //clas def end\r
-\r
-#endif\r
#include "AliTRDSignalIndex.h"\r
#include "AliTRDdigitsParam.h"\r
\r
-//#include "AliLog.h"\r
+#include "AliLog.h"\r
#include "AliRawReader.h"\r
\r
#define END_OF_TRACKLET_MARKEROLD 0xaaaaaaaa\r
\r
\r
AliTRDrawStreamOld::AliTRDrawStreamOld()\r
- : AliTRDrawStreamBase()\r
+ : TObject()\r
, fSM()\r
, fStack(0)\r
, fHC(0)\r
\r
//--------------------------------------------------------\r
AliTRDrawStreamOld::AliTRDrawStreamOld(AliRawReader *rawReader)\r
- : AliTRDrawStreamBase(rawReader)\r
+ : TObject()\r
, fSM()\r
, fStack(0)\r
, fHC(0)\r
//------------------------------------------------------------\r
\r
AliTRDrawStreamOld::AliTRDrawStreamOld(const AliTRDrawStreamOld& /*st*/)\r
- : AliTRDrawStreamBase()\r
+ : TObject()\r
, fSM()\r
, fStack(0)\r
, fHC(0)\r
// //\r
///////////////////////////////////////////////////////////////////////////////\r
\r
-#include "AliTRDrawStreamBase.h"\r
+#include "TObject.h"\r
\r
class AliTRDgeometry;\r
class AliRawReader;\r
class TTreeSRedirector;\r
class AliTRDfeeParam;\r
\r
+#define TRDMAXTBINS 63\r
+#define TRDMAXADC 21\r
+#define TRDMAXMCM 4 * 16\r
+#define MAXTRACKLETSPERHC 256\r
\r
-class AliTRDrawStreamOld : public AliTRDrawStreamBase\r
+class AliTRDrawStreamOld : public TObject\r
{ // class def begin\r
\r
public:\r
// //
///////////////////////////////////////////////////////////////////////////////
+#include "AliLog.h"
+
#include "AliTRDrecoParam.h"
-#include "AliTRDrawStreamBase.h"
ClassImp(AliTRDrecoParam)
//
#include "AliRawReader.h"
#include "AliRawReaderDate.h"
-//#include "AliTRDrawFastStream.h"
-//#include "AliTRDrawStreamBase.h"
#include "AliTRDgeometry.h"
#include "AliCDBManager.h"
#include "AliLog.h"
// 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;
//
#include "AliRawReader.h"
#include "AliRawReaderDate.h"
-//#include "AliTRDrawFastStream.h"
-//#include "AliTRDrawStreamBase.h"
#include "AliLog.h"
//
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;
#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+;
AliTRDrawData.cxx \
AliTRDpadPlane.cxx \
AliTRDrawStreamOld.cxx \
- AliTRDrawStreamBase.cxx \
AliTRDrawStream.cxx \
AliTRDCommonParam.cxx \
AliTRDfeeParam.cxx \