From dee1d5f18d249b20534cefbbba1f0a292b1c9a5d Mon Sep 17 00:00:00 2001 From: ivana Date: Mon, 19 Sep 2005 18:10:02 +0000 Subject: [PATCH] From Laurent - Added new classes into slat category (dependent on basic and motif, but not on sector) - AliMpArea: changed the validity test - now one dimension (either x or y) can have the zero value - Minor fixes in AliMpMotif, AliMpMotifMap, AliMpMotifPainter From Ivana: - The AliMpReader splitted into AliMpMotifReader (used by both sector and slat) and AliMpSectorReader - Updated comments for doxygen, now documented - class categories - class description (in .h) - member function description (in .cxx) --- MUON/mapping/AliMpArea.cxx | 72 ++- MUON/mapping/AliMpArea.h | 17 +- MUON/mapping/AliMpBasicTypes.h | 18 +- MUON/mapping/AliMpConnection.cxx | 34 +- MUON/mapping/AliMpConnection.h | 17 +- MUON/mapping/AliMpConstants.cxx | 32 +- MUON/mapping/AliMpConstants.h | 17 +- MUON/mapping/AliMpContainers.h | 19 +- MUON/mapping/AliMpDirection.h | 21 +- MUON/mapping/AliMpFiles.cxx | 146 +++-- MUON/mapping/AliMpFiles.h | 32 +- MUON/mapping/AliMpGraphContext.cxx | 44 +- MUON/mapping/AliMpGraphContext.h | 19 +- MUON/mapping/AliMpGraphicsTypes.h | 17 +- MUON/mapping/AliMpHelper.cxx | 165 +++++ MUON/mapping/AliMpHelper.h | 39 ++ MUON/mapping/AliMpIntPair.cxx | 67 ++- MUON/mapping/AliMpIntPair.h | 22 +- MUON/mapping/AliMpMotif.cxx | 46 +- MUON/mapping/AliMpMotif.h | 18 +- MUON/mapping/AliMpMotifMap.cxx | 120 ++-- MUON/mapping/AliMpMotifMap.h | 24 +- MUON/mapping/AliMpMotifPainter.cxx | 54 +- MUON/mapping/AliMpMotifPainter.h | 15 +- MUON/mapping/AliMpMotifPosition.cxx | 91 ++- MUON/mapping/AliMpMotifPosition.h | 26 +- .../mapping/AliMpMotifPositionPadIterator.cxx | 52 +- MUON/mapping/AliMpMotifPositionPadIterator.h | 17 +- MUON/mapping/AliMpMotifSpecial.cxx | 81 ++- MUON/mapping/AliMpMotifSpecial.h | 18 +- MUON/mapping/AliMpMotifType.cxx | 102 ++-- MUON/mapping/AliMpMotifType.h | 17 +- MUON/mapping/AliMpMotifTypePadIterator.cxx | 56 +- MUON/mapping/AliMpMotifTypePadIterator.h | 17 +- MUON/mapping/AliMpMotifTypes.h | 23 +- MUON/mapping/AliMpNeighboursPadIterator.cxx | 87 ++- MUON/mapping/AliMpNeighboursPadIterator.h | 17 +- MUON/mapping/AliMpPCB.cxx | 569 ++++++++++++++++++ MUON/mapping/AliMpPCB.h | 151 +++++ MUON/mapping/AliMpPCBPainter.cxx | 145 +++++ MUON/mapping/AliMpPCBPainter.h | 39 ++ MUON/mapping/AliMpPad.cxx | 55 +- MUON/mapping/AliMpPad.h | 17 +- MUON/mapping/AliMpPadIteratorPtr.cxx | 38 +- MUON/mapping/AliMpPadIteratorPtr.h | 26 +- MUON/mapping/AliMpPadPair.cxx | 48 +- MUON/mapping/AliMpPadPair.h | 19 +- MUON/mapping/AliMpPadRow.cxx | 61 +- MUON/mapping/AliMpPadRow.h | 17 +- MUON/mapping/AliMpPadRowLSegment.cxx | 57 +- MUON/mapping/AliMpPadRowLSegment.h | 24 +- MUON/mapping/AliMpPadRowRSegment.cxx | 57 +- MUON/mapping/AliMpPadRowRSegment.h | 24 +- MUON/mapping/AliMpPlaneType.h | 21 +- MUON/mapping/AliMpRow.cxx | 111 ++-- MUON/mapping/AliMpRow.h | 17 +- MUON/mapping/AliMpRowPainter.cxx | 60 +- MUON/mapping/AliMpRowPainter.h | 17 +- MUON/mapping/AliMpRowSegment.cxx | 122 ++-- MUON/mapping/AliMpRowSegment.h | 18 +- MUON/mapping/AliMpRowSegmentLSpecial.cxx | 66 +- MUON/mapping/AliMpRowSegmentLSpecial.h | 18 +- MUON/mapping/AliMpRowSegmentPainter.cxx | 62 +- MUON/mapping/AliMpRowSegmentPainter.h | 17 +- MUON/mapping/AliMpRowSegmentRSpecial.cxx | 63 +- MUON/mapping/AliMpRowSegmentRSpecial.h | 18 +- MUON/mapping/AliMpSector.cxx | 127 ++-- MUON/mapping/AliMpSector.h | 21 +- MUON/mapping/AliMpSectorAreaHPadIterator.cxx | 53 +- MUON/mapping/AliMpSectorAreaHPadIterator.h | 19 +- MUON/mapping/AliMpSectorAreaVPadIterator.cxx | 53 +- MUON/mapping/AliMpSectorAreaVPadIterator.h | 19 +- MUON/mapping/AliMpSectorPadIterator.cxx | 59 +- MUON/mapping/AliMpSectorPadIterator.h | 17 +- MUON/mapping/AliMpSectorPainter.cxx | 63 +- MUON/mapping/AliMpSectorPainter.h | 15 +- MUON/mapping/AliMpSectorSegmentation.cxx | 135 ++--- MUON/mapping/AliMpSectorSegmentation.h | 25 +- MUON/mapping/AliMpSectorTypes.h | 23 +- MUON/mapping/AliMpSlat.cxx | 377 ++++++++++++ MUON/mapping/AliMpSlat.h | 131 ++++ MUON/mapping/AliMpSlatPadIterator.cxx | 238 ++++++++ MUON/mapping/AliMpSlatPadIterator.h | 50 ++ MUON/mapping/AliMpSlatPainter.cxx | 148 +++++ MUON/mapping/AliMpSlatPainter.h | 43 ++ MUON/mapping/AliMpSlatSegmentation.cxx | 267 ++++++++ MUON/mapping/AliMpSlatSegmentation.h | 63 ++ MUON/mapping/AliMpSlatZonePadIterator.cxx | 299 +++++++++ MUON/mapping/AliMpSlatZonePadIterator.h | 52 ++ MUON/mapping/AliMpSt345Reader.cxx | 226 +++++++ MUON/mapping/AliMpSt345Reader.h | 55 ++ MUON/mapping/AliMpStationType.h | 22 +- MUON/mapping/AliMpSubZone.cxx | 52 +- MUON/mapping/AliMpSubZone.h | 19 +- MUON/mapping/AliMpSubZonePainter.cxx | 64 +- MUON/mapping/AliMpSubZonePainter.h | 17 +- MUON/mapping/AliMpVIndexed.cxx | 40 +- MUON/mapping/AliMpVIndexed.h | 17 +- MUON/mapping/AliMpVMotif.cxx | 62 +- MUON/mapping/AliMpVMotif.h | 18 +- MUON/mapping/AliMpVPadIterator.cxx | 28 +- MUON/mapping/AliMpVPadIterator.h | 17 +- MUON/mapping/AliMpVPadRowSegment.cxx | 52 +- MUON/mapping/AliMpVPadRowSegment.h | 20 +- MUON/mapping/AliMpVPainter.cxx | 89 ++- MUON/mapping/AliMpVPainter.h | 17 +- MUON/mapping/AliMpVRowSegment.cxx | 26 +- MUON/mapping/AliMpVRowSegment.h | 17 +- MUON/mapping/AliMpVRowSegmentSpecial.cxx | 105 ++-- MUON/mapping/AliMpVRowSegmentSpecial.h | 19 +- MUON/mapping/AliMpVSegmentation.cxx | 56 +- MUON/mapping/AliMpVSegmentation.h | 24 +- MUON/mapping/AliMpXDirection.h | 21 +- MUON/mapping/AliMpZone.cxx | 39 +- MUON/mapping/AliMpZone.h | 21 +- MUON/mapping/AliMpZonePainter.cxx | 62 +- MUON/mapping/AliMpZonePainter.h | 17 +- 117 files changed, 5603 insertions(+), 1552 deletions(-) create mode 100644 MUON/mapping/AliMpHelper.cxx create mode 100644 MUON/mapping/AliMpHelper.h create mode 100644 MUON/mapping/AliMpPCB.cxx create mode 100644 MUON/mapping/AliMpPCB.h create mode 100644 MUON/mapping/AliMpPCBPainter.cxx create mode 100644 MUON/mapping/AliMpPCBPainter.h create mode 100644 MUON/mapping/AliMpSlat.cxx create mode 100644 MUON/mapping/AliMpSlat.h create mode 100644 MUON/mapping/AliMpSlatPadIterator.cxx create mode 100644 MUON/mapping/AliMpSlatPadIterator.h create mode 100644 MUON/mapping/AliMpSlatPainter.cxx create mode 100644 MUON/mapping/AliMpSlatPainter.h create mode 100644 MUON/mapping/AliMpSlatSegmentation.cxx create mode 100644 MUON/mapping/AliMpSlatSegmentation.h create mode 100644 MUON/mapping/AliMpSlatZonePadIterator.cxx create mode 100644 MUON/mapping/AliMpSlatZonePadIterator.h create mode 100644 MUON/mapping/AliMpSt345Reader.cxx create mode 100644 MUON/mapping/AliMpSt345Reader.h diff --git a/MUON/mapping/AliMpArea.cxx b/MUON/mapping/AliMpArea.cxx index 33739398f1d..d221853a091 100755 --- a/MUON/mapping/AliMpArea.cxx +++ b/MUON/mapping/AliMpArea.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpArea.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $ // Category: basic // // Class AliMpArea @@ -19,10 +35,13 @@ AliMpArea::AliMpArea(const TVector2& position, const TVector2& dimensions) : TObject(), fPosition(position), fDimensions(dimensions), - fValidity(true) { -// + fValidity(true) +{ +/// Standard constructor + // Check dimensions - if (fDimensions.X() <= 0. || fDimensions.Y() <=0.) { + if ( fDimensions.X() < 0. || fDimensions.Y() < 0. || + ( fDimensions.X() == 0 && fDimensions.Y() == 0.0 ) ) { fDimensions = TVector2(); fValidity = false; } @@ -33,21 +52,24 @@ AliMpArea::AliMpArea() : TObject(), fPosition(TVector2()), fDimensions(TVector2()), - fValidity(false) { -// + fValidity(false) +{ +/// Default constructor } //_____________________________________________________________________________ AliMpArea::AliMpArea(const AliMpArea& rhs): TObject(rhs), fPosition(rhs.fPosition), - fDimensions(rhs.fDimensions) { -// + fDimensions(rhs.fDimensions) +{ +/// Copy constructor } //_____________________________________________________________________________ -AliMpArea::~AliMpArea() { -// +AliMpArea::~AliMpArea() +{ +/// Destructor } // @@ -57,12 +79,12 @@ AliMpArea::~AliMpArea() { //______________________________________________________________________________ AliMpArea& AliMpArea::operator = (const AliMpArea& right) { -// Assignement operator +/// Assignment operator - // check assignement to self + // check assignment to self if (this == &right) return *this; - // base class assignement + // base class assignment TObject::operator=(right); fPosition = right.fPosition; @@ -79,8 +101,7 @@ AliMpArea& AliMpArea::operator = (const AliMpArea& right) //_____________________________________________________________________________ Double_t AliMpArea::LeftBorder() const { -// Returns the position of the left edge. -// -- +/// Return the position of the left edge. return fPosition.X() - fDimensions.X(); } @@ -88,8 +109,7 @@ Double_t AliMpArea::LeftBorder() const //_____________________________________________________________________________ Double_t AliMpArea::RightBorder() const { -// Returns the position of right edge. -// -- +/// Return the position of right edge. return fPosition.X() + fDimensions.X(); } @@ -97,8 +117,7 @@ Double_t AliMpArea::RightBorder() const //_____________________________________________________________________________ Double_t AliMpArea::UpBorder() const { -// Returns the position of the up edge. -// -- +/// Return the position of the up edge. return fPosition.Y() + fDimensions.Y(); } @@ -106,8 +125,7 @@ Double_t AliMpArea::UpBorder() const //_____________________________________________________________________________ Double_t AliMpArea::DownBorder() const { -// Returns the position of the down edge. -// -- +/// Return the position of the down edge. return fPosition.Y() - fDimensions.Y(); } @@ -115,8 +133,7 @@ Double_t AliMpArea::DownBorder() const //_____________________________________________________________________________ TVector2 AliMpArea::LeftDownCorner() const { -// Returns position of the left down corner. -// -- +/// Return position of the left down corner. return TVector2(LeftBorder(), DownBorder()); } @@ -124,8 +141,7 @@ TVector2 AliMpArea::LeftDownCorner() const //_____________________________________________________________________________ TVector2 AliMpArea::LeftUpCorner() const { -// Returns position of the left up corner. -// -- +/// Return position of the left up corner. return TVector2(LeftBorder(), UpBorder()); } @@ -133,8 +149,7 @@ TVector2 AliMpArea::LeftUpCorner() const //_____________________________________________________________________________ TVector2 AliMpArea::RightDownCorner() const { -// Returns position of the right down corner. -// -- +/// Return position of the right down corner. return TVector2(RightBorder(), DownBorder()); } @@ -143,8 +158,7 @@ TVector2 AliMpArea::RightDownCorner() const //_____________________________________________________________________________ TVector2 AliMpArea::RightUpCorner() const { -// Returns position of the right up corner. -// -- +/// Return position of the right up corner. return TVector2(RightBorder(), UpBorder()); } @@ -152,6 +166,8 @@ TVector2 AliMpArea::RightUpCorner() const //_____________________________________________________________________________ ostream& operator<< (ostream &stream,const AliMpArea& area) { +/// Output streaming + stream << "Area: position: (" << area.Position().X() << ", " << area.Position().Y() << ") " << " dimensions: (" diff --git a/MUON/mapping/AliMpArea.h b/MUON/mapping/AliMpArea.h index e863f80a673..290ebb87c84 100755 --- a/MUON/mapping/AliMpArea.h +++ b/MUON/mapping/AliMpArea.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: basic -// -// Class AliMpArea -// ---------------- -// Class that defines a rectangle area positioned in plane.. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpArea.h,v 1.7 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup basic +/// \class AliMpArea +/// \brief A rectangle area positioned in plane.. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_AREA_H #define ALI_MP_AREA_H diff --git a/MUON/mapping/AliMpBasicTypes.h b/MUON/mapping/AliMpBasicTypes.h index 1972396e872..3bda0fcedb4 100755 --- a/MUON/mapping/AliMpBasicTypes.h +++ b/MUON/mapping/AliMpBasicTypes.h @@ -1,11 +1,15 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: basic -// -// AliMpBasicTypes -// --------------- -// Sytem dependent types definitions for basic category. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpBasicTypes.h,v 1.4 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup basic +/// +/// AliMpBasicTypes +/// System dependent types definitions for basic category. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_BASIC_TYPES_H #define ALI_MP_BASIC_TYPES_H diff --git a/MUON/mapping/AliMpConnection.cxx b/MUON/mapping/AliMpConnection.cxx index fc87ae5f8ed..c319a395a47 100755 --- a/MUON/mapping/AliMpConnection.cxx +++ b/MUON/mapping/AliMpConnection.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpConnection.cxx,v 1.5 2005/08/26 15:43:36 ivana Exp $ // Category: motif // // Class AliMpConnection @@ -23,13 +39,15 @@ AliMpConnection::AliMpConnection(Int_t padNum, Int_t bergNum,Int_t kaptonNum, fGassiNum(gassiNum), fOwner(0) { -// +/// Standard constructor } //_____________________________________________________________________________ AliMpConnection::AliMpConnection(const AliMpConnection& right) - : TObject(right) { -// + : TObject(right) +{ +/// Protected copy constructor (not provided) + Fatal("AliMpConnection", "Copy constructor not provided."); } @@ -42,7 +60,7 @@ AliMpConnection::AliMpConnection() fGassiNum(-1), fOwner(0) { -// +/// Default constructor } //_____________________________________________________________________________ @@ -50,16 +68,20 @@ AliMpConnection::~AliMpConnection() { // } +// // operators +// //_____________________________________________________________________________ AliMpConnection& AliMpConnection::operator=(const AliMpConnection& right) { - // check assignement to self +/// Protected assignment operator (not provided) + + // check assignment to self if (this == &right) return *this; - Fatal("operator =", "Assignement operator not provided."); + Fatal("operator =", "Assignment operator not provided."); return *this; } diff --git a/MUON/mapping/AliMpConnection.h b/MUON/mapping/AliMpConnection.h index fee94dd9b6e..f0db6aeac03 100755 --- a/MUON/mapping/AliMpConnection.h +++ b/MUON/mapping/AliMpConnection.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: motif -// -// Class AliMpConnection -// --------------------- -// Class that defines a connexion properties. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpConnection.h,v 1.6 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup motif +/// \class AliMpConnection +/// \brief A connection properties. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_CONNECTION_H #define ALI_MP_CONNECTION_H diff --git a/MUON/mapping/AliMpConstants.cxx b/MUON/mapping/AliMpConstants.cxx index 66c6949d85a..f086ac9be42 100755 --- a/MUON/mapping/AliMpConstants.cxx +++ b/MUON/mapping/AliMpConstants.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpConstants.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $ // Category: basic // // Class AliMpConstants @@ -21,20 +37,21 @@ const Int_t AliMpConstants::fgkStartPadIndex = 1; //_____________________________________________________________________________ AliMpConstants::AliMpConstants() - : TObject() { -// + : TObject() +{ +/// Default constructor } //_____________________________________________________________________________ -AliMpConstants::~AliMpConstants() { -// +AliMpConstants::~AliMpConstants() +{ +///Destructor } //_____________________________________________________________________________ Bool_t AliMpConstants::IsEqual(Double_t length1, Double_t length2) { -// Compares lengths within the length tolerance. -// --- +/// Compare lengths within the length tolerance. return TMath::Abs(length1 - length2) < fgkLengthTolerance; } @@ -43,8 +60,7 @@ Bool_t AliMpConstants::IsEqual(Double_t length1, Double_t length2) //_____________________________________________________________________________ Bool_t AliMpConstants::IsEqual(const TVector2& v1, const TVector2& v2) { -// Compares x, y vector coordinates within the length tolerance. -// --- +/// Compare x, y vector coordinates within the length tolerance. return ( TMath::Abs(v1.X() - v2.X()) + TMath::Abs(v1.Y() - v2.Y())) < 2.*fgkLengthTolerance; diff --git a/MUON/mapping/AliMpConstants.h b/MUON/mapping/AliMpConstants.h index 819793b4c03..db155c9a025 100755 --- a/MUON/mapping/AliMpConstants.h +++ b/MUON/mapping/AliMpConstants.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: basic -// -// Class AliMpConstants -// -------------------- -// Class for globally used constants definition. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpConstants.h,v 1.6 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup basic +/// \class AliMpConstants +/// \brief Globally used constants definition. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_CONSTANTS_H #define ALI_MP_CONSTANTS_H diff --git a/MUON/mapping/AliMpContainers.h b/MUON/mapping/AliMpContainers.h index 51de622ae60..545cc414983 100644 --- a/MUON/mapping/AliMpContainers.h +++ b/MUON/mapping/AliMpContainers.h @@ -1,12 +1,15 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: basis -// -// AliMpContainers -// --------------- -// Compiler directive for selection of containers type: -// Either STL or ROOT -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpContainers.h,v 1.3 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup basis +/// AliMpContainers +/// Compiler directive for selection of containers type: +/// Either STL or ROOT +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #define WITH_ROOT //#define WITH_STL diff --git a/MUON/mapping/AliMpDirection.h b/MUON/mapping/AliMpDirection.h index 4377414fcae..a565bc639b6 100755 --- a/MUON/mapping/AliMpDirection.h +++ b/MUON/mapping/AliMpDirection.h @@ -1,19 +1,22 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: basic -// -// Enum AliMpDirection -// ------------------- -// Enumeration for the directions in a plane. -// -// Authors: David Guez, IPN Orsay +// $MpId: AliMpDirection.h,v 1.4 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup basic +/// \enum AliMpDirection +/// Enumeration for the directions in a plane. +/// +/// Authors: David Guez, IPN Orsay #ifndef ALI_MP_DIRECTION_H #define ALI_MP_DIRECTION_H enum AliMpDirection { - kX, // direction in x - kY // direction in y + kX, ///< direction in x + kY ///< direction in y }; #endif //ALI_MP_DIRECTION_H diff --git a/MUON/mapping/AliMpFiles.cxx b/MUON/mapping/AliMpFiles.cxx index 80e39738c8b..3a9537e08bb 100755 --- a/MUON/mapping/AliMpFiles.cxx +++ b/MUON/mapping/AliMpFiles.cxx @@ -1,5 +1,21 @@ +/************************************************************************** + * 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$ -// Category: sector +// $MpId: AliMpFiles.cxx,v 1.4 2005/08/26 15:43:36 ivana Exp $ +// Category: basic // // Class AliMpFiles // ---------------- @@ -40,7 +56,8 @@ AliMpFiles::AliMpFiles() : TObject(), fTop(fgkDefaultTop) { -// +/// Default constructor + if (fgInstance) { Fatal("AliMpFiles", "AliMpFiles: attempt to create two instances of singleton."); @@ -53,14 +70,16 @@ AliMpFiles::AliMpFiles() AliMpFiles::AliMpFiles(const AliMpFiles& right) : TObject(right) { -// +/// Protected copy constructor + Fatal("AliMpFiles", "Attempt to copy AliMpFiles singleton."); } //______________________________________________________________________________ -AliMpFiles::~AliMpFiles() { -// +AliMpFiles::~AliMpFiles() +{ +/// Destructor fgInstance = 0; } @@ -70,7 +89,9 @@ AliMpFiles::~AliMpFiles() { //______________________________________________________________________________ AliMpFiles& AliMpFiles::operator=(const AliMpFiles& right) { - // check assignement to self +/// Assignment operator + + // check assignment to self if (this == &right) return *this; Fatal("operator=", "Attempt to assign AliMpFiles singleton."); @@ -86,19 +107,26 @@ AliMpFiles& AliMpFiles::operator=(const AliMpFiles& right) TString AliMpFiles::PlaneDataDir(AliMpStationType station, AliMpPlaneType plane) const { -// Returns path to data files with sector description -// for a specified plane. -// --- +/// Returns path to data files with sector description +/// for a specified plane. - switch (plane) { + switch (station) { + case kStation1: + case kStation2: + switch (plane) { case kBendingPlane: - return fTop + fgkDataDir + StationDataDir(station) + fgkBendingDir; - ;; + return fTop + fgkDataDir + StationDataDir(station) + fgkBendingDir; + ;; case kNonBendingPlane: - return fTop + fgkDataDir + StationDataDir(station) + fgkNonBendingDir; - ;; - } - + return fTop + fgkDataDir + StationDataDir(station) + fgkNonBendingDir; + ;; + } + break; + case kStation345: + return fTop + fgkDataDir + StationDataDir(station) + "/"; + break; + } + Fatal("PlaneDataDir", "Incomplete switch on AliMpPlaneType"); return TString(); } @@ -106,19 +134,22 @@ TString AliMpFiles::PlaneDataDir(AliMpStationType station, //______________________________________________________________________________ TString AliMpFiles::StationDataDir(AliMpStationType station) const { -// Returns the station directory name for the specified station number. -// --- +/// Returns the station directory name for the specified station number. TString stationDataDir(fgkStationDir); switch (station) { - case kStation1: - stationDataDir += 1; - break; - ;; - case kStation2: - stationDataDir += 2; - break; - ;; + case kStation1: + stationDataDir += 1; + break; + ;; + case kStation2: + stationDataDir += 2; + break; + ;; + case kStation345: + stationDataDir += "345/"; + break; + ;; } return stationDataDir; } @@ -130,22 +161,53 @@ TString AliMpFiles::StationDataDir(AliMpStationType station) const //______________________________________________________________________________ AliMpFiles* AliMpFiles::Instance() { -// Return the singleton instance; -// Creates it if it does not yet exist, -// -// --- +/// Return the singleton instance; +/// Creates it if it does not yet exist, if (!fgInstance) fgInstance = new AliMpFiles(); return fgInstance; } + +//_____________________________________________________________________________ +TString AliMpFiles::SlatFilePath(const char* slatType, + AliMpPlaneType plane) const +{ +/// \todo add .. + + return TString(PlaneDataDir(kStation345,plane) + slatType + "." + + ( plane == kNonBendingPlane ? "NonBending":"Bending" ) + ".slat"); +} + +//_____________________________________________________________________________ +TString AliMpFiles::SlatPCBFilePath(const char* pcbType) const +{ +/// Get the full path for a given PCB (only relevant to stations 3, +/// 4 and 5). The bending parameter below is of no use in this case, but +/// we use it to re-use the PlaneDataDir() method untouched. + + return TString(PlaneDataDir(kStation345,kNonBendingPlane) + pcbType + + ".pcb"); +} + +//_____________________________________________________________________________ +TString +AliMpFiles::DetElemIdToSlatTypeFilePath() const +{ +/// Get the full path of the file containing the mapping detElemId <-> +/// SlatType. +/// The bending parameter below is of no use in this case, but +/// we use it to re-use the PlaneDataDir() method untouched. + + return TString(PlaneDataDir(kStation345,kNonBendingPlane) + + "DetElemIdToSlatType.dat"); +} //______________________________________________________________________________ TString AliMpFiles::SectorFilePath(AliMpStationType station, AliMpPlaneType plane) const { -// Returns path to data file with sector description. -// --- +/// Return path to data file with sector description. return TString(PlaneDataDir(station, plane) + fgkSector + fgkDataExt); } @@ -154,8 +216,7 @@ TString AliMpFiles::SectorFilePath(AliMpStationType station, TString AliMpFiles::SectorSpecialFilePath(AliMpStationType station, AliMpPlaneType plane) const { -// Returns path to data file with sector special description (irregular motifs). -// --- +/// Return path to data file with sector special description (irregular motifs). return TString(PlaneDataDir(station, plane) + fgkSectorSpecial + fgkDataExt); } @@ -164,8 +225,7 @@ TString AliMpFiles::SectorSpecialFilePath(AliMpStationType station, TString AliMpFiles::SectorSpecialFilePath2(AliMpStationType station, AliMpPlaneType plane) const { -// Returns path to data file with sector special description (irregular motifs). -// --- +/// Returns path to data file with sector special description (irregular motifs). return TString(PlaneDataDir(station, plane) + fgkSectorSpecial2 + fgkDataExt); } @@ -175,8 +235,7 @@ TString AliMpFiles::MotifFilePath(AliMpStationType station, AliMpPlaneType plane, const TString& motifTypeID) const { -// Returns path to data file for a given motif type. -// --- +/// Returns path to data file for a given motif type. return TString(PlaneDataDir(station, plane) + fgkMotifPrefix + motifTypeID + fgkDataExt); @@ -187,8 +246,7 @@ TString AliMpFiles::PadPosFilePath(AliMpStationType station, AliMpPlaneType plane, const TString& motifTypeID) const { -// Returns path to data file with pad positions for a given motif type. -// --- +/// Returns path to data file with pad positions for a given motif type. return TString(PlaneDataDir(station, plane) + fgkPadPosPrefix + motifTypeID + fgkDataExt); @@ -199,8 +257,7 @@ TString AliMpFiles::MotifSpecialFilePath(AliMpStationType station, AliMpPlaneType plane, const TString& motifID) const { -// Returns path to data file with pad dimensions for a given motif ID. -// --- +/// Returns path to data file with pad dimensions for a given motif ID. return TString(PlaneDataDir(station, plane) + fgkMotifSpecialPrefix + motifID + fgkDataExt); @@ -210,9 +267,8 @@ TString AliMpFiles::MotifSpecialFilePath(AliMpStationType station, //______________________________________________________________________________ TString AliMpFiles::BergToGCFilePath(AliMpStationType station) const { -// Returns the path of the file which describes the correspondance between -// the berg number and the gassiplex channel. -// --- +/// Returns the path of the file which describes the correspondance between +/// the berg number and the gassiplex channel. return fTop + fgkDataDir + StationDataDir(station) + fgkBergToGCFileName + fgkDataExt; diff --git a/MUON/mapping/AliMpFiles.h b/MUON/mapping/AliMpFiles.h index eee07df80e4..49d1c01d853 100755 --- a/MUON/mapping/AliMpFiles.h +++ b/MUON/mapping/AliMpFiles.h @@ -1,15 +1,19 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: sector -// -// Class AliMpFiles -// ---------------- -// Class for generating file names and paths. -// The input files: -// zones.dat, zones_special.dat - sector description -// motif*.dat - motif description (generated from Exceed) -// padPos*.dat - pad positions in motif -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpFiles.h,v 1.4 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup basic +/// \class AliMpFiles +/// \brief Class for generating file names and paths. +/// +/// The input files: +/// - zones.dat, zones_special.dat - sector description +/// - motif*.dat - motif description (generated from Exceed) +/// - padPos*.dat - pad positions in motif +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_FILES_H #define ALI_MP_FILES_H @@ -32,6 +36,12 @@ class AliMpFiles : public TObject static AliMpFiles* Instance(); // methods + TString SlatFilePath(const char* slatType, + AliMpPlaneType plane) const; + TString SlatPCBFilePath(const char* pcbType) const; + + TString DetElemIdToSlatTypeFilePath() const; + TString SectorFilePath(AliMpStationType station, AliMpPlaneType plane) const; TString SectorSpecialFilePath(AliMpStationType station, diff --git a/MUON/mapping/AliMpGraphContext.cxx b/MUON/mapping/AliMpGraphContext.cxx index fef053f365d..e652b577d65 100755 --- a/MUON/mapping/AliMpGraphContext.cxx +++ b/MUON/mapping/AliMpGraphContext.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpGraphContext.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $ // Category: graphics // // Class AliMpGraphContext @@ -28,7 +44,7 @@ AliMpGraphContext::AliMpGraphContext(): fRealPosition(TVector2(0.,0.)), fRealDimensions(TVector2(1,1)) { -// private constructor +/// Private constructor fColor = 20; // default constructor (private) @@ -43,16 +59,16 @@ AliMpGraphContext::AliMpGraphContext(const AliMpGraphContext& right) fRealPosition(right.fRealPosition), fRealDimensions(right.fRealDimensions) { -// Copy constructor +/// Copy constructor } //_____________________________________________________________________________ AliMpGraphContext& AliMpGraphContext::operator=(const AliMpGraphContext& right) { -// protected assignement operator +/// Protected assignment operator - // check assignement to self + // check assignment to self if (this == &right) return *this; fColor = right.fColor; @@ -67,7 +83,8 @@ AliMpGraphContext::operator=(const AliMpGraphContext& right) //_____________________________________________________________________________ AliMpGraphContext *AliMpGraphContext::Instance() { - // return or create a unique instance of this class + /// Return or create a unique instance of this class + if (fgInstance) return fgInstance; fgInstance = new AliMpGraphContext; return fgInstance; @@ -76,7 +93,8 @@ AliMpGraphContext *AliMpGraphContext::Instance() //_____________________________________________________________________________ TVector2 AliMpGraphContext::RealToPad(const TVector2 &position) const { - // transform a real position into its equivalent position in the pad + /// Transform a real position into its equivalent position in the pad + Double_t x=position.X(); Double_t y=position.Y(); x-= (fRealPosition.X()-fRealDimensions.X()); @@ -98,8 +116,9 @@ void AliMpGraphContext::RealToPad(const TVector2 &position, TVector2 &padPosition, TVector2 &padDimensions) const { - // transform the real area (position,dimensions) to + // Transform the real area (position,dimensions) to // its equivalent pad area + padPosition = RealToPad(position); padDimensions = TVector2(dimensions.X()*fPadDimensions.X()/fRealDimensions.X(), @@ -111,15 +130,17 @@ void AliMpGraphContext::RealToPad(const TVector2 &position, void AliMpGraphContext::SetPadPosForReal(const TVector2 &position, const TVector2 &dimensions) { - // Set the pad area from the actual one - // corresponding to the given real area. + /// Set the pad area from the actual one + /// corresponding to the given real area. + RealToPad(position,dimensions,fPadPosition,fPadDimensions); } //_____________________________________________________________________________ void AliMpGraphContext::Push() const { - // Store the current configuration + /// Store the current configuration + AliMpGraphContext *save = new AliMpGraphContext(*this); #ifdef WITH_STL @@ -134,7 +155,8 @@ void AliMpGraphContext::Push() const //_____________________________________________________________________________ void AliMpGraphContext::Pop() { -// Pops object from the stack. +/// Pop an object from the stack. + #ifdef WITH_STL // restore the last saved configuration if (!fgStack.empty()){ diff --git a/MUON/mapping/AliMpGraphContext.h b/MUON/mapping/AliMpGraphContext.h index 00c3b8e9631..e9e7967fcfd 100755 --- a/MUON/mapping/AliMpGraphContext.h +++ b/MUON/mapping/AliMpGraphContext.h @@ -1,12 +1,15 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: graphics -// -// Class AliMpGraphContext -// ----------------------- -// Class describing the correspondance between a given area -// in pad, and a zone of real (cm) position -// -// Author: David GUEZ, IPN Orsay +// $MpId: AliMpGraphContext.h,v 1.7 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup graphics +/// \class AliMpGraphContext +/// \brief Class describing the correspondance between a given area +/// in pad, and a zone of real (cm) position +/// +/// Author: David GUEZ, IPN Orsay #ifndef ALI_MP_GRAPH_CONTEXT_H #define ALI_MP_GRAPH_CONTEXT_H diff --git a/MUON/mapping/AliMpGraphicsTypes.h b/MUON/mapping/AliMpGraphicsTypes.h index 963eef24c40..90bac932ece 100644 --- a/MUON/mapping/AliMpGraphicsTypes.h +++ b/MUON/mapping/AliMpGraphicsTypes.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: graphics -// -// AliMpGraphicsTypes -// ------------------ -// Sytem dependent types definitions for graphics category. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpGraphicsTypes.h,v 1.5 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup graphics +/// AliMpGraphicsTypes +/// System dependent types definitions for graphics category. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_GRAPHICS_TYPES_H #define ALI_MP_GRAPHICS_TYPES_H diff --git a/MUON/mapping/AliMpHelper.cxx b/MUON/mapping/AliMpHelper.cxx new file mode 100644 index 00000000000..60a3553bc2b --- /dev/null +++ b/MUON/mapping/AliMpHelper.cxx @@ -0,0 +1,165 @@ +/************************************************************************** + * 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 purpeateose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +// $Id$ +// $MpId: AliMpHelper.cxx,v 1.3 2005/09/19 19:01:31 ivana Exp $ + +#include "AliMpHelper.h" + +#include "AliLog.h" +#include "TArrayI.h" +#include "TClass.h" +#include "TObjArray.h" +#include "TObjString.h" +#include "TString.h" + +ClassImp(AliMpHelper) + +//_____________________________________________________________________________ +AliMpHelper::AliMpHelper() : TObject() +{ + // + // Default (empty) ctor. + // +} + +//_____________________________________________________________________________ +AliMpHelper::~AliMpHelper() +{ + // + // Dtor. + // +} + +//_____________________________________________________________________________ +void AliMpHelper::DecodeName(const char* name, char sep, TArrayI& theList) +{ + // + // From a string of the form "i-j;k;l;m-n" returns an integer array + // containing all the integers from i to j, then k, l and then from m to + // n. + // + theList.Set(0); + + TString str(name); + + if ( str.Length() == 0 ) + { + // protection against empty input string. + return; + } + + // Get substrings separated by 'sep' + TObjArray* ranges = str.Tokenize(sep); + + // Finally takes each substring (which ought to be a range of the form + // x-y), and decode it into the theList integer vector. + for ( Int_t i = 0; i < ranges->GetEntriesFast(); ++i ) + { + int m1; + int m2; + int n; + int incr; + TString& s = ((TObjString*)ranges->At(i))->String(); + GetRange(s.Data(),m1,m2,incr,n); + int m = m1; + while ( n > 0 ) + { + theList.Set(theList.GetSize()+1); + theList[theList.GetSize()-1] = m; + m += incr; + --n; + } + } + + delete ranges; +} + +//_____________________________________________________________________________ +void +AliMpHelper::GetRange(const char* cstr, Int_t& begin, Int_t& end, + Int_t& incr, Int_t& n) +{ + // + // From a string of the form "m-n" returns a range (begin,end), + // its ordering (incr=+-1) and its size (abs(begin-end)+1) + // + TString str(cstr); + + incr = 1; + Ssiz_t pos = str.First('-'); + if ( pos < 0 ) + { + begin = str.Atoi(); + end = -1; + n = 1; + } + else + { + begin = str.Atoi(); + end = TString(str(pos+1,str.Length()-pos)).Atoi(); + if ( begin > end ) + { + incr = -1; + n = begin-end+1; + } + else + { + n = end-begin+1; + } + } +} + +//_____________________________________________________________________________ +TString AliMpHelper::Normalize(const char* line) +{ + // + // Remove multiple blanks, and blanks in the begining/end. + // + TString rv(line); + + if ( rv.Length() <= 0 ) return TString(); + + while ( rv[0] == ' ' ) + { + rv.Remove(0,1); + } + while ( rv[rv.Length()-1] == ' ' ) + { + rv.Remove(rv.Length()-1,1); + } + Ssiz_t i(0); + bool kill = false; + for ( i = 0; i < rv.Length(); ++i ) + { + if ( rv[i] == ' ' ) + { + if (kill) + { + rv.Remove(i,1); + --i; + } + else + { + kill = true; + } + } + else + { + kill = false; + } + } + return rv; +} diff --git a/MUON/mapping/AliMpHelper.h b/MUON/mapping/AliMpHelper.h new file mode 100644 index 00000000000..426f4ce7b1c --- /dev/null +++ b/MUON/mapping/AliMpHelper.h @@ -0,0 +1,39 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +// $Id$ +// $MpId: AliMpHelper.h,v 1.4 2005/09/19 19:01:09 ivana Exp $ + +/// \ingroup slat +/// \class AliMpHelper +/// \brief Helper class to parse slat mapping ascii files. +/// +/// Author: Laurent Aphecetche + +#ifndef ALI_MP_HELPER_H +#define ALI_MP_HELPER_H + +#ifndef ROOT_TObject +# include "TObject.h" +#endif + +class TArrayI; +class TString; + +class AliMpHelper : public TObject +{ + public: + AliMpHelper(); + virtual ~AliMpHelper(); + + static void DecodeName(const char* manus, char sep, TArrayI& theList); + + static void GetRange(const char* str, Int_t& begin, Int_t& end, + Int_t& incr, Int_t& n); + + static TString Normalize(const char* line); + + ClassDef(AliMpHelper,1) // Helper for parsing slat stations mapping files +}; + +#endif diff --git a/MUON/mapping/AliMpIntPair.cxx b/MUON/mapping/AliMpIntPair.cxx index b1a29c5781d..7f27bd20f72 100755 --- a/MUON/mapping/AliMpIntPair.cxx +++ b/MUON/mapping/AliMpIntPair.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpIntPair.cxx,v 1.5 2005/08/26 15:43:36 ivana Exp $ // Category: basic // // Class AliMpIntPair @@ -32,8 +48,9 @@ AliMpIntPair::AliMpIntPair(Int_t ix,Int_t iy) : TObject(), fFirst(ix), fSecond(iy), - fValidity(true) { -// + fValidity(true) +{ +/// Standard constructor } //_____________________________________________________________________________ @@ -41,8 +58,9 @@ AliMpIntPair::AliMpIntPair(Int_t ix,Int_t iy, Bool_t validity) : TObject(), fFirst(ix), fSecond(iy), - fValidity(validity) { -// + fValidity(validity) +{ +/// Standard constructor with validity argument } //_____________________________________________________________________________ @@ -52,9 +70,11 @@ AliMpIntPair::AliMpIntPair() //fSecond(9999), fFirst(0), fSecond(0), - fValidity(false) { -// + fValidity(false) +{ +/// Default constructor } + //_____________________________________________________________________________ AliMpIntPair::AliMpIntPair(const AliMpIntPair& src): TObject(src), @@ -62,17 +82,20 @@ AliMpIntPair::AliMpIntPair(const AliMpIntPair& src): fSecond(src.fSecond), fValidity(src.fValidity) { - +/// Copy constructor } //_____________________________________________________________________________ -AliMpIntPair::~AliMpIntPair() { -// +AliMpIntPair::~AliMpIntPair() +{ +/// Destructor } //_____________________________________________________________________________ Bool_t AliMpIntPair::operator< (const AliMpIntPair& pos2) const { +/// Less operator + // fFirst prior to fSecond if (fFirstpos2.fFirst) return kFALSE; @@ -83,6 +106,8 @@ Bool_t AliMpIntPair::operator< (const AliMpIntPair& pos2) const //_____________________________________________________________________________ Bool_t AliMpIntPair::operator== (const AliMpIntPair& pos2) const { +/// Equality operator + // are this and pos2 equals? // one valid, one invalid @@ -98,6 +123,8 @@ Bool_t AliMpIntPair::operator== (const AliMpIntPair& pos2) const //_____________________________________________________________________________ Bool_t AliMpIntPair::operator!= (const AliMpIntPair& pos2) const { +/// Non-equality operator + // are this and pos2 equals? return !(*this == pos2); } @@ -105,13 +132,15 @@ Bool_t AliMpIntPair::operator!= (const AliMpIntPair& pos2) const //_____________________________________________________________________________ AliMpIntPair& AliMpIntPair::operator=(const AliMpIntPair& src) { - // check assignement to self +/// Assignment operator + + // check assignment to self if (this == &src) return *this; - // base class assignement + // base class assignment TObject::operator=(src); - // assignement operator + // assignment operator fFirst = src.fFirst; fSecond = src.fSecond; fValidity = src.fValidity; @@ -122,7 +151,8 @@ AliMpIntPair& AliMpIntPair::operator=(const AliMpIntPair& src) //_____________________________________________________________________________ void AliMpIntPair::operator += (const AliMpIntPair& op) { - // incrementation operator +/// Incrementation operator + fFirst += op.fFirst; fSecond += op.fSecond; @@ -132,7 +162,8 @@ void AliMpIntPair::operator += (const AliMpIntPair& op) //_____________________________________________________________________________ void AliMpIntPair::operator -= (const AliMpIntPair& op) { - // decrementation operator +/// Decrementation operator + fFirst -= op.fFirst; fSecond -= op.fSecond; @@ -143,6 +174,8 @@ void AliMpIntPair::operator -= (const AliMpIntPair& op) //_____________________________________________________________________________ AliMpIntPair operator-(const AliMpIntPair& op1,const AliMpIntPair& op2) { +/// Substraction operator + return AliMpIntPair(op1.GetFirst()-op2.GetFirst(), op1.GetSecond()-op2.GetSecond(), op1.IsValid() && op2.IsValid()); @@ -150,6 +183,8 @@ AliMpIntPair operator-(const AliMpIntPair& op1,const AliMpIntPair& op2) //_____________________________________________________________________________ AliMpIntPair operator+(const AliMpIntPair& op1,const AliMpIntPair& op2) { +/// Addition operator + return AliMpIntPair(op1.GetFirst()+op2.GetFirst(), op1.GetSecond()+op2.GetSecond(), op1.IsValid() && op2.IsValid()); @@ -157,6 +192,8 @@ AliMpIntPair operator+(const AliMpIntPair& op1,const AliMpIntPair& op2) //_____________________________________________________________________________ AliMpIntPair operator*(const AliMpIntPair& op1,const AliMpIntPair& op2) { +/// Multiplication operator + return AliMpIntPair(op1.GetFirst()*op2.GetFirst(), op1.GetSecond()*op2.GetSecond(), op1.IsValid() && op2.IsValid()); @@ -164,6 +201,8 @@ AliMpIntPair operator*(const AliMpIntPair& op1,const AliMpIntPair& op2) //_____________________________________________________________________________ ostream& operator<< (ostream &stream,const AliMpIntPair& op) { +/// Output streaming + if (op.IsValid()) { stream << '('; stream << op.GetFirst()<<','<HasPad(localIndices)) return fPadDimensions; @@ -56,7 +72,7 @@ TVector2 AliMpMotif::GetPadDimensions(const AliMpIntPair& localIndices) const //_____________________________________________________________________________ TVector2 AliMpMotif::Dimensions() const { - // gives the dimension of the motif + /// Give the dimension of the motif return TVector2(GetMotifType()->GetNofPadsX()*fPadDimensions.X(), GetMotifType()->GetNofPadsY()*fPadDimensions.Y()); @@ -65,8 +81,8 @@ TVector2 AliMpMotif::Dimensions() const //_____________________________________________________________________________ TVector2 AliMpMotif::PadPositionLocal(const AliMpIntPair& localIndices) const { - // gives the local position of the pad number (ix,iy) - // (0,0 is the center of the motif) + /// Give the local position of the pad number (ix,iy) + /// (0,0 is the center of the motif) TVector2 dim=Dimensions(); return TVector2((2.*localIndices.GetFirst()+1.)*fPadDimensions.X()-dim.X(), @@ -76,11 +92,17 @@ TVector2 AliMpMotif::PadPositionLocal(const AliMpIntPair& localIndices) const //_____________________________________________________________________________ AliMpIntPair AliMpMotif::PadIndicesLocal(const TVector2& localPos) const { - // return the pad indices from a given local position - // or (-1,-1) if this position doesn't correspond to any valid - // connection + /// Return the pad indices from a given local position + /// or (-1,-1) if this position doesn't correspond to any valid + /// connection TVector2 lowerLeft = localPos+Dimensions(); + + if ( lowerLeft.X() < 0 || lowerLeft.Y() < 0 ) + { + return AliMpIntPair::Invalid(); + } + Int_t ix = (Int_t)(lowerLeft.X()/(2.*fPadDimensions.X())); Int_t iy = (Int_t)(lowerLeft.Y()/(2.*fPadDimensions.Y())); diff --git a/MUON/mapping/AliMpMotif.h b/MUON/mapping/AliMpMotif.h index 1c5a22ebc15..7c0127e6ccd 100755 --- a/MUON/mapping/AliMpMotif.h +++ b/MUON/mapping/AliMpMotif.h @@ -1,12 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: motif -// -// Class AliMpMotif -// ---------------- -// Class that defines a motif with its unique ID -// and the motif type. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpMotif.h,v 1.5 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup motif +/// \class AliMpMotif +/// \brief A motif with its unique ID and the motif type. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_MOTIF_H #define ALI_MP_MOTIF_H diff --git a/MUON/mapping/AliMpMotifMap.cxx b/MUON/mapping/AliMpMotifMap.cxx index b6fed2da83c..738044b73d7 100755 --- a/MUON/mapping/AliMpMotifMap.cxx +++ b/MUON/mapping/AliMpMotifMap.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpMotifMap.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $ // Category: motif // // Class AliMpMotifMap @@ -28,12 +44,13 @@ const Int_t AliMpMotifMap::fgkSeparator = 100; AliMpMotifMap::AliMpMotifMap() : TObject() { -// +/// Default constructor } //_____________________________________________________________________________ -AliMpMotifMap::~AliMpMotifMap() { -// +AliMpMotifMap::~AliMpMotifMap() +{ +/// Destructor // Delete all registered motifs, motif types, motif positions @@ -76,8 +93,7 @@ AliMpMotifMap::~AliMpMotifMap() { //_____________________________________________________________________________ Int_t AliMpMotifMap::GetIndex(const TString& s) const { -// Converts the TString to integer. -// --- +/// Convert the TString to integer. if (s.Length() > 5) { Fatal("GetIndex", "String too long."); @@ -92,8 +108,7 @@ Int_t AliMpMotifMap::GetIndex(const TString& s) const //______________________________________________________________________________ Int_t AliMpMotifMap::GetIndex(const AliMpIntPair& pair) const { -// Converts the pair of integers to integer. -// --- +/// Convert the pair of integers to integer. if (pair.GetFirst() >= fgkSeparator || pair.GetSecond() >= fgkSeparator) Fatal("GetIndex", "Index out of limit."); @@ -104,8 +119,7 @@ Int_t AliMpMotifMap::GetIndex(const AliMpIntPair& pair) const //_____________________________________________________________________________ TString AliMpMotifMap::GetString(Int_t index) const { -// Converts the integer index to the string. -// --- +/// Convert the integer index to the string. TString s; while (index >0) { @@ -119,8 +133,7 @@ TString AliMpMotifMap::GetString(Int_t index) const //______________________________________________________________________________ AliMpIntPair AliMpMotifMap::GetPair(Int_t index) const { -// Converts the integer index to the pair of integers. -// --- +/// Convert the integer index to the pair of integers. return AliMpIntPair((index-1)/fgkSeparator, (index-1)%fgkSeparator); } @@ -129,7 +142,7 @@ AliMpIntPair AliMpMotifMap::GetPair(Int_t index) const //_____________________________________________________________________________ void AliMpMotifMap::PrintMotif(const AliMpVMotif* motif) const { -// Prints the motif. +/// Print the motif. // --- cout << motif->GetID().Data() << " " @@ -141,8 +154,7 @@ void AliMpMotifMap::PrintMotif(const AliMpVMotif* motif) const //_____________________________________________________________________________ void AliMpMotifMap::PrintMotifType(const AliMpMotifType* motifType) const { -// Prints the motif type. -// --- +/// Print the motif type. cout << motifType->GetID().Data() << " " << motifType->GetNofPadsX() << " " @@ -153,8 +165,7 @@ void AliMpMotifMap::PrintMotifType(const AliMpMotifType* motifType) const void AliMpMotifMap::PrintMotifPosition( const AliMpMotifPosition* motifPosition) const { -// Prints the motif position. -// --- +/// Print the motif position. cout << motifPosition->GetID() << " " << motifPosition->GetMotif()->GetID() << " " @@ -166,8 +177,7 @@ void AliMpMotifMap::PrintMotifPosition( void AliMpMotifMap::PrintMotifPosition2( const AliMpMotifPosition* motifPosition) const { -// Prints the motif position. -// --- +/// Print the motif position. cout << setw(3) << motifPosition->GetLowIndicesLimit().GetFirst() << " " << setw(3) << motifPosition->GetLowIndicesLimit().GetSecond() << " " @@ -179,9 +189,8 @@ void AliMpMotifMap::PrintMotifPosition2( //_____________________________________________________________________________ void AliMpMotifMap::PrintMotifs() const { -// Prints all the motifs and their motif types -// for all motifs in the motifs map. -// --- +/// Print all the motifs and their motif types +/// for all motifs in the motifs map. #ifdef WITH_STL if (fMotifs.size()) { @@ -222,9 +231,8 @@ void AliMpMotifMap::PrintMotifs() const //_____________________________________________________________________________ void AliMpMotifMap::PrintMotifTypes() const { -// Prints all the the motifs types and their motif dimensions -// for all motif types in the motif types map. -// --- +/// Print all the the motifs types and their motif dimensions +/// for all motif types in the motif types map. #ifdef WITH_STL if (fMotifTypes.size()) { @@ -265,8 +273,7 @@ void AliMpMotifMap::PrintMotifTypes() const //_____________________________________________________________________________ void AliMpMotifMap::PrintMotifPositions() const { -// Prints all the the motifs positions. -// --- +/// Print all the the motifs positions. #ifdef WITH_STL if (fMotifPositions.size()) { @@ -286,7 +293,7 @@ void AliMpMotifMap::PrintMotifPositions() const #ifdef WITH_ROOT if (fMotifPositions.GetSize()) { - cout << "Dump of Motif Type Map - " << fMotifPositions.GetSize() << " entries:" << endl; + cout << "Dump of Motif Position Map - " << fMotifPositions.GetSize() << " entries:" << endl; Int_t counter = 0; MotifPositionMapIterator i(&fMotifPositions); Long_t key, value; @@ -305,9 +312,8 @@ void AliMpMotifMap::PrintMotifPositions() const //_____________________________________________________________________________ void AliMpMotifMap::PrintMotifPositions2() const { -// Prints all the the motifs positions from the second map -// (by global indices) -// --- +/// Print all the the motifs positions from the second map +/// (by global indices) #ifdef WITH_STL if (fMotifPositions2.size()) { @@ -350,9 +356,8 @@ void AliMpMotifMap::PrintMotifPositions2() const //_____________________________________________________________________________ Bool_t AliMpMotifMap::AddMotif(AliMpVMotif* motif, Bool_t warn) { -// Adds the specified motif -// if the motif with this ID is not yet present. -// --- +/// Add the specified motif +/// if the motif with this ID is not yet present. AliMpVMotif* found = FindMotif(motif->GetID()); if (found) { @@ -377,9 +382,8 @@ Bool_t AliMpMotifMap::AddMotif(AliMpVMotif* motif, Bool_t warn) //_____________________________________________________________________________ Bool_t AliMpMotifMap::AddMotifType(AliMpMotifType* motifType, Bool_t warn) { -// Adds the specified motif type -// if the motif with this ID is not yet present. -// --- +/// Add the specified motif type +/// if the motif with this ID is not yet present. AliMpMotifType* found = FindMotifType(motifType->GetID()); if (found) { @@ -405,9 +409,8 @@ Bool_t AliMpMotifMap::AddMotifType(AliMpMotifType* motifType, Bool_t warn) //_____________________________________________________________________________ Bool_t AliMpMotifMap::AddMotifPosition(AliMpMotifPosition* motifPosition, Bool_t warn) { -// Adds the specified motif position -// if this position is not yet present. -// --- +/// Add the specified motif position +/// if this position is not yet present. AliMpMotifPosition* found = FindMotifPosition(motifPosition->GetID()); if (found) { @@ -441,8 +444,7 @@ Bool_t AliMpMotifMap::AddMotifPosition(AliMpMotifPosition* motifPosition, Bool_t //_____________________________________________________________________________ void AliMpMotifMap::FillMotifPositionMap2() { -// Fills the second map (by global indices) of motif positions. -// --- +/// Fill the second map (by global indices) of motif positions. #ifdef WITH_STL if (fMotifPositions2.size() > 0 ) { @@ -477,8 +479,7 @@ void AliMpMotifMap::FillMotifPositionMap2() //_____________________________________________________________________________ void AliMpMotifMap::Print(const char* /*option*/) const { -// Prints the motifs and motif types maps. -// --- +/// Print the motifs and motif types maps. PrintMotifs(); PrintMotifTypes(); @@ -489,8 +490,7 @@ void AliMpMotifMap::Print(const char* /*option*/) const //_____________________________________________________________________________ void AliMpMotifMap::PrintGlobalIndices(const char* fileName) const { -// Prints all the motifs positions and their global indices. -// --- +/// Print all the motifs positions and their global indices. ofstream out(fileName, ios::out); @@ -528,9 +528,8 @@ void AliMpMotifMap::PrintGlobalIndices(const char* fileName) const //_____________________________________________________________________________ void AliMpMotifMap::UpdateGlobalIndices(const char* fileName) { -// Updates the motifs positions global indices -// from the file. -// --- +/// Updates the motifs positions global indices +/// from the file. ifstream in(fileName, ios::in); @@ -572,8 +571,7 @@ void AliMpMotifMap::UpdateGlobalIndices(const char* fileName) //_____________________________________________________________________________ AliMpVMotif* AliMpMotifMap::FindMotif(const TString& motifID) const { -// Finds the motif with the specified ID. -// --- +/// Finds the motif with the specified ID. #ifdef WITH_STL MotifMapIterator i = fMotifs.find(motifID); @@ -597,12 +595,11 @@ AliMpVMotif* AliMpMotifMap::FindMotif(const TString& motifID, const TString& motifTypeID, const TVector2& padDimensions ) const { -// Finds the motif with the specified ID and returns it -// only if its motif type and motif dimensions agree -// with the given motifTypeID and motifDimensions. -// Disagreement causes fatal error. -// --- - +/// Finds the motif with the specified ID and returns it +/// only if its motif type and motif dimensions agree +/// with the given motifTypeID and motifDimensions. +/// Disagreement causes fatal error. + AliMpVMotif* motif = FindMotif(motifID); if (motif && motif->GetMotifType()->GetID() != motifTypeID) { @@ -640,8 +637,7 @@ AliMpVMotif* AliMpMotifMap::FindMotif(const TString& motifID, //_____________________________________________________________________________ AliMpMotifType* AliMpMotifMap::FindMotifType(const TString& motifTypeID) const { -// Finds the motif type with the specified motif type ID. -// --- +/// Find the motif type with the specified motif type ID. #ifdef WITH_STL MotifTypeMapIterator i = fMotifTypes.find(motifTypeID); @@ -664,8 +660,7 @@ AliMpMotifType* AliMpMotifMap::FindMotifType(const TString& motifTypeID) const AliMpMotifPosition* AliMpMotifMap::FindMotifPosition(Int_t motifPositionID) const { -// Finds the motif position with the specified motif position ID. -// --- +/// Find the motif position with the specified motif position ID. #ifdef WITH_STL MotifPositionMapIterator i = fMotifPositions.find(motifPositionID); @@ -689,9 +684,8 @@ AliMpMotifMap::FindMotifPosition(Int_t motifPositionID) const AliMpMotifPosition* AliMpMotifMap::FindMotifPosition(const AliMpIntPair& indices) const { -// Finds the last motif position which has the global indices (low limit) -// less then the indices specified. -// --- +/// Find the last motif position which has the global indices (low limit) +/// less then the indices specified. #ifdef WITH_STL MotifPositionMap2Iterator found diff --git a/MUON/mapping/AliMpMotifMap.h b/MUON/mapping/AliMpMotifMap.h index 0b0e7cfdf49..7d252c6ada8 100755 --- a/MUON/mapping/AliMpMotifMap.h +++ b/MUON/mapping/AliMpMotifMap.h @@ -1,12 +1,20 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: motif -// -// Class AliMpMotifMap -// ------------------- -// Class describing the motif map container, where motifs are -// mapped to their string IDs. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpMotifMap.h,v 1.7 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup motif +/// \class AliMpMotifMap +/// \brief Motif map containers + +/// The class defines: +/// - map of motif objects to their string IDs +/// - map of motif type objects to their string IDs +/// - map of motif position objects to their string IDs +/// - map of motif position objects to their global indices +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_MOTIF_MAP_H #define ALI_MP_MOTIF_MAP_H diff --git a/MUON/mapping/AliMpMotifPainter.cxx b/MUON/mapping/AliMpMotifPainter.cxx index 5e456ac60fb..8b6c3ec3590 100755 --- a/MUON/mapping/AliMpMotifPainter.cxx +++ b/MUON/mapping/AliMpMotifPainter.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpMotifPainter.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $ // Category: graphics // // Class AliMpMotifPainter @@ -25,7 +41,7 @@ AliMpMotifPainter::AliMpMotifPainter() : AliMpVPainter(), fMotifPos(0) { - // default dummy constructor + /// Default constructor } //_______________________________________________________________________ @@ -33,31 +49,35 @@ AliMpMotifPainter::AliMpMotifPainter(AliMpMotifPosition *motifPos) : AliMpVPainter(), fMotifPos(motifPos) { - // normal constructor + /// Standard constructor } //_____________________________________________________________________________ AliMpMotifPainter::AliMpMotifPainter(const AliMpMotifPainter& right) - : AliMpVPainter(right) { -// + : AliMpVPainter(right) +{ + /// Protected copy constructor (not provided) + Fatal("AliMpMotifPainter", "Copy constructor not provided."); } //_______________________________________________________________________ AliMpMotifPainter::~AliMpMotifPainter() { - // default dummy constructor + /// Default constructor } //_____________________________________________________________________________ AliMpMotifPainter& AliMpMotifPainter::operator=(const AliMpMotifPainter& right) { - // check assignement to self + /// Assignment operator (not provided) + + // check assignment to self if (this == &right) return *this; - Fatal("operator =", "Assignement operator not provided."); + Fatal("operator =", "Assignment operator not provided."); return *this; } @@ -65,30 +85,32 @@ AliMpMotifPainter::operator=(const AliMpMotifPainter& right) //_______________________________________________________________________ void AliMpMotifPainter::DumpObject() { -// Draw the owned object - fMotifPos->Dump(); +/// Dump the owned object + fMotifPos->Dump(); } //_______________________________________________________________________ TVector2 AliMpMotifPainter::GetPosition() const { -// Get the owned object's position - return fMotifPos->Position(); +/// Get the owned object's position + return fMotifPos->Position(); } + //_______________________________________________________________________ TVector2 AliMpMotifPainter::GetDimensions() const { -// Get the owned object's dimensions - return fMotifPos->Dimensions(); +/// Get the owned object's dimensions + return fMotifPos->Dimensions(); } //_______________________________________________________________________ void AliMpMotifPainter::Paint(Option_t *option) { -// Paint the object +/// Paint the object + AliMpGraphContext *gr = AliMpGraphContext::Instance(); if (!fMotifPos) return; Int_t col=gVirtualX->GetFillColor(); @@ -160,7 +182,9 @@ void AliMpMotifPainter::Paint(Option_t *option) if (option[1]=='T'){ Float_t textSize = gVirtualX->GetTextSize(); gVirtualX->SetTextSize(10); - gPad->PaintText(padPadPos.X()-0.01,padPadPos.Y()-0.01, + gVirtualX->SetTextAlign(22); + // gPad->PaintText(padPadPos.X()-0.01,padPadPos.Y()-0.01, + gPad->PaintText((bl.X()+ur.X())/2.0,(bl.Y()+ur.Y())/2.0, Form("%d",connect->GetGassiNum())); gVirtualX->SetTextSize(textSize); diff --git a/MUON/mapping/AliMpMotifPainter.h b/MUON/mapping/AliMpMotifPainter.h index e541330353f..8a330588083 100755 --- a/MUON/mapping/AliMpMotifPainter.h +++ b/MUON/mapping/AliMpMotifPainter.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: graphics -// -// Class AliMpMotifPainter -// ----------------------- -// Class for drawing a motif into canvas +// $MpId: AliMpMotifPainter.h,v 1.6 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup graphics +/// \class AliMpMotifPainter +/// \brief Class for drawing a motif into canvas // -// Authors: David Guez, IPN Orsay +/// Authors: David Guez, IPN Orsay #ifndef ALI_MP_MOTIF_PAINTER_H #define ALI_MP_MOTIF_PAINTER_H diff --git a/MUON/mapping/AliMpMotifPosition.cxx b/MUON/mapping/AliMpMotifPosition.cxx index d7eeb3827b8..598a30a40e4 100755 --- a/MUON/mapping/AliMpMotifPosition.cxx +++ b/MUON/mapping/AliMpMotifPosition.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpMotifPosition.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $ // // Class AliMpMotifPosition // ------------------------ @@ -11,6 +27,7 @@ #include "AliMpMotifPosition.h" #include "AliMpMotifPositionPadIterator.h" #include "AliMpMotifType.h" +#include ClassImp(AliMpMotifPosition) @@ -20,8 +37,9 @@ AliMpMotifPosition::AliMpMotifPosition(Int_t id, AliMpVMotif* motif, : AliMpVIndexed(), fID(id), fMotif(motif), - fPosition(position) { -// + fPosition(position) +{ +/// Standard constructor } //______________________________________________________________________________ @@ -29,20 +47,24 @@ AliMpMotifPosition::AliMpMotifPosition() : AliMpVIndexed(), fID(0), fMotif(0), - fPosition(TVector2(0.,0.)) { -// + fPosition(TVector2(0.,0.)) +{ +/// Default constructor } //_____________________________________________________________________________ AliMpMotifPosition::AliMpMotifPosition(const AliMpMotifPosition& right) - : AliMpVIndexed(right) { -// + : AliMpVIndexed(right) +{ +/// Protected copy constructor (not provided) + Fatal("AliMpMotifPosition", "Copy constructor not provided."); } //______________________________________________________________________________ -AliMpMotifPosition::~AliMpMotifPosition(){ -// +AliMpMotifPosition::~AliMpMotifPosition()\ +{ +/// Destructor } // operators @@ -51,10 +73,12 @@ AliMpMotifPosition::~AliMpMotifPosition(){ AliMpMotifPosition& AliMpMotifPosition::operator=(const AliMpMotifPosition& right) { - // check assignement to self +/// Protected assignment operator (not provided) + + // check assignment to self if (this == &right) return *this; - Fatal("operator =", "Assignement operator not provided."); + Fatal("operator =", "Assignment operator not provided."); return *this; } @@ -62,8 +86,7 @@ AliMpMotifPosition::operator=(const AliMpMotifPosition& right) //______________________________________________________________________________ AliMpVPadIterator* AliMpMotifPosition::CreateIterator() const { -// Iterator is not yet implemented. -// +/// Return motif position iterator return new AliMpMotifPositionPadIterator(this); } @@ -71,9 +94,8 @@ AliMpVPadIterator* AliMpMotifPosition::CreateIterator() const //______________________________________________________________________________ Bool_t AliMpMotifPosition::HasPad(const AliMpIntPair& indices) const { -// Returns true if pad with the specified indices exists in -// this motif position. -// --- +/// Return true if pad with the specified indices exists in +/// this motif position. if (!HasIndices(indices)) return kFALSE; @@ -82,3 +104,42 @@ Bool_t AliMpMotifPosition::HasPad(const AliMpIntPair& indices) const return fMotif->GetMotifType()->HasPad(indices-GetLowIndicesLimit()); } +//_____________________________________________________________________________ +void +AliMpMotifPosition::SetID(Int_t id) +{ +/// Set ID + + fID = id; +} + +//_____________________________________________________________________________ +void +AliMpMotifPosition::SetPosition(const TVector2& pos) +{ +/// Set position + + fPosition = pos; +} + +//_____________________________________________________________________________ +void +AliMpMotifPosition::Print(Option_t* option) const +{ +/// Printing + + std::cout << "MOTIFPOSITION " << GetID() << " MOTIF " + << GetMotif()->GetID() + << " at (" << Position().X() << "," + << Position().Y() << ") " + << " iMin=(" << GetLowIndicesLimit().GetFirst() + << "," << GetLowIndicesLimit().GetSecond() + << ") iMax=(" << GetHighIndicesLimit().GetFirst() + << "," << GetHighIndicesLimit().GetSecond() + << ")" << std::endl; + + if ( option && option[0] == 'M' ) + { + GetMotif()->Print(option+1); + } +} diff --git a/MUON/mapping/AliMpMotifPosition.h b/MUON/mapping/AliMpMotifPosition.h index 4a075e9359e..c5dc37c9975 100755 --- a/MUON/mapping/AliMpMotifPosition.h +++ b/MUON/mapping/AliMpMotifPosition.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: motif -// -// Class AliMpMotifPosition -// ------------------------ -// Class that represents a placed motif. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpMotifPosition.h,v 1.6 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup motif +/// \class AliMpMotifPosition +/// \brief A placed motif. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_MOTIF_POSITION_H #define ALI_MP_MOTIF_POSITION_H @@ -35,6 +38,13 @@ class AliMpMotifPosition : public AliMpVIndexed // Geometry TVector2 Position() const; TVector2 Dimensions() const; + + // Sets the ID (which is the MANU ID) + void SetID(Int_t id); + // Sets the position. + void SetPosition(const TVector2& pos); + + void Print(Option_t* option="") const; protected: AliMpMotifPosition(const AliMpMotifPosition& right); @@ -43,7 +53,7 @@ class AliMpMotifPosition : public AliMpVIndexed private: // methods // data members - Int_t fID; //identifier + Int_t fID; //identifier=manu id AliMpVMotif* fMotif; //motif TVector2 fPosition; //position diff --git a/MUON/mapping/AliMpMotifPositionPadIterator.cxx b/MUON/mapping/AliMpMotifPositionPadIterator.cxx index c11fab71fbb..c14317ce99f 100755 --- a/MUON/mapping/AliMpMotifPositionPadIterator.cxx +++ b/MUON/mapping/AliMpMotifPositionPadIterator.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpMotifPositionPadIterator.cxx,v 1.5 2005/08/26 15:43:36 ivana Exp $ // Category: motif // // Class AliMpMotifPositionPadIterator @@ -20,7 +36,7 @@ AliMpMotifPositionPadIterator::AliMpMotifPositionPadIterator(): fMotifPos(0), fIterator() { -// default constructor, set the current position to "invalid" +/// Default constructor, set the current position to "invalid" } //______________________________________________________________________________ @@ -31,7 +47,7 @@ AliMpMotifPositionPadIterator::AliMpMotifPositionPadIterator( fMotifPos(motifPos), fIterator(motifPos->GetMotif()->GetMotifType()) { -// normal constructor, let *this to invalid position +/// Standard constructor, let *this to invalid position } //______________________________________________________________________________ @@ -42,13 +58,13 @@ AliMpMotifPositionPadIterator::AliMpMotifPositionPadIterator( fIterator(right.fIterator) { -// copy constructor +/// Copy constructor } //______________________________________________________________________________ AliMpMotifPositionPadIterator::~AliMpMotifPositionPadIterator() { -// destructor +/// Destructor } // operators @@ -57,14 +73,15 @@ AliMpMotifPositionPadIterator::~AliMpMotifPositionPadIterator() AliMpMotifPositionPadIterator& AliMpMotifPositionPadIterator::operator = (const AliMpMotifPositionPadIterator& right) { -// assignement operator +/// Assignment operator + // if the right hand iterator isn't of good type // the current operator is invalidated - // check assignement to self + // check assignment to self if (this == &right) return *this; - // base class assignement + // base class assignment AliMpVPadIterator::operator=(right); fMotifPos = right.fMotifPos; @@ -79,18 +96,20 @@ AliMpMotifPositionPadIterator::operator = (const AliMpMotifPositionPadIterator& //______________________________________________________________________________ Bool_t AliMpMotifPositionPadIterator::IsValid() const { -// Is the iterator in a valid position? +/// Is the iterator in a valid position? return (fMotifPos!=0) && (!fIterator.IsDone()); } -//public methods +// +// public methods +// //______________________________________________________________________________ void AliMpMotifPositionPadIterator::First() { -// Reset the iterator, so that it points to the first available -// pad in the motif type +/// Reset the iterator, so that it points to the first available +/// pad in the motif type if (!fMotifPos) { Invalidate(); @@ -104,21 +123,23 @@ void AliMpMotifPositionPadIterator::First() //______________________________________________________________________________ void AliMpMotifPositionPadIterator::Next() { -// Move the iterator to the next valid pad. +/// Move the iterator to the next valid pad. + fIterator.Next(); } //______________________________________________________________________________ Bool_t AliMpMotifPositionPadIterator::IsDone() const { -// +/// Is the iterator in the end? + return !IsValid(); } //______________________________________________________________________________ AliMpPad AliMpMotifPositionPadIterator::CurrentItem() const { -// Returns current pad. +/// Return current pad. if (!fMotifPos) return AliMpPad::Invalid(); @@ -137,7 +158,8 @@ AliMpPad AliMpMotifPositionPadIterator::CurrentItem() const //______________________________________________________________________________ void AliMpMotifPositionPadIterator::Invalidate() { -// Let the iterator points to the invalid position +/// Let the iterator point to the invalid position + fIterator.Invalidate(); } diff --git a/MUON/mapping/AliMpMotifPositionPadIterator.h b/MUON/mapping/AliMpMotifPositionPadIterator.h index aa5d019c572..dd4f969bdb8 100755 --- a/MUON/mapping/AliMpMotifPositionPadIterator.h +++ b/MUON/mapping/AliMpMotifPositionPadIterator.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: motif -// -// Class AliMpMotifPositionPadIterator -// ----------------------------------- -// Class, which defines an iterator over the pads of a given motif type -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpMotifPositionPadIterator.h,v 1.5 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup motif +/// \class AliMpMotifPositionPadIterator +/// \brief An iterator over the pads of a given motif position +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_MOTIF_POSITION_PAD_ITERATOR_H #define ALI_MP_MOTIF_POSITION_PAD_ITERATOR_H diff --git a/MUON/mapping/AliMpMotifSpecial.cxx b/MUON/mapping/AliMpMotifSpecial.cxx index a60a01bc1c1..3d90d9fbcf0 100755 --- a/MUON/mapping/AliMpMotifSpecial.cxx +++ b/MUON/mapping/AliMpMotifSpecial.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpMotifSpecial.cxx,v 1.8 2005/08/26 15:43:36 ivana Exp $ // Category: motif // // Class AliMpMotifSpecial @@ -18,24 +34,13 @@ ClassImp(AliMpMotifSpecial) -// private methods -//______________________________________________________________________________ -Int_t AliMpMotifSpecial::VectorIndex(const AliMpIntPair& indices) const -{ -// transform indices to linear vector index - return indices.GetFirst()*GetMotifType()->GetNofPadsY() + indices.GetSecond(); -} - - -//public methods - //______________________________________________________________________________ AliMpMotifSpecial::AliMpMotifSpecial(): AliMpVMotif(), fPadDimensionsVector(), fPadDimensionsVector2() { - //default dummy constructor + /// Default constructor } @@ -47,7 +52,7 @@ AliMpMotifSpecial::AliMpMotifSpecial(const TString &id, fPadDimensionsVector2() { - // Normal constructor. + /// Standard constructor. #ifdef WITH_STL fPadDimensionsVector.resize(motifType->GetNofPadsX()*motifType->GetNofPadsY()); @@ -61,7 +66,7 @@ AliMpMotifSpecial::AliMpMotifSpecial(const TString &id, //______________________________________________________________________________ AliMpMotifSpecial::~AliMpMotifSpecial() { - //destructor + /// Destructor #ifdef WITH_ROOT fPadDimensionsVector.Delete(); @@ -69,11 +74,29 @@ AliMpMotifSpecial::~AliMpMotifSpecial() } +// +// private methods +// + +//______________________________________________________________________________ +Int_t AliMpMotifSpecial::VectorIndex(const AliMpIntPair& indices) const +{ +/// Transform indices to linear vector index + + return indices.GetFirst()*GetMotifType()->GetNofPadsY() + indices.GetSecond(); +} + + +// +// public methods +// + //______________________________________________________________________________ TVector2 AliMpMotifSpecial::GetPadDimensions(const AliMpIntPair& localIndices) const { -// returns the dimensions of pad located at the given indices +/// Return the dimensions of pad located at the given indices + if (GetMotifType()->HasPad(localIndices)) #ifdef WITH_STL return fPadDimensionsVector[VectorIndex(localIndices)]; @@ -90,7 +113,7 @@ AliMpMotifSpecial::GetPadDimensions(const AliMpIntPair& localIndices) const //______________________________________________________________________________ Int_t AliMpMotifSpecial::GetNofPadDimensions() const { -// returns number of different pad dimensions in this motif +/// Return number of different pad dimensions in this motif #ifdef WITH_STL return fPadDimensionsVector2.size(); @@ -104,7 +127,7 @@ Int_t AliMpMotifSpecial::GetNofPadDimensions() const //______________________________________________________________________________ TVector2 AliMpMotifSpecial::GetPadDimensions(Int_t i) const { -// returns the i-th different pad dimensions +/// Returns the i-th different pad dimensions if (i<0 || i>GetNofPadDimensions()) { Fatal("GetPadDimensions(i)", "Index outside limits."); @@ -123,7 +146,7 @@ TVector2 AliMpMotifSpecial::GetPadDimensions(Int_t i) const //______________________________________________________________________________ TVector2 AliMpMotifSpecial::Dimensions() const { - // gives the dimension of the motif + /// Give the dimension of the motif Int_t i,j; @@ -155,8 +178,8 @@ TVector2 AliMpMotifSpecial::Dimensions() const TVector2 AliMpMotifSpecial::PadPositionLocal(const AliMpIntPair& localIndices) const { - // gives the local position of the pad number (ix,iy) - // (0,0 is the center of the motif) + /// Give the local position of the pad number (ix,iy) + /// (0,0 is the center of the motif) TVector2 dim = GetPadDimensions(localIndices); @@ -176,13 +199,13 @@ AliMpMotifSpecial::PadPositionLocal(const AliMpIntPair& localIndices) const //______________________________________________________________________________ AliMpIntPair AliMpMotifSpecial::PadIndicesLocal(const TVector2& localPos) const { - // return the pad indices from a given local position - // or AliMpIntPair::Invalid() if this position doesn't correspond to any valid - // connection - - // *SOLEIL* : This code suppose that - // 1) all cells have the same size along the Y direction - // 2) the column 0 is entierly filled + /// Return the pad indices from a given local position + /// or AliMpIntPair::Invalid() if this position doesn't correspond to any valid + /// connection + /// + /// *SOLEIL* : This code suppose that + /// - 1) all cells have the same size along the Y direction + /// - 2) the column 0 is entierly filled // First : find the j index @@ -230,8 +253,8 @@ AliMpIntPair AliMpMotifSpecial::PadIndicesLocal(const TVector2& localPos) const void AliMpMotifSpecial::SetPadDimensions(const AliMpIntPair& localIndices, const TVector2& dimensions) { - // set the dimensions of the pad located at to the given - // + /// Set the dimensions of the pad located at to the given + /// if ( !GetMotifType()->HasPad(localIndices)){ Warning("SetPadDimensions","Pad indices outside limits"); diff --git a/MUON/mapping/AliMpMotifSpecial.h b/MUON/mapping/AliMpMotifSpecial.h index 8b86c81b44b..9675891db0e 100755 --- a/MUON/mapping/AliMpMotifSpecial.h +++ b/MUON/mapping/AliMpMotifSpecial.h @@ -1,12 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: motif -// -// Class AliMpMotifSpecial -// ----------------------- -// Class that defines a motif with its unique ID -// and the motif type. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpMotifSpecial.h,v 1.6 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup motif +/// \class AliMpMotifSpecial +/// \brief A special motif with varying pad dimensions +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_MOTIF_SPECIAL_H #define ALI_MP_MOTIF_SPECIAL_H diff --git a/MUON/mapping/AliMpMotifType.cxx b/MUON/mapping/AliMpMotifType.cxx index e98c70ce21a..ab34b97e9be 100755 --- a/MUON/mapping/AliMpMotifType.cxx +++ b/MUON/mapping/AliMpMotifType.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpMotifType.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $ // Category: motif // // Class AliMpMotifType @@ -31,7 +47,7 @@ AliMpMotifType::AliMpMotifType(const TString &id) fVerboseLevel(0), fConnections() { - // Constructor + /// Standard constructor } //______________________________________________________________________________ @@ -43,12 +59,13 @@ AliMpMotifType::AliMpMotifType() fVerboseLevel(0), fConnections() { - // Default constructor (dummy) + /// Default constructor } //______________________________________________________________________________ -AliMpMotifType::~AliMpMotifType() { -// Destructor +AliMpMotifType::~AliMpMotifType() +{ +/// Destructor #ifdef WITH_STL for(ConnectionMapCIterator i = fConnections.begin(); @@ -66,11 +83,11 @@ AliMpMotifType::~AliMpMotifType() { } #ifdef WITH_ROOT + //______________________________________________________________________________ Int_t AliMpMotifType::GetIndex(const AliMpIntPair& pair) const { -// Converts the pair of integers to integer. -// --- +/// Convert the pair of integers to integer. if (pair.GetFirst() >= fgkSeparator || pair.GetSecond() >= fgkSeparator) Fatal("GetIndex", "Index out of limit."); @@ -81,8 +98,7 @@ Int_t AliMpMotifType::GetIndex(const AliMpIntPair& pair) const //______________________________________________________________________________ AliMpIntPair AliMpMotifType::GetPair(Int_t index) const { -// Converts the integer index to the pair of integers. -// --- +/// Convert the integer index to the pair of integers. return AliMpIntPair((index-1)/fgkSeparator,(index-1)%fgkSeparator); } @@ -91,13 +107,15 @@ AliMpIntPair AliMpMotifType::GetPair(Int_t index) const //______________________________________________________________________________ AliMpVPadIterator* AliMpMotifType::CreateIterator() const { +/// Create new motif type iterator + return new AliMpMotifTypePadIterator(this); } //______________________________________________________________________________ void AliMpMotifType::SetNofPads(Int_t nofPadsX, Int_t nofPadsY) { - // Change the number of pads in this motif + /// Change the number of pads in this motif fNofPadsX = nofPadsX; fNofPadsY = nofPadsY; @@ -107,7 +125,8 @@ void AliMpMotifType::SetNofPads(Int_t nofPadsX, Int_t nofPadsY) //______________________________________________________________________________ Int_t AliMpMotifType::PadNum(const TString &padName) const { - // Transform a pad name into the equivalent pad number + /// Transform a pad name into the equivalent pad number + if ( (padName[0]>='A') && (padName[0]<='Z') ) return fgkPadNumForA+padName[0]-'A'; else @@ -117,7 +136,8 @@ Int_t AliMpMotifType::PadNum(const TString &padName) const //______________________________________________________________________________ TString AliMpMotifType::PadName(Int_t padNum) const { - // Transform a pad number into its equivalent pad name + /// Transform a pad number into its equivalent pad name + if (padNum has a connection + /// Return true if the pad indexed by has a connection + if (!localIndices.IsValid()) return false; #ifdef WITH_STL @@ -398,16 +428,16 @@ Bool_t AliMpMotifType::HasPad(const AliMpIntPair& localIndices) const //______________________________________________________________________________ void AliMpMotifType::Print(Option_t *option) const { - // Print the map of the motif. In each cel, the value - // printed depends of option, as the following: - // option="N" the "name" of the pad is written - // option="K" the Kapton connect. number attached to the pad is written - // option="B" the Berg connect. number attached to the pad is written - // option="G" the Gassiplex channel number attached to the pad is written - // otherwise the number of the pad is written - - // NOTE : this method is really not optimized, in case 'N' or '', - // but the Print() this should not be very important in a Print() method + /// Print the map of the motif. In each cell, the value + /// printed depends of option, as the following: + /// - option="N" the "name" of the pad is written + /// - option="K" the Kapton connect. number attached to the pad is written + /// - option="B" the Berg connect. number attached to the pad is written + /// - option="G" the Gassiplex channel number attached to the pad is written + /// otherwise the number of the pad is written + /// + /// NOTE : this method is really not optimized, in case 'N' or '', + /// but the Print() this should not be very important in a Print() method switch (option[0]){ case 'N':cout<<"Name mapping"; diff --git a/MUON/mapping/AliMpMotifType.h b/MUON/mapping/AliMpMotifType.h index cf80de17abd..b0b30873ae3 100755 --- a/MUON/mapping/AliMpMotifType.h +++ b/MUON/mapping/AliMpMotifType.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: motif -// -// Class AliMpMotifType -// -------------------- -// Class that defines the motif properties. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpMotifType.h,v 1.7 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup motif +/// \class AliMpMotifType +/// \brief Class that defines the motif properties. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_MOTIF_TYPE_H #define ALI_MP_MOTIF_TYPE_H diff --git a/MUON/mapping/AliMpMotifTypePadIterator.cxx b/MUON/mapping/AliMpMotifTypePadIterator.cxx index 05ca6499fda..7fee81d76ce 100755 --- a/MUON/mapping/AliMpMotifTypePadIterator.cxx +++ b/MUON/mapping/AliMpMotifTypePadIterator.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpMotifTypePadIterator.cxx,v 1.5 2005/08/26 15:43:36 ivana Exp $ // Category: motif // // Class AliMpMotifTypePadIterator @@ -18,7 +34,7 @@ AliMpMotifTypePadIterator::AliMpMotifTypePadIterator(): fMotifType(0), fCurrentPosition(AliMpIntPair::Invalid()) { -// default constructor, set the current position to "invalid" +/// Default constructor, set the current position to "invalid" } //______________________________________________________________________________ @@ -28,7 +44,7 @@ AliMpMotifTypePadIterator::AliMpMotifTypePadIterator( fMotifType(motifType), fCurrentPosition(AliMpIntPair::Invalid()) { -// normal constructor, let *this to invalid position +/// Standard constructor, let *this to invalid position } //______________________________________________________________________________ @@ -39,13 +55,13 @@ AliMpMotifTypePadIterator::AliMpMotifTypePadIterator( fCurrentPosition(right.fCurrentPosition) { -// copy constructor +/// Copy constructor } //______________________________________________________________________________ AliMpMotifTypePadIterator::~AliMpMotifTypePadIterator() { -// destructor +/// Destructor } // operators @@ -54,14 +70,14 @@ AliMpMotifTypePadIterator::~AliMpMotifTypePadIterator() AliMpMotifTypePadIterator& AliMpMotifTypePadIterator::operator = (const AliMpMotifTypePadIterator& right) { -// assignement operator -// if the right hand iterator isn't of good type -// the current operator is invalidated +/// Assignment operator. \n +/// If the right hand iterator isn't of good type +/// the current operator is invalidated - // check assignement to self + // check assignment to self if (this == &right) return *this; - // base class assignement + // base class assignment AliMpVPadIterator::operator=(right); fMotifType = right.fMotifType; @@ -78,9 +94,9 @@ AliMpMotifTypePadIterator::operator = (const AliMpMotifTypePadIterator& right) AliMpIntPair AliMpMotifTypePadIterator::FindFirstPadInLine(AliMpIntPair indices) const { -// Find the indices of the first pad in the same line -// as the , and in column, at least equal, to the -// one of +/// Find the indices of the first pad in the same line +/// as the , and in column, at least equal, to the +/// one of if (!fMotifType) return AliMpIntPair::Invalid(); @@ -94,7 +110,7 @@ AliMpMotifTypePadIterator::FindFirstPadInLine(AliMpIntPair indices) const //______________________________________________________________________________ Bool_t AliMpMotifTypePadIterator::IsValid() const { -// Is the iterator in a valid position? +/// Is the iterator in a valid position? return fMotifType!=0 && fCurrentPosition.IsValid(); } @@ -106,8 +122,8 @@ Bool_t AliMpMotifTypePadIterator::IsValid() const //______________________________________________________________________________ void AliMpMotifTypePadIterator::First() { -// Reset the iterator, so that it points to the first available -// pad in the motif type +/// Reset the iterator, so that it points to the first available +/// pad in the motif type if (!fMotifType) { Invalidate(); @@ -128,7 +144,7 @@ void AliMpMotifTypePadIterator::First() //______________________________________________________________________________ void AliMpMotifTypePadIterator::Next() { -// Move the iterator to the next valid pad. +/// Move the iterator to the next valid pad. //if (!IsValid()) return *this; if (!IsValid()) return; @@ -152,14 +168,15 @@ void AliMpMotifTypePadIterator::Next() //______________________________________________________________________________ Bool_t AliMpMotifTypePadIterator::IsDone() const { -// +/// Is the iterator in the end ? + return !IsValid(); } //______________________________________________________________________________ AliMpPad AliMpMotifTypePadIterator::CurrentItem() const { -// Returns current pad. +/// Return current pad. if (!fMotifType) return AliMpPad::Invalid(); @@ -171,7 +188,8 @@ AliMpPad AliMpMotifTypePadIterator::CurrentItem() const //______________________________________________________________________________ void AliMpMotifTypePadIterator::Invalidate() { -// Let the iterator points to the invalid position +/// Let the iterator point to the invalid position + fCurrentPosition = AliMpIntPair::Invalid(); } diff --git a/MUON/mapping/AliMpMotifTypePadIterator.h b/MUON/mapping/AliMpMotifTypePadIterator.h index e63c8e7bb40..4a23f92cc1f 100755 --- a/MUON/mapping/AliMpMotifTypePadIterator.h +++ b/MUON/mapping/AliMpMotifTypePadIterator.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: motif -// -// Class AliMpMotifTypePadIterator -// ------------------------------- -// Class, which defines an iterator over the pads of a given motif type -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpMotifTypePadIterator.h,v 1.5 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup motif +/// \class AliMpMotifTypePadIterator +/// \brief An iterator over the pads of a given motif type +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_MOTIF_TYPE_PAD_ITERATOR_H #define ALI_MP_MOTIF_TYPE_PAD_ITERATOR_H diff --git a/MUON/mapping/AliMpMotifTypes.h b/MUON/mapping/AliMpMotifTypes.h index 3653ce6c6db..b815e5a208f 100644 --- a/MUON/mapping/AliMpMotifTypes.h +++ b/MUON/mapping/AliMpMotifTypes.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: motif -// -// AliMpMotifTypes -// --------------- -// Sytem dependent types definitions for motif category. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpMotifTypes.h,v 1.7 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup motif +/// AliMpMotifTypes +/// Sytem dependent types definitions for motif category. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_MOTIF_TYPES_H #define ALI_MP_MOTIF_TYPES_H @@ -44,6 +47,8 @@ class AliMpMotifPosition; typedef MotiPositionMap::const_iterator MotifPositionMapIterator; typedef map MotifPositionMap2; typedef MotifPositionMap2::const_iterator MotifPositionMap2Iterator; + typedef map > PadMapType; + typedef PadMapType::iterator PadMapTypeIterator; typedef vector DimensionsMap; #else typedef std::map< AliMpIntPair, AliMpConnection* > ConnectionMap_t; @@ -56,6 +61,8 @@ class AliMpMotifPosition; typedef MotiPositionMap::const_iterator MotifPositionMapIterator; typedef std::map MotifPositionMap2; typedef MotifPositionMap2::const_iterator MotifPositionMap2Iterator; + typedef std::map > PadMapType; + typedef PadMapType::iterator PadMapTypeIterator; typedef std::vector< TVector2 > DimensionsMap; #endif #endif @@ -71,6 +78,8 @@ class AliMpMotifPosition; typedef TExMapIter MotifPositionMapIterator; typedef TExMap MotifPositionMap2; typedef TExMapIter MotifPositionMap2Iterator; + typedef TExMap PadMapType; + typedef TExMapIter PadMapTypeIterator; typedef TObjArray DimensionsMap; #endif diff --git a/MUON/mapping/AliMpNeighboursPadIterator.cxx b/MUON/mapping/AliMpNeighboursPadIterator.cxx index 2dc978a5b6a..42c3f033806 100755 --- a/MUON/mapping/AliMpNeighboursPadIterator.cxx +++ b/MUON/mapping/AliMpNeighboursPadIterator.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpNeighboursPadIterator.cxx,v 1.8 2005/08/26 15:43:36 ivana Exp $ // Category: sector // // Class AliMpNeighboursPadIterator @@ -28,7 +44,7 @@ AliMpNeighboursPadIterator::AliMpNeighboursPadIterator() fPads(), fIndex(fgkInvalidIndex) { -// default constructor, set the current position to "invalid" +/// Default constructor, set the current position to "invalid" } //______________________________________________________________________________ @@ -41,7 +57,7 @@ AliMpNeighboursPadIterator::AliMpNeighboursPadIterator( fCenterPad(centerPad), fIndex(fgkInvalidIndex) { -// normal constructor, set *this to invalid position +/// Standard constructor, set *this to invalid position FillPadsVector(includeCenter); } @@ -51,7 +67,7 @@ AliMpNeighboursPadIterator::AliMpNeighboursPadIterator( const AliMpNeighboursPadIterator& right) : AliMpVPadIterator(right) { -// copy constructor +/// Copy constructor *this = right; } @@ -59,7 +75,7 @@ AliMpNeighboursPadIterator::AliMpNeighboursPadIterator( //______________________________________________________________________________ AliMpNeighboursPadIterator::~AliMpNeighboursPadIterator() { -// destructor +/// Destructor #ifdef WITH_ROOT fPads.Delete(); @@ -72,14 +88,15 @@ AliMpNeighboursPadIterator::~AliMpNeighboursPadIterator() AliMpNeighboursPadIterator& AliMpNeighboursPadIterator::operator = (const AliMpNeighboursPadIterator& right) { -// assignement operator -// if the right hand iterator isn't of good type -// the current operator is invalidated +/// Assignment operator. \n +/// If the right hand iterator isn't of a good type +/// the current operator is invalidated \n +/// Not provided for WITH_ROOT option. - // check assignement to self + // check assignment to self if (this == &right) return *this; - // base class assignement + // base class assignment AliMpVPadIterator::operator=(right); #ifdef WITH_STL @@ -95,13 +112,15 @@ AliMpNeighboursPadIterator::operator = (const AliMpNeighboursPadIterator& right) return *this; } -//private methods +// +// private methods +// //______________________________________________________________________________ Bool_t AliMpNeighboursPadIterator::IsNeighbours(const AliMpPad& pad) const { -// true if the pad located by is a neighbours of those -// located at +/// Return true if the pad located by is a neighbour of those +/// located at TVector2 relPos = pad.Position() - fCenterPad.Position(); @@ -116,9 +135,9 @@ Bool_t AliMpNeighboursPadIterator::IsNeighbours(const AliMpPad& pad) const PadVector AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from, const AliMpIntPair& direction) const { -// Fill a new vector with all pads which have common -// parts with the pad located at , in a given line -// starting from and moving by +/// Fill a new vector with all pads which have common +/// parts with the pad located at , in a given line +/// starting from and moving by AliMpPad current = from; PadVector ans; @@ -140,8 +159,8 @@ PadVector AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from, void AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal, const PadVector& from) const { -// Add pads from pad vector to the total set -// only if they are not yet included +/// Add pads from pad vector to the total set +/// only if they are not yet included setTotal.insert(from.begin(),from.end()); } @@ -152,9 +171,9 @@ void AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal, PadVector* AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from, const AliMpIntPair& direction) const { -// Fill a new vector with all pads which have common -// parts with the pad located at , in a given line -// starting from and moving by +/// Fill a new vector with all pads which have common +/// parts with the pad located at , in a given line +/// starting from and moving by AliMpPad current = from; PadVector* ans = new PadVector(); @@ -176,8 +195,8 @@ PadVector* AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from, void AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal, PadVector* from) const { -// Add pads from pad vector to the total set -// only if they are not yet included and deletes the pad vector +/// Add pads from pad vector to the total set +/// only if they are not yet included and deletes the pad vector for (Int_t i=0; iGetEntriesFast(); i++) { AliMpPad* candidate = (AliMpPad*)from->At(i); @@ -204,8 +223,8 @@ void AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal, //______________________________________________________________________________ void AliMpNeighboursPadIterator::FillPadsVector(Bool_t includeCenter) { -// Fill the indices vector with all indices of pads which have common -// parts with the pad located at +/// Fill the indices vector with all indices of pads which have common +/// parts with the pad located at if (!fkSegmentation || !fCenterPad.IsValid()) return; @@ -314,7 +333,8 @@ void AliMpNeighboursPadIterator::FillPadsVector(Bool_t includeCenter) //______________________________________________________________________________ Bool_t AliMpNeighboursPadIterator::IsValid() const { -// Is the iterator in a valid position? +/// Is the iterator in a valid position? + return (fkSegmentation!=0 && fIndex!=fgkInvalidIndex); } @@ -323,8 +343,8 @@ Bool_t AliMpNeighboursPadIterator::IsValid() const //______________________________________________________________________________ void AliMpNeighboursPadIterator::First() { -// Reset the iterator, so that it points to the first available -// pad in the sector +/// Reset the iterator, so that it points to the first available +/// pad in the sector #ifdef WITH_STL if ((fkSegmentation != 0) && (fPads.size() != 0)) @@ -341,8 +361,8 @@ void AliMpNeighboursPadIterator::First() //______________________________________________________________________________ void AliMpNeighboursPadIterator::Next() { -// pre-increment operator. Should be used by default for iterating over -// pads +/// Pre-increment operator. Should be used by default for iterating over +/// pads if (!IsValid()) return; @@ -361,14 +381,16 @@ void AliMpNeighboursPadIterator::Next() //______________________________________________________________________________ Bool_t AliMpNeighboursPadIterator::IsDone() const { -// +/// Is the iterator in the end? + return !IsValid(); } //______________________________________________________________________________ AliMpPad AliMpNeighboursPadIterator::CurrentItem() const { -// dereferencement operator +/// Dereferencement function + if (!IsValid()) return AliMpPad::Invalid(); else @@ -383,7 +405,8 @@ AliMpPad AliMpNeighboursPadIterator::CurrentItem() const //______________________________________________________________________________ void AliMpNeighboursPadIterator::Invalidate() { -// Let the iterator points to the invalid position +/// Let the iterator point to the invalid position + fIndex=fgkInvalidIndex; } diff --git a/MUON/mapping/AliMpNeighboursPadIterator.h b/MUON/mapping/AliMpNeighboursPadIterator.h index bbd6fbde082..7995ab7ca20 100755 --- a/MUON/mapping/AliMpNeighboursPadIterator.h +++ b/MUON/mapping/AliMpNeighboursPadIterator.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: sector -// -// Class AliMpNeighboursPadIterator -// -------------------------------- -// Class, which defines an iterator over the pads surrounding a given pad -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpNeighboursPadIterator.h,v 1.7 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup sector +/// \class AliMpNeighboursPadIterator +/// \brief An iterator over the pads surrounding a given pad +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_NEIGHBOURS_PAD_ITERATOR_H #define ALI_MP_NEIGHBOURS_PAD_ITERATOR_H diff --git a/MUON/mapping/AliMpPCB.cxx b/MUON/mapping/AliMpPCB.cxx new file mode 100644 index 00000000000..9401ea9323a --- /dev/null +++ b/MUON/mapping/AliMpPCB.cxx @@ -0,0 +1,569 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpPCB.cxx,v 1.3 2005/09/19 19:01:31 ivana Exp $ + +#include "AliMpPCB.h" + +#include "AliMpMotif.h" +#include "AliMpMotifPosition.h" +#include "AliMpMotifType.h" +#include "AliLog.h" + +#include "Riostream.h" +#include + +ClassImp(AliMpPCB) + +//_____________________________________________________________________________ +AliMpPCB::AliMpPCB() + : TObject(), fId(""), + fPadSizeX(0), fPadSizeY(0), + fEnveloppeSizeX(0), fEnveloppeSizeY(0), + fXoffset(0), + fActiveXmin(0), fActiveXmax(0), + fIxmin(99999), fIxmax(0), fIymin(99999), fIymax(0) +{ + // + // Default ctor. + // +} + +//_____________________________________________________________________________ +AliMpPCB::AliMpPCB(const char* id, Double_t padSizeX, Double_t padSizeY, + Double_t enveloppeSizeX, Double_t enveloppeSizeY) + : TObject(), fId(id), + fPadSizeX(padSizeX), fPadSizeY(padSizeY), + fEnveloppeSizeX(enveloppeSizeX), fEnveloppeSizeY(enveloppeSizeY), + fXoffset(0), + fActiveXmin(0), fActiveXmax(0), + fIxmin(99999), fIxmax(0), fIymin(99999), fIymax(0) +{ + // + // Normal ctor. Must be fed with the PCB's name (id), the pad dimensions + // and the global dimension of the virtual enveloppe of the PCB + // (usually 400x400 mm) +} + +//_____________________________________________________________________________ +AliMpPCB::AliMpPCB(const AliMpPCB& o) + : TObject(o), + fPadSizeX(0), fPadSizeY(0), + fEnveloppeSizeX(0), fEnveloppeSizeY(0), + fXoffset(0), + fActiveXmin(0), fActiveXmax(0), + fIxmin(0), fIxmax(0), fIymin(0), fIymax(0) +{ + o.Copy(*this); +} + +//_____________________________________________________________________________ +AliMpPCB& +AliMpPCB::operator=(const AliMpPCB& o) +{ + o.Copy(*this); + return *this; +} + +//_____________________________________________________________________________ +AliMpPCB::~AliMpPCB() +{ + // + // Dtor. + // +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::ActiveXmin() const +{ + // + // Returns the mininum x for which there is a pad in this PCB. + // Different from Xmin only for PCB which are not full of pads. + // + + return fActiveXmin; +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::ActiveXmax() const +{ + // + // Returns the maximum x for which there is a pad in this PCB. + // Different from Xmax only for PCB which are not full of pads. + // + + return fActiveXmax; +} + +//_____________________________________________________________________________ +void +AliMpPCB::Add(AliMpMotifType* mt, Int_t ix, Int_t iy) +{ + // + // Add a motif to this PCB. (ix,iy) is the lower-left position of the motif. + // + + AliMpVMotif* motif = + new AliMpMotif(mt->GetID(),mt,TVector2(PadSizeX()/2.0,PadSizeY()/2.0)); + TVector2 position(ix*PadSizeX(),iy*PadSizeY()); + position += motif->Dimensions(); + + AliMpMotifPosition* mp = new AliMpMotifPosition(-1,motif,position); + Int_t ixmin = ix; + Int_t iymin = iy; + Int_t ixmax = ix + mt->GetNofPadsX() - 1; + Int_t iymax = iy + mt->GetNofPadsY() - 1; + + mp->SetLowIndicesLimit(AliMpIntPair(ixmin,iymin)); + mp->SetHighIndicesLimit(AliMpIntPair(ixmax,iymax)); + +#ifdef WITH_ROOT + fMotifs.AddLast(mp); +#else + fMotifs.push_back(mp); +#endif + + fIxmin = std::min(fIxmin,ixmin); + fIxmax = std::max(fIxmax,ixmax); + fIymin = std::min(fIymin,iymin); + fIymax = std::max(fIymax,iymax); + + fActiveXmin = fIxmin*PadSizeX(); + fActiveXmax = (fIxmax+1)*PadSizeX(); +} + +//_____________________________________________________________________________ +TObject* +AliMpPCB::Clone(const char* /*newname*/) const +{ + // + // Return a full copy of this object. + // + return new AliMpPCB(*this); +} + +//_____________________________________________________________________________ +AliMpPCB* +AliMpPCB::Clone(const TArrayI& manuids, Int_t ixOffset, Double_t xOffset) const +{ + // + // Get a full copy of *this, and then apply 2 changes to it : + // + // a) define the relationship motifType <-> manu id + // b) define the x-offset + // c) shift ix indices backwards to insure that e.g. the first + // pcb of a slat will start at ix=0 (only relevant for rounded pcbs). + // + + // First get a full clone. + AliMpPCB* pcb = static_cast(Clone()); + + if ( pcb->GetSize() != manuids.GetSize() ) + { + AliError(Form("Cannot Clone because I do not get the correct number of " + "manu ids (got %d, wanted %d)", + manuids.GetSize(),pcb->GetSize())); + return 0; + } + + AliMpIntPair shift(-fIxmin,0); + + // Then change the internal MotifPositions wrt manu id + // and position (offset in x). + for ( Size_t i = 0; i < pcb->GetSize(); ++i ) + { + AliMpMotifPosition* mp = pcb->GetMotifPosition(i); + mp->SetID(manuids[i]); + mp->SetPosition(mp->Position() + TVector2(xOffset,0)); + mp->SetLowIndicesLimit(mp->GetLowIndicesLimit()+ + shift+ + AliMpIntPair(ixOffset,0)); + mp->SetHighIndicesLimit(mp->GetHighIndicesLimit()+ + shift+ + AliMpIntPair(ixOffset,0)); + } + + pcb->fIxmin += ixOffset + shift.GetFirst(); + pcb->fIxmax += ixOffset + shift.GetFirst(); + pcb->fXoffset = xOffset; + + pcb->fActiveXmin += xOffset; + pcb->fActiveXmax += xOffset; + + return pcb; +} + +//_____________________________________________________________________________ +void +AliMpPCB::Copy(TObject& o) const +{ + TObject::Copy(o); + AliMpPCB& pcb = static_cast(o); + pcb.fId = fId; + pcb.fPadSizeX = fPadSizeX; + pcb.fPadSizeY = fPadSizeY; + pcb.fEnveloppeSizeX = fEnveloppeSizeX; + pcb.fEnveloppeSizeY = fEnveloppeSizeY; + pcb.fXoffset = fXoffset; + pcb.fIxmin = fIxmin; + pcb.fIxmax = fIxmax; + pcb.fIymin = fIymin; + pcb.fIymax = fIymax; + pcb.fActiveXmin = fActiveXmin; + pcb.fActiveXmax = fActiveXmax; + +#ifdef WITH_ROOT + pcb.fMotifs.Clear(); +#else + pcb.fMotifs.clear(); +#endif + +#ifdef WITH_ROOT + for ( Size_t i = 0; i < fMotifs.GetEntriesFast(); ++i ) +#else + for ( Size_t i = 0; i < fMotifs.size(); ++i ) +#endif + { + AliMpMotifPosition* pos = (AliMpMotifPosition*)fMotifs[i]; + AliMpMotifPosition* pcbpos = + new AliMpMotifPosition(pos->GetID(),pos->GetMotif(),pos->Position()); + pcbpos->SetLowIndicesLimit(pos->GetLowIndicesLimit()); + pcbpos->SetHighIndicesLimit(pos->GetHighIndicesLimit()); +#ifdef WITH_ROOT + pcb.fMotifs.AddLast(pcbpos); +#else + pcb.fMotifs.push_back(pcbpos); +#endif + } +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::ActiveDX() const +{ + // + // Half-length (in x-direction) occupied by pads + // + + return GetNofPadsX()*fPadSizeX/2.0; +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::DX() const +{ + // + // Half-length (in x-direction) of the PCB. + // This length is the one of the virtual enveloppe of the PCB and might + // be bigger than the length occupied by pads (e.g. for rounded or short + // PCBs). + // See also ActiveDX(). + // + + return fEnveloppeSizeX/2.0; +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::ActiveDY() const +{ + // + // Half-length (in y-direction) occupied by pads + // + + return GetNofPadsY()*fPadSizeY/2.0; +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::DY() const +{ + // + // Half-length (in y-direction) of the PCB. + // This length is the one of the virtual enveloppe of the PCB and might + // be bigger than the length occupied by pads (e.g. for rounded or short + // PCBs). + // See also ActiveDY(). + // + + return fEnveloppeSizeY/2.0; +} + +//_____________________________________________________________________________ +AliMpMotifPosition* +AliMpPCB::FindMotifPosition(Int_t ix, Int_t iy) const +{ + // + // Returns the motifPosition located at the position referenced by + // integer indices (ix,iy). + // + +#ifdef WITH_ROOT + for (Size_t i = 0; i < fMotifs.GetEntriesFast(); ++i ) +#else + for (Size_t i = 0; i < fMotifs.size(); ++i ) +#endif + { + AliMpMotifPosition* mp = (AliMpMotifPosition*)fMotifs[i]; + if ( mp->HasPad(AliMpIntPair(ix,iy)) ) + { + return mp; + } + } + return 0; +} + +//_____________________________________________________________________________ +AliMpMotifPosition* +AliMpPCB::FindMotifPosition(Double_t x, Double_t y) const +{ + // + // Returns the motifPosition located at position (x,y) + // + +#ifdef WITH_ROOT + for (Size_t i = 0; i < fMotifs.GetEntriesFast(); ++i ) +#else + for (Size_t i = 0; i < fMotifs.size(); ++i ) +#endif + { + AliMpMotifPosition* mp = (AliMpMotifPosition*)fMotifs[i]; + + TVector2 localPos( TVector2(x,y) - mp->Position() ); + + AliMpIntPair localIndices(mp->GetMotif()->PadIndicesLocal(localPos)); + + if ( mp->GetMotif()->GetMotifType()->HasPad(localIndices) ) + { + return mp; + } + } + return 0; +} + +//_____________________________________________________________________________ +const char* +AliMpPCB::GetID() const +{ + // + // Returns the name of this PCB. + // + + return fId.Data(); +} + +//_____________________________________________________________________________ +AliMpMotifPosition* +AliMpPCB::GetMotifPosition(AliMpPCB::Size_t i) const +{ + // + // Get the i-th motifPosition stored in this PCB's internal array. + // + +#ifdef WITH_ROOT + if ( i >= fMotifs.GetEntriesFast() ) return 0; +#else + if ( i >= fMotifs.size() ) return 0; +#endif + return (AliMpMotifPosition*)fMotifs[i]; +} + +//_____________________________________________________________________________ +Int_t +AliMpPCB::GetNofPadsX() const +{ + // + // Returns the number of pads in x-direction. + // + + return fIxmax-fIxmin+1; +} + +//_____________________________________________________________________________ +Int_t +AliMpPCB::GetNofPadsY() const +{ + // + // Returns the number of pads in y-direction. + // + + return fIymax-fIymin+1; +} + +//_____________________________________________________________________________ +AliMpPCB::Size_t +AliMpPCB::GetSize() const +{ + // + // Returns the number of motifPositions stored in this PCB. + // + +#ifdef WITH_ROOT + return fMotifs.GetEntriesFast(); +#else + return fMotifs.size(); +#endif +} + + +//_____________________________________________________________________________ +Int_t +AliMpPCB::Ixmin() const +{ + // + // Returns the index value of the leftmost pad. + // + + return fIxmin; +} + +//_____________________________________________________________________________ +Int_t +AliMpPCB::Ixmax() const +{ + // + // Returns the index value of the rightmost pad. + // + + return Ixmin() + GetNofPadsX() - 1; +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::PadSizeX() const +{ + // + // Returns the pad size in x-direction (in mm) + // + + return fPadSizeX; +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::PadSizeY() const +{ + // + // Returns the pad size in y-direction (in mm) + // + + return fPadSizeY; +} + +//_____________________________________________________________________________ +void +AliMpPCB::Print(Option_t* option) const +{ + // + // Printout of this PCB. + // If option="M", the contained motifs are printed too. + // + + cout << "PCB " << GetID() << " PADSIZES=(" << fPadSizeX << "," + << fPadSizeY << ") iMin=(" << fIxmin << "," << fIymin << ") " + << "iMax=(" << fIxmax << "," << fIymax << ") " + << " EnvXmin,max=(" << Xmin() << "," << Xmax() + << ") Xmin,max=(" << ActiveXmin() << "," << ActiveXmax() << ")" + << endl; + + if ( option && option[0] == 'M' ) + { +#ifdef WITH_ROOT + for ( Size_t i = 0; i < fMotifs.GetEntriesFast(); ++i ) +#else + for ( Size_t i = 0; i < fMotifs.size(); ++i ) +#endif + { + if (option) + { + fMotifs[i]->Print(option+1); + } + else + { + fMotifs[i]->Print(); + } + } + } +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::X() const +{ + // + // Returns the x-position of the PCB center. + // + + return fXoffset + DX(); +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::Xmin() const +{ + // + // Returns the leftmost x-position in this PCB. + // + + return X() - DX(); +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::Xmax() const +{ + // + // Returns the rightmost x-position in this PCB. + // + + return X() + DX(); +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::Y() const +{ + // + // Returns the y-position of the PCB center. + // + + return DY(); // this works as PCB are organized in a single row within slats. +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::Ymin() const +{ + // + // Returns the smallest y-position in this PCB. + // + + return Y() - DY(); +} + +//_____________________________________________________________________________ +Double_t +AliMpPCB::Ymax() const +{ + // + // Returns the largest y-position in this PCB. + // + + return Y() + DY(); +} + diff --git a/MUON/mapping/AliMpPCB.h b/MUON/mapping/AliMpPCB.h new file mode 100644 index 00000000000..c7e6a88f641 --- /dev/null +++ b/MUON/mapping/AliMpPCB.h @@ -0,0 +1,151 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +// $Id$ +// $MpId: AliMpPCB.h,v 1.4 2005/09/19 19:01:09 ivana Exp $ + +/// \ingroup slat +/// \class AliMpPCB +/// \brief A PCB for station 3,4 or 5 +/// +/// Author: Laurent Aphecetche + +#ifndef ALIMPPCB_H +#define ALIMPPCB_H + +#ifndef ROOT_TObject +# include "TObject.h" +#endif + +#ifndef ROOT_TString +# include "TString.h" +#endif + +# ifndef ROOT_TArraI +# include "TArrayI.h" +# endif + +#include "AliMpContainers.h" + +#ifdef WITH_ROOT +# ifndef ROOT_TObjArray +# include "TObjArray.h" +# endif +#else +# include +#endif + +class AliMpMotifPosition; +class AliMpMotifType; + +class AliMpPCB : public TObject +{ + public: + +#ifdef WITH_ROOT + typedef Int_t Size_t; +#else + typedef UInt_t Size_t; +#endif + + AliMpPCB(); + /** Ctor. The sizes are given in mm. + enveloppe is due to the fact that not all PCBs are "full" of pads, + e.g. the rounded or short ones miss some pads, but the enveloppe + is a virtual size that should be constant across the slats, + and is 400x400 mm. + It's a usefull notion to compute e.g. slat center in a uniform way, + considering that a slat is N PCBs, of the same "virtual" size, that of + the enveloppe. + */ + AliMpPCB(const char* id, Double_t padSizeX, Double_t padSizeY, + Double_t enveloppeSizeX, Double_t enveloppeSizeY); + AliMpPCB(const AliMpPCB&); + AliMpPCB& operator=(const AliMpPCB&); + + virtual ~AliMpPCB(); + + TObject* Clone(const char* newname="") const; + + /** Duplicate this PCB. The copy has the manuids of its motifs changed + according to the manuid vector, and its x-offset according to ix + and x. + */ + AliMpPCB* Clone(const TArrayI& manuids, + Int_t ixOffset, Double_t xOffset) const; + + void Copy(TObject&) const; + + /** Add a motif to this PCB. (ix,iy) are the coordinates of the lower-left + of the motif, in pad-units, starting at 0,0 on the lower-left of the PCB. + */ + void Add(AliMpMotifType* motifType, Int_t ix, Int_t iy); + + void Print(Option_t* option = "") const; + + Double_t ActiveDX() const; + Double_t ActiveDY() const; + + Double_t DX() const; + Double_t DY() const; + + Double_t X() const; + Double_t Y() const; + + Double_t Xmin() const; + Double_t Xmax() const; + + Double_t ActiveXmin() const; + Double_t ActiveXmax() const; + + Double_t Ymin() const; + Double_t Ymax() const; + + Double_t PadSizeX() const; + Double_t PadSizeY() const; + + /** Returns the i-th motifPosition of this PCB. + i : [0..GetSize()-1] + */ + AliMpMotifPosition* GetMotifPosition(Size_t i) const; + + /// Returns the motifPosition which contains the pad at (ix,iy). + AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const; + + /// Returns the motifPosition which contains the pad at (x,y). + AliMpMotifPosition* FindMotifPosition(Double_t x, Double_t y) const; + + /// The number of motifs, aka manus. + Size_t GetSize() const; + + Int_t GetNofPadsX() const; + Int_t GetNofPadsY() const; + + Int_t Ixmin() const; + Int_t Ixmax() const; + + const char* GetID() const; + + private: + TString fId; + Double_t fPadSizeX; + Double_t fPadSizeY; + Double_t fEnveloppeSizeX; + Double_t fEnveloppeSizeY; + Double_t fXoffset; + Double_t fActiveXmin; + Double_t fActiveXmax; + Int_t fIxmin; + Int_t fIxmax; + Int_t fIymin; + Int_t fIymax; +#ifdef WITH_ROOT + TObjArray fMotifs; +#else + std::vector fMotifs; +#endif + + ClassDef(AliMpPCB,1) // A PCB for Stations 3,4,5 +}; + +#endif diff --git a/MUON/mapping/AliMpPCBPainter.cxx b/MUON/mapping/AliMpPCBPainter.cxx new file mode 100644 index 00000000000..555779a68a8 --- /dev/null +++ b/MUON/mapping/AliMpPCBPainter.cxx @@ -0,0 +1,145 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpPCBPainter.cxx,v 1.4 2005/09/19 18:56:46 ivana Exp $ +// Category: graphics +// +// Class AliMpSlatPainter +// ----------------------- +// Class for drawing a PCB into canvas +// Authors: Laurent Aphecetche + +#include "AliMpPCBPainter.h" + +#include "AliMpGraphContext.h" +#include "AliMpMotifPosition.h" +#include "AliMpPCB.h" + +#include "TVirtualX.h" +#include "TPad.h" + +#include + +ClassImp(AliMpPCBPainter) + +//_____________________________________________________________________________ +AliMpPCBPainter::AliMpPCBPainter(AliMpPCB* pcb) + : AliMpVPainter(), fPCB(pcb) +{ + // + // Default ctor. + // +} + +//_____________________________________________________________________________ +AliMpPCBPainter::~AliMpPCBPainter() +{ + // + // Dtor. + // +} + +//_____________________________________________________________________________ +TVector2 +AliMpPCBPainter::GetDimensions() const +{ + // + // Returns the half-sizes of the PCB. + // + return TVector2(fPCB->DX(),fPCB->DY()); +} + +//_____________________________________________________________________________ +TVector2 +AliMpPCBPainter::GetPosition() const +{ + // + // Returns the (x,y) position of the PCB. + // + return TVector2(fPCB->X(),fPCB->Y()); +} + +//_____________________________________________________________________________ +void +AliMpPCBPainter::Draw(Option_t* option) +{ + // + // Draws the PCB. + // + AliMpGraphContext *gr = AliMpGraphContext::Instance(); + if (!fPCB) return; + + gr->Push(); + InitGraphContext(); + + std::cout << "PCB Position and Dimensions:" << std::endl; + GetPosition().Print(); + GetDimensions().Print(); + + switch (option[0]) + { + case 'M': + for ( AliMpPCB::Size_t i = 0; i < fPCB->GetSize(); ++i ) + { + AliMpMotifPosition* pos = fPCB->GetMotifPosition(i); + + gr->Push(); + gr->SetPadPosForReal(pos->Position(), + pos->Dimensions()); + // + std::cout << "Motif Position " << pos->GetID() + << std::endl; + pos->GetMotif()->Print(""); + std::cout << "Motif dimension:" << std::endl; + pos->GetMotif()->Dimensions().Print(); + std::cout << "MotifPosition position:" << std::endl; + pos->Position().Print(); + std::cout << "MotifPosition dimensions:" << std::endl; + pos->Dimensions().Print(); + // int id = atoi(pos->GetMotif()->GetID().Data()); + gr->SetColor(2+i%7); + + DrawObject(pos,option+1); + + gr->Pop(); + } + break; + default: + AppendPad(option); + } + + gr->Pop(); +} + +//_____________________________________________________________________________ +void +AliMpPCBPainter::Paint(Option_t* /*option*/) +{ + // + // Paint the object. + // + AliMpGraphContext* gr = AliMpGraphContext::Instance(); + if (!fPCB) return; + Int_t col=gVirtualX->GetFillColor(); + gr->Push(); + gPad->Range(0.,0.,1.,1.); + InitGraphContext(); + + PaintWholeBox(kTRUE); + + gr->Pop(); + gVirtualX->SetFillColor(col); +} diff --git a/MUON/mapping/AliMpPCBPainter.h b/MUON/mapping/AliMpPCBPainter.h new file mode 100644 index 00000000000..11e09fcc71b --- /dev/null +++ b/MUON/mapping/AliMpPCBPainter.h @@ -0,0 +1,39 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +// $Id$ +// $MpId: AliMpPCBPainter.h,v 1.3 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup graphics +/// \class AliMpPCBPainter +/// \brief Class for drawing a PCB into canvas +/// +/// Authors: Laurent Aphecetche + +#ifndef ALIMPPCBPAINTER_H +#define ALIMPPCBPAINTER_H + +#include "AliMpVPainter.h" + +class AliMpPCB; + +class AliMpPCBPainter : public AliMpVPainter +{ +public: + AliMpPCBPainter(AliMpPCB* pcb); + virtual ~AliMpPCBPainter(); + + void Draw(Option_t* option); + + void Paint(Option_t* option); + + TVector2 GetDimensions() const; + TVector2 GetPosition() const; + + private: + AliMpPCB* fPCB; + + ClassDef(AliMpPCBPainter,1) // A painter for a PCB of stations 3,4,5 +}; + +#endif diff --git a/MUON/mapping/AliMpPad.cxx b/MUON/mapping/AliMpPad.cxx index 5f5767476f0..0e63de185b4 100755 --- a/MUON/mapping/AliMpPad.cxx +++ b/MUON/mapping/AliMpPad.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpPad.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $ // Category: basic // // Class AliMpPad @@ -48,10 +64,11 @@ AliMpPad::AliMpPad(const AliMpIntPair& location,const AliMpIntPair& indices, fDimensions(dimensions), fValidity(validity) { -// Be carefull : this constructor doesn't check the validity of -// the correspondance between location and indices. -// By default, validity is set true. -// It is aimed to be used by MSegmentation methods, and never from outside.... +/// Standard constructor \n +/// Be carefull : this constructor doesn't check the validity of +/// the correspondance between location and indices. +/// By default, validity is set true. +/// It is aimed to be used by MSegmentation methods, and never from outside.... } @@ -64,7 +81,7 @@ AliMpPad::AliMpPad() fDimensions(0.,0.), fValidity(false) { -// Default constructor - creates pad in invalid state +/// Default constructor - creates pad in invalid state } @@ -72,24 +89,29 @@ AliMpPad::AliMpPad() AliMpPad::AliMpPad(const AliMpPad& src) : TObject(src) { +/// Copy constructor + *this = src; } //_____________________________________________________________________________ -AliMpPad::~AliMpPad() { -// +AliMpPad::~AliMpPad() +{ +/// Destructor } //_____________________________________________________________________________ AliMpPad& AliMpPad::operator = (const AliMpPad& src) { - // check assignement to self +/// Assignment operator + + // check assignment to self if (this == &src) return *this; - // base class assignement + // base class assignment TObject::operator=(src); - // assignement operator + // assignment operator fLocation = src.fLocation; fIndices = src.fIndices; fPosition.Set(src.fPosition); @@ -102,6 +124,8 @@ AliMpPad& AliMpPad::operator = (const AliMpPad& src) //_____________________________________________________________________________ Bool_t AliMpPad::operator == (const AliMpPad& pos2) const { +/// Equality operator + // are this and pos2 equals? // one valid, one invalid @@ -117,6 +141,8 @@ Bool_t AliMpPad::operator == (const AliMpPad& pos2) const //_____________________________________________________________________________ Bool_t AliMpPad::operator!= (const AliMpPad& pos2) const { +/// Non-equality operator + // are this and pos2 equals? return !(*this==pos2); } @@ -124,6 +150,8 @@ Bool_t AliMpPad::operator!= (const AliMpPad& pos2) const //_____________________________________________________________________________ ostream& operator<< (ostream &out, const AliMpPad& op) { +/// Output streaming + if (op.IsValid()) { out << "Pad: Location " << op.GetLocation() << " Indices " << op.GetIndices() @@ -140,14 +168,15 @@ ostream& operator<< (ostream &out, const AliMpPad& op) //_____________________________________________________________________________ Bool_t operator < (const AliMpPad& left, const AliMpPad& right) { -return left.GetIndices()CreateIterator()); -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpPadIteratorPtr.h,v 1.5 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup basic +/// \class AliMpPadIteratorPtr +/// \brief A pointer to the virtual pad iterator; +/// +/// It enables to allocate the virtual pad iterator on stack. +/// Usage: \n +/// AliMpVIndexed* myIndexed = MyIndexed(); \n +/// MVIterator& it = *AliMpPadIteratorPtr(myIndexed->CreateIterator()); \n +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_PAD_ITERATOR_PTR_H #define ALI_MP_PAD_ITERATOR_PTR_H diff --git a/MUON/mapping/AliMpPadPair.cxx b/MUON/mapping/AliMpPadPair.cxx index 6fbea4d743e..8ab85c51e0c 100644 --- a/MUON/mapping/AliMpPadPair.cxx +++ b/MUON/mapping/AliMpPadPair.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpPadPair.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $ // Category: basic // // Class AliMpPadPair @@ -17,53 +33,63 @@ ClassImp(AliMpPadPair) AliMpPadPair::AliMpPadPair(const AliMpPad& pad1, const AliMpPad& pad2) : TObject(), fPadFirst(pad1), - fPadSecond(pad2) { -// + fPadSecond(pad2) +{ +/// Standard constructor } //_____________________________________________________________________________ AliMpPadPair::AliMpPadPair(const AliMpPadPair& right) : TObject(), fPadFirst(right.GetFirst()), - fPadSecond(right.GetSecond()) { -// + fPadSecond(right.GetSecond()) +{ +/// Copy constructor } //_____________________________________________________________________________ AliMpPadPair::AliMpPadPair() : TObject(), fPadFirst(AliMpPad::Invalid()), - fPadSecond(AliMpPad::Invalid()) { -// + fPadSecond(AliMpPad::Invalid()) +{ +/// Default constructor } //_____________________________________________________________________________ -AliMpPadPair::~AliMpPadPair() { -// +AliMpPadPair::~AliMpPadPair() +{ +/// Destructor } //_____________________________________________________________________________ Bool_t AliMpPadPair::operator == (const AliMpPadPair& right) const { +/// Equality operator + return (fPadFirst == right.fPadFirst && fPadSecond == right.fPadSecond); } //_____________________________________________________________________________ Bool_t AliMpPadPair::operator!= (const AliMpPadPair& right) const { +/// Non-equality operator + return !(*this == right); } //_____________________________________________________________________________ AliMpPadPair& AliMpPadPair::operator = (const AliMpPadPair& right) { - // check assignement to self +/// Assignment operator + + // check assignment to self if (this == &right) return *this; - // base class assignement + // base class assignment TObject::operator=(right); - // assignement operator + // assignment operator fPadFirst = right.fPadFirst; fPadSecond = right.fPadSecond; diff --git a/MUON/mapping/AliMpPadPair.h b/MUON/mapping/AliMpPadPair.h index e270829bd22..387ae6b2ecc 100644 --- a/MUON/mapping/AliMpPadPair.h +++ b/MUON/mapping/AliMpPadPair.h @@ -1,12 +1,15 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: basic -// -// Class AliMpPadPair -// ------------------ -// Wrap up for std::pair -// to avoid problems with CINT. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpPadPair.h,v 1.7 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup basic +/// \class AliMpPadPair +/// \brief Wrap up for std::pair +/// to avoid problems with CINT. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_PAD_PAIR_H #define ALI_MP_PAD_PAIR_H diff --git a/MUON/mapping/AliMpPadRow.cxx b/MUON/mapping/AliMpPadRow.cxx index 6baedc845d9..c6666b3738d 100755 --- a/MUON/mapping/AliMpPadRow.cxx +++ b/MUON/mapping/AliMpPadRow.cxx @@ -1,5 +1,20 @@ +/************************************************************************** + * 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$ -// -------------------------------------------------------- +// $MpId: AliMpPadRow.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $ // Category: sector // // Class AliMpPadRow @@ -20,9 +35,9 @@ ClassImp(AliMpPadRow) AliMpPadRow::AliMpPadRow(AliMpXDirection direction) : TObject(), fDirection(direction), - fID(0) + fID(0) { -// +/// Standard constructor } //_____________________________________________________________________________ @@ -31,12 +46,13 @@ AliMpPadRow::AliMpPadRow() fDirection(kLeft), fID(0) { -// +/// Default constructor } //_____________________________________________________________________________ -AliMpPadRow::~AliMpPadRow() { -// +AliMpPadRow::~AliMpPadRow() +{ +/// Destructor for (Int_t i=0; iHalfSizeY(); } //_____________________________________________________________________________ void AliMpPadRow::SetID(Int_t id) { -// Sets the ID. -// --- +/// Set the ID. fID = id; } @@ -134,8 +148,7 @@ void AliMpPadRow::SetID(Int_t id) //_____________________________________________________________________________ void AliMpPadRow::SetOffsetX(Double_t offsetX) { -// Sets the x offset. -// --- +/// Set the x offset. fOffsetX = offsetX; } @@ -143,8 +156,7 @@ void AliMpPadRow::SetOffsetX(Double_t offsetX) //_____________________________________________________________________________ Int_t AliMpPadRow::GetID() const { -// Returns the row ID. -// --- +/// Return the pad row ID. return fID; } @@ -152,8 +164,7 @@ Int_t AliMpPadRow::GetID() const //_____________________________________________________________________________ Int_t AliMpPadRow::GetNofPadRowSegments() const { -// Returns number of row segments. -// --- +/// Return the number of pad row segments. #ifdef WITH_STL return fSegments.size(); @@ -167,8 +178,7 @@ Int_t AliMpPadRow::GetNofPadRowSegments() const //_____________________________________________________________________________ AliMpVPadRowSegment* AliMpPadRow::GetPadRowSegment(Int_t i) const { -// Returns pad row segment with specified number. -// --- +/// Return the pad row segment with the specified number. if (i<0 || i>=GetNofPadRowSegments()) { Warning("GetRowSegment", "Index outside range"); @@ -187,8 +197,7 @@ AliMpVPadRowSegment* AliMpPadRow::GetPadRowSegment(Int_t i) const //_____________________________________________________________________________ Int_t AliMpPadRow::GetNofPads() const { -// Returns number of pads in this pad row. -// --- +/// Return the number of pads in this pad row. Int_t nofPads=0; for (Int_t i=0; iGetPadDimensions().X(); } @@ -58,10 +74,9 @@ Double_t AliMpPadRowLSegment::FirstPadCenterX() const //_____________________________________________________________________________ Double_t AliMpPadRowLSegment::LastPadCenterX() const { -// Returns the x coordinate of the last (the most left) pad center -// in global coordinate system. -// !! numbering of pads is in (-x) direction -// --- +/// Return the x coordinate of the last (the most left) pad center +/// in the global coordinate system. \n +/// !! numbering of pads is in (-x) direction return GetOffsetX() - (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X(); } @@ -69,9 +84,8 @@ Double_t AliMpPadRowLSegment::LastPadCenterX() const //_____________________________________________________________________________ Double_t AliMpPadRowLSegment::FirstPadBorderX() const { -// Returns the x coordinate of the right border of the first (the most right) -// pad in global coordinate system. -// --- +/// Return the x coordinate of the right border of the first (the most right) +/// pad in the global coordinate system. return GetOffsetX(); // Also could be @@ -81,9 +95,8 @@ Double_t AliMpPadRowLSegment::FirstPadBorderX() const //_____________________________________________________________________________ Double_t AliMpPadRowLSegment::LastPadBorderX() const { -// Returns the x coordinate of the left border of the last (the most left) -// pad in global coordinate system. -// --- +/// Return the x coordinate of the left border of the last (the most left) +/// pad in the global coordinate system. return LastPadCenterX() - GetMotif()->GetPadDimensions().X(); } @@ -95,9 +108,8 @@ Double_t AliMpPadRowLSegment::LastPadBorderX() const //_____________________________________________________________________________ Double_t AliMpPadRowLSegment::LeftBorderX() const { -// Returns the x coordinate of the left row segment border -// in global coordinate system. -// --- +/// Return the x coordinate of the left row segment border +/// in the global coordinate system. return LastPadBorderX(); } @@ -105,9 +117,8 @@ Double_t AliMpPadRowLSegment::LeftBorderX() const //_____________________________________________________________________________ Double_t AliMpPadRowLSegment::RightBorderX() const { -// Returns the x coordinate of the right row segment border -// in global coordinate system. -// --- +/// Return the x coordinate of the right row segment border +/// in the global coordinate system. return FirstPadBorderX(); } diff --git a/MUON/mapping/AliMpPadRowLSegment.h b/MUON/mapping/AliMpPadRowLSegment.h index 788a32ff4c6..fde759990b7 100755 --- a/MUON/mapping/AliMpPadRowLSegment.h +++ b/MUON/mapping/AliMpPadRowLSegment.h @@ -1,14 +1,18 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: sector -// -// Class AliMpPadRowLSegment -// ------------------------- -// Class describing a pad row segment composed of the -// the identic pads; -// the pads are placed from the offset (defined in the base class) -// to the left. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpPadRowLSegment.h,v 1.4 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup sector +/// \class AliMpPadRowLSegment +/// \brief A left pad row segment composed of the identic pads +/// +/// A pad row segment composed of the identic pads; +/// the pads are placed from the offset (defined in the base class) +/// to the left. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_PAD_ROW_L_SEGMENT_H #define ALI_MP_PAD_ROW_L_SEGMENT_H diff --git a/MUON/mapping/AliMpPadRowRSegment.cxx b/MUON/mapping/AliMpPadRowRSegment.cxx index 9a64ec7bcff..9e7d8fa8b97 100644 --- a/MUON/mapping/AliMpPadRowRSegment.cxx +++ b/MUON/mapping/AliMpPadRowRSegment.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpPadRowRSegment.cxx,v 1.4 2005/08/26 15:43:36 ivana Exp $ // Category: sector // // Class AliMpPadRowRSegment @@ -25,19 +41,20 @@ AliMpPadRowRSegment::AliMpPadRowRSegment(AliMpPadRow* padRow, AliMpMotif* motif, Int_t motifPositionId, Int_t nofPads) : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads) { -// +/// Standard constructor } //______________________________________________________________________________ AliMpPadRowRSegment::AliMpPadRowRSegment() : AliMpVPadRowSegment() { -// +/// Default constructor } //______________________________________________________________________________ -AliMpPadRowRSegment::~AliMpPadRowRSegment() { -// +AliMpPadRowRSegment::~AliMpPadRowRSegment() +{ +/// Destructor } // @@ -47,9 +64,8 @@ AliMpPadRowRSegment::~AliMpPadRowRSegment() { //______________________________________________________________________________ Double_t AliMpPadRowRSegment::FirstPadCenterX() const { -// Returns the x coordinate of the first (the most left) pad center -// in global coordinate system. -// --- +/// Return the x coordinate of the first (the most left) pad center +/// in the global coordinate system. return GetOffsetX() + GetMotif()->GetPadDimensions().X(); } @@ -57,10 +73,9 @@ Double_t AliMpPadRowRSegment::FirstPadCenterX() const //______________________________________________________________________________ Double_t AliMpPadRowRSegment::LastPadCenterX() const { -// Returns the x coordinate of the last (the most right) pad center -// in global coordinate system. -// !! numbering of pads is in (-x) direction -// --- +/// Return the x coordinate of the last (the most right) pad center +/// in the global coordinate system. \n +/// !! numbering of pads is in (-x) direction return GetOffsetX() + (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X(); } @@ -68,9 +83,8 @@ Double_t AliMpPadRowRSegment::LastPadCenterX() const //______________________________________________________________________________ Double_t AliMpPadRowRSegment::FirstPadBorderX() const { -// Returns the x coordinate of the left border of the first (the most left) -// pad in global coordinate system. -// --- +/// Return the x coordinate of the left border of the first (the most left) +/// pad in the global coordinate system. return GetOffsetX(); // Also could be @@ -80,9 +94,8 @@ Double_t AliMpPadRowRSegment::FirstPadBorderX() const //______________________________________________________________________________ Double_t AliMpPadRowRSegment::LastPadBorderX() const { -// Returns the x coordinate of the right border of the last (the most right) -// pad in global coordinate system. -// --- +/// Return the x coordinate of the right border of the last (the most right) +/// pad in the global coordinate system. return LastPadCenterX() + GetMotif()->GetPadDimensions().X(); } @@ -94,9 +107,8 @@ Double_t AliMpPadRowRSegment::LastPadBorderX() const //______________________________________________________________________________ Double_t AliMpPadRowRSegment::LeftBorderX() const { -// Returns the x coordinate of the left row segment border -// in global coordinate system. -// --- +/// Return the x coordinate of the left row segment border +/// in the global coordinate system. return FirstPadBorderX(); } @@ -104,9 +116,8 @@ Double_t AliMpPadRowRSegment::LeftBorderX() const //______________________________________________________________________________ Double_t AliMpPadRowRSegment::RightBorderX() const { -// Returns the x coordinate of the right row segment border -// in global coordinate system. -// --- +/// Return the x coordinate of the right row segment border +/// in the global coordinate system. return LastPadBorderX(); } diff --git a/MUON/mapping/AliMpPadRowRSegment.h b/MUON/mapping/AliMpPadRowRSegment.h index 052b6715256..69bb0dce370 100644 --- a/MUON/mapping/AliMpPadRowRSegment.h +++ b/MUON/mapping/AliMpPadRowRSegment.h @@ -1,14 +1,18 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: sector -// -// Class AliMpPadRowRSegment -// ------------------------- -// Class describing a pad row segment composed of the -// the identic pads; -// the pads are placed from the offset (defined in the base class) -// to the right. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpPadRowRSegment.h,v 1.4 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup sector +/// \class AliMpPadRowRSegment +/// \brief A right pad row segment composed of the identic pads +/// +/// A pad row segment composed of the identic pads; +/// the pads are placed from the offset (defined in the base class) +/// to the right. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_PAD_ROW_R_SEGMENT_H #define ALI_MP_PAD_ROW_R_SEGMENT_H diff --git a/MUON/mapping/AliMpPlaneType.h b/MUON/mapping/AliMpPlaneType.h index 66aa3e9839b..5ad9bbfd52f 100755 --- a/MUON/mapping/AliMpPlaneType.h +++ b/MUON/mapping/AliMpPlaneType.h @@ -1,19 +1,22 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: sector -// -// Enum AliMpPlaneType -// ------------------- -// Enumeration for refering to bending and non-bending planes. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpPlaneType.h,v 1.3 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup basic +/// \enum AliMpPlaneType +/// Enumeration for refering to bending and non-bending planes. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_PLANE_TYPE_H #define ALI_MP_PLANE_TYPE_H enum AliMpPlaneType { - kBendingPlane, // bending plane - kNonBendingPlane // non-bending plane + kBendingPlane, ///< bending plane + kNonBendingPlane ///< non-bending plane }; #endif //ALI_MP_PLANE_TYPE_H diff --git a/MUON/mapping/AliMpRow.cxx b/MUON/mapping/AliMpRow.cxx index 6096e1b6bad..d68f88f9182 100755 --- a/MUON/mapping/AliMpRow.cxx +++ b/MUON/mapping/AliMpRow.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpRow.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $ // Category: sector // // Class AliMpRow @@ -31,7 +47,7 @@ AliMpRow::AliMpRow(Int_t id, AliMpMotifMap* motifMap) fSegments(), fMotifMap(motifMap) { -// +/// Standard constructor } //_____________________________________________________________________________ @@ -42,19 +58,22 @@ AliMpRow::AliMpRow() fSegments(), fMotifMap(0) { -// +/// Default constructor } //_____________________________________________________________________________ AliMpRow::AliMpRow(const AliMpRow& right) - : AliMpVIndexed(right) { -// + : AliMpVIndexed(right) +{ +/// Protected copy constructor (not provided) + Fatal("AliMpRow", "Copy constructor not provided."); } //_____________________________________________________________________________ -AliMpRow::~AliMpRow() { -// +AliMpRow::~AliMpRow() +{ +/// Destructor #ifdef WITH_STL for (Int_t i=0; i= ix. -// --- +/// Find first normal row segment with low indices limit >= ix. for (Int_t i=0; i= ix. -// --- +/// Find first motif position in the specified row segment +/// with high indices limit >= ix. if (!segment) return 0; @@ -133,10 +152,9 @@ AliMpRow::FindMotifPosition(AliMpVRowSegment* segment, Int_t ix) const //_____________________________________________________________________________ void AliMpRow::SetHighIndicesLimits(Int_t iy) { -// Sets the global indices high limit to its row segments, -// motif positions with a given value. -// Keeps ix unmodified. -// --- +/// Set the global indices high limit to its row segments, +/// motif positions with a given value. +/// Keep ix unmodified. for (Int_t j=0; jHalfSizeY(); @@ -252,10 +264,9 @@ Double_t AliMpRow::UpperBorderY() const //_____________________________________________________________________________ AliMpVPadIterator* AliMpRow::CreateIterator() const { -// Iterator is not yet implemented. -// --- +/// Iterator is not implemented. - Fatal("CreateIterator", "Iterator is not yet implemented."); + Fatal("CreateIterator", "Iterator is not implemented."); return 0; } @@ -263,8 +274,7 @@ AliMpVPadIterator* AliMpRow::CreateIterator() const //_____________________________________________________________________________ void AliMpRow::SetMotifPositions() { -// Creates motif positions objects and fills them in the motif map. -// --- +/// Create motif positions objects and fills them in the motif map. CheckEmpty(); @@ -301,9 +311,8 @@ void AliMpRow::SetMotifPositions() void AliMpRow::SetGlobalIndices(AliMpDirection constPadSizeDirection, AliMpRow* rowBefore) { -// Sets the global indices limits to its row segments, motif positions -// and itself. -// --- +/// Set the global indices limits to its row segments, motif positions +/// and itself. Int_t ix = AliMpConstants::StartPadIndex(); Int_t iy = AliMpConstants::StartPadIndex(); @@ -369,8 +378,7 @@ void AliMpRow::SetGlobalIndices(AliMpDirection constPadSizeDirection, //_____________________________________________________________________________ TVector2 AliMpRow::Position() const { -// Returns the position of the row centre. -// --- +/// Return the position of the row centre. Double_t x = (GetRowSegment(0)->LeftBorderX() + GetRowSegment(GetNofRowSegments()-1)->RightBorderX())/2.; @@ -383,8 +391,7 @@ TVector2 AliMpRow::Position() const //_____________________________________________________________________________ TVector2 AliMpRow::Dimensions() const { -// Returns the maximum halflengths of the row in x, y. -// --- +/// Return the maximum halflengths of the row in x, y. Double_t x = (GetRowSegment(GetNofRowSegments()-1)->RightBorderX() - GetRowSegment(0)->LeftBorderX())/2.; @@ -397,8 +404,7 @@ TVector2 AliMpRow::Dimensions() const //_____________________________________________________________________________ void AliMpRow::SetRowSegmentOffsets(const TVector2& offset) { -// Sets the row segments offsets in X . -// --- +/// Set the row segments offsets in X . CheckEmpty(); @@ -422,9 +428,8 @@ void AliMpRow::SetRowSegmentOffsets(const TVector2& offset) //_____________________________________________________________________________ Double_t AliMpRow::SetOffsetY(Double_t offsetY) { -// Sets the row offset (the Y coordinate of the position of the -// center of motif) and returns the offset of the top border. -// --- +/// Set the row offset (the Y coordinate of the position of the +/// center of motif) and returns the offset of the top border. CheckEmpty(); @@ -454,8 +459,7 @@ Double_t AliMpRow::SetOffsetY(Double_t offsetY) //_____________________________________________________________________________ Int_t AliMpRow::GetNofRowSegments() const { -// Returns number of row segments. -// --- +/// Return number of row segments. #ifdef WITH_STL return fSegments.size(); @@ -469,8 +473,7 @@ Int_t AliMpRow::GetNofRowSegments() const //_____________________________________________________________________________ AliMpVRowSegment* AliMpRow::GetRowSegment(Int_t i) const { -// Returns i-th row segment. -// --- +/// Return i-th row segment. if (i<0 || i>=GetNofRowSegments()) { Warning("GetRowSegment", "Index outside range"); diff --git a/MUON/mapping/AliMpRow.h b/MUON/mapping/AliMpRow.h index eb1b660d707..f16f1b0ee44 100755 --- a/MUON/mapping/AliMpRow.h +++ b/MUON/mapping/AliMpRow.h @@ -1,11 +1,14 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: sector -// -// Class AliMpRow -// -------------- -// Class describing a row composed of the row segments. -// -// Authors: David Guez, Ivana Hrivnacova; IPN Orsay +// $MpId: AliMpRow.h,v 1.7 2005/08/26 15:43:36 ivana Exp $ + +/// \ingroup sector +/// \class AliMpRow +/// \brief A row composed of the row segments. +/// +/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_ROW_H #define ALI_MP_ROW_H diff --git a/MUON/mapping/AliMpRowPainter.cxx b/MUON/mapping/AliMpRowPainter.cxx index b7c169d46cd..7152faf4b32 100755 --- a/MUON/mapping/AliMpRowPainter.cxx +++ b/MUON/mapping/AliMpRowPainter.cxx @@ -1,4 +1,20 @@ +/************************************************************************** + * 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$ +// $MpId: AliMpRowPainter.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $ // Category: graphics // // Class AliMpRowPainter @@ -23,7 +39,7 @@ AliMpRowPainter::AliMpRowPainter() : AliMpVPainter(), fRow(0) { - // default dummy constructor + /// Default constructor } //_______________________________________________________________________ @@ -31,14 +47,14 @@ AliMpRowPainter::AliMpRowPainter(AliMpRow *row) : AliMpVPainter(), fRow(row) { - // normal constructor + /// Standard constructor } //_____________________________________________________________________________ AliMpRowPainter::AliMpRowPainter(const AliMpRowPainter& right) : AliMpVPainter(right) { // - // copy constructor (not implemented) + /// Protected copy constructor (not provided) Fatal("AliMpRowPainter", "Copy constructor not provided."); } @@ -46,18 +62,18 @@ AliMpRowPainter::AliMpRowPainter(const AliMpRowPainter& right) //_______________________________________________________________________ AliMpRowPainter::~AliMpRowPainter() { - // destructor + /// Destructor } //_____________________________________________________________________________ AliMpRowPainter& AliMpRowPainter::operator=(const AliMpRowPainter& right) { - // assignement operator (not implemented) + /// Assignment operator (not provided) - // check assignement to self + // check assignment to self if (this == &right) return *this; - Fatal("operator =", "Assignement operator not provided."); + Fatal("operator =", "Assignment operator not provided."); return *this; } @@ -65,38 +81,38 @@ AliMpRowPainter& AliMpRowPainter::operator=(const AliMpRowPainter& right) //_______________________________________________________________________ void AliMpRowPainter::DumpObject() { -// Draw the owned object - fRow->Dump(); +/// Draw the owned object + fRow->Dump(); } //_______________________________________________________________________ TVector2 AliMpRowPainter::GetPosition() const { -// Get the owned object's position - return fRow->Position(); +/// Get the owned object's position + return fRow->Position(); } //_______________________________________________________________________ TVector2 AliMpRowPainter::GetDimensions() const { -// Get the owned object's dimensions - return fRow->Dimensions(); +/// Get the owned object's dimensions + return fRow->Dimensions(); } //_______________________________________________________________________ void AliMpRowPainter::Draw(Option_t *option) { -// Draw the sector on the current pad -// The first letter of