//_____________________________________________________________________________
AliTRDRawStream::AliTRDRawStream()
- :TObject()
+ :AliTRDrawStreamBase()
+// :TObject()
,fGeo(NULL)
,fSig()
,fADC(0)
//_____________________________________________________________________________
AliTRDRawStream::AliTRDRawStream(AliRawReader *rawReader)
- :TObject()
+ :AliTRDrawStreamBase(rawReader)
+// :TObject()
,fGeo(NULL)
,fSig()
,fADC(0)
//_____________________________________________________________________________
AliTRDRawStream::AliTRDRawStream(const AliTRDRawStream& stream)
- :TObject(stream)
+ :AliTRDrawStreamBase(stream)
+// :TObject()
,fGeo(NULL)
,fSig()
,fADC(-1)
}
//____________________________________________________________________________
-Int_t AliTRDRawStream::Init()
+Bool_t AliTRDRawStream::Init()
{
//
// Initialization
if (!AliTRDcalibDB::Instance()) {
AliError("Could not get calibration object");
- return 0;
+ return kFALSE;
}
if (!fGeo) {
////////////////////////////////////////////////////////////////////////////
#include <TObject.h>
+#include "AliTRDrawStreamBase.h"
class AliRawReader;
const UInt_t kEndofrawdatamarker = 0x00000000; /*This marks the end of half-chamber-data*/
const UInt_t kSizeWord = sizeof(UInt_t);
-class AliTRDRawStream: public TObject {
+//class AliTRDRawStream: public TObject {
+class AliTRDRawStream: public AliTRDrawStreamBase {
public :
virtual Bool_t Next(); // Read the next data
virtual Int_t NextChamber(AliTRDdigitsManager *man); // Read next chamber data
- virtual Int_t Init(); // Init for the fRawVersion > 1
+ virtual Bool_t Init(); // Init for the fRawVersion > 1
enum { kDDLOffset = 0x400 }; // Offset for DDL numbers
Bool_t IsGTULinkActive(Int_t sm, Int_t la, Int_t sta, Int_t side)
{ return ( ((fGTUlinkMask[sm][sta]) >> (2*la+side)) & 0x1 ); };
- Int_t *GetSignals() { return fSig; } // Signals in the three time bins from Data Word
+ Int_t *GetSignals() const { return (Int_t*)fSig; } // Signals in the three time bins from Data Word
Int_t GetADC() const { return fADC; } // MCM ADC channel and Time Bin of word 1
Int_t GetTimeBin() const { return fTB - 3; } // MCM ADC channel and Time Bin of word 1
Int_t GetEventNumber() const { return fEv; } // MCM Event number and position of current MCM
//_____________________________________________________________________________
AliTRDRawStreamV2::AliTRDRawStreamV2()
- :TObject()
+ :AliTRDrawStreamBase()
+// :TObject()
,fGeo(NULL)
,fSig()
,fADC(0)
//_____________________________________________________________________________
AliTRDRawStreamV2::AliTRDRawStreamV2(AliRawReader *rawReader)
- :TObject()
+ :AliTRDrawStreamBase(rawReader)
+// :TObject()
,fGeo(NULL)
,fADC(0)
,fTB(0)
//_____________________________________________________________________________
AliTRDRawStreamV2::AliTRDRawStreamV2(const AliTRDRawStreamV2& stream)
- :TObject(stream)
+ :AliTRDrawStreamBase(stream)
+// :TObject()
,fGeo(NULL)
,fSig()
,fADC(-1)
}
//____________________________________________________________________________
-Int_t AliTRDRawStreamV2::Init()
+Bool_t AliTRDRawStreamV2::Init()
{
//
// Initialization
if (!AliTRDcalibDB::Instance()) {
AliError("Could not get calibration object");
- return 0;
+ return kFALSE;
}
if (!fGeo) {
///////////////////////////////////////////////////////////////////////////////
#include <TObject.h>
+#include "AliTRDrawStreamBase.h"
class AliTRDgeometry;
class AliRawReader;
class AliTRDdigitsManager;
-class AliTRDRawStreamV2: public TObject {
+//class AliTRDRawStreamV2: public TObject {
+class AliTRDRawStreamV2 : public AliTRDrawStreamBase {
public :
virtual Bool_t Next(); // Read the next data
virtual Int_t NextChamber(AliTRDdigitsManager *man); // Read next chamber data
- virtual Int_t Init(); // Init for the fRawVersion > 1
+ virtual Bool_t Init(); // Init for the fRawVersion > 1
enum { kDDLOffset = 0x400 }; // Offset for DDL numbers
Bool_t IsGTULinkActive(Int_t sm, Int_t la, Int_t sta, Int_t side)
{ return ( ((fGTUlinkMask[sm][sta]) >> (2*la+side)) & 0x1 ); };
- Int_t *GetSignals() { return fSig; } // Signals in the three time bins from Data Word
+ Int_t *GetSignals() const { return (Int_t*)fSig; } // Signals in the three time bins from Data Word
Int_t GetADC() const { return fADC; } // MCM ADC channel and Time Bin of word 1
Int_t GetTimeBin() const { return fTB - 3; } // MCM ADC channel and Time Bin of word 1
Int_t GetEventNumber() const { return fEv; } // MCM Event number and position of current MCM on TRD chamber
#include "AliTRDCommonParam.h"
#include "AliTRDtransform.h"
#include "AliTRDSignalIndex.h"
-#include "AliTRDRawStream.h"
-#include "AliTRDRawStreamV2.h"
+#include "AliTRDrawStreamBase.h"
+// #include "AliTRDRawStream.h"
+// #include "AliTRDRawStreamV2.h"
#include "AliTRDfeeParam.h"
#include "Cal/AliTRDCalROC.h"
,fRawVersion(2)
,fIndexesOut(NULL)
,fIndexesMaxima(NULL)
- ,fTransform(NULL)
+ ,fTransform(new AliTRDtransform(0))
{
//
// AliTRDclusterizer default constructor
// Creates clusters from raw data
//
- AliTRDdataArrayS *digits = 0;
- AliTRDdataArrayI *track0 = 0;
- AliTRDdataArrayI *track1 = 0;
- AliTRDdataArrayI *track2 = 0;
+// AliTRDdataArrayS *digits = 0;
+// AliTRDdataArrayI *track0 = 0;
+// AliTRDdataArrayI *track1 = 0;
+// AliTRDdataArrayI *track2 = 0;
- AliTRDSignalIndex *indexes = 0;
+// AliTRDSignalIndex *indexes = 0;
- // Create the digits manager
- if (!fDigitsManager)
- {
- fDigitsManager = new AliTRDdigitsManager();
- fDigitsManager->CreateArrays();
- }
+// // Create the digits manager
+// if (!fDigitsManager)
+// {
+// fDigitsManager = new AliTRDdigitsManager();
+// fDigitsManager->CreateArrays();
+// }
- AliTRDRawStreamV2 input(rawReader);
- input.SetRawVersion( fRawVersion );
- input.Init();
+// // AliTRDRawStreamV2 input(rawReader);
+// // input.SetRawVersion( fRawVersion );
+// // input.Init();
+// AliTRDrawStreamBase &input = *AliTRDrawStreamBase::GetRawStream(rawReader);
- AliInfo(Form("Stream version: %s", input.IsA()->GetName()));
+// AliInfo(Form("Stream version: %s", input.IsA()->GetName()));
- // Loop through the digits
- Int_t lastdet = -1;
- Int_t det = 0;
- Int_t it = 0;
- while (input.Next())
- {
+// // Loop through the digits
+// Int_t lastdet = -1;
+// Int_t det = 0;
+// Int_t it = 0;
+// while (input.Next())
+// {
- det = input.GetDet();
+// det = input.GetDet();
- if (det != lastdet)
- {
+// if (det != lastdet)
+// {
- if (lastdet != -1)
- {
- digits = (AliTRDdataArrayS *) fDigitsManager->GetDigits(lastdet);
- Bool_t iclusterBranch = kFALSE;
- if (indexes->HasEntry())
- iclusterBranch = MakeClusters(lastdet);
- if (iclusterBranch == kFALSE)
- {
- WriteClusters(lastdet);
- ResetRecPoints();
- }
- }
-
- if (digits)
- {
- fDigitsManager->RemoveDigits(lastdet);
- fDigitsManager->RemoveDictionaries(lastdet);
- fDigitsManager->ClearIndexes(lastdet);
- }
-
- lastdet = det;
-
- // Add a container for the digits of this detector
- digits = (AliTRDdataArrayS *) fDigitsManager->GetDigits(det);
- track0 = (AliTRDdataArrayI *) fDigitsManager->GetDictionary(det,0);
- track1 = (AliTRDdataArrayI *) fDigitsManager->GetDictionary(det,1);
- track2 = (AliTRDdataArrayI *) fDigitsManager->GetDictionary(det,2);
-
- // Allocate memory space for the digits buffer
- if (!digits->HasData())
- {
- //AliDebug(5, Form("Alloc digits for det %d", det));
- digits->Allocate(input.GetMaxRow(),input.GetMaxCol(), input.GetNumberOfTimeBins());
- track0->Allocate(input.GetMaxRow(),input.GetMaxCol(), input.GetNumberOfTimeBins());
- track1->Allocate(input.GetMaxRow(),input.GetMaxCol(), input.GetNumberOfTimeBins());
- track2->Allocate(input.GetMaxRow(),input.GetMaxCol(), input.GetNumberOfTimeBins());
- }
+// if (lastdet != -1)
+// {
+// digits = (AliTRDdataArrayS *) fDigitsManager->GetDigits(lastdet);
+// Bool_t iclusterBranch = kFALSE;
+// if (indexes->HasEntry())
+// iclusterBranch = MakeClusters(lastdet);
+// if (iclusterBranch == kFALSE)
+// {
+// WriteClusters(lastdet);
+// ResetRecPoints();
+// }
+// }
+
+// if (digits)
+// {
+// fDigitsManager->RemoveDigits(lastdet);
+// fDigitsManager->RemoveDictionaries(lastdet);
+// fDigitsManager->ClearIndexes(lastdet);
+// }
+
+// lastdet = det;
+
+// // Add a container for the digits of this detector
+// digits = (AliTRDdataArrayS *) fDigitsManager->GetDigits(det);
+// track0 = (AliTRDdataArrayI *) fDigitsManager->GetDictionary(det,0);
+// track1 = (AliTRDdataArrayI *) fDigitsManager->GetDictionary(det,1);
+// track2 = (AliTRDdataArrayI *) fDigitsManager->GetDictionary(det,2);
+
+// // Allocate memory space for the digits buffer
+// if (!digits->HasData())
+// {
+// //AliDebug(5, Form("Alloc digits for det %d", det));
+// digits->Allocate(input.GetMaxRow(),input.GetMaxCol(), input.GetNumberOfTimeBins());
+// track0->Allocate(input.GetMaxRow(),input.GetMaxCol(), input.GetNumberOfTimeBins());
+// track1->Allocate(input.GetMaxRow(),input.GetMaxCol(), input.GetNumberOfTimeBins());
+// track2->Allocate(input.GetMaxRow(),input.GetMaxCol(), input.GetNumberOfTimeBins());
+// }
- indexes = fDigitsManager->GetIndexes(det);
- indexes->SetSM(input.GetSM());
- indexes->SetStack(input.GetStack());
- indexes->SetLayer(input.GetLayer());
- indexes->SetDetNumber(det);
- if (indexes->IsAllocated() == kFALSE)
- {
- indexes->Allocate(input.GetMaxRow(), input.GetMaxCol(), input.GetNumberOfTimeBins());
- }
-
- }
+// indexes = fDigitsManager->GetIndexes(det);
+// indexes->SetSM(input.GetSM());
+// indexes->SetStack(input.GetStack());
+// indexes->SetLayer(input.GetLayer());
+// indexes->SetDetNumber(det);
+// if (indexes->IsAllocated() == kFALSE)
+// {
+// indexes->Allocate(input.GetMaxRow(), input.GetMaxCol(), input.GetNumberOfTimeBins());
+// }
+
+// }
- for (it = 0; it < 3; it++)
- {
- if ( input.GetTimeBin() + it < input.GetNumberOfTimeBins() )
- {
- if (input.GetSignals()[it] > 0)
- {
- digits->SetDataUnchecked(input.GetRow(), input.GetCol(),
- input.GetTimeBin() + it, input.GetSignals()[it]);
-
- indexes->AddIndexTBin(input.GetRow(), input.GetCol(),
- input.GetTimeBin() + it);
- track0->SetDataUnchecked(input.GetRow(), input.GetCol(),
- input.GetTimeBin() + it, 0);
- track1->SetDataUnchecked(input.GetRow(), input.GetCol(),
- input.GetTimeBin() + it, 0);
- track2->SetDataUnchecked(input.GetRow(), input.GetCol(),
- input.GetTimeBin() + it, 0);
- }
- }
- }
-
- }
-
- if (lastdet != -1)
- {
- Bool_t iclusterBranch = kFALSE;
- if (indexes->HasEntry())
- {
- iclusterBranch = MakeClusters(lastdet);
- }
- if (iclusterBranch == kFALSE)
- {
- WriteClusters(lastdet);
- ResetRecPoints();
- }
- //MakeClusters(lastdet);
- if (digits)
- {
- fDigitsManager->RemoveDigits(lastdet);
- fDigitsManager->RemoveDictionaries(lastdet);
- fDigitsManager->ClearIndexes(lastdet);
- }
- }
-
- delete fDigitsManager;
- fDigitsManager = NULL;
- return kTRUE;
-
+// for (it = 0; it < 3; it++)
+// {
+// if ( input.GetTimeBin() + it < input.GetNumberOfTimeBins() )
+// {
+// if (input.GetSignals()[it] > 0)
+// {
+// digits->SetDataUnchecked(input.GetRow(), input.GetCol(),
+// input.GetTimeBin() + it, input.GetSignals()[it]);
+
+// indexes->AddIndexTBin(input.GetRow(), input.GetCol(),
+// input.GetTimeBin() + it);
+// track0->SetDataUnchecked(input.GetRow(), input.GetCol(),
+// input.GetTimeBin() + it, 0);
+// track1->SetDataUnchecked(input.GetRow(), input.GetCol(),
+// input.GetTimeBin() + it, 0);
+// track2->SetDataUnchecked(input.GetRow(), input.GetCol(),
+// input.GetTimeBin() + it, 0);
+// }
+// }
+// }
+
+// }
+
+// if (lastdet != -1)
+// {
+// Bool_t iclusterBranch = kFALSE;
+// if (indexes->HasEntry())
+// {
+// iclusterBranch = MakeClusters(lastdet);
+// }
+// if (iclusterBranch == kFALSE)
+// {
+// WriteClusters(lastdet);
+// ResetRecPoints();
+// }
+// //MakeClusters(lastdet);
+// if (digits)
+// {
+// fDigitsManager->RemoveDigits(lastdet);
+// fDigitsManager->RemoveDictionaries(lastdet);
+// fDigitsManager->ClearIndexes(lastdet);
+// }
+// }
+
+// delete fDigitsManager;
+// fDigitsManager = NULL;
+// return kTRUE;
+
+return Raw2ClustersChamber(rawReader);
}
//_____________________________________________________________________________
fDigitsManager->SetUseDictionaries(fAddLabels);
- AliTRDRawStreamV2 input(rawReader);
- input.SetRawVersion( fRawVersion );
- input.Init();
+// AliTRDRawStreamV2 input(rawReader);
+// input.SetRawVersion( fRawVersion );
+// input.Init();
+ AliTRDrawStreamBase *pinput = AliTRDrawStreamBase::GetRawStream(rawReader);
+ AliTRDrawStreamBase &input = *pinput;
AliInfo(Form("Stream version: %s", input.IsA()->GetName()));
delete fDigitsManager;
fDigitsManager = NULL;
+
+ delete pinput;
+ pinput = NULL;
return kTRUE;
}
#include "AliTRDgeometry.h"
#include "AliTRDdataArrayI.h"
#include "AliTRDdataArrayS.h"
+#include "AliTRDrawStreamBase.h"
#include "AliTRDRawStream.h"
#include "AliTRDRawStreamV2.h"
#include "AliTRDcalibDB.h"
AliTRDdataArrayI *track1 = 0;
AliTRDdataArrayI *track2 = 0;
+ //AliTRDSignalIndex *indexes = 0;
+ // Create the digits manager
+ AliTRDdigitsManager* digitsManager = new AliTRDdigitsManager();
+ digitsManager->CreateArrays();
+
+ //AliTRDRawStream input(rawReader);
+ // AliTRDRawStreamV2 input(rawReader);
+ // input.SetRawVersion( fFee->GetRAWversion() );
+ // input.Init();
+
+ AliTRDrawStreamBase *pinput = AliTRDrawStreamBase::GetRawStream(rawReader);
+ AliTRDrawStreamBase &input = *pinput;
+
+ AliInfo(Form("Stream version: %s", input.IsA()->GetName()));
+
+ // Loop through the digits
+ Int_t det = 0;
+
+ while (det >= 0)
+ {
+ det = input.NextChamber(digitsManager);
+ if (det >= 0)
+ {
+ // get...
+ digits = (AliTRDdataArrayS *) digitsManager->GetDigits(det);
+ track0 = (AliTRDdataArrayI *) digitsManager->GetDictionary(det,0);
+ track1 = (AliTRDdataArrayI *) digitsManager->GetDictionary(det,1);
+ track2 = (AliTRDdataArrayI *) digitsManager->GetDictionary(det,2);
+ // and compress
+ if (digits) digits->Compress(1,0);
+ if (track0) track0->Compress(1,0);
+ if (track1) track1->Compress(1,0);
+ if (track2) track2->Compress(1,0);
+ }
+ }
+
+ delete pinput;
+ pinput = NULL;
+
+ return digitsManager;
+}
+
+//_____________________________________________________________________________
+AliTRDdigitsManager *AliTRDrawData::Raw2DigitsOLD(AliRawReader *rawReader)
+{
+ //
+ // Vx of the raw data reading
+ //
+
+ AliTRDdataArrayS *digits = 0;
+ AliTRDdataArrayI *track0 = 0;
+ AliTRDdataArrayI *track1 = 0;
+ AliTRDdataArrayI *track2 = 0;
+
AliTRDSignalIndex *indexes = 0;
// Create the digits manager
AliTRDdigitsManager* digitsManager = new AliTRDdigitsManager();
virtual Bool_t Digits2Raw(TTree *digits, TTree *tracks = NULL);
virtual AliTRDdigitsManager *Raw2Digits(AliRawReader *rawReader);
+ virtual AliTRDdigitsManager *Raw2DigitsOLD(AliRawReader *rawReader);
protected:
--- /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 "AliRawReader.h"
+
+#include "AliTRDRawStream.h"
+#include "AliTRDRawStreamV2.h"
+#include "AliTRDrawStreamTB.h"
+
+#include "AliTRDrawStreamBase.h"
+
+//--------------------------------------------------------
+ClassImp(AliTRDrawStreamBase)
+
+Int_t AliTRDrawStreamBase::fgRawStreamVersion = AliTRDrawStreamBase::kTRDsimStream;
+
+//_____________________________________________________________________________
+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
+ //
+
+ if (fgRawStreamVersion == kTRDoldStream)
+ return new AliTRDRawStream();
+
+ if (fgRawStreamVersion == kTRDrealStream)
+ return new AliTRDrawStreamTB();
+
+ if (fgRawStreamVersion == kTRDsimStream)
+ {
+ AliTRDRawStreamV2 *rstream = new AliTRDRawStreamV2();
+ rstream->Init();
+ return rstream;
+ }
+
+ return new AliTRDrawStreamBase;
+}
+
+//_____________________________________________________________________________
+AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream(AliRawReader *reader)
+{
+ //
+ // Returns the selected raw stream implementation
+ //
+
+ if (fgRawStreamVersion == kTRDoldStream)
+ return new AliTRDRawStream(reader);
+
+ if (fgRawStreamVersion == kTRDrealStream)
+ return new AliTRDrawStreamTB(reader);
+
+ if (fgRawStreamVersion == kTRDsimStream)
+ {
+ AliTRDRawStreamV2 *rstream = new AliTRDRawStreamV2(reader);
+ rstream->Init();
+ return rstream;
+ }
+ return new AliTRDrawStreamBase;
+}
+
+//_____________________________________________________________________________
+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, "old" ) != 0 || strstr(opt, "OLD") != 0)
+ fgRawStreamVersion = kTRDoldStream;
+
+}
--- /dev/null
+#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 "TString.h"
+#include "AliLog.h"
+
+class AliRawReader;
+class AliTRDdigitsManager;
+
+#define TRD_MAX_TBINS 30
+#define TRD_MAX_ADC 21
+#define TRD_MAX_MCM 4 * 16
+
+/* // old raw stream */
+/* #define TRD_OLD_STREAM -1 */
+/* // read simulated data */
+/* #define TRD_SIM_STREAM 0 */
+/* // read real data - including test beam 2007 */
+/* #define TRD_REAL_STREAM 1 */
+
+#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,
+ kTRDoldStream = 99
+ };
+
+ static AliTRDrawStreamBase *GetRawStream();
+ static AliTRDrawStreamBase *GetRawStream(AliRawReader *reader);
+
+ static void SetRawStreamVersion(Int_t iver) { fgRawStreamVersion = iver; }
+ static void SetRawStreamVersion(const char *opt);
+
+ virtual Bool_t Next() {TRD_NOIMP(); return 0;}
+ virtual Int_t NextChamber(AliTRDdigitsManager */*man*/) {TRD_NOIMP(); return 0;}
+ virtual Bool_t Init() {TRD_NOIMP(); return -1;}
+
+ virtual Bool_t SetRawVersion(Int_t /*fraw*/) {TRD_NOIMP(); return 0;}
+
+ 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;}
+
+ //----------------------------------------------------------
+
+ protected:
+
+ private:
+
+ static Int_t fgRawStreamVersion; // Raw stream version number
+
+ ClassDef(AliTRDrawStreamBase, 0) // TRD raw stream base class
+
+}; //clas def end
+
+#endif
};
AliTRDrawStreamTB::AliTRDrawStreamTB()
- : TObject()
+ : AliTRDrawStreamBase()
+//: TObject()
, fSM()
, fStack(0)
, fHC(0)
//--------------------------------------------------------
AliTRDrawStreamTB::AliTRDrawStreamTB(AliRawReader *rawReader)
- : TObject()
+ : AliTRDrawStreamBase(rawReader)
+//: TObject()
, fSM()
, fStack(0)
, fHC(0)
//------------------------------------------------------------
AliTRDrawStreamTB::AliTRDrawStreamTB(const AliTRDrawStreamTB& /*st*/)
- : TObject()
+ : AliTRDrawStreamBase()
+//: TObject()
, fSM()
, fStack(0)
, fHC(0)
}
//------------------------------------------------------------
-void AliTRDrawStreamTB::SetRawVersion(Int_t fraw)
+Bool_t AliTRDrawStreamTB::SetRawVersion(Int_t fraw)
{
//
// function provided for backward compatibility
//
AliWarning("Raw data version is read from raw data stream! No point of setting it in here.");
fraw = 0; // avoid warnings
+ return kFALSE;
}
//------------------------------------------------------------
#include "TObject.h"
#include "TString.h"
+#include "AliTRDrawStreamBase.h"
class AliTRDgeometry;
class AliRawReader;
class TTreeSRedirector;
class AliTRDfeeParam;
-#define TRD_MAX_TBINS 30
-#define TRD_MAX_ADC 21
-#define TRD_MAX_MCM 4 * 16
+// definitions in AliTRDrawStreamBase.h:
+/* #define TRD_MAX_TBINS 30 */
+/* #define TRD_MAX_ADC 21 */
+/* #define TRD_MAX_MCM 4 * 16 */
-class AliTRDrawStreamTB : public TObject
+//class AliTRDrawStreamTB : public TObject
+class AliTRDrawStreamTB : public AliTRDrawStreamBase
{ // class def begin
public:
virtual Int_t NextChamber(AliTRDdigitsManager *man); // read next chamber data
virtual Bool_t Init(); // Init some internal variables
- void SetRawVersion(Int_t fraw); // set the raw version - used for backward compat.
+ Bool_t SetRawVersion(Int_t fraw); // set the raw version - used for backward compat.
Bool_t IsCurrentPadShared() const {return fADC->fIsShared;} // is current pad shared between mcms
void SetSharedPadReadout(Bool_t fv) {fSharedPadsOn = fv;} // set the flag on if the reader should return the shared pads
#pragma link C++ class AliTRDRawStreamV2+;
#pragma link C++ class AliTRDrawStreamTB+;
+#pragma link C++ class AliTRDrawStreamBase+;
#pragma link C++ class AliTRDtestBeam+;
#pragma link C++ class AliTRDCommonParam+;
AliTRDRawStream.cxx \
AliTRDRawStreamV2.cxx \
AliTRDrawStreamTB.cxx \
+ AliTRDrawStreamBase.cxx \
AliTRDtestBeam.cxx \
AliTRDCommonParam.cxx \
AliTRDfeeParam.cxx \