+/**************************************************************************
+ * 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: AliMpZonePainter.cxx,v 1.8 2006/05/24 13:58:32 ivana Exp $
// Category: graphics
-//
+
+//-----------------------------------------------------------------------------
// Class AliMpZonePainter
// ----------------------
// Class for drawing a zone into canvas
-//
+// Included in AliRoot: 2003/05/02
// Authors: David Guez, IPN Orsay
+//-----------------------------------------------------------------------------
-#include <TVirtualX.h>
-#include <TPad.h>
-
#include "AliMpZonePainter.h"
#include "AliMpGraphContext.h"
#include "AliMpZone.h"
#include "AliMpSubZone.h"
#include "AliMpVRowSegment.h"
+#include <TVirtualX.h>
+#include <TPad.h>
+
+/// \cond CLASSIMP
ClassImp(AliMpZonePainter)
+/// \endcond
//_______________________________________________________________________
AliMpZonePainter::AliMpZonePainter()
: AliMpVPainter(),
fZone(0)
{
- // default dummy constructor
+ /// Default constructor
}
//_______________________________________________________________________
: AliMpVPainter(),
fZone(zone)
{
- // normal constructor
+ /// Standard constructor
}
//_______________________________________________________________________
AliMpZonePainter::~AliMpZonePainter()
{
- // destructor
-
+ /// Destructor
}
//_______________________________________________________________________
Int_t AliMpZonePainter::DistancetoPrimitive(Int_t x, Int_t y)
{
- // dist to the nearest segment center if (x,y) is inside the zone
- // 9999 otherwise
+ /// Distance to the nearest segment center if (x,y) is inside the zone
+ /// 9999 otherwise
+
if (fZone->GetNofSubZones()<1) return 9999;
AliMpGraphContext *gr = AliMpGraphContext::Instance();
//_______________________________________________________________________
void AliMpZonePainter::DumpObject()
{
-// Draw the owned object
- fZone->Dump();
+ /// Dump the owned object
+ fZone->Dump();
}
//_______________________________________________________________________
TVector2 AliMpZonePainter::GetPosition() const
{
- // Get the owned object's position
+ //// Get the owned object's position
if (fZone->GetNofSubZones()<1) return TVector2(0.,0.);
//_______________________________________________________________________
TVector2 AliMpZonePainter::GetDimensions() const
{
- // Get the owned object's dimensions
+ //// Get the owned object's dimensions
if (fZone->GetNofSubZones()<1) return TVector2(0.,0.);
//_______________________________________________________________________
void AliMpZonePainter::Draw(Option_t *option)
{
-// Draw the sector on the current pad
-// The first letter of <option> is treated as follows:
-// case "S" : each sub zones are drawn separately
-// case "" : the whole zone 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 \a option is treated as follows:
+/// - case "S" : each sub zones are drawn separately
+/// - case "" : the whole zone 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 (!fZone) return;
//_______________________________________________________________________
void AliMpZonePainter::Paint(Option_t *option)
{
-// Paint the object
+//// Paint the object
+
AliMpGraphContext *gr = AliMpGraphContext::Instance();
if (!fZone) return;
if (fZone->GetNofSubZones()<1) return;