// $Id$
// $MpId: AliMpMotifPosition.cxx,v 1.9 2006/05/24 13:58:41 ivana Exp $
-//
+
+//-----------------------------------------------------------------------------
// Class AliMpMotifPosition
// ------------------------
// Class that represents a placed motif.
// Included in AliRoot: 2003/05/02
// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+//-----------------------------------------------------------------------------
#include "AliMpMotifPosition.h"
#include "AliMpMotifPositionPadIterator.h"
#include "AliMpMotifType.h"
-
#include <Riostream.h>
+using std::cout;
/// \cond CLASSIMP
ClassImp(AliMpMotifPosition)
/// \endcond
//______________________________________________________________________________
AliMpMotifPosition::AliMpMotifPosition(Int_t id, AliMpVMotif* motif,
- TVector2 position)
+ Double_t x, Double_t y)
: AliMpVIndexed(),
fID(id),
fMotif(motif),
- fPosition(position)
+ fPositionX(x),
+ fPositionY(y)
{
/// Standard constructor
}
: AliMpVIndexed(),
fID(0),
fMotif(0),
- fPosition(TVector2(0.,0.))
+ fPositionX(0.),
+ fPositionY(0.)
{
/// Default constructor
}
-//_____________________________________________________________________________
-AliMpMotifPosition::AliMpMotifPosition(const AliMpMotifPosition& 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)
-{
-/// Protected assignment operator (not provided)
-
- // check assignment to self
- if (this == &right) return *this;
-
- Fatal("operator =", "Assignment operator not provided.");
-
- return *this;
-}
-
//______________________________________________________________________________
AliMpVPadIterator* AliMpMotifPosition::CreateIterator() const
{
}
//______________________________________________________________________________
-Bool_t AliMpMotifPosition::HasPad(const AliMpIntPair& indices) const
+Bool_t AliMpMotifPosition::HasPadByIndices(MpPair_t indices) const
{
/// Return true if pad with the specified indices exists in
/// this motif position.
- if (!HasIndices(indices)) return kFALSE;
+ if ( ! HasIndices(indices) ) return kFALSE;
if (fMotif->GetMotifType()->IsFull()) return kTRUE;
- return fMotif->GetMotifType()->HasPad(indices-GetLowIndicesLimit());
+ return fMotif->GetMotifType()->HasPadByLocalIndices(
+ indices - GetLowIndicesLimit());
+}
+
+//______________________________________________________________________________
+Bool_t AliMpMotifPosition::HasPadByManuChannel(Int_t manuChannel) const
+{
+ /// Return true if pad with the specified manuChannel exists in
+ /// this motif position.
+
+ return fMotif->GetMotifType()->HasPadByManuChannel(manuChannel);
}
//_____________________________________________________________________________
//_____________________________________________________________________________
void
-AliMpMotifPosition::SetPosition(const TVector2& pos)
+AliMpMotifPosition::SetPosition(Double_t x, Double_t y)
{
/// Set position
- fPosition = pos;
+ fPositionX = x;
+ fPositionY = y;
}
//_____________________________________________________________________________
cout << "MOTIFPOSITION " << GetID() << " MOTIF "
<< GetMotif()->GetID()
- << " at (" << Position().X() << ","
- << Position().Y() << ") "
- << " iMin=(" << GetLowIndicesLimit().GetFirst()
- << "," << GetLowIndicesLimit().GetSecond()
- << ") iMax=(" << GetHighIndicesLimit().GetFirst()
- << "," << GetHighIndicesLimit().GetSecond()
+ << " at (" << GetPositionX() << ","
+ << GetPositionY() << ") "
+ << " iMin=(" << GetLowLimitIx()
+ << "," << GetLowLimitIy()
+ << ") iMax=(" << GetHighLimitIx()
+ << "," << GetHighLimitIy()
<< ")" << std::endl;
if ( option && option[0] == 'M' )