Implementing the new methods of the interface class
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Mar 2006 17:01:56 +0000 (17:01 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Mar 2006 17:01:56 +0000 (17:01 +0000)
(Laurent)

MUON/mapping/AliMpSectorSegmentation.cxx
MUON/mapping/AliMpSectorSegmentation.h
MUON/mapping/AliMpSlatSegmentation.cxx
MUON/mapping/AliMpSlatSegmentation.h
MUON/mapping/AliMpTriggerSegmentation.cxx
MUON/mapping/AliMpTriggerSegmentation.h

index 044a214..3bf2876 100755 (executable)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpSectorSegmentation.cxx,v 1.10 2005/10/28 15:22:02 ivana Exp $
+// $MpId: AliMpSectorSegmentation.cxx,v 1.11 2006/03/02 16:35:12 ivana Exp $
 // Category: sector
 //
 // Class AliMpSectorSegmentation
 //
 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
 
-#include <Riostream.h>
-#include <TMath.h>
-#include <TError.h>
-
-#include "AliLog.h"
-
 #include "AliMpSectorSegmentation.h"
 #include "AliMpSector.h"
 #include "AliMpZone.h"
 #include "AliMpArea.h"
 #include "AliMpConstants.h"
 
-ClassImp(AliMpSectorSegmentation)
+#include "AliLog.h"
+
+#include <Riostream.h>
+#include <TMath.h>
+#include <TError.h>
 
 #ifdef WITH_ROOT
 const Double_t AliMpSectorSegmentation::fgkS1 = 100000.;
 const Double_t AliMpSectorSegmentation::fgkS2 = 1000.;
 #endif
 
+ClassImp(AliMpSectorSegmentation)
+
 //______________________________________________________________________________
 AliMpSectorSegmentation::AliMpSectorSegmentation(const AliMpSector* sector) 
   : AliMpVSegmentation(),
@@ -122,6 +122,13 @@ AliMpSectorSegmentation::operator=(const AliMpSectorSegmentation& right)
 // private methods
 //
 
+//_____________________________________________________________________________
+void 
+AliMpSectorSegmentation::GetAllElectronicCardIDs(TArrayI& ecn) const
+{
+  GetSector()->GetAllMotifPositionsIDs(ecn);
+}
+
 #ifdef WITH_ROOT
 //______________________________________________________________________________
 Long_t AliMpSectorSegmentation::GetIndex(const TVector2& vector2) const
@@ -355,6 +362,20 @@ AliMpSectorSegmentation::CreateIterator(const AliMpPad& centerPad,
 }   
   
 //______________________________________________________________________________
+TVector2
+AliMpSectorSegmentation::Dimensions() const
+{
+  return GetSector()->Dimensions();
+}
+
+//______________________________________________________________________________
+AliMpPlaneType
+AliMpSectorSegmentation::PlaneType() const
+{
+  return GetSector()->PlaneType();
+}
+
+//______________________________________________________________________________
 AliMpPad 
 AliMpSectorSegmentation::PadByLocation(const AliMpIntPair& location, 
                                        Bool_t warning) const
@@ -638,6 +659,13 @@ Bool_t AliMpSectorSegmentation::CircleTest(const AliMpIntPair& indices) const
 }
 
 //______________________________________________________________________________
+void
+AliMpSectorSegmentation::Print(Option_t* opt) const
+{
+  fkSector->Print(opt);
+}
+
+//______________________________________________________________________________
 void AliMpSectorSegmentation::PrintZones() const
 {
 /// Print all zones and pads dimensions from the map.
index d7b8c93..1d2246e 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpSectorSegmentation.h,v 1.10 2005/09/26 16:12:11 ivana Exp $
+// $MpId: AliMpSectorSegmentation.h,v 1.11 2006/03/02 16:35:06 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpSectorSegmentation
@@ -85,7 +85,15 @@ class AliMpSectorSegmentation : public AliMpVSegmentation
    
     const AliMpSector* GetSector() const;
 
-  protected:
+    virtual void Print(Option_t* opt="") const;
+    
+    virtual void GetAllElectronicCardIDs(TArrayI& ecn) const;
+
+    AliMpPlaneType PlaneType() const;
+    
+    TVector2 Dimensions() const;
+    
+protected:
     AliMpSectorSegmentation(const AliMpSectorSegmentation& right);
     AliMpSectorSegmentation&  operator = (const AliMpSectorSegmentation& right);
 
index a6acbfc..59a60a1 100644 (file)
@@ -14,7 +14,7 @@
 **************************************************************************/
 
 // $Id$
-// $MpId: AliMpSlatSegmentation.cxx,v 1.5 2005/10/28 15:26:01 ivana Exp $
+// $MpId: AliMpSlatSegmentation.cxx,v 1.7 2006/03/02 16:35:20 ivana Exp $
 
 // Caution !!
 // Implementation note.
@@ -76,10 +76,32 @@ AliMpSlatSegmentation::CreateIterator(const AliMpArea& area) const
   // Returns an iterator to loop over the pad contained within given area.
   //
   AliMpArea a(area.Position()+fkSlat->Position(),area.Dimensions());
+  AliDebug(3,Form("Converted input area wrt to slat center : "
+                  "%7.2f,%7.2f->%7.2f,%7.2f to wrt slat lower-left : "
+                  "%7.2f,%7.2f->%7.2f,%7.2f ",
+                  area.LeftBorder(),area.DownBorder(),
+                  area.RightBorder(),area.UpBorder(),
+                  a.LeftBorder(),a.DownBorder(),
+                  a.RightBorder(),a.UpBorder()));
+                  
   return new AliMpSlatPadIterator(fkSlat,a);
 }
 
 //_____________________________________________________________________________
+TVector2
+AliMpSlatSegmentation::Dimensions() const
+{
+  return Slat()->Dimensions();
+}
+
+//_____________________________________________________________________________
+void 
+AliMpSlatSegmentation::GetAllElectronicCardIDs(TArrayI& ecn) const
+{
+  Slat()->GetAllMotifPositionsIDs(ecn);
+}
+
+//_____________________________________________________________________________
 const char*
 AliMpSlatSegmentation::GetName() const
 {
@@ -283,6 +305,20 @@ AliMpSlatSegmentation::PadByPosition(const TVector2& position,
 }
 
 //_____________________________________________________________________________
+AliMpPlaneType
+AliMpSlatSegmentation::PlaneType() const
+{
+  return Slat()->PlaneType();
+}
+
+//_____________________________________________________________________________
+void
+AliMpSlatSegmentation::Print(Option_t* opt) const
+{
+  fkSlat->Print(opt);
+}
+
+//_____________________________________________________________________________
 const AliMpSlat* 
 AliMpSlatSegmentation::Slat() const
 {
index b73ae74..f60dfb9 100644 (file)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpSlatSegmentation.h,v 1.4 2005/09/19 19:01:09 ivana Exp $
+// $MpId: AliMpSlatSegmentation.h,v 1.7 2006/03/02 16:35:16 ivana Exp $
 
 /// \ingroup slat
 /// \class AliMpSlatSegmentation
@@ -59,8 +59,16 @@ class AliMpSlatSegmentation : public AliMpVSegmentation
   virtual AliMpPad PadByPosition(const TVector2& position,
                         Bool_t warning) const;
 
+  virtual void Print(Option_t*) const;
+  
   const AliMpSlat* Slat() const;
   
+  void GetAllElectronicCardIDs(TArrayI& ecn) const;
+  
+  AliMpPlaneType PlaneType() const;
+  
+  TVector2 Dimensions() const;
+  
  private:
   const AliMpSlat* fkSlat; // Slat
 
index 3c61605..c8fcd1d 100644 (file)
@@ -14,7 +14,7 @@
 **************************************************************************/
 
 // $Id$
-// $MpId$
+// $MpId: AliMpTriggerSegmentation.cxx,v 1.2 2006/03/02 16:35:31 ivana Exp $
 
 #include "AliMpTriggerSegmentation.h"
 
@@ -73,6 +73,20 @@ AliMpTriggerSegmentation::CreateIterator(const AliMpArea&) const
 }
 
 //_____________________________________________________________________________
+TVector2
+AliMpTriggerSegmentation::Dimensions() const
+{
+  return Slat()->Dimensions();
+}
+
+//_____________________________________________________________________________
+void 
+AliMpTriggerSegmentation::GetAllElectronicCardIDs(TArrayI& ecn) const
+{
+  Slat()->GetAllLocalBoardNumbers(ecn);
+}
+
+//_____________________________________________________________________________
 const char*
 AliMpTriggerSegmentation::GetName() const
 {
@@ -248,6 +262,13 @@ AliMpTriggerSegmentation::PadByPosition(const TVector2& position,
 }
 
 //_____________________________________________________________________________
+AliMpPlaneType
+AliMpTriggerSegmentation::PlaneType() const
+{
+  return Slat()->PlaneType();
+}
+
+//_____________________________________________________________________________
 const AliMpTrigger* 
 AliMpTriggerSegmentation::Slat() const
 {
index d46e07f..a672508 100644 (file)
@@ -2,7 +2,7 @@
 * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId$
+// $MpId: AliMpTriggerSegmentation.h,v 1.2 2006/03/02 16:35:27 ivana Exp $
 
 /// \ingroup trigger
 /// \class AliMpTriggerSegmentation
@@ -56,6 +56,12 @@ public:
   
   const AliMpTrigger* Slat() const;
    
+  virtual void GetAllElectronicCardIDs(TArrayI& ecn) const;
+  
+  AliMpPlaneType PlaneType() const;
+  
+  TVector2 Dimensions() const;
+  
 private:
     const AliMpTrigger* fkSlat; // Slat