* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.3 2000/10/15 23:40:01 cblume
-Remove AliTRDconst
-
-Revision 1.2 2000/10/06 16:49:46 cblume
-Made Getters const
-
-Revision 1.1.2.1 2000/09/18 13:44:21 cblume
-New class AliTRDpoints to display the TR photon hits
-
-*/
+/* $Id$ */
///////////////////////////////////////////////////////////////////////////////
// //
ClassImp(AliTRDpoints)
//_____________________________________________________________________________
-AliTRDpoints::AliTRDpoints():AliPoints()
+AliTRDpoints::AliTRDpoints()
+ :AliPoints()
+ ,fNTRpoints(0)
+ ,fTRpolyMarker(0)
{
//
// Default constructor
//
- fNTRpoints = 0;
- fTRpolyMarker = 0;
-
}
//_____________________________________________________________________________
-AliTRDpoints::AliTRDpoints(Int_t nhitsE, Int_t nhitsT):AliPoints(nhitsE)
+AliTRDpoints::AliTRDpoints(Int_t nhitsE, Int_t nhitsT)
+ :AliPoints(nhitsE)
+ ,fNTRpoints(nhitsT)
+ ,fTRpolyMarker(0)
{
//
// Standard constructor
//
- fNTRpoints = nhitsT;
- fTRpolyMarker = 0;
-
}
//_____________________________________________________________________________
AliTRDpoints::AliTRDpoints(const AliTRDpoints &p)
+ :AliPoints(p)
+ ,fNTRpoints(p.fNTRpoints)
+ ,fTRpolyMarker(0)
{
//
// Copy contructor
//
-
- ((AliTRDpoints &) p).Copy(*this);
+
+ for (Int_t i = 0; i < 3*fNTRpoints; i++) {
+ ((AliTRDpoints &) p).fTRpoints[i] = fTRpoints[i];
+ }
}
// Default destructor
//
- if (fTRpolyMarker) delete fTRpolyMarker;
+ if (fTRpolyMarker) {
+ delete fTRpolyMarker;
+ fTRpolyMarker = 0;
+ }
}
}
//_____________________________________________________________________________
-void AliTRDpoints::Copy(TObject &p)
+void AliTRDpoints::Copy(TObject &p) const
{
//
// Copy function
AliPoints::Draw(option);
- //if (fTRpolyMarker) delete fTRpolyMarker;
if (fNTRpoints) {
fTRpolyMarker = new TPolyMarker3D(fNTRpoints,fTRpoints,29);
fTRpolyMarker->SetMarkerColor(2);
// Sets the number and the coordinates of the photon hits
//
- if (kNTRpoints >= 3 * n) {
+ if (kNTRpoints >= 3*n) {
fNTRpoints = n;
for (Int_t i = 0; i < 3*n; i++) {
fTRpoints[i] = coor[i];
}
}
else {
- printf("AliTRDpoints::SetTRpoints -- ");
- printf("Boundary error: %d/%d\n",3*n,kNTRpoints);
+ AliError(Form("Boundary error: %d/%d\n",3*n,kNTRpoints));
}
}