+/**************************************************************************
+ * 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
: 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;
}
: 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
}
//
//______________________________________________________________________________
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;
//_____________________________________________________________________________
Double_t AliMpArea::LeftBorder() const
{
-// Returns the position of the left edge.
-// --
+/// Return the position of the left edge.
return fPosition.X() - fDimensions.X();
}
//_____________________________________________________________________________
Double_t AliMpArea::RightBorder() const
{
-// Returns the position of right edge.
-// --
+/// Return the position of right edge.
return fPosition.X() + fDimensions.X();
}
//_____________________________________________________________________________
Double_t AliMpArea::UpBorder() const
{
-// Returns the position of the up edge.
-// --
+/// Return the position of the up edge.
return fPosition.Y() + fDimensions.Y();
}
//_____________________________________________________________________________
Double_t AliMpArea::DownBorder() const
{
-// Returns the position of the down edge.
-// --
+/// Return the position of the down edge.
return fPosition.Y() - fDimensions.Y();
}
//_____________________________________________________________________________
TVector2 AliMpArea::LeftDownCorner() const
{
-// Returns position of the left down corner.
-// --
+/// Return position of the left down corner.
return TVector2(LeftBorder(), DownBorder());
}
//_____________________________________________________________________________
TVector2 AliMpArea::LeftUpCorner() const
{
-// Returns position of the left up corner.
-// --
+/// Return position of the left up corner.
return TVector2(LeftBorder(), UpBorder());
}
//_____________________________________________________________________________
TVector2 AliMpArea::RightDownCorner() const
{
-// Returns position of the right down corner.
-// --
+/// Return position of the right down corner.
return TVector2(RightBorder(), DownBorder());
}
//_____________________________________________________________________________
TVector2 AliMpArea::RightUpCorner() const
{
-// Returns position of the right up corner.
-// --
+/// Return position of the right up corner.
return TVector2(RightBorder(), UpBorder());
}
//_____________________________________________________________________________
ostream& operator<< (ostream &stream,const AliMpArea& area)
{
+/// Output streaming
+
stream << "Area: position: ("
<< area.Position().X() << ", " << area.Position().Y() << ") "
<< " dimensions: ("
+/* 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
+/* 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
+/**************************************************************************
+ * 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
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.");
}
fGassiNum(-1),
fOwner(0)
{
-//
+/// Default constructor
}
//_____________________________________________________________________________
//
}
+//
// 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;
}
+/* 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
+/**************************************************************************
+ * 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
//_____________________________________________________________________________
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;
}
//_____________________________________________________________________________
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;
+/* 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
+/* 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
+/* 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
+/**************************************************************************
+ * 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
// ----------------
: TObject(),
fTop(fgkDefaultTop)
{
-//
+/// Default constructor
+
if (fgInstance) {
Fatal("AliMpFiles",
"AliMpFiles: attempt to create two instances of singleton.");
AliMpFiles::AliMpFiles(const AliMpFiles& right)
: TObject(right)
{
-//
+/// Protected copy constructor
+
Fatal("AliMpFiles", "Attempt to copy AliMpFiles singleton.");
}
//______________________________________________________________________________
-AliMpFiles::~AliMpFiles() {
-//
+AliMpFiles::~AliMpFiles()
+{
+/// Destructor
fgInstance = 0;
}
//______________________________________________________________________________
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.");
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();
}
//______________________________________________________________________________
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;
}
//______________________________________________________________________________
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);
}
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);
}
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);
}
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);
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);
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);
//______________________________________________________________________________
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;
+/* 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
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,
+/**************************************************************************
+ * 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
fRealPosition(TVector2(0.,0.)),
fRealDimensions(TVector2(1,1))
{
-// private constructor
+/// Private constructor
fColor = 20;
// default constructor (private)
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;
//_____________________________________________________________________________
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;
//_____________________________________________________________________________
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());
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(),
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
//_____________________________________________________________________________
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()){
+/* 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
+/* 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
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any 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;
+}
--- /dev/null
+/* 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
+/**************************************************************************
+ * 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
: TObject(),
fFirst(ix),
fSecond(iy),
- fValidity(true) {
-//
+ fValidity(true)
+{
+/// Standard constructor
}
//_____________________________________________________________________________
: TObject(),
fFirst(ix),
fSecond(iy),
- fValidity(validity) {
-//
+ fValidity(validity)
+{
+/// Standard constructor with validity argument
}
//_____________________________________________________________________________
//fSecond(9999),
fFirst(0),
fSecond(0),
- fValidity(false) {
-//
+ fValidity(false)
+{
+/// Default constructor
}
+
//_____________________________________________________________________________
AliMpIntPair::AliMpIntPair(const AliMpIntPair& src):
TObject(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 (fFirst<pos2.fFirst) return kTRUE;
if (fFirst>pos2.fFirst) return kFALSE;
//_____________________________________________________________________________
Bool_t AliMpIntPair::operator== (const AliMpIntPair& pos2) const
{
+/// Equality operator
+
// are this and pos2 equals?
// one valid, one invalid
//_____________________________________________________________________________
Bool_t AliMpIntPair::operator!= (const AliMpIntPair& pos2) const
{
+/// Non-equality operator
+
// are this and pos2 equals?
return !(*this == pos2);
}
//_____________________________________________________________________________
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;
//_____________________________________________________________________________
void AliMpIntPair::operator += (const AliMpIntPair& op)
{
- // incrementation operator
+/// Incrementation operator
+
fFirst += op.fFirst;
fSecond += op.fSecond;
//_____________________________________________________________________________
void AliMpIntPair::operator -= (const AliMpIntPair& op)
{
- // decrementation operator
+/// Decrementation operator
+
fFirst -= op.fFirst;
fSecond -= op.fSecond;
//_____________________________________________________________________________
AliMpIntPair operator-(const AliMpIntPair& op1,const AliMpIntPair& op2)
{
+/// Substraction operator
+
return AliMpIntPair(op1.GetFirst()-op2.GetFirst(),
op1.GetSecond()-op2.GetSecond(),
op1.IsValid() && op2.IsValid());
//_____________________________________________________________________________
AliMpIntPair operator+(const AliMpIntPair& op1,const AliMpIntPair& op2)
{
+/// Addition operator
+
return AliMpIntPair(op1.GetFirst()+op2.GetFirst(),
op1.GetSecond()+op2.GetSecond(),
op1.IsValid() && op2.IsValid());
//_____________________________________________________________________________
AliMpIntPair operator*(const AliMpIntPair& op1,const AliMpIntPair& op2)
{
+/// Multiplication operator
+
return AliMpIntPair(op1.GetFirst()*op2.GetFirst(),
op1.GetSecond()*op2.GetSecond(),
op1.IsValid() && op2.IsValid());
//_____________________________________________________________________________
ostream& operator<< (ostream &stream,const AliMpIntPair& op)
{
+/// Output streaming
+
if (op.IsValid()) {
stream << '(';
stream << op.GetFirst()<<','<<op.GetSecond()<<')';
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: basic
-//
-// Class AliMpIntPair
-// ------------------
-// Class that defines the pair of integers.
-// The pair created by the default constructor is in invalide state,
-// setting one of values changes the state to valid.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpIntPair.h,v 1.4 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup basic
+/// \class AliMpIntPair
+/// \brief A pair of integers.
+///
+/// The pair created by the default constructor is in invalide state,
+/// setting one of values changes the state to valid.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_INT_PAIR_H
#define ALI_MP_INT_PAIR_H
+/**************************************************************************
+ * 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: AliMpMotif.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $
// Category: motif
//
// Class AliMpMotif
: AliMpVMotif(),
fPadDimensions(TVector2(0.,0.))
{
- //default dummy constructor
+ /// Default constructor
}
//_____________________________________________________________________________
: AliMpVMotif(id,motifType),
fPadDimensions(padDimension)
{
- // Normal constructor.
- // The dimension in a given direction is calculated by
- // multiplying the total dimension by the number of pads
+ /// Standard constructor. \n
+ /// The dimension in a given direction is calculated by
+ /// multiplying the total dimension by the number of pads
}
//_____________________________________________________________________________
AliMpMotif::~AliMpMotif()
{
- // destructor
+ /// Destructor
}
//_____________________________________________________________________________
TVector2 AliMpMotif::GetPadDimensions(const AliMpIntPair& localIndices) const
{
- // gives the dimension of the specified pad in the motif
+ /// Give the dimension of the specified pad in the motif
if (GetMotifType()->HasPad(localIndices))
return fPadDimensions;
//_____________________________________________________________________________
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());
//_____________________________________________________________________________
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(),
//_____________________________________________________________________________
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()));
+/* 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
+/**************************************************************************
+ * 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
AliMpMotifMap::AliMpMotifMap()
: TObject()
{
-//
+/// Default constructor
}
//_____________________________________________________________________________
-AliMpMotifMap::~AliMpMotifMap() {
-//
+AliMpMotifMap::~AliMpMotifMap()
+{
+/// Destructor
// Delete all registered motifs, motif types, motif positions
//_____________________________________________________________________________
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.");
//______________________________________________________________________________
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.");
//_____________________________________________________________________________
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) {
//______________________________________________________________________________
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);
}
//_____________________________________________________________________________
void AliMpMotifMap::PrintMotif(const AliMpVMotif* motif) const
{
-// Prints the motif.
+/// Print the motif.
// ---
cout << motif->GetID().Data() << " "
//_____________________________________________________________________________
void AliMpMotifMap::PrintMotifType(const AliMpMotifType* motifType) const
{
-// Prints the motif type.
-// ---
+/// Print the motif type.
cout << motifType->GetID().Data() << " "
<< motifType->GetNofPadsX() << " "
void AliMpMotifMap::PrintMotifPosition(
const AliMpMotifPosition* motifPosition) const
{
-// Prints the motif position.
-// ---
+/// Print the motif position.
cout << motifPosition->GetID() << " "
<< motifPosition->GetMotif()->GetID() << " "
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() << " "
//_____________________________________________________________________________
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()) {
//_____________________________________________________________________________
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()) {
//_____________________________________________________________________________
void AliMpMotifMap::PrintMotifPositions() const
{
-// Prints all the the motifs positions.
-// ---
+/// Print all the the motifs positions.
#ifdef WITH_STL
if (fMotifPositions.size()) {
#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;
//_____________________________________________________________________________
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()) {
//_____________________________________________________________________________
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) {
//_____________________________________________________________________________
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) {
//_____________________________________________________________________________
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) {
//_____________________________________________________________________________
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 ) {
//_____________________________________________________________________________
void AliMpMotifMap::Print(const char* /*option*/) const
{
-// Prints the motifs and motif types maps.
-// ---
+/// Print the motifs and motif types maps.
PrintMotifs();
PrintMotifTypes();
//_____________________________________________________________________________
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);
//_____________________________________________________________________________
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);
//_____________________________________________________________________________
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);
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) {
//_____________________________________________________________________________
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);
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);
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
+/* 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
+/**************************************************************************
+ * 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
: AliMpVPainter(),
fMotifPos(0)
{
- // default dummy constructor
+ /// Default constructor
}
//_______________________________________________________________________
: 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;
}
//_______________________________________________________________________
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();
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);
+/* 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
+/**************************************************************************
+ * 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
// ------------------------
#include "AliMpMotifPosition.h"
#include "AliMpMotifPositionPadIterator.h"
#include "AliMpMotifType.h"
+#include <iostream>
ClassImp(AliMpMotifPosition)
: AliMpVIndexed(),
fID(id),
fMotif(motif),
- fPosition(position) {
-//
+ fPosition(position)
+{
+/// Standard constructor
}
//______________________________________________________________________________
: 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
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;
}
//______________________________________________________________________________
AliMpVPadIterator* AliMpMotifPosition::CreateIterator() const
{
-// Iterator is not yet implemented.
-//
+/// Return motif position iterator
return new AliMpMotifPositionPadIterator(this);
}
//______________________________________________________________________________
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;
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);
+ }
+}
+/* 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
// 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);
private:
// methods
// data members
- Int_t fID; //identifier
+ Int_t fID; //identifier=manu id
AliMpVMotif* fMotif; //motif
TVector2 fPosition; //position
+/**************************************************************************
+ * 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
fMotifPos(0),
fIterator()
{
-// default constructor, set the current position to "invalid"
+/// Default constructor, set the current position to "invalid"
}
//______________________________________________________________________________
fMotifPos(motifPos),
fIterator(motifPos->GetMotif()->GetMotifType())
{
-// normal constructor, let *this to invalid position
+/// Standard constructor, let *this to invalid position
}
//______________________________________________________________________________
fIterator(right.fIterator)
{
-// copy constructor
+/// Copy constructor
}
//______________________________________________________________________________
AliMpMotifPositionPadIterator::~AliMpMotifPositionPadIterator()
{
-// destructor
+/// Destructor
}
// operators
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;
//______________________________________________________________________________
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();
//______________________________________________________________________________
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();
//______________________________________________________________________________
void AliMpMotifPositionPadIterator::Invalidate()
{
-// Let the iterator points to the invalid position
+/// Let the iterator point to the invalid position
+
fIterator.Invalidate();
}
+/* 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
+/**************************************************************************
+ * 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
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
}
fPadDimensionsVector2()
{
- // Normal constructor.
+ /// Standard constructor.
#ifdef WITH_STL
fPadDimensionsVector.resize(motifType->GetNofPadsX()*motifType->GetNofPadsY());
//______________________________________________________________________________
AliMpMotifSpecial::~AliMpMotifSpecial()
{
- //destructor
+ /// Destructor
#ifdef WITH_ROOT
fPadDimensionsVector.Delete();
}
+//
+// 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)];
//______________________________________________________________________________
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();
//______________________________________________________________________________
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.");
//______________________________________________________________________________
TVector2 AliMpMotifSpecial::Dimensions() const
{
- // gives the dimension of the motif
+ /// Give the dimension of the motif
Int_t i,j;
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);
//______________________________________________________________________________
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
void AliMpMotifSpecial::SetPadDimensions(const AliMpIntPair& localIndices,
const TVector2& dimensions)
{
- // set the dimensions of the pad located at <localIndices> to the given
- // <dimensions>
+ /// Set the dimensions of the pad located at <localIndices> to the given
+ /// <dimensions>
if ( !GetMotifType()->HasPad(localIndices)){
Warning("SetPadDimensions","Pad indices outside limits");
+/* 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
+/**************************************************************************
+ * 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
fVerboseLevel(0),
fConnections()
{
- // Constructor
+ /// Standard constructor
}
//______________________________________________________________________________
fVerboseLevel(0),
fConnections()
{
- // Default constructor (dummy)
+ /// Default constructor
}
//______________________________________________________________________________
-AliMpMotifType::~AliMpMotifType() {
-// Destructor
+AliMpMotifType::~AliMpMotifType()
+{
+/// Destructor
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
}
#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.");
//______________________________________________________________________________
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);
}
//______________________________________________________________________________
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;
//______________________________________________________________________________
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
//______________________________________________________________________________
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<fgkPadNumForA)
return Form("%d",padNum);
else
void AliMpMotifType::AddConnection(const AliMpIntPair &localIndices,
AliMpConnection* connection)
{
- // Add the connection to the map
+ /// Add the connection to the map
#ifdef WITH_STL
fConnections[localIndices]=connection;
//______________________________________________________________________________
AliMpConnection *AliMpMotifType::FindConnectionByPadNum(Int_t padNum) const
{
- // Retrieve the AliMpConnection pointer from its pad num
+ /// Retrieve the AliMpConnection pointer from its pad num
+
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
i!=fConnections.end();++i)
AliMpConnection *AliMpMotifType::FindConnectionByLocalIndices(
const AliMpIntPair& localIndices) const
{
- // Retrieve the AliMpConnection pointer from its position (in pad unit)
+ /// Retrieve the AliMpConnection pointer from its position (in pad unit)
+
if (!localIndices.IsValid()) return 0;
#ifdef WITH_STL
//______________________________________________________________________________
AliMpConnection *AliMpMotifType::FindConnectionByGassiNum(Int_t gassiNum) const
{
- // Return the connection for the given gassiplex number
+ /// Return the connection for the given gassiplex number
+
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
i!=fConnections.end();++i)
//______________________________________________________________________________
AliMpConnection *AliMpMotifType::FindConnectionByKaptonNum(Int_t kaptonNum) const
{
- // Gives the connection related to the given kapton number
+ /// Give the connection related to the given kapton number
+
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
i!=fConnections.end();++i)
//______________________________________________________________________________
AliMpConnection *AliMpMotifType::FindConnectionByBergNum(Int_t bergNum) const
{
- // Retrieve the connection from a Berg connector number
+ /// Retrieve the connection from a Berg connector number
+
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
i!=fConnections.end();++i)
AliMpIntPair AliMpMotifType::FindLocalIndicesByConnection(
const AliMpConnection* connection) const
{
- // Retrieve the pad position from the connection pointer.
- // Not to be used widely, since it use a search in the
- // connection list...
+ /// Retrieve the pad position from the connection pointer.
+ /// Not to be used widely, since it use a search in the
+ /// connection list...
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
//______________________________________________________________________________
AliMpIntPair AliMpMotifType::FindLocalIndicesByPadNum(Int_t padNum) const
{
- // Retrieve the AliMpConnection pointer from its pad num
+ /// Retrieve the AliMpConnection pointer from its pad num
+
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
i!=fConnections.end();++i)
//______________________________________________________________________________
AliMpIntPair AliMpMotifType::FindLocalIndicesByGassiNum(Int_t gassiNum) const
{
- // return the connection for the given gassiplex number
+ /// Return the connection for the given gassiplex number
+
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
i!=fConnections.end();++i)
//______________________________________________________________________________
AliMpIntPair AliMpMotifType::FindLocalIndicesByKaptonNum(Int_t kaptonNum) const
{
- // Gives the connection related to the given kapton number
+ /// Give the connection related to the given kapton number
+
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
i!=fConnections.end();++i)
//______________________________________________________________________________
AliMpIntPair AliMpMotifType::FindLocalIndicesByBergNum(Int_t bergNum) const
{
- // Retrieve the connection from a Berg connector number
+ /// Retrieve the connection from a Berg connector number
+
#ifdef WITH_STL
for(ConnectionMapCIterator i = fConnections.begin();
i!=fConnections.end();++i)
//______________________________________________________________________________
Int_t AliMpMotifType::GetNofPads() const
{
-// Returns the number of pads
+/// Return the number of pads
#ifdef WITH_STL
return fConnections.size();
//______________________________________________________________________________
Bool_t AliMpMotifType::HasPad(const AliMpIntPair& localIndices) const
{
- // Return true if the pad indexed by <localIndices> has a connection
+ /// Return true if the pad indexed by <localIndices> has a connection
+
if (!localIndices.IsValid()) return false;
#ifdef WITH_STL
//______________________________________________________________________________
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";
+/* 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
+/**************************************************************************
+ * 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
fMotifType(0),
fCurrentPosition(AliMpIntPair::Invalid())
{
-// default constructor, set the current position to "invalid"
+/// Default constructor, set the current position to "invalid"
}
//______________________________________________________________________________
fMotifType(motifType),
fCurrentPosition(AliMpIntPair::Invalid())
{
-// normal constructor, let *this to invalid position
+/// Standard constructor, let *this to invalid position
}
//______________________________________________________________________________
fCurrentPosition(right.fCurrentPosition)
{
-// copy constructor
+/// Copy constructor
}
//______________________________________________________________________________
AliMpMotifTypePadIterator::~AliMpMotifTypePadIterator()
{
-// destructor
+/// Destructor
}
// operators
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;
AliMpIntPair
AliMpMotifTypePadIterator::FindFirstPadInLine(AliMpIntPair indices) const
{
-// Find the indices of the first pad in the same line
-// as the <indices>, and in column, at least equal, to the
-// one of <indices>
+/// Find the indices of the first pad in the same line
+/// as the <indices>, and in column, at least equal, to the
+/// one of <indices>
if (!fMotifType) return AliMpIntPair::Invalid();
//______________________________________________________________________________
Bool_t AliMpMotifTypePadIterator::IsValid() const
{
-// Is the iterator in a valid position?
+/// Is the iterator in a valid position?
return fMotifType!=0 && fCurrentPosition.IsValid();
}
//______________________________________________________________________________
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();
//______________________________________________________________________________
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;
//______________________________________________________________________________
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();
//______________________________________________________________________________
void AliMpMotifTypePadIterator::Invalidate()
{
-// Let the iterator points to the invalid position
+/// Let the iterator point to the invalid position
+
fCurrentPosition = AliMpIntPair::Invalid();
}
+/* 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
+/* 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
typedef MotiPositionMap::const_iterator MotifPositionMapIterator;
typedef map<AliMpIntPair, AliMpMotifPosition*> MotifPositionMap2;
typedef MotifPositionMap2::const_iterator MotifPositionMap2Iterator;
+ typedef map<string,pair<Int_t,Int_t> > PadMapType;
+ typedef PadMapType::iterator PadMapTypeIterator;
typedef vector<TVector2> DimensionsMap;
#else
typedef std::map< AliMpIntPair, AliMpConnection* > ConnectionMap_t;
typedef MotiPositionMap::const_iterator MotifPositionMapIterator;
typedef std::map<AliMpIntPair, AliMpMotifPosition*> MotifPositionMap2;
typedef MotifPositionMap2::const_iterator MotifPositionMap2Iterator;
+ typedef std::map<std::string, std::pair<Int_t,Int_t> > PadMapType;
+ typedef PadMapType::iterator PadMapTypeIterator;
typedef std::vector< TVector2 > DimensionsMap;
#endif
#endif
typedef TExMapIter MotifPositionMapIterator;
typedef TExMap MotifPositionMap2;
typedef TExMapIter MotifPositionMap2Iterator;
+ typedef TExMap PadMapType;
+ typedef TExMapIter PadMapTypeIterator;
typedef TObjArray DimensionsMap;
#endif
+/**************************************************************************
+ * 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
fPads(),
fIndex(fgkInvalidIndex)
{
-// default constructor, set the current position to "invalid"
+/// Default constructor, set the current position to "invalid"
}
//______________________________________________________________________________
fCenterPad(centerPad),
fIndex(fgkInvalidIndex)
{
-// normal constructor, set *this to invalid position
+/// Standard constructor, set *this to invalid position
FillPadsVector(includeCenter);
}
const AliMpNeighboursPadIterator& right)
: AliMpVPadIterator(right)
{
-// copy constructor
+/// Copy constructor
*this = right;
}
//______________________________________________________________________________
AliMpNeighboursPadIterator::~AliMpNeighboursPadIterator()
{
-// destructor
+/// Destructor
#ifdef WITH_ROOT
fPads.Delete();
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
return *this;
}
-//private methods
+//
+// private methods
+//
//______________________________________________________________________________
Bool_t AliMpNeighboursPadIterator::IsNeighbours(const AliMpPad& pad) const
{
-// true if the pad located by <padIndice> is a neighbours of those
-// located at <fCenterPad>
+/// Return true if the pad located by <padIndice> is a neighbour of those
+/// located at <fCenterPad>
TVector2 relPos = pad.Position() - fCenterPad.Position();
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 <fCenterPad>, in a given line
-// starting from <from> and moving by <direction>
+/// Fill a new vector with all pads which have common
+/// parts with the pad located at <fCenterPad>, in a given line
+/// starting from <from> and moving by <direction>
AliMpPad current = from;
PadVector ans;
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());
}
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 <fCenterPad>, in a given line
-// starting from <from> and moving by <direction>
+/// Fill a new vector with all pads which have common
+/// parts with the pad located at <fCenterPad>, in a given line
+/// starting from <from> and moving by <direction>
AliMpPad current = from;
PadVector* ans = new PadVector();
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; i<from->GetEntriesFast(); i++) {
AliMpPad* candidate = (AliMpPad*)from->At(i);
//______________________________________________________________________________
void AliMpNeighboursPadIterator::FillPadsVector(Bool_t includeCenter)
{
-// Fill the indices vector with all indices of pads which have common
-// parts with the pad located at <fCenterPad>
+/// Fill the indices vector with all indices of pads which have common
+/// parts with the pad located at <fCenterPad>
if (!fkSegmentation || !fCenterPad.IsValid()) return;
//______________________________________________________________________________
Bool_t AliMpNeighboursPadIterator::IsValid() const
{
-// Is the iterator in a valid position?
+/// Is the iterator in a valid position?
+
return (fkSegmentation!=0 && fIndex!=fgkInvalidIndex);
}
//______________________________________________________________________________
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))
//______________________________________________________________________________
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;
//______________________________________________________________________________
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
//______________________________________________________________________________
void AliMpNeighboursPadIterator::Invalidate()
{
-// Let the iterator points to the invalid position
+/// Let the iterator point to the invalid position
+
fIndex=fgkInvalidIndex;
}
+/* 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
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+// $Id$
+// $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 <sstream>
+
+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<AliMpPCB*>(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<AliMpPCB&>(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();
+}
+
--- /dev/null
+/* 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 <vector>
+#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<AliMpMotifPosition*> fMotifs;
+#endif
+
+ ClassDef(AliMpPCB,1) // A PCB for Stations 3,4,5
+};
+
+#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+// $Id$
+// $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 <iostream>
+
+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);
+}
--- /dev/null
+/* 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
+/**************************************************************************
+ * 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
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....
}
fDimensions(0.,0.),
fValidity(false)
{
-// Default constructor - creates pad in invalid state
+/// Default constructor - creates pad in invalid state
}
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);
//_____________________________________________________________________________
Bool_t AliMpPad::operator == (const AliMpPad& pos2) const
{
+/// Equality operator
+
// are this and pos2 equals?
// one valid, one invalid
//_____________________________________________________________________________
Bool_t AliMpPad::operator!= (const AliMpPad& pos2) const
{
+/// Non-equality operator
+
// are this and pos2 equals?
return !(*this==pos2);
}
//_____________________________________________________________________________
ostream& operator<< (ostream &out, const AliMpPad& op)
{
+/// Output streaming
+
if (op.IsValid()) {
out << "Pad: Location " << op.GetLocation()
<< " Indices " << op.GetIndices()
//_____________________________________________________________________________
Bool_t operator < (const AliMpPad& left, const AliMpPad& right)
{
-return left.GetIndices()<right.GetIndices();
+/// Less operator
+
+ return left.GetIndices()<right.GetIndices();
}
//_____________________________________________________________________________
void AliMpPad::Print(const char* /*option*/) const
{
-// Prints all pad data.
-// ---
+/// Prints all pad data.
if (fValidity) {
cout << "Indices: " << fIndices << "; "
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: basic
-//
-// Class AliMpPad
-// ---------------
-// Class which encapsuate all informations about a pad
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpPad.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup basic
+/// \class AliMpPad
+/// \brief Class which encapsuate all information about a pad
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_PAD_H
#define ALI_MP_PAD_H
+/**************************************************************************
+ * 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: AliMpPadIteratorPtr.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $
// Category: basic
//
// Class AliMpPadIteratorPtr
//_____________________________________________________________________________
AliMpPadIteratorPtr::AliMpPadIteratorPtr(AliMpVPadIterator* it)
: fIterator(it)
-{}
+{
+/// Standard constructor
+}
//_____________________________________________________________________________
AliMpPadIteratorPtr::AliMpPadIteratorPtr(const AliMpPadIteratorPtr& right)
- : TObject(right) {
-//
+ : TObject(right)
+{
+/// Protected copy constructor (not provided)
+
Fatal("AliMpPadIteratorPtr", "Copy constructor not provided.");
}
//_____________________________________________________________________________
-AliMpPadIteratorPtr::~AliMpPadIteratorPtr() {
-//
+AliMpPadIteratorPtr::~AliMpPadIteratorPtr()
+{
+/// Destructor
+
delete fIterator;
}
AliMpPadIteratorPtr&
AliMpPadIteratorPtr::operator=(const AliMpPadIteratorPtr& 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;
}
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: basic
-//
-// Class AliMpPadIteratorPtr
-// --------------------------
-// Pointer to the virtual pad iterator;
-// enables to allocate the virtual pad iterator on stack.
-// Usage:
-// AliMpVIndexed* myIndexed = MyIndexed()
-// MVIterator& it = *AliMpPadIteratorPtr(myIndexed->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
+/**************************************************************************
+ * 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
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;
+/* 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<AliMpPad, AliMpPad>
-// 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<AliMpPad, AliMpPad>
+/// to avoid problems with CINT.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_PAD_PAIR_H
#define ALI_MP_PAD_PAIR_H
+/**************************************************************************
+ * 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
AliMpPadRow::AliMpPadRow(AliMpXDirection direction)
: TObject(),
fDirection(direction),
- fID(0)
+ fID(0)
{
-//
+/// Standard constructor
}
//_____________________________________________________________________________
fDirection(kLeft),
fID(0)
{
-//
+/// Default constructor
}
//_____________________________________________________________________________
-AliMpPadRow::~AliMpPadRow() {
-//
+AliMpPadRow::~AliMpPadRow()
+{
+/// Destructor
for (Int_t i=0; i<GetNofPadRowSegments() ; i++)
delete fSegments[i];
//_____________________________________________________________________________
Double_t AliMpPadRow::CurrentBorderX() const
{
-// Returns the left/right x border
-// (depending on the direction which the row segments are filled in).
-// ---
+/// Return the left/right x border
+/// (depending on the direction which the row segments are filled in).
if (GetNofPadRowSegments() == 0)
return fOffsetX;
AliMpPadRow::AddPadRowSegment(AliMpMotif* motif, Int_t motifPositionId,
Int_t nofPads)
{
-// Adds pad row segment.
-// ---
+/// Add a pad row segment.
AliMpVPadRowSegment* padRowSegment = 0;
//_____________________________________________________________________________
AliMpVPadRowSegment* AliMpPadRow::FindPadRowSegment(Double_t x) const
{
-// Finds the row segment for the specified x position;
-// returns 0 if no row segment is found.
-// ---
+/// Find the row segment for the specified x position;
+/// return 0 if no row segment is found.
for (Int_t i=0; i<GetNofPadRowSegments(); i++) {
AliMpVPadRowSegment* rs = GetPadRowSegment(i);
//_____________________________________________________________________________
Double_t AliMpPadRow::HalfSizeY() const
{
+/// Return the half size in y
+
return GetPadRowSegment(0)->HalfSizeY();
}
//_____________________________________________________________________________
void AliMpPadRow::SetID(Int_t id)
{
-// Sets the ID.
-// ---
+/// Set the ID.
fID = id;
}
//_____________________________________________________________________________
void AliMpPadRow::SetOffsetX(Double_t offsetX)
{
-// Sets the x offset.
-// ---
+/// Set the x offset.
fOffsetX = offsetX;
}
//_____________________________________________________________________________
Int_t AliMpPadRow::GetID() const
{
-// Returns the row ID.
-// ---
+/// Return the pad row ID.
return fID;
}
//_____________________________________________________________________________
Int_t AliMpPadRow::GetNofPadRowSegments() const
{
-// Returns number of row segments.
-// ---
+/// Return the number of pad row segments.
#ifdef WITH_STL
return fSegments.size();
//_____________________________________________________________________________
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");
//_____________________________________________________________________________
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; i<GetNofPadRowSegments(); i++)
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: sector
-//
-// Class AliMpPadRow
-// ------------------
-// Class describing a pad row composed of the pad row segments.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpPadRow.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpPadRow
+/// \brief A pad row composed of the pad row segments.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_PAD_ROW_H
#define ALI_MP_PAD_ROW_H
+/**************************************************************************
+ * 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: AliMpPadRowLSegment.cxx,v 1.4 2005/08/26 15:43:36 ivana Exp $
// Category: sector
//
// Class AliMpPadRowLSegment
Int_t motifPositionId, Int_t nofPads)
: AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
{
-//
+/// Standard constructor
}
//_____________________________________________________________________________
AliMpPadRowLSegment::AliMpPadRowLSegment()
: AliMpVPadRowSegment()
{
-//
+/// Default constructor
}
//_____________________________________________________________________________
-AliMpPadRowLSegment::~AliMpPadRowLSegment() {
-//
+AliMpPadRowLSegment::~AliMpPadRowLSegment()
+{
+/// Destructor
}
//
//_____________________________________________________________________________
Double_t AliMpPadRowLSegment::FirstPadCenterX() const
{
-// Returns the x coordinate of the first (the most right) pad center
-// in global coordinate system.
-// ---
+/// Return the x coordinate of the first (the most right) pad center
+/// in the global coordinate system.
return GetOffsetX() - GetMotif()->GetPadDimensions().X();
}
//_____________________________________________________________________________
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();
}
//_____________________________________________________________________________
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
//_____________________________________________________________________________
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();
}
//_____________________________________________________________________________
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();
}
//_____________________________________________________________________________
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();
}
+/* 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
+/**************************************************************************
+ * 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
Int_t motifPositionId, Int_t nofPads)
: AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
{
-//
+/// Standard constructor
}
//______________________________________________________________________________
AliMpPadRowRSegment::AliMpPadRowRSegment()
: AliMpVPadRowSegment()
{
-//
+/// Default constructor
}
//______________________________________________________________________________
-AliMpPadRowRSegment::~AliMpPadRowRSegment() {
-//
+AliMpPadRowRSegment::~AliMpPadRowRSegment()
+{
+/// Destructor
}
//
//______________________________________________________________________________
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();
}
//______________________________________________________________________________
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();
}
//______________________________________________________________________________
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
//______________________________________________________________________________
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();
}
//______________________________________________________________________________
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();
}
//______________________________________________________________________________
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();
}
+/* 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
+/* 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
+/**************************************************************************
+ * 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
fSegments(),
fMotifMap(motifMap)
{
-//
+/// Standard constructor
}
//_____________________________________________________________________________
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<GetNofRowSegments(); i++)
//_____________________________________________________________________________
AliMpRow& AliMpRow::operator=(const AliMpRow& 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;
}
//_____________________________________________________________________________
AliMpVRowSegment* AliMpRow::FindRowSegment(Int_t ix) const
{
-// Finds first normal row segment with low indices limit >= ix.
-// ---
+/// Find first normal row segment with low indices limit >= ix.
for (Int_t i=0; i<GetNofRowSegments(); i++) {
AliMpVRowSegment* segment = GetRowSegment(i);
AliMpMotifPosition*
AliMpRow::FindMotifPosition(AliMpVRowSegment* segment, Int_t ix) const
{
-// Finds first motif position in the specified row segment
-// with high indices limit >= ix.
-// ---
+/// Find first motif position in the specified row segment
+/// with high indices limit >= ix.
if (!segment) return 0;
//_____________________________________________________________________________
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; j<GetNofRowSegments(); j++) {
AliMpVRowSegment* rowSegment = GetRowSegment(j);
//_____________________________________________________________________________
void AliMpRow::CheckEmpty() const
{
-// Give a fatal if row is empty.
-// ---
+/// Give a fatal if the row is empty.
if (GetNofRowSegments() == 0)
Fatal("CheckEmpty", "Empty row");
//_____________________________________________________________________________
void AliMpRow::AddRowSegment(AliMpVRowSegment* rowSegment)
{
-// Adds row segment at the end.
-// ---
+/// Add row segment at the end.
#ifdef WITH_STL
fSegments.push_back(rowSegment);
//_____________________________________________________________________________
void AliMpRow::AddRowSegmentInFront(AliMpVRowSegment* rowSegment)
{
-// Inserts row segment in the first vector position.
-// ---
+/// Insert row segment in the first vector position.
#ifdef WITH_STL
fSegments.insert(fSegments.begin(), rowSegment);
//_____________________________________________________________________________
AliMpVRowSegment* AliMpRow::FindRowSegment(Double_t x) const
{
-// Finds the row segment for the specified x position;
-// returns 0 if no row segment is found.
-// ---
+/// Find the row segment for the specified x position;
+/// return 0 if no row segment is found.
for (Int_t i=0; i<GetNofRowSegments(); i++) {
//_____________________________________________________________________________
Double_t AliMpRow::LowBorderY() const
{
-// Returns the lowest row offset (the Y coordinate of the position of the
-// low border of motif).
-// ---
+/// Return the lowest row offset (the Y coordinate of the position of the
+/// low border of motif).
CheckEmpty();
//_____________________________________________________________________________
Double_t AliMpRow::UpperBorderY() const
{
-// Returns the uppermost row offset (the Y coordinate of the position of the
-// upper border of motif).
-// ---
-
+/// Return the uppermost row offset (the Y coordinate of the position of the
+/// upper border of motif).
+\
CheckEmpty();
return fOffsetY + GetRowSegment(0)->HalfSizeY();
//_____________________________________________________________________________
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;
}
//_____________________________________________________________________________
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();
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();
//_____________________________________________________________________________
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.;
//_____________________________________________________________________________
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.;
//_____________________________________________________________________________
void AliMpRow::SetRowSegmentOffsets(const TVector2& offset)
{
-// Sets the row segments offsets in X .
-// ---
+/// Set the row segments offsets in X .
CheckEmpty();
//_____________________________________________________________________________
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();
//_____________________________________________________________________________
Int_t AliMpRow::GetNofRowSegments() const
{
-// Returns number of row segments.
-// ---
+/// Return number of row segments.
#ifdef WITH_STL
return fSegments.size();
//_____________________________________________________________________________
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");
+/* 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
+/**************************************************************************
+ * 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
: AliMpVPainter(),
fRow(0)
{
- // default dummy constructor
+ /// Default constructor
}
//_______________________________________________________________________
: 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.");
}
//_______________________________________________________________________
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;
}
//_______________________________________________________________________
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 <option> is treated as follows:
-// case "S" : each row segments are drawn separately
-// case "" : the whole row is drawn at once
-// in both cases, the rest of the option is passed
-// as argument to the Draw function of respectively
-// zone or row objects.
-// ---
+/// Draw the sector on the current pad
+/// The first letter of <option> is treated as follows:
+/// - case "S" : each row segments are drawn separately
+/// - case "" : the whole row is drawn at once
+/// in both cases, the rest of the option is passed
+/// as argument to the Draw function of respectively
+/// zone or row objects.
+
AliMpGraphContext *gr = AliMpGraphContext::Instance();
if( !fRow) return;
//_______________________________________________________________________
void AliMpRowPainter::Paint(Option_t *option)
{
- // Paint the object
+ /// Paint the object
AliMpGraphContext *gr = AliMpGraphContext::Instance();
if( !fRow) return;
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: graphics
-//
-// Class AliMpRowPainter
-// ---------------------
-// Class for drawing a row into canvas
-//
-// Authors: David Guez, IPN Orsay
+// $MpId: AliMpRowPainter.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup graphics
+/// \class AliMpRowPainter
+/// \brief Class for drawing a row into canvas
+///
+/// Authors: David Guez, IPN Orsay
#ifndef ALI_MP_ROW_PAINTER_H
#define ALI_MP_ROW_PAINTER_H
+/**************************************************************************
+ * 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: AliMpRowSegment.cxx,v 1.8 2005/08/26 15:43:36 ivana Exp $
// Category: sector
//
// Class AliMpRowSegment
fMotifPositionId(motifPositionId),
fMotifPositionDId(motifPositionDId)
{
-//
+/// Standard constructor
+
// Keep pad offset in the low indices limits
SetLowIndicesLimit(padOffset);
}
fMotifPositionId(0),
fMotifPositionDId(0)
{
-//
+/// Default constructor
}
//_____________________________________________________________________________
AliMpRowSegment::AliMpRowSegment(const AliMpRowSegment& right)
- : AliMpVRowSegment(right) {
-//
+ : AliMpVRowSegment(right)
+{
+/// Protected copy constructor (not provided)
+
Fatal("AliMpRowSegment", "Copy constructor not provided.");
}
//_____________________________________________________________________________
-AliMpRowSegment::~AliMpRowSegment() {
-//
+AliMpRowSegment::~AliMpRowSegment()
+{
+/// Destructor
}
//
//_____________________________________________________________________________
AliMpRowSegment& AliMpRowSegment::operator=(const AliMpRowSegment& 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;
}
//_____________________________________________________________________________
Double_t AliMpRowSegment::FirstMotifCenterX() const
{
-// Returns the x coordinate of the first motif center
-// in global coordinate system.
-// ---
+/// Return the x coordinate of the first motif center
+/// in the global coordinate system.
return fOffset.X();
}
//_____________________________________________________________________________
Double_t AliMpRowSegment::LastMotifCenterX() const
{
-// Returns the x coordinate of the last motif center
-// in global coordinate system.
-// ---
+/// Return the x coordinate of the last motif center
+/// in the global coordinate system.
return fOffset.X() + 2.*(fNofMotifs-1)*fMotif->Dimensions().X();
}
//_____________________________________________________________________________
Double_t AliMpRowSegment::MotifCenterX(Int_t motifPositionId) const
{
-// Returns the x coordinate of the motif specified with
-// the given position identifier.
-// ---
+/// Return the x coordinate of the motif specified with
+/// the given position identifier.
// Check if x is in the row segment range
if (! HasMotifPosition(motifPositionId)) {
//_____________________________________________________________________________
Double_t AliMpRowSegment::MotifCenterY(Int_t motifPositionId) const
{
-// Returns the y coordinate of the motif specified with
-// the given position identifier.
-// ---
+/// Return the y coordinate of the motif specified with
+/// the given position identifier.
// Check if x is in the row segment range
if (! HasMotifPosition(motifPositionId)) {
//_____________________________________________________________________________
Bool_t AliMpRowSegment::IsInside(const TVector2& position, Bool_t warn) const
{
-// Checks if the position is inside some motif of this row segment.
-// ---
+/// Check if the position is inside some motif of this row segment.
Double_t minY = GetRow()->Position().Y() + fOffset.Y() - fMotif->Dimensions().Y();
Double_t maxY = GetRow()->Position().Y() + fOffset.Y() + fMotif->Dimensions().Y();
//_____________________________________________________________________________
Double_t AliMpRowSegment::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 FirstMotifCenterX() - fMotif->Dimensions().X();
}
//_____________________________________________________________________________
Double_t AliMpRowSegment::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 LastMotifCenterX() + fMotif->Dimensions().X();
}
//_____________________________________________________________________________
Double_t AliMpRowSegment::HalfSizeY() const
{
-// Returns the size in y of this row segment.
-// ---
+/// Return the size in y of this row segment.
return fMotif->Dimensions().Y() + fOffset.Y();
}
//_____________________________________________________________________________
AliMpVMotif* AliMpRowSegment::FindMotif(const TVector2& position) const
{
-// Returns the motif of this row;
-// ---
+/// Return the motif of this row;
if (IsInside(position, false))
return fMotif;
//_____________________________________________________________________________
Int_t AliMpRowSegment::FindMotifPositionId(const TVector2& position) const
{
-// Returns the motif position identified for the given
-// geometric position.
-// ---
+/// Return the motif position identified for the given
+/// geometric position.
if (!IsInside(position, false)) return 0;
//_____________________________________________________________________________
Bool_t AliMpRowSegment::HasMotifPosition(Int_t motifPositionId) const
{
-// Returns true if the motif specified with the given position identifier
-// is in this segment.
-// ---
+/// Return true if the motif specified with the given position identifier
+/// is in this segment.
Int_t minId = TMath::Min(fMotifPositionId,
fMotifPositionId + (fNofMotifs-1)*fMotifPositionDId);
//_____________________________________________________________________________
TVector2 AliMpRowSegment::MotifCenter(Int_t motifPositionId) const
{
-// Returns the coordinates of the motif specified with
-// the given position identifier.
-// ---
+/// Return the coordinates of the motif specified with
+/// the given position identifier.
return TVector2(MotifCenterX(motifPositionId), MotifCenterY(motifPositionId));
}
//_____________________________________________________________________________
TVector2 AliMpRowSegment::Position() const
{
-// Returns the position of the row segment centre.
-// ---
+/// Return the position of the row segment centre.
Double_t x = (LeftBorderX() + RightBorderX())/2.;
Double_t y = GetRow()->Position().Y();
//_____________________________________________________________________________
TVector2 AliMpRowSegment::Dimensions() const
{
-// Returns the halflengths of the row segment in x, y.
+/// Return the halflengths of the row segment in x, y.
// ---
Double_t x = (RightBorderX() - LeftBorderX())/2.;
//_____________________________________________________________________________
void AliMpRowSegment::SetOffset(const TVector2& offset)
{
-// Calculates offset from given offset and
-// stored offset in pads.
-// ---
+/// Calculate offset from given offset and
+/// stored offset in pads.
AliMpMotifTypePadIterator iter(fMotif->GetMotifType());
iter.First();
//_____________________________________________________________________________
void AliMpRowSegment::SetGlobalIndices(AliMpRow* /*rowBefore*/)
{
-// Sets indices limits.
-// ---
+/// Set global indices limits.
// The low/high indices limits has to be taken as the highest/lowest from all
// motif positions
Int_t AliMpRowSegment::SetIndicesToMotifPosition(Int_t i,
const AliMpIntPair& indices)
{
-// Sets global indices to i-th motif position and returns next index
-// in x.
-// ---
+/// Set global indices to i-th motif position and returns next index
+/// in x.
// Get motif position
AliMpMotifPosition* motifPosition
//_____________________________________________________________________________
AliMpRow* AliMpRowSegment::GetRow() const
{
-// Returns the row.which this row segment belongs to.
-// ---
+/// Return the row.which this row segment belongs to.
return fRow;
}
//_____________________________________________________________________________
Int_t AliMpRowSegment::GetNofMotifs() const
{
-// Returns number of motifs in this this row segment.
-// ---
+/// Return number of motifs in this this row segment.
return fNofMotifs;
}
//_____________________________________________________________________________
Int_t AliMpRowSegment::GetMotifPositionId(Int_t i) const
{
-// Returns number of motifs in this this row segment.
-// ---
+/// Return number of motifs in this this row segment.
return fMotifPositionId + i*fMotifPositionDId;
}
//_____________________________________________________________________________
AliMpVMotif* AliMpRowSegment::GetMotif(Int_t /*i*/) const
{
-// Returns the motif of this row segment.
-// ---
+/// Return the motif of this row segment.
return fMotif;
}
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: sector
-//
-// Class AliMpRowSegment
-// ---------------------
-// Class describing a row segment composed of the
-// the identic motifs.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpRowSegment.h,v 1.7 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpRowSegment
+/// \brief A row segment composed of the the identic motifs.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_ROW_SEGMENT_H
#define ALI_MP_ROW_SEGMENT_H
+/**************************************************************************
+ * 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: AliMpRowSegmentLSpecial.cxx,v 1.5 2005/08/26 15:43:36 ivana Exp $
// Category: sector
//
// Class AliMpRowSegmentLSpecial
AliMpRowSegmentLSpecial::AliMpRowSegmentLSpecial(AliMpRow* row, Double_t offsetX)
: AliMpVRowSegmentSpecial(row, offsetX)
{
-//
+/// Standard constructor
}
//______________________________________________________________________________
AliMpRowSegmentLSpecial::AliMpRowSegmentLSpecial()
: AliMpVRowSegmentSpecial()
{
-//
+/// Default constructor
}
//______________________________________________________________________________
AliMpRowSegmentLSpecial::~AliMpRowSegmentLSpecial()
{
-//
+/// Destructor
}
//
AliMpVPadRowSegment*
AliMpRowSegmentLSpecial::FindMostRightPadRowSegment(Int_t motifPositionId) const
{
-// Find the most right pad row segment with this motifPositionId.
-// ---
+/// Find the most right pad row segment with this motifPositionId.
AliMpVPadRowSegment* found = 0;
//______________________________________________________________________________
TVector2 AliMpRowSegmentLSpecial::MotifCenterSlow(Int_t motifPositionId) const
{
-// Returns the coordinates of the motif specified with
-// the given position identifier.
-// !! Applicable only for motifs that have their most down pad in
-// this row segment.
-// ---
+/// Return the coordinates of the motif specified with
+/// the given position identifier. \n
+/// !! Applicable only for motifs that have their most down pad in
+/// this row segment.
// Find the first (left, down) pad row segment with this motifPositionId.
AliMpVPadRowSegment* downPadRowSegment
//______________________________________________________________________________
void AliMpRowSegmentLSpecial::UpdatePadsOffset()
{
-// Sets low indices limit to the pad offset calculated
-// from the neighbour normal segment.
-// ---
+/// Set low indices limit to the pad offset calculated
+/// from the neighbour normal segment.
// Get the neighbour row segment
// (the first normal segment)
//______________________________________________________________________________
Double_t AliMpRowSegmentLSpecial::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.
Double_t leftBorder = DBL_MAX;
for (Int_t i=0; i<GetNofPadRows(); i++) {
//______________________________________________________________________________
Double_t AliMpRowSegmentLSpecial::RightBorderX() const
{
-// Returns the x coordinate of the right row segment border
-// in global coordinate system.
-// ---
+/// Returns the x coordinate of the right row segment border
+/// in the global coordinate system.
Double_t sameBorder = GetOffsetX();
//______________________________________________________________________________
TVector2 AliMpRowSegmentLSpecial::Position() const
{
-// Returns the position of the row segment centre.
-// The centre is defined as the centre of the rectangular
-// row segment envelope.
-// ---
+/// Return the position of the row segment centre.
+/// The centre is defined as the centre of the rectangular
+/// row segment envelope.
Double_t x = GetOffsetX() - Dimensions().X();
Double_t y = GetRow()->Position().Y();
Int_t AliMpRowSegmentLSpecial::SetIndicesToMotifPosition(Int_t i,
const AliMpIntPair& indices)
{
-// Sets global indices to i-th motif position and returns next index in x.
-// ---
+/// Set global indices to i-th motif position and returns next index in x.
// Get motif position
AliMpMotifPosition* motifPosition
//______________________________________________________________________________
void AliMpRowSegmentLSpecial::SetGlobalIndices(AliMpRow* rowBefore)
{
-// Sets indices limits
-// The limits are defined as the limits of the smallest rectangle which
-// includes all pads of this special row segment.
-// ---
+/// Set indices limits
+/// The limits are defined as the limits of the smallest rectangle which
+/// includes all pads of this special row segment.
// Low ix
Int_t ixl = GetLowIndicesLimit().GetFirst() + AliMpConstants::StartPadIndex();
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: sector
-//
-// Class AliMpRowSegmentLSpecial
-// -----------------------------
-// Class describing a special inner row segment composed of the
-// pad rows.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpRowSegmentLSpecial.h,v 1.5 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpRowSegmentLSpecial
+/// \brief A special inner row segment composed of the pad rows.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_ROW_SEGMENT_L_SPECIAL_H
#define ALI_MP_ROW_SEGMENT_L_SPECIAL_H
+/**************************************************************************
+ * 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: AliMpRowSegmentPainter.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $
// Category: graphics
//
// Class AliMpRowSegmentPainter
: AliMpVPainter(),
fRowSegment(0)
{
- // default dummy constructor
+ /// Default constructor
}
//_______________________________________________________________________
: AliMpVPainter(),
fRowSegment(row)
{
- // normal constructor
+ /// Standard constructor
}
const AliMpRowSegmentPainter& right)
: AliMpVPainter(right)
{
- // copy constructor (not implemented)
+ /// Protected copy constructor (not provided)
Fatal("AliMpRowSegmentPainter", "Copy constructor not provided.");
}
//_______________________________________________________________________
AliMpRowSegmentPainter::~AliMpRowSegmentPainter()
{
- // destructor
+ /// Destructor
}
//_____________________________________________________________________________
AliMpRowSegmentPainter&
AliMpRowSegmentPainter::operator=(const AliMpRowSegmentPainter& 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;
}
//_______________________________________________________________________
TVector2 AliMpRowSegmentPainter::GetPosition() const
{
-// Get the owned object's position
- return fRowSegment->Position();
+/// Get the owned object's position
+ return fRowSegment->Position();
}
+
//_______________________________________________________________________
TVector2 AliMpRowSegmentPainter::GetDimensions() const
{
-// Get the owned object's dimensions
- return fRowSegment->Dimensions();
+/// Get the owned object's dimensions
+ return fRowSegment->Dimensions();
}
//_______________________________________________________________________
void AliMpRowSegmentPainter::DumpObject()
{
-// Draw the owned object
- fRowSegment->Dump();
+/// Draw the owned object
+ fRowSegment->Dump();
}
//_______________________________________________________________________
void AliMpRowSegmentPainter::Draw(Option_t *option)
{
-// Draw the sector on the current pad
-// The first letter of <option> is treated as follows:
-// case "S" : each row segments are drawn separately
-// case "" : the whole row is drawn at once
-// in both cases, the rest of the option is passed
-// as argument to the Draw function of respectively
-// zone or row objects.
-// ---
+/// Draw the sector on the current pad
+/// The first letter of <option> is treated as follows:
+/// - case "S" : each row segments are drawn separately
+/// - case "" : the whole row is drawn at once
+/// in both cases, the rest of the option is passed
+/// as argument to the Draw function of respectively
+/// zone or row objects.
+
AliMpGraphContext *gr = AliMpGraphContext::Instance();
if( !fRowSegment) return;
//_______________________________________________________________________
void AliMpRowSegmentPainter::Paint(Option_t* /*option*/)
{
-// Paint the object
+/// Paint the object
+
AliMpGraphContext *gr = AliMpGraphContext::Instance();
if (!fRowSegment) return;
Int_t col=gVirtualX->GetFillColor();
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: graphics
-//
-// Class AliMpRowSegmentPainter
-// ----------------------------
-// Class for drawing a motif into canvas
-//
-// Authors: David Guez, IPN Orsay
+// $MpId: AliMpRowSegmentPainter.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup graphics
+/// \class AliMpRowSegmentPainter
+/// \brief Class for drawing a motif into canvas
+///
+/// Authors: David Guez, IPN Orsay
#ifndef ALI_MP_ROW_SEGMENT_PAINTER_H
#define ALI_MP_ROW_SEGMENT_PAINTER_H
+/**************************************************************************
+ * 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: AliMpRowSegmentRSpecial.cxx,v 1.5 2005/08/26 15:43:36 ivana Exp $
// Category: sector
//
// Class AliMpRowSegmentRSpecial
AliMpRowSegmentRSpecial::AliMpRowSegmentRSpecial(AliMpRow* row, Double_t offsetX)
: AliMpVRowSegmentSpecial(row, offsetX)
{
-//
+/// Standard constructor
}
//______________________________________________________________________________
AliMpRowSegmentRSpecial::AliMpRowSegmentRSpecial()
: AliMpVRowSegmentSpecial()
{
-//
+/// Default constructor
}
//______________________________________________________________________________
AliMpRowSegmentRSpecial::~AliMpRowSegmentRSpecial()
{
-//
+/// Destructor
}
//
AliMpVPadRowSegment*
AliMpRowSegmentRSpecial::FindMostLeftPadRowSegment(Int_t motifPositionId) const
{
-// Find the most left pad row segment with this motifPositionId.
-// ---
+/// Find the most left pad row segment with this motifPositionId.
AliMpVPadRowSegment* found = 0;
//______________________________________________________________________________
void AliMpRowSegmentRSpecial::SetGlobalIndicesLow()
{
-// ...
+/// Set global low indices
// Last normal row segment in the row
// (preceding this special row segment)
//______________________________________________________________________________
TVector2 AliMpRowSegmentRSpecial::MotifCenterSlow(Int_t motifPositionId) const
{
-// Returns the coordinates of the motif specified with
-// the given position identifier.
-// !! Applicable only for motifs that have their most down pad in
-// this row segment.
-// ---
+/// Return the coordinates of the motif specified with
+/// the given position identifier. \n
+/// !! Applicable only for motifs that have their most down pad in
+/// this row segment.
// Find the first (left, down) pad row segment with this motifPositionId.
AliMpVPadRowSegment* downPadRowSegment
//______________________________________________________________________________
Double_t AliMpRowSegmentRSpecial::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.
// The right edge of the last normal segment
Double_t sameBorder = GetOffsetX();
//______________________________________________________________________________
Double_t AliMpRowSegmentRSpecial::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.
Double_t rightBorder = -DBL_MAX;
for (Int_t i=0; i<GetNofPadRows(); i++) {
//______________________________________________________________________________
TVector2 AliMpRowSegmentRSpecial::Position() const
{
-// Returns the position of the row segment centre.
-// The centre is defined as the centre of the rectangular
-// row segment envelope.
-// ---
+/// Return the position of the row segment centre.
+/// The centre is defined as the centre of the rectangular
+/// row segment envelope.
// The right edge of the last normal segment
Double_t x = GetOffsetX() + Dimensions().X();
Int_t AliMpRowSegmentRSpecial::SetIndicesToMotifPosition(Int_t i,
const AliMpIntPair& indices)
{
-// Sets global indices to i-th motif position and returns next index in x.
-// ---
+/// Set global indices to i-th motif position and returns next index in x.
// Update low indices limit for this row segment
SetGlobalIndicesLow();
//______________________________________________________________________________
void AliMpRowSegmentRSpecial::SetGlobalIndices(AliMpRow* rowBefore)
{
-// Sets indices limits.
-// The limits are defined as the limits of the smallest rectangle which
-// includes all pads of this special row segment.
-// ---
+/// Set indices limits.
+/// The limits are defined as the limits of the smallest rectangle which
+/// includes all pads of this special row segment.
// Get first motif position
AliMpMotifPosition* firstMotifPosition
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: sector
-//
-// Class AliMpRowSegmentRSpecial
-// -----------------------------
-// Class describing a special outer row segment composed of the
-// pad rows.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpRowSegmentRSpecial.h,v 1.5 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpRowSegmentRSpecial
+/// \brief A special outer row segment composed of the pad rows.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_ROW_SEGMENT_R_SPECIAL_H
#define ALI_MP_ROW_SEGMENT_R_SPECIAL_H
+/**************************************************************************
+ * 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: AliMpSector.cxx,v 1.9 2005/09/02 10:01:09 ivana Exp $
// Category: sector
//
// Class AliMpSector
fDirection(direction),
fMinPadDimensions(TVector2(1.e6, 1.e6))
{
-//
+/// Standard constructor
+
fMotifMap = new AliMpMotifMap();
#ifdef WITH_STL
//_____________________________________________________________________________
AliMpSector::AliMpSector(const AliMpSector& right)
- : TObject(right) {
-//
+ : TObject(right)
+{
+/// Protected copy constructor (not provided)
+
Fatal("AliMpSector", "Copy constructor not provided.");
}
fDirection(kX),
fMinPadDimensions(TVector2(0., 0.))
{
-//
+/// Default constructor
}
//_____________________________________________________________________________
-AliMpSector::~AliMpSector() {
-//
+AliMpSector::~AliMpSector()
+{
+/// Destructor
+
// deletes
for (Int_t izone = 0; izone<GetNofZones(); izone++)
delete fZones[izone];
//_____________________________________________________________________________
AliMpSector& AliMpSector::operator=(const AliMpSector& 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;
}
//_____________________________________________________________________________
AliMpVPadIterator* AliMpSector::CreateIterator() const
{
+/// Create sector pad iterator
+
return new AliMpSectorPadIterator(this);
}
//_____________________________________________________________________________
AliMpVRowSegment* AliMpSector::FindRowSegment(const TVector2& position) const
{
-// Finds the row segment in the specified position.
-// Returns 0 if no motif is found.
-// ---
+/// Find the row segment in the specified position. \n
+/// Return if no motif is found.
// Find row
AliMpRow* row = FindRow(position);
//_____________________________________________________________________________
void AliMpSector::SetRowOffsets()
{
-// For each row checks consitency of the row segments
-// and calculates the row offset.
-// ---
+/// For each row check consitency of the row segments
+/// and calculate the row offset.
Double_t offset = fOffset.Y();
//_____________________________________________________________________________
void AliMpSector::SetMotifPositions()
{
-// Creates motif positions objects and fills them in the motif map.
-// ---
+/// Create motif positions objects and fills them in the motif map.
for (Int_t i=0; i<GetNofRows(); i++)
GetRow(i)->SetMotifPositions();
//_____________________________________________________________________________
void AliMpSector::SetGlobalIndices()
{
-// Set the indices limits to all indexed elements
-// (row, row segment, motif positions).
-// ---
+/// Set the indices limits to all indexed elements
+/// (row, row segment, motif positions).
AliMpIntPair indices(0,0);
AliMpRow* rowBefore=0;
//_____________________________________________________________________________
void AliMpSector::SetMinPadDimensions()
{
-// Sets the minimal pad dimensions.
-// ---
+/// Set the minimal pad dimensions.
for (Int_t i=1; i<GetNofZones()+1; i++) {
TVector2 padDimensions = GetZone(i)->GetPadDimensions();
//_____________________________________________________________________________
void AliMpSector::SetRowSegmentOffsets()
{
-// For all rows sets offset to all row segments.
-// ---
+/// For all rows set the offset to all row segments.
for (Int_t irow=0; irow<GetNofRows(); irow++)
GetRow(irow)->SetRowSegmentOffsets(fOffset);
//_____________________________________________________________________________
void AliMpSector::Initialize()
{
-// Makes needed settings after sector is read from
-// data files.
-// ---
+/// Make needed settings after sector is read from
+/// data files.
SetRowOffsets();
SetMotifPositions();
//_____________________________________________________________________________
void AliMpSector::PrintGeometry() const
{
-// Prints the positions of rows, rows segments
-// ---
+/// Print the positions of rows, rows segments
for (Int_t i=0; i<GetNofRows(); i++) {
AliMpRow* row = GetRow(i);
//_____________________________________________________________________________
AliMpRow* AliMpSector::FindRow(const TVector2& position) const
{
-// Finds the row for the specified y position.
-// If y is on border the lowest row is returned.
-// ---
+/// Find the row for the specified y position. \n
+/// If y is on border the lowest row is returned.
Double_t y = position.Y();
//_____________________________________________________________________________
AliMpVMotif* AliMpSector::FindMotif(const TVector2& position) const
{
-// Finds the motif in the specified position.
-// Returns 0 if no motif is found.
-// ---
+/// Find the motif in the specified position. \n
+/// Return 0 if no motif is found.
// Find the row segment
AliMpVRowSegment* rowSegment = FindRowSegment(position);
// Find motif
return rowSegment->FindMotif(position);
}
-
//_____________________________________________________________________________
Int_t AliMpSector::FindMotifPositionId(const TVector2& position) const
{
-// Finds the motif position ID in the specified position.
-// Returns 0 if no motif is found.
-// ---
-
+/// Find the motif position ID in the specified position. \n
+/// Return 0 if no motif is found.
+
// Find the row segment
AliMpVRowSegment* rowSegment = FindRowSegment(position);
//_____________________________________________________________________________
AliMpRow* AliMpSector::FindRow(Int_t motifPositionId) const
{
-// Finds the row with the the specified motif position.
-// Returns 0 if no row is found.
-// ---
+/// Find the row with the the specified motif position. \n
+/// Return 0 if no row is found.
AliMpVRowSegment* segment = FindRowSegment(motifPositionId);
//_____________________________________________________________________________
AliMpVRowSegment* AliMpSector::FindRowSegment(Int_t motifPositionId) const
{
-// Finds the row segment with the the specified motif position.
-// Returns 0 if no row segment is found.
-// ---
+/// Find the row segment with the the specified motif position. \n
+/// Return 0 if no row segment is found.
for (Int_t irow=0; irow<GetNofRows(); irow++) {
//_____________________________________________________________________________
TVector2 AliMpSector::FindPosition(Int_t motifPositionId) const
{
-// Finds the position of the motif specified by its position Id.
-// Returns 0 if no row segment is found.
-// ---
+/// Find the position of the motif specified by its position Id. \n
+/// Return 0 if no row segment is found.
AliMpVRowSegment* segment = FindRowSegment(motifPositionId);
//_____________________________________________________________________________
AliMpZone* AliMpSector::FindZone(const TVector2& padDimensions) const
{
-// Finds the zone with specified padDimensions.
-// ---
+/// Find the zone with specified padDimensions.
for (Int_t i=0; i<GetNofZones(); i++) {
AliMpZone* zone = GetZone(i+1);
//_____________________________________________________________________________
TVector2 AliMpSector::Position() const
{
-// Returns the offset.
-// ---
+/// Return the sector offset.
return fOffset;
}
//_____________________________________________________________________________
TVector2 AliMpSector::Dimensions() const
{
-// Returns the maximum halflength in x, y.
-// ---
+/// Return the maximum halflengths in x, y.
Double_t x = 0.;
Double_t y = 0.;
//_____________________________________________________________________________
Int_t AliMpSector::GetNofZones() const
{
-// Returns the number of zones.
-// ---
+/// Return the number of zones.
#ifdef WITH_STL
return fZones.size();
//_____________________________________________________________________________
AliMpZone* AliMpSector::GetZone(Int_t zoneID) const
{
-// Returns zone with specified ID.
-// ---
+/// Return zone with specified ID.
if (zoneID < 1 || zoneID > GetNofZones()) {
Warning("GetZone", "Index outside range");
//_____________________________________________________________________________
Int_t AliMpSector::GetNofRows() const
{
-// Returns the number of rows.
-// ---
+/// Return the number of rows.
#ifdef WITH_STL
return fRows.size();
//_____________________________________________________________________________
AliMpRow* AliMpSector::GetRow(Int_t rowID) const
{
-// Returns row with specified ID.
-// ---
+/// Return row with specified ID.
if (rowID < 0 || rowID >= GetNofRows()) {
Warning("GetRow", "Index outside range");
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: sector
-//
-// Class AliMpSector
-// -----------------
-// Class describing the sector of the MUON chamber of station 1.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpSector.h,v 1.8 2005/09/02 10:00:49 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpSector
+/// \brief A sector (quadrant) of the MUON chamber of stations 1 and 2.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_SECTOR_H
#define ALI_MP_SECTOR_H
// geometry
TVector2 Position() const;
TVector2 Dimensions() const;
- TVector2 Offset() const;
// get methods
Int_t GetNofZones() const;
// inline functions
-inline TVector2 AliMpSector::Offset() const
-{ return fOffset; }
-
inline AliMpDirection AliMpSector::GetDirection() const
{ return fDirection; }
+/**************************************************************************
+ * 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: AliMpSectorAreaHPadIterator.cxx,v 1.5 2005/08/26 15:43:36 ivana Exp $
// Category: sector
//
// Class AliMpSectorAreaHPadIterator
fCurrentPad(AliMpPad::Invalid()),
fCurrentRowPosition(0.)
{
-// normal constructor, start in invalid position
+/// Standard constructor, start in invalid position
}
//______________________________________________________________________________
const AliMpSectorAreaHPadIterator& right)
: AliMpVPadIterator(right)
{
-// copy constructor
+/// Protected copy constructor (not provided)
Fatal("Copy constructor", "Not implemented");
}
fCurrentPad(AliMpPad::Invalid()),
fCurrentRowPosition(0.)
{
-// Dummy default constructor.
+/// Default constructor.
}
//______________________________________________________________________________
AliMpSectorAreaHPadIterator::~AliMpSectorAreaHPadIterator()
{
-// destructor
+/// Destructor
}
//
AliMpSectorAreaHPadIterator&
AliMpSectorAreaHPadIterator::operator = (const AliMpSectorAreaHPadIterator& right)
{
-// Assignement operator
+/// Assignment operator
- // check assignement to self
+ // check assignment to self
if (this == &right) return *this;
- // base class assignement
+ // base class assignment
AliMpVPadIterator::operator=(right);
fkSegmentation = right.fkSegmentation;
//______________________________________________________________________________
Bool_t AliMpSectorAreaHPadIterator::IsValid() const
{
-// Is the iterator in a valid position?
-// ---
+/// Is the iterator in a valid position?
return fCurrentPad.IsValid() ;
}
//______________________________________________________________________________
void AliMpSectorAreaHPadIterator::MoveUp()
{
-// Increase the current row position and searches the first valid pad.
-// ---
+/// Increase the current row position and searches the first valid pad.
Double_t step = 2.* fkSegmentation->GetMinPadDimensions().Y();
//______________________________________________________________________________
void AliMpSectorAreaHPadIterator::First()
{
-// Reset the iterator, so that it points to the first available
-// pad in the area
-// ---
+/// Reset the iterator, so that it points to the first available
+/// pad in the area
if (!fkSegmentation) {
Fatal("First", "Segmentation is not defined");
//______________________________________________________________________________
void AliMpSectorAreaHPadIterator::Next()
{
-// Move the iterator to the next valid pad.
-// ---
+/// Move the iterator to the next valid pad.
if (!IsValid()) return;
//______________________________________________________________________________
Bool_t AliMpSectorAreaHPadIterator::IsDone() const
{
-//
+/// Is the iterator in the end ?
+
return !IsValid();
}
//______________________________________________________________________________
AliMpPad AliMpSectorAreaHPadIterator::CurrentItem () const
{
-// Returns current pad.
-// ---
+/// Return current pad.
return fCurrentPad;
}
//______________________________________________________________________________
void AliMpSectorAreaHPadIterator::Invalidate()
{
-//
+/// Let the iterator point to the invalid position
+
fCurrentPad = AliMpPad::Invalid();
fCurrentRowPosition = 0;
}
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: sector
-//
-// Class AliMpSectorAreaHPadIterator
-// ---------------------------------
-// Class, which defines an iterator over the pads
-// inside a given area in a sector in horizontal direction.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpSectorAreaHPadIterator.h,v 1.5 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpSectorAreaHPadIterator
+/// \brief An iterator over the pads inside a given area in a sector
+/// in horizontal direction.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_SECTOR_AREA_H_PAD_ITERATOR_H
#define ALI_MP_SECTOR_AREA_H_PAD_ITERATOR_H
+/**************************************************************************
+ * 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: AliMpSectorAreaVPadIterator.cxx,v 1.5 2005/08/26 15:43:36 ivana Exp $
// Category: sector
//
// Class AliMpSectorAreaVPadIterator
fCurrentPad(AliMpPad::Invalid()),
fCurrentColumnPosition(0.)
{
-// normal constructor, start in invalid position
+/// Standard constructor, start in invalid position
}
//______________________________________________________________________________
const AliMpSectorAreaVPadIterator& right)
: AliMpVPadIterator(right)
{
-// copy constructor
+/// Protected copy constructor (not provided)
Fatal("Copy constructor", "Not implemented");
}
fCurrentPad(AliMpPad::Invalid()),
fCurrentColumnPosition(0.)
{
-// Dummy default constructor.
+/// Default constructor.
}
//______________________________________________________________________________
AliMpSectorAreaVPadIterator::~AliMpSectorAreaVPadIterator()
{
-// destructor
+/// Destructor
}
//
AliMpSectorAreaVPadIterator&
AliMpSectorAreaVPadIterator::operator = (const AliMpSectorAreaVPadIterator& right)
{
-// Assignement operator
+/// Assignment operator
- // check assignement to self
+ // check assignment to self
if (this == &right) return *this;
- // base class assignement
+ // base class assignment
AliMpVPadIterator::operator=(right);
fkSegmentation = right.fkSegmentation;
//______________________________________________________________________________
Bool_t AliMpSectorAreaVPadIterator::IsValid() const
{
-// Is the iterator in a valid position?
-// ---
+/// Is the iterator in a valid position?
return fCurrentPad.IsValid() ;
}
//______________________________________________________________________________
void AliMpSectorAreaVPadIterator::MoveRight()
{
-// Increase the current row position and searches the first valid pad.
-// ---
+/// Increase the current row position and searches the first valid pad.
Double_t step = 2.* fkSegmentation->GetMinPadDimensions().X();
//______________________________________________________________________________
void AliMpSectorAreaVPadIterator::First()
{
-// Reset the iterator, so that it points to the first available
-// pad in the area
-// ---
+/// Reset the iterator, so that it points to the first available
+/// pad in the area
if (!fkSegmentation) {
Fatal("First", "Segmentation is not defined");
//______________________________________________________________________________
void AliMpSectorAreaVPadIterator::Next()
{
-// Move the iterator to the next valid pad.
-// ---
+/// Move the iterator to the next valid pad.
if (!IsValid()) return;
//______________________________________________________________________________
Bool_t AliMpSectorAreaVPadIterator::IsDone() const
{
-//
+/// Is the iterator in the end ?
+
return !IsValid();
}
//______________________________________________________________________________
AliMpPad AliMpSectorAreaVPadIterator::CurrentItem () const
{
-// Returns current pad.
-// ---
+/// Return current pad.
return fCurrentPad;
}
//______________________________________________________________________________
void AliMpSectorAreaVPadIterator::Invalidate()
{
-//
+/// Let the iterator point to the invalid position
+
fCurrentPad = AliMpPad::Invalid();
fCurrentColumnPosition = 0;
}
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: sector
-//
-// Class AliMpSectorAreaVPadIterator
-// ---------------------------------
-// Class, which defines an iterator over the pads
-// inside a given area in a sector in vertical direction.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpSectorAreaVPadIterator.h,v 1.4 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpSectorAreaVPadIterator
+/// \brief An iterator over the pads inside a given area in a sector
+/// in vertical direction.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_SECTOR_AREA_V_PAD_ITERATOR_H
#define ALI_MP_SECTOR_AREA_V_PAD_ITERATOR_H
+/**************************************************************************
+ * 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: AliMpSectorPadIterator.cxx,v 1.5 2005/08/26 15:43:36 ivana Exp $
// Category: sector
//
// Class AliMpSectorPadIterator
fMotifPos(0),
fIterator()
{
-// default constructor, set the current position to "invalid"
+/// Default constructor, set the current position to "invalid"
}
//______________________________________________________________________________
-AliMpSectorPadIterator::AliMpSectorPadIterator(const AliMpSector* sector)
+AliMpSectorPadIterator::AliMpSectorPadIterator(const AliMpSector* const sector)
: AliMpVPadIterator(),
fkSector(sector),
fCurrentRow(0),
fMotifPos(0),
fIterator()
{
-// normal constructor, set *this to invalid position
+/// Standard constructor, set *this to invalid position
}
//______________________________________________________________________________
AliMpSectorPadIterator::AliMpSectorPadIterator(const AliMpSectorPadIterator& right)
: AliMpVPadIterator(right)
{
-// copy constructor
+/// Copy constructor
*this = right;
}
//______________________________________________________________________________
AliMpSectorPadIterator::~AliMpSectorPadIterator()
{
-// destructor
+/// Destructor
}
+//
// operators
+//
//______________________________________________________________________________
AliMpSectorPadIterator&
AliMpSectorPadIterator::operator = (const AliMpSectorPadIterator& right)
{
-// assignement operator
+/// Assignment operator
- // check assignement to self
+ // check assignment to self
if (this == &right) return *this;
- // base class assignement
+ // base class assignment
AliMpVPadIterator::operator=(right);
fkSector = right.fkSector;
//______________________________________________________________________________
AliMpMotifPosition* AliMpSectorPadIterator::ResetToCurrentMotifPosition()
{
- // Find the AliMpMotifType object associated with the triplet
- // (fCurrentRow, fCurrentSeg, fCurrentMotif)
- // place it in the private fMotifType member and returns it.
+/// Find the AliMpMotifType object associated with the triplet
+/// (fCurrentRow, fCurrentSeg, fCurrentMotif),
+/// place it in the private fMotifType member and return it.
fMotifPos =0;
//______________________________________________________________________________
Bool_t AliMpSectorPadIterator::IsValid() const
{
-// Is the iterator in a valid position?
+/// Is the iterator in a valid position?
+
return (fkSector!=0) && (fMotifPos!=0);
}
+//
//public methods
+//
//______________________________________________________________________________
void AliMpSectorPadIterator::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
if (!fkSector) {
Invalidate();
//______________________________________________________________________________
void AliMpSectorPadIterator::Next()
{
-// Move the iterator to the next valid pad.
-
+/// Move the iterator to the next valid pad.
//if (!IsValid()) return *this;
if (!IsValid()) return;
//______________________________________________________________________________
Bool_t AliMpSectorPadIterator::IsDone() const
{
-//
+/// Is the iterator in the end?
+
return !IsValid();
}
//______________________________________________________________________________
AliMpPad AliMpSectorPadIterator::CurrentItem () const
{
-// Returns current pad.
+/// Return current pad.
if (!IsValid())
return AliMpPad::Invalid();
//______________________________________________________________________________
void AliMpSectorPadIterator::Invalidate()
{
-// Let the iterator points to the invalid position
+/// Let the iterator point to the invalid position
fMotifPos = 0;
fIterator.Invalidate();
}
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: sector
-//
-// Class AliMpSectorPadIterator
-// ----------------------------
-// Class, which defines an iterator over the pads of a sector
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpSectorPadIterator.h,v 1.5 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpSectorPadIterator
+/// \brief An iterator over the pads of a sector
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_SECTOR_PAD_ITERATOR_H
#define ALI_MP_SECTOR_PAD_ITERATOR_H
+/**************************************************************************
+ * 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: AliMpSectorPainter.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $
//
// Class AliMpSectorPainter
// ------------------------
:AliMpVPainter(),
fSector(0)
{
- // default dummy constructor
+ /// Default constructor
}
//_______________________________________________________________________
AliMpSectorPainter::AliMpSectorPainter(AliMpSector *sector)
:AliMpVPainter(),
fSector(sector)
{
- // normal constructor
+ /// Standard constructor
}
AliMpSectorPainter::AliMpSectorPainter(const AliMpSectorPainter& right)
: AliMpVPainter(right)
{
- // copy constructor (not implemented)
+ /// Protected copy constructor (not provided)
Fatal("AliMpSectorPainter", "Copy constructor not provided.");
}
//_______________________________________________________________________
AliMpSectorPainter::~AliMpSectorPainter()
{
- // destructor
+ /// Destructor
}
//_____________________________________________________________________________
AliMpSectorPainter&
AliMpSectorPainter::operator=(const AliMpSectorPainter& 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;
}
//_______________________________________________________________________
void AliMpSectorPainter::DumpObject()
{
-// Draw the owned object
- fSector->Dump();
+//// Draw the owned object
+ fSector->Dump();
}
+
//_______________________________________________________________________
TVector2 AliMpSectorPainter::GetPosition() const
{
-// Get the owned object's position
+//// Get the owned object's position
if (fSector->GetNofRows()<1) return TVector2(0.,0.);
AliMpRow* row = fSector->GetRow(0);
}
return (ur+bl)/2.;
}
+
//_______________________________________________________________________
TVector2 AliMpSectorPainter::GetDimensions() const
{
-// Get the owned object's dimensions
+//// Get the owned object's dimensions
+
if (fSector->GetNofRows()<1) return TVector2(0.,0.);
AliMpRow* row = fSector->GetRow(0);
//_______________________________________________________________________
void AliMpSectorPainter::Draw(Option_t *option)
{
-// Draw the sector on the current pad
-// The first letter of <option> is treated as follows:
-// case "Z" : each zones are drawn separately
-// case "R" : each rows are drawn separately
-// case "" : the whole sector is drawn at once
-// in both cases, the rest of the option is passed
-// as argument to the Draw function of respectively
-// zone or row objects.
-// ---
+/// Draw the sector on the current pad
+/// The first letter of <option> is treated as follows:
+/// - case "Z" : each zones are drawn separately
+/// - case "R" : each rows are drawn separately
+/// - case "" : the whole sector is drawn at once
+/// in both cases, the rest of the option is passed
+/// as argument to the Draw function of respectively
+/// zone or row objects.
AliMpGraphContext *gr = AliMpGraphContext::Instance();
if (!fSector) return;
gr->Pop();
}
-
-
//_______________________________________________________________________
void AliMpSectorPainter::Paint(Option_t* /*option*/)
{
-// Paint the object
+//// Paint the object
+
AliMpGraphContext *gr = AliMpGraphContext::Instance();
if (!fSector) return;
if (fSector->GetNofRows()<1) return;
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
// $Id$
-// Category: graphics
-//
-// Class AliMpSectorPainter
-// ------------------------
-// Class for drawing a sector into canvas
+// $MpId: AliMpSectorPainter.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
+
+/// \ingroup graphics
+/// \class AliMpSectorPainter
+/// \brief Class for drawing a sector into canvas
//
-// Authors: David Guez, IPN Orsay
+/// Authors: David Guez, IPN Orsay
#ifndef ALI_MP_SECTOR_PAINTER_H
#define ALI_MP_SECTOR_PAINTER_H
+/**************************************************************************
+ * 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: AliMpSectorSegmentation.cxx,v 1.9 2005/08/26 15:43:36 ivana Exp $
// Category: sector
//
// Class AliMpSectorSegmentation
fMaxIndexInX(0),
fMaxIndexInY(0)
{
-//
+/// Standard constructor
+
fPadBuffer = new AliMpPad(AliMpPad::Invalid());
FillPadDimensionsMap();