/*
$Log$
+Revision 1.20 2000/06/08 18:32:57 cblume
+Make code compliant to coding conventions
+
Revision 1.19 2000/06/07 16:25:37 cblume
Try to remove compiler warnings on Sun and HP
}
//_____________________________________________________________________________
-AliTRD::AliTRD(AliTRD &trd)
+AliTRD::AliTRD(const AliTRD &trd)
{
//
// Copy constructor
//
- trd.Copy(*this);
+ ((AliTRD &) trd).Copy(*this);
}
}
//_____________________________________________________________________________
-void AliTRD::Copy(AliTRD &trd)
+void AliTRD::Copy(TObject &trd)
{
//
// Copy function
//
- trd.fGasMix = fGasMix;
- trd.fGeometry = fGeometry;
- trd.fRecPoints = fRecPoints;
- trd.fNRecPoints = fNRecPoints;
+ ((AliTRD &) trd).fGasMix = fGasMix;
+ ((AliTRD &) trd).fGeometry = fGeometry;
+ ((AliTRD &) trd).fRecPoints = fRecPoints;
+ ((AliTRD &) trd).fNRecPoints = fNRecPoints;
//AliDetector::Copy(trd);
}
+//_____________________________________________________________________________
+AliTRD &AliTRD::operator=(const AliTRD &trd)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &trd) ((AliTRD &) trd).Copy(*this);
+ return *this;
+
+}
AliTRD();
AliTRD(const char *name, const char *title);
- AliTRD(AliTRD &trd);
+ AliTRD(const AliTRD &trd);
virtual ~AliTRD();
+
+ AliTRD &operator=(const AliTRD &trd);
+
virtual void AddHit(Int_t track, Int_t *det, Float_t *hits);
virtual void AddDigit(Int_t *digits, Int_t *amp);
virtual void AddRecPoint(Float_t *pos, Int_t *digits
, Int_t det, Float_t amp);
virtual void BuildGeometry();
- virtual void Copy(AliTRD &trd);
+ virtual void Copy(TObject &trd);
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual void DrawModule();
virtual Int_t GetSensSector() = 0;
virtual Int_t GetSensSectorRange() = 0;
- inline AliTRD &operator=(AliTRD &trd);
-
protected:
Int_t fGasMix; // Gas mixture. 0: Xe/Isobutane 1: Xe/CO2
};
-//_____________________________________________________________________________
-AliTRD &AliTRD::operator=(AliTRD &trd)
-{
- //
- // Assignment operator
- //
-
- if (this != &trd) trd.Copy(*this);
- return *this;
-
-}
-
#endif
/*
$Log$
+Revision 1.3 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
}
//_____________________________________________________________________________
-void AliTRDarrayF::Copy(AliTRDarrayF &a)
+void AliTRDarrayF::Copy(TObject &a)
{
//
// Copy function
//
TObject::Copy(a);
- TArrayF::Copy(a);
+ TArrayF::Copy(((TArrayF &) a));
}
public:
~AliTRDarrayF();
- void Copy(AliTRDarrayF &a);
+ void Copy(TObject &a);
void Expand(Int_t n);
ClassDef(AliTRDarrayF,1)
/*
$Log$
+Revision 1.3 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
}
//_____________________________________________________________________________
-void AliTRDarrayI::Copy(AliTRDarrayI &a)
+void AliTRDarrayI::Copy(TObject &a)
{
//
// Copy function
//
TObject::Copy(a);
- TArrayI::Copy(a);
+ TArrayI::Copy(((TArrayI &) a));
}
public:
~AliTRDarrayI();
- void Copy(AliTRDarrayI &a);
+ void Copy(TObject &a);
void Expand(Int_t n);
ClassDef(AliTRDarrayI,1)
/*
$Log$
+Revision 1.3 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
}
//_____________________________________________________________________________
-AliTRDclusterizer::AliTRDclusterizer(AliTRDclusterizer &c)
+AliTRDclusterizer::AliTRDclusterizer(const AliTRDclusterizer &c)
{
//
// AliTRDclusterizer copy constructor
//
- c.Copy(*this);
+ ((AliTRDclusterizer &) c).Copy(*this);
}
}
//_____________________________________________________________________________
-void AliTRDclusterizer::Copy(AliTRDclusterizer &c)
+AliTRDclusterizer &AliTRDclusterizer::operator=(const AliTRDclusterizer &c)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &c) ((AliTRDclusterizer &) c).Copy(*this);
+ return *this;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDclusterizer::Copy(TObject &c)
{
//
// Copy function
//
- c.fInputFile = NULL;
- c.fEvent = 0;
+ ((AliTRDclusterizer &) c).fInputFile = NULL;
+ ((AliTRDclusterizer &) c).fEvent = 0;
}
AliTRDclusterizer();
AliTRDclusterizer(const Text_t* name, const Text_t* title);
- AliTRDclusterizer(AliTRDclusterizer &c);
+ AliTRDclusterizer(const AliTRDclusterizer &c);
virtual ~AliTRDclusterizer();
-
- inline AliTRDclusterizer &operator=(AliTRDclusterizer &c);
- virtual void Copy(AliTRDclusterizer &c);
+ AliTRDclusterizer &operator=(const AliTRDclusterizer &c);
+
+ virtual void Copy(TObject &c);
virtual void Init();
virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
virtual Bool_t MakeCluster() = 0;
};
-//_____________________________________________________________________________
-AliTRDclusterizer &AliTRDclusterizer::operator=(AliTRDclusterizer &c)
-{
- //
- // Assignment operator
- //
-
- if (this != &c) c.Copy(*this);
- return *this;
-
-}
-
#endif
-#ifndef ALITRDCLUSTERIZERV0_h
-#define ALITRDCLUSTERIZERV0_h
+#ifndef ALITRDCLUSTERIZERV0_H
+#define ALITRDCLUSTERIZERV0_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/*
$Log$
+Revision 1.5 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.4 2000/06/07 16:27:01 cblume
Try to remove compiler warnings on Sun and HP
}
//_____________________________________________________________________________
-AliTRDclusterizerV1::AliTRDclusterizerV1(AliTRDclusterizerV1 &c)
+AliTRDclusterizerV1::AliTRDclusterizerV1(const AliTRDclusterizerV1 &c)
{
//
// AliTRDclusterizerV1 copy constructor
//
- c.Copy(*this);
+ ((AliTRDclusterizerV1 &) c).Copy(*this);
}
}
+//_____________________________________________________________________________
+AliTRDclusterizerV1 &AliTRDclusterizerV1::operator=(const AliTRDclusterizerV1 &c)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &c) ((AliTRDclusterizerV1 &) c).Copy(*this);
+ return *this;
+
+}
+
//_____________________________________________________________________________
void AliTRDclusterizerV1::Copy(AliTRDclusterizerV1 &c)
{
Int_t sens1 = trd->GetSensSector();
Int_t sens2 = sens1 + trd->GetSensSectorRange();
sens2 -= ((Int_t) (sens2 / kNsect)) * kNsect;
- if (sens1 < sens2)
+ if (sens1 < sens2) {
if ((isect < sens1) || (isect >= sens2)) continue;
- else
+ }
+ else {
if ((isect < sens1) && (isect >= sens2)) continue;
+ }
}
Int_t idet = geo->GetDetector(iplan,icham,isect);
-#ifndef ALITRDCLUSTERIZERV1_h
-#define ALITRDCLUSTERIZERV1_h
+#ifndef ALITRDCLUSTERIZERV1_H
+#define ALITRDCLUSTERIZERV1_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDclusterizerV1();
AliTRDclusterizerV1(const Text_t* name, const Text_t* title);
- AliTRDclusterizerV1(AliTRDclusterizerV1 &c);
+ AliTRDclusterizerV1(const AliTRDclusterizerV1 &c);
virtual ~AliTRDclusterizerV1();
+ AliTRDclusterizerV1 &operator=(const AliTRDclusterizerV1 &c);
virtual void Copy(AliTRDclusterizerV1 &c);
virtual void Init();
virtual Float_t GetClusSigThresh() { return fClusSigThresh; };
virtual Int_t GetClusMethod() { return fClusMethod; };
- inline AliTRDclusterizerV1 &operator=(AliTRDclusterizerV1 &c);
-
protected:
AliTRDdigitsManager *fDigitsManager; //! TRD digits manager
};
-//_____________________________________________________________________________
-AliTRDclusterizerV1 &AliTRDclusterizerV1::operator=(AliTRDclusterizerV1 &c)
-{
- //
- // Assignment operator
- //
-
- if (this != &c) c.Copy(*this);
- return *this;
-
-}
-
#endif
/*
$Log$
+Revision 1.5 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.4 2000/06/07 16:27:01 cblume
Try to remove compiler warnings on Sun and HP
}
//_____________________________________________________________________________
-AliTRDdataArray::AliTRDdataArray(AliTRDdataArray &d)
+AliTRDdataArray::AliTRDdataArray(const AliTRDdataArray &d)
{
//
// AliTRDdataArray copy constructor
//
- d.Copy(*this);
+ ((AliTRDdataArray &) d).Copy(*this);
}
}
//_____________________________________________________________________________
-void AliTRDdataArray::Copy(AliTRDdataArray &d)
+AliTRDdataArray &AliTRDdataArray::operator=(const AliTRDdataArray &d)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &d) ((AliTRDdataArray &) d).Copy(*this);
+ return *this;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdataArray::Copy(TObject &d)
{
//
// Copy function
//
- d.fNrow = fNrow;
- d.fNcol = fNcol;
- d.fNtime = fNtime;
+ ((AliTRDdataArray &) d).fNrow = fNrow;
+ ((AliTRDdataArray &) d).fNcol = fNcol;
+ ((AliTRDdataArray &) d).fNtime = fNtime;
- d.fNdim1 = fNdim1;
- d.fNdim2 = fNdim2;
+ ((AliTRDdataArray &) d).fNdim1 = fNdim1;
+ ((AliTRDdataArray &) d).fNdim2 = fNdim2;
- d.fBufType = fBufType;
- d.fNelems = fNelems;
+ ((AliTRDdataArray &) d).fBufType = fBufType;
+ ((AliTRDdataArray &) d).fNelems = fNelems;
- d.fCurrentIdx1 = 0;
- d.fCurrentIdx2 = 0;
- d.fCurrentIndex = 0;
+ ((AliTRDdataArray &) d).fCurrentIdx1 = 0;
+ ((AliTRDdataArray &) d).fCurrentIdx2 = 0;
+ ((AliTRDdataArray &) d).fCurrentIndex = 0;
- fIndex->Copy(*d.fIndex);
+ fIndex->Copy(*((AliTRDdataArray &) d).fIndex);
}
}
+//_____________________________________________________________________________
+Bool_t AliTRDdataArray::CheckBounds(const char *where, Int_t idx1, Int_t idx2)
+{
+ //
+ // Does the boundary checking
+ //
+
+ if ((idx2 >= fNdim2) || (idx2 < 0))
+ return OutOfBoundsError(where,idx1,idx2);
+
+ Int_t index = (*fIndex).At(idx2) + idx1;
+ if ((index < 0) || (index > fNelems))
+ return OutOfBoundsError(where,idx1,idx2);
+
+ return kTRUE;
+
+}
+
+//_____________________________________________________________________________
+Bool_t AliTRDdataArray::OutOfBoundsError(const char *where, Int_t idx1, Int_t idx2)
+{
+ //
+ // Generate an out-of-bounds error. Always returns false.
+ //
+
+ TObject::Error(where, "idx1 %d idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
+ ,idx1,idx2,fNdim1,fNdim2,this);
+
+ return kFALSE;
+
+}
+
//_____________________________________________________________________________
void AliTRDdataArray::Reset()
{
AliTRDdataArray();
AliTRDdataArray(Int_t nrow, Int_t ncol,Int_t ntime);
- AliTRDdataArray(AliTRDdataArray &d);
+ AliTRDdataArray(const AliTRDdataArray &d);
virtual ~AliTRDdataArray();
+ AliTRDdataArray &operator=(const AliTRDdataArray &d);
- virtual void Copy(AliTRDdataArray &d);
+ virtual void Copy(TObject &d);
virtual void Allocate(Int_t nrow, Int_t ncol,Int_t ntime);
virtual void Reset();
virtual Int_t GetNtime() { return fNtime; };
Int_t GetIndex(Int_t row, Int_t col, Int_t time);
- inline AliTRDdataArray &operator=(AliTRDdataArray &d);
protected:
};
-//_____________________________________________________________________________
-Bool_t AliTRDdataArray::CheckBounds(const char *where, Int_t idx1, Int_t idx2)
-{
- //
- // Does the boundary checking
- //
-
- if ((idx2 >= fNdim2) || (idx2 < 0))
- return OutOfBoundsError(where,idx1,idx2);
-
- Int_t index = (*fIndex).At(idx2) + idx1;
- if ((index < 0) || (index > fNelems))
- return OutOfBoundsError(where,idx1,idx2);
-
- return kTRUE;
-
-}
-
-//_____________________________________________________________________________
-Bool_t AliTRDdataArray::OutOfBoundsError(const char *where, Int_t idx1, Int_t idx2)
-{
- //
- // Generate an out-of-bounds error. Always returns false.
- //
-
- TObject::Error(where, "idx1 %d idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
- ,idx1,idx2,fNdim1,fNdim2,this);
-
- return kFALSE;
-
-}
-
-//_____________________________________________________________________________
-AliTRDdataArray &AliTRDdataArray::operator=(AliTRDdataArray &d)
-{
- //
- // Assignment operator
- //
-
- if (this != &d) d.Copy(*this);
- return *this;
-
-}
-
#endif
/*
$Log$
+Revision 1.3 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
}
//_____________________________________________________________________________
-AliTRDdataArrayF::AliTRDdataArrayF(AliTRDdataArrayF &a)
+AliTRDdataArrayF::AliTRDdataArrayF(const AliTRDdataArrayF &a)
{
//
// AliTRDdataArrayF copy constructor
//
- a.Copy(*this);
+ ((AliTRDdataArrayF &) a).Copy(*this);
}
}
+//____________________________________________________________________________
+Float_t AliTRDdataArrayF::GetDataFast(Int_t idx1, Int_t idx2)
+{
+ //
+ // Returns the value at a given position in the array
+ //
+
+ return fElements->At(fIndex->At(idx2) + idx1);
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdataArrayF::SetData(Int_t row, Int_t col, Int_t time, Float_t value)
+{
+ //
+ // Sets the data value at a given position of the array
+ // Includes boundary checking
+ //
+
+ if ((row >= 0) && (col >= 0) && (time >= 0)) {
+ Int_t idx1 = GetIdx1(row,col);
+ if ((idx1 >= 0) && (time < fNdim2)) {
+ SetDataFast(idx1,time,value);
+ }
+ else {
+ if (idx1 >= 0) {
+ TObject::Error("SetData"
+ ,"time %d out of bounds (size: %d, this: 0x%08x)"
+ ,time,fNdim2,this);
+ }
+ }
+ }
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdataArrayF::SetDataFast(Int_t idx1, Int_t idx2, Float_t value)
+{
+ //
+ // Set the value at a given position in the array
+ //
+
+ if ((idx1 < 0) || (idx1 >= fNdim1) ||
+ (idx2 < 0) || (idx2 >= fNdim2)) {
+ TObject::Error("SetDataFast"
+ ,"idx1 %d idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
+ ,idx1,idx2,fNdim1,fNdim2,this);
+ }
+
+ (*fElements)[fIndex->fArray[idx2] + idx1] = value;
+
+}
+
+//_____________________________________________________________________________
+AliTRDdataArrayF &AliTRDdataArrayF::operator=(const AliTRDdataArrayF &a)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &a) ((AliTRDdataArrayF &) a).Copy(*this);
+ return *this;
+
+}
AliTRDdataArrayF();
AliTRDdataArrayF(Int_t nrow, Int_t ncol,Int_t ntime);
- AliTRDdataArrayF(AliTRDdataArrayF &a);
+ AliTRDdataArrayF(const AliTRDdataArrayF &a);
virtual ~AliTRDdataArrayF();
+ AliTRDdataArrayF &operator=(const AliTRDdataArrayF &a);
virtual void Allocate(Int_t nrow, Int_t ncol,Int_t ntime);
virtual void Copy(AliTRDdataArrayF &a);
virtual Int_t GetDataSize();
virtual Int_t GetOverThreshold(Float_t threshold);
- inline AliTRDdataArrayF &operator=(AliTRDdataArrayF &a);
-
protected:
inline void SetDataFast(Int_t idx1, Int_t idx2, Float_t value);
};
-//____________________________________________________________________________
-Float_t AliTRDdataArrayF::GetDataFast(Int_t idx1, Int_t idx2)
-{
- //
- // Returns the value at a given position in the array
- //
-
- return fElements->At(fIndex->At(idx2) + idx1);
-
-}
-
-//_____________________________________________________________________________
-void AliTRDdataArrayF::SetData(Int_t row, Int_t col, Int_t time, Float_t value)
-{
- //
- // Sets the data value at a given position of the array
- // Includes boundary checking
- //
-
- if ((row >= 0) && (col >= 0) && (time >= 0)) {
- Int_t idx1 = GetIdx1(row,col);
- if ((idx1 >= 0) && (time < fNdim2)) {
- SetDataFast(idx1,time,value);
- }
- else {
- if (idx1 >= 0) {
- TObject::Error("SetData"
- ,"time %d out of bounds (size: %d, this: 0x%08x)"
- ,time,fNdim2,this);
- }
- }
- }
-
-}
-
-//_____________________________________________________________________________
-void AliTRDdataArrayF::SetDataFast(Int_t idx1, Int_t idx2, Float_t value)
-{
- //
- // Set the value at a given position in the array
- //
-
- if ((idx1 < 0) || (idx1 >= fNdim1) ||
- (idx2 < 0) || (idx2 >= fNdim2)) {
- TObject::Error("SetDataFast"
- ,"idx1 %d idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
- ,idx1,idx2,fNdim1,fNdim2,this);
- }
-
- (*fElements)[fIndex->fArray[idx2] + idx1] = value;
-
-}
-
-//_____________________________________________________________________________
-AliTRDdataArrayF &AliTRDdataArrayF::operator=(AliTRDdataArrayF &a)
-{
- //
- // Assignment operator
- //
-
- if (this != &a) a.Copy(*this);
- return *this;
-
-}
-
#endif
/*
$Log$
+Revision 1.3 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
}
//_____________________________________________________________________________
-AliTRDdataArrayI::AliTRDdataArrayI(AliTRDdataArrayI &a)
+AliTRDdataArrayI::AliTRDdataArrayI(const AliTRDdataArrayI &a)
{
//
// AliTRDdataArrayI copy constructor
//
- a.Copy(*this);
+ ((AliTRDdataArrayI &) a).Copy(*this);
}
}
+//_____________________________________________________________________________
+Int_t AliTRDdataArrayI::GetDataFast(Int_t idx1, Int_t idx2)
+{
+ //
+ // Returns the value at a given position in the array
+ //
+
+ return fElements->At(fIndex->At(idx2) + idx1);
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdataArrayI::SetData(Int_t row, Int_t col, Int_t time, Int_t value)
+{
+ //
+ // Sets the data value at a given position of the array
+ // Includes boundary checking
+ //
+
+ if ((row >= 0) && (col >= 0) && (time >= 0)) {
+ Int_t idx1 = GetIdx1(row,col);
+ if ((idx1 >= 0) && (time < fNdim2)) {
+ SetDataFast(idx1,time,value);
+ }
+ else {
+ if (idx1 >= 0) {
+ TObject::Error("SetData"
+ ,"time %d out of bounds (size: %d, this: 0x%08x)"
+ ,time,fNdim2,this);
+ }
+ }
+ }
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdataArrayI::SetDataFast(Int_t idx1, Int_t idx2, Int_t value)
+{
+ //
+ // Set the value at a given position in the array
+ //
+
+ if ((idx1 < 0) || (idx1 >= fNdim1) ||
+ (idx2 < 0) || (idx2 >= fNdim2)) {
+ TObject::Error("SetDataFast"
+ ,"idx1 %d idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
+ ,idx1,idx2,fNdim1,fNdim2,this);
+ }
+
+ (*fElements)[fIndex->fArray[idx2] + idx1] = value;
+
+}
+
+//_____________________________________________________________________________
+AliTRDdataArrayI &AliTRDdataArrayI::operator=(const AliTRDdataArrayI &a)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &a) ((AliTRDdataArrayI &) a).Copy(*this);
+ return *this;
+
+}
AliTRDdataArrayI();
AliTRDdataArrayI(Int_t nrow, Int_t ncol, Int_t ntime);
- AliTRDdataArrayI(AliTRDdataArrayI &a);
+ AliTRDdataArrayI(const AliTRDdataArrayI &a);
virtual ~AliTRDdataArrayI();
+ AliTRDdataArrayI &operator=(const AliTRDdataArrayI &a);
virtual void Allocate(Int_t nrow, Int_t ncol, Int_t ntime);
virtual void Copy(AliTRDdataArrayI &a);
virtual Int_t GetDataSize();
virtual Int_t GetOverThreshold(Int_t threshold);
- inline AliTRDdataArrayI &operator=(AliTRDdataArrayI &a);
-
protected:
inline void SetDataFast(Int_t idx1, Int_t idx2, Int_t value);
};
-
-//_____________________________________________________________________________
-Int_t AliTRDdataArrayI::GetDataFast(Int_t idx1, Int_t idx2)
-{
- //
- // Returns the value at a given position in the array
- //
-
- return fElements->At(fIndex->At(idx2) + idx1);
-
-}
-
-//_____________________________________________________________________________
-void AliTRDdataArrayI::SetData(Int_t row, Int_t col, Int_t time, Int_t value)
-{
- //
- // Sets the data value at a given position of the array
- // Includes boundary checking
- //
-
- if ((row >= 0) && (col >= 0) && (time >= 0)) {
- Int_t idx1 = GetIdx1(row,col);
- if ((idx1 >= 0) && (time < fNdim2)) {
- SetDataFast(idx1,time,value);
- }
- else {
- if (idx1 >= 0) {
- TObject::Error("SetData"
- ,"time %d out of bounds (size: %d, this: 0x%08x)"
- ,time,fNdim2,this);
- }
- }
- }
-
-}
-
-//_____________________________________________________________________________
-void AliTRDdataArrayI::SetDataFast(Int_t idx1, Int_t idx2, Int_t value)
-{
- //
- // Set the value at a given position in the array
- //
-
- if ((idx1 < 0) || (idx1 >= fNdim1) ||
- (idx2 < 0) || (idx2 >= fNdim2)) {
- TObject::Error("SetDataFast"
- ,"idx1 %d idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
- ,idx1,idx2,fNdim1,fNdim2,this);
- }
-
- (*fElements)[fIndex->fArray[idx2] + idx1] = value;
-
-}
-
-//_____________________________________________________________________________
-AliTRDdataArrayI &AliTRDdataArrayI::operator=(AliTRDdataArrayI &a)
-{
- //
- // Assignment operator
- //
-
- if (this != &a) a.Copy(*this);
- return *this;
-
-}
-
#endif
/*
$Log$
+Revision 1.7 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.6 2000/06/07 16:27:32 cblume
Try to remove compiler warnings on Sun and HP
}
//_____________________________________________________________________________
-AliTRDdigitizer::AliTRDdigitizer(AliTRDdigitizer &d)
+AliTRDdigitizer::AliTRDdigitizer(const AliTRDdigitizer &d)
{
//
// AliTRDdigitizer copy constructor
//
- d.Copy(*this);
+ ((AliTRDdigitizer &) d).Copy(*this);
}
}
//_____________________________________________________________________________
-void AliTRDdigitizer::Copy(AliTRDdigitizer &d)
+AliTRDdigitizer &AliTRDdigitizer::operator=(const AliTRDdigitizer &d)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &d) ((AliTRDdigitizer &) d).Copy(*this);
+ return *this;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdigitizer::Copy(TObject &d)
{
//
// Copy function
//
- d.fInputFile = NULL;
- d.fDigits = NULL;
- d.fTRD = NULL;
- d.fGeo = NULL;
-
- d.fEvent = 0;
-
- d.fGasGain = fGasGain;
- d.fNoise = fNoise;
- d.fChipGain = fChipGain;
- d.fADCoutRange = fADCoutRange;
- d.fADCinRange = fADCinRange;
- d.fADCthreshold = fADCthreshold;
- d.fDiffusionOn = fDiffusionOn;
- d.fDiffusionT = fDiffusionT;
- d.fDiffusionL = fDiffusionL;
- d.fElAttachOn = fElAttachOn;
- d.fElAttachProp = fElAttachProp;
- d.fExBOn = fExBOn;
- d.fLorentzAngle = fLorentzAngle;
- d.fLorentzFactor = fLorentzFactor;
-
- fPRF->Copy(*d.fPRF);
+ ((AliTRDdigitizer &) d).fInputFile = NULL;
+ ((AliTRDdigitizer &) d).fDigits = NULL;
+ ((AliTRDdigitizer &) d).fTRD = NULL;
+ ((AliTRDdigitizer &) d).fGeo = NULL;
+
+ ((AliTRDdigitizer &) d).fEvent = 0;
+
+ ((AliTRDdigitizer &) d).fGasGain = fGasGain;
+ ((AliTRDdigitizer &) d).fNoise = fNoise;
+ ((AliTRDdigitizer &) d).fChipGain = fChipGain;
+ ((AliTRDdigitizer &) d).fADCoutRange = fADCoutRange;
+ ((AliTRDdigitizer &) d).fADCinRange = fADCinRange;
+ ((AliTRDdigitizer &) d).fADCthreshold = fADCthreshold;
+ ((AliTRDdigitizer &) d).fDiffusionOn = fDiffusionOn;
+ ((AliTRDdigitizer &) d).fDiffusionT = fDiffusionT;
+ ((AliTRDdigitizer &) d).fDiffusionL = fDiffusionL;
+ ((AliTRDdigitizer &) d).fElAttachOn = fElAttachOn;
+ ((AliTRDdigitizer &) d).fElAttachProp = fElAttachProp;
+ ((AliTRDdigitizer &) d).fExBOn = fExBOn;
+ ((AliTRDdigitizer &) d).fLorentzAngle = fLorentzAngle;
+ ((AliTRDdigitizer &) d).fLorentzFactor = fLorentzFactor;
+
+ fPRF->Copy(*((AliTRDdigitizer &) d).fPRF);
}
return kFALSE;
}
+ // Get the pointer to the detector class and check for version 1
+ fTRD = (AliTRD*) gAlice->GetDetector("TRD");
+ if (fTRD->IsVersion() != 1) {
+ printf("AliTRDdigitizer::Open -- ");
+ printf("TRD must be version 1 (slow simulator).\n");
+ exit(1);
+ }
+
+ // Get the geometry
+ fGeo = fTRD->GetGeometry();
+ printf("AliTRDdigitizer::Open -- ");
+ printf("Geometry version %d\n",fGeo->IsVersion());
+
return kTRUE;
}
Int_t sens1 = fTRD->GetSensSector();
Int_t sens2 = sens1 + fTRD->GetSensSectorRange();
sens2 -= ((Int_t) (sens2 / kNsect)) * kNsect;
- if (sens1 < sens2)
+ if (sens1 < sens2) {
if ((iSect < sens1) || (iSect >= sens2)) continue;
- else
+ }
+ else {
if ((iSect < sens1) && (iSect >= sens2)) continue;
+ }
}
Int_t nDigits = 0;
-#ifndef ALITRDDIGITIZER_h
-#define ALITRDDIGITIZER_h
+#ifndef ALITRDDIGITIZER_H
+#define ALITRDDIGITIZER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDdigitizer();
AliTRDdigitizer(const Text_t* name, const Text_t* title);
- AliTRDdigitizer(AliTRDdigitizer &d);
+ AliTRDdigitizer(const AliTRDdigitizer &d);
virtual ~AliTRDdigitizer();
+ AliTRDdigitizer &operator=(const AliTRDdigitizer &d);
- virtual void Copy(AliTRDdigitizer &d);
+ virtual void Copy(TObject &d);
virtual void Init();
virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
virtual Bool_t MakeDigits();
virtual Float_t GetLorentzAngle() { return fLorentzAngle; };
virtual TF1 *GetPadResponse() { return fPRF; };
- inline AliTRDdigitizer &operator=(AliTRDdigitizer &d);
-
protected:
TFile *fInputFile; //! ALIROOT-filename
};
-//_____________________________________________________________________________
-AliTRDdigitizer &AliTRDdigitizer::operator=(AliTRDdigitizer &d)
-{
- //
- // Assignment operator
- //
-
- if (this != &d) d.Copy(*this);
- return *this;
-
-}
-
#endif
/*
$Log$
+Revision 1.4 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.3 2000/06/07 16:27:01 cblume
Try to remove compiler warnings on Sun and HP
}
//_____________________________________________________________________________
-AliTRDdigitsManager::AliTRDdigitsManager(AliTRDdigitsManager &m)
+AliTRDdigitsManager::AliTRDdigitsManager(const AliTRDdigitsManager &m)
{
//
// AliTRDdigitsManager copy constructor
//
- m.Copy(*this);
+ ((AliTRDdigitsManager &) m).Copy(*this);
}
}
//_____________________________________________________________________________
-void AliTRDdigitsManager::Copy(AliTRDdigitsManager &m)
+void AliTRDdigitsManager::Copy(TObject &m)
{
//
// Copy function
//
- m.fIsRaw = fIsRaw;
+ ((AliTRDdigitsManager &) m).fIsRaw = fIsRaw;
TObject::Copy(m);
}
+//_____________________________________________________________________________
+AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det)
+{
+ //
+ // Returns the digits array for one detector
+ //
+
+ return (AliTRDdataArrayI *) fDigits->At(det);
+
+}
+
+//_____________________________________________________________________________
+AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i)
+{
+ //
+ // Returns the dictionary for one detector
+ //
+
+ return (AliTRDdataArrayI *) fDictionary[i]->At(det);
+
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit *Digit)
+{
+ //
+ // Returns the MC-track numbers from the dictionary for a given digit
+ //
+
+ Int_t row = Digit->GetRow();
+ Int_t col = Digit->GetCol();
+ Int_t time = Digit->GetTime();
+ Int_t det = Digit->GetDetector();
+
+ return GetTrack(track,row,col,time,det);
+
+}
+
+//_____________________________________________________________________________
+AliTRDdigitsManager &AliTRDdigitsManager::operator=(const AliTRDdigitsManager &m)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &m) ((AliTRDdigitsManager &) m).Copy(*this);
+ return *this;
+
+}
public:
AliTRDdigitsManager();
- AliTRDdigitsManager(AliTRDdigitsManager &m);
+ AliTRDdigitsManager(const AliTRDdigitsManager &m);
virtual ~AliTRDdigitsManager();
+ AliTRDdigitsManager &operator=(const AliTRDdigitsManager &m);
- virtual void Copy(AliTRDdigitsManager &m);
+ virtual void Copy(TObject &m);
virtual Bool_t MakeBranch();
virtual Bool_t ReadDigits();
virtual Bool_t WriteDigits();
inline AliTRDdataArrayI *GetDictionary(Int_t det, Int_t i);
inline Int_t GetTrack(Int_t track, AliTRDdigit *Digit);
- inline AliTRDdigitsManager &operator=(AliTRDdigitsManager &m);
-
protected:
AliTRDsegmentArray *fDigits; //! Digits data Array
};
-//_____________________________________________________________________________
-AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det)
-{
- //
- // Returns the digits array for one detector
- //
-
- return (AliTRDdataArrayI *) fDigits->At(det);
-
-}
-
-//_____________________________________________________________________________
-AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i)
-{
- //
- // Returns the dictionary for one detector
- //
-
- return (AliTRDdataArrayI *) fDictionary[i]->At(det);
-
-}
-
-//_____________________________________________________________________________
-Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit *Digit)
-{
- //
- // Returns the MC-track numbers from the dictionary for a given digit
- //
-
- Int_t row = Digit->GetRow();
- Int_t col = Digit->GetCol();
- Int_t time = Digit->GetTime();
- Int_t det = Digit->GetDetector();
-
- return GetTrack(track,row,col,time,det);
-
-}
-
-//_____________________________________________________________________________
-AliTRDdigitsManager &AliTRDdigitsManager::operator=(AliTRDdigitsManager &m)
-{
- //
- // Assignment operator
- //
-
- if (this != &m) m.Copy(*this);
- return *this;
-
-}
-
#endif
-#ifndef ALITRDGEOMETRY_h
-#define ALITRDGEOMETRY_h
+#ifndef ALITRDGEOMETRY_H
+#define ALITRDGEOMETRY_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-#ifndef ALITRDGEOMETRYFULL_h
-#define ALITRDGEOMETRYFULL_h
+#ifndef ALITRDGEOMETRYFULL_H
+#define ALITRDGEOMETRYFULL_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-#ifndef ALITRDGEOMETRYHOLE_h
-#define ALITRDGEOMETRYHOLE_h
+#ifndef ALITRDGEOMETRYHOLE_H
+#define ALITRDGEOMETRYHOLE_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/*
$Log$
+Revision 1.7 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.6 2000/05/08 15:48:30 cblume
Resolved merge conflict
}
//_____________________________________________________________________________
-AliTRDmatrix::AliTRDmatrix(AliTRDmatrix &m)
+AliTRDmatrix::AliTRDmatrix(const AliTRDmatrix &m)
{
//
// AliTRDmatrix copy constructor
//
- m.Copy(*this);
+ ((AliTRDmatrix &) m).Copy(*this);
}
}
+//_____________________________________________________________________________
+AliTRDmatrix &AliTRDmatrix::operator=(const AliTRDmatrix &m)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &m) ((AliTRDmatrix &) m).Copy(*this);
+ return *this;
+
+}
+
//_____________________________________________________________________________
void AliTRDmatrix::AddSignal(Int_t iRow, Int_t iCol, Int_t iTime, Float_t signal)
{
}
//_____________________________________________________________________________
-void AliTRDmatrix::Copy(AliTRDmatrix &m)
+void AliTRDmatrix::Copy(TObject &m)
{
//
// Copy function
//
- m.fRow = fRow;
- m.fCol = fCol;
- m.fTime = fTime;
- m.fPixel = fPixel;
- m.fSector = fSector;
- m.fChamber = fChamber;
- m.fPlane = fPlane;
+ ((AliTRDmatrix &) m).fRow = fRow;
+ ((AliTRDmatrix &) m).fCol = fCol;
+ ((AliTRDmatrix &) m).fTime = fTime;
+ ((AliTRDmatrix &) m).fPixel = fPixel;
+ ((AliTRDmatrix &) m).fSector = fSector;
+ ((AliTRDmatrix &) m).fChamber = fChamber;
+ ((AliTRDmatrix &) m).fPlane = fPlane;
- m.fPixelArray = new TObjArray(*fPixelArray);
+ ((AliTRDmatrix &) m).fPixelArray = new TObjArray(*fPixelArray);
}
-#ifndef ALITRDMATRIX_h
-#define ALITRDMATRIX_h
+#ifndef ALITRDMATRIX_H
+#define ALITRDMATRIX_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDmatrix();
AliTRDmatrix(Int_t nRow, Int_t nCol, Int_t nTime, Int_t iSec, Int_t iCha, Int_t iPla);
- AliTRDmatrix(AliTRDmatrix &m);
+ AliTRDmatrix(const AliTRDmatrix &m);
virtual ~AliTRDmatrix();
+ AliTRDmatrix &operator=(const AliTRDmatrix &m);
virtual void AddSignal(Int_t iRow, Int_t iCol, Int_t iTime, Float_t signal);
virtual Bool_t AddTrack(Int_t iRow, Int_t iCol, Int_t iTime, Int_t track);
- virtual void Copy(AliTRDmatrix &m);
+ virtual void Copy(TObject &m);
virtual void Draw(Option_t *opt = " ");
virtual void DrawRow(Int_t iRow);
virtual void DrawCol(Int_t iCol);
virtual Int_t GetChamber() { return fChamber; };
virtual Int_t GetPlane() { return fPlane; };
- inline AliTRDmatrix &operator=(AliTRDmatrix &m);
-
protected:
virtual Int_t GetIndex(Int_t iRow, Int_t iCol, Int_t iTime);
};
-//_____________________________________________________________________________
-AliTRDmatrix &AliTRDmatrix::operator=(AliTRDmatrix &m)
-{
- //
- // Assignment operator
- //
-
- if (this != &m) m.Copy(*this);
- return *this;
-
-}
-
#endif
/*
$Log$
+Revision 1.4 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.3 2000/02/28 19:10:26 cblume
Include the new TRD classes
}
//_____________________________________________________________________________
-void AliTRDpixel::Copy(AliTRDpixel &p)
+void AliTRDpixel::Copy(TObject &p)
{
//
// Copy function
//
- p.fSignal = fSignal;
+ ((AliTRDpixel &) p).fSignal = fSignal;
for (Int_t iTrackPixel = 0; iTrackPixel < kTrackPixel; iTrackPixel++) {
- p.fTrack[iTrackPixel] = fTrack[iTrackPixel];
+ ((AliTRDpixel &) p).fTrack[iTrackPixel] = fTrack[iTrackPixel];
}
}
-#ifndef ALITRDPIXEL_h
-#define ALITRDPIXEL_h
+#ifndef ALITRDPIXEL_H
+#define ALITRDPIXEL_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDpixel();
virtual ~AliTRDpixel();
- virtual void Copy(AliTRDpixel &p);
+ virtual void Copy(TObject &p);
virtual void SetSignal(Float_t signal) { fSignal = signal; };
virtual void SetTrack(Int_t i, Int_t track) { fTrack[i] = track; };
/*
$Log$
+Revision 1.2 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.1 2000/02/28 19:02:07 cblume
Add new TRD classes
// Increase the size of the list if necessary
if (fMulDigit >= fMaxDigit) {
- int *tempo = new (int[fMaxDigit*=2]);
+ fMaxDigit *= 2;
+ int *tempo = new (int[fMaxDigit]);
Int_t index;
for (index = 0; index < fMulDigit; index++)
tempo[index] = fDigitsList[index];
AliTRDrecPoint();
virtual ~AliTRDrecPoint();
- virtual void Print(Option_t* ) {};
+ virtual void Print(Option_t* opt) {};
virtual void AddDigit(Int_t digit);
virtual void AddDigit(AliDigitNew &digit) {};
/*
$Log$
+Revision 1.4 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.3 2000/06/07 16:27:01 cblume
Try to remove compiler warnings on Sun and HP
}
//_____________________________________________________________________________
-AliTRDsegmentArrayBase::AliTRDsegmentArrayBase(AliTRDsegmentArrayBase &a)
+AliTRDsegmentArrayBase::AliTRDsegmentArrayBase(const AliTRDsegmentArrayBase &a)
{
//
// AliTRDsegmentArrayBase copy constructor
//
- a.Copy(*this);
+ ((AliTRDsegmentArrayBase &) a).Copy(*this);
}
}
//_____________________________________________________________________________
-void AliTRDsegmentArrayBase::Copy(AliTRDsegmentArrayBase &a)
+AliTRDsegmentArrayBase &AliTRDsegmentArrayBase
+ ::operator=(const AliTRDsegmentArrayBase &a)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &a) ((AliTRDsegmentArrayBase &) a).Copy(*this);
+ return *this;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDsegmentArrayBase::Copy(TObject &a)
{
//
// Copy function
TNamed::Copy(a);
- fSegment->Copy(*a.fSegment);
- fTreeIndex->Copy(*a.fTreeIndex);
- fClass->Copy(*a.fClass);
+ fSegment->Copy(*((AliTRDsegmentArrayBase &) a).fSegment);
+ fTreeIndex->Copy(*((AliTRDsegmentArrayBase &) a).fTreeIndex);
+ fClass->Copy(*((AliTRDsegmentArrayBase &) a).fClass);
- a.fNSegment = fNSegment;
+ ((AliTRDsegmentArrayBase &) a).fNSegment = fNSegment;
}
AliTRDsegmentArrayBase();
AliTRDsegmentArrayBase(Text_t *classname, Int_t n);
- AliTRDsegmentArrayBase(AliTRDsegmentArrayBase &a);
+ AliTRDsegmentArrayBase(const AliTRDsegmentArrayBase &a);
virtual ~AliTRDsegmentArrayBase();
+ AliTRDsegmentArrayBase &operator=(const AliTRDsegmentArrayBase &a);
const AliTRDsegmentID *At(Int_t i);
const AliTRDsegmentID *operator[](Int_t i);
Bool_t AddSegment(AliTRDsegmentID *segment);
AliTRDsegmentID *AddSegment(Int_t index);
void ClearSegment(Int_t index);
- virtual void Copy(AliTRDsegmentArrayBase &a);
+ virtual void Copy(TObject &a);
virtual Bool_t ConnectTree(const char *treeName);
Bool_t MakeArray(Int_t n);
virtual AliTRDsegmentID *NewSegment();
TClass *GetClass() { return fClass; };
TTree *GetTree() { return fTree; };
- inline AliTRDsegmentArrayBase &operator=(AliTRDsegmentArrayBase &a);
-
protected:
TObjArray *fSegment; //! Pointer to an array of pointers to a segment
};
-//_____________________________________________________________________________
-AliTRDsegmentArrayBase &AliTRDsegmentArrayBase
- ::operator=(AliTRDsegmentArrayBase &a)
-{
- //
- // Assignment operator
- //
-
- if (this != &a) a.Copy(*this);
- return *this;
-
-}
-
#endif
/*
$Log$
+Revision 1.20 2000/06/08 18:32:58 cblume
+Make code compliant to coding conventions
+
Revision 1.19 2000/06/07 16:27:32 cblume
Try to remove compiler warnings on Sun and HP
}
//_____________________________________________________________________________
-AliTRDv1::AliTRDv1(AliTRDv1 &trd)
+AliTRDv1::AliTRDv1(const AliTRDv1 &trd)
{
//
// Copy constructor
//
- trd.Copy(*this);
+ ((AliTRDv1 &) trd).Copy(*this);
}
//_____________________________________________________________________________
AliTRDv1::~AliTRDv1()
{
+ //
+ // AliTRDv1 destructor
+ //
if (fDeltaE) delete fDeltaE;
}
+//_____________________________________________________________________________
+AliTRDv1 &AliTRDv1::operator=(const AliTRDv1 &trd)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &trd) ((AliTRDv1 &) trd).Copy(*this);
+ return *this;
+
+}
//_____________________________________________________________________________
void AliTRDv1::Copy(AliTRDv1 &trd)
AliTRDv1();
AliTRDv1(const char *name, const char *title);
- AliTRDv1(AliTRDv1 &trd);
+ AliTRDv1(const AliTRDv1 &trd);
virtual ~AliTRDv1();
+ AliTRDv1 &operator=(const AliTRDv1 &trd);
virtual void Copy(AliTRDv1 &trd);
virtual void CreateGeometry();
Int_t GetSensSector() { return fSensSector; };
Int_t GetSensSectorRange() { return fSensSectorRange; };
- inline AliTRDv1 &operator=(AliTRDv1 &trd);
-
protected:
Int_t fIdSens; // Sensitive volume identifier
};
-//_____________________________________________________________________________
-AliTRDv1 &AliTRDv1::operator=(AliTRDv1 &trd)
-{
- //
- // Assignment operator
- //
-
- if (this != &trd) trd.Copy(*this);
- return *this;
-
-}
-
#endif