]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpMotifType.h
Corrected access to the data file
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotifType.h
index aeacbb01890697a67f230ae2b885bd25e8cbb883..9b636fa46bcf2f4d5a77e3e33ff7a4fccc811607 100755 (executable)
@@ -2,31 +2,31 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpMotifType.h,v 1.8 2005/09/26 16:10:46 ivana Exp $
+// $MpId: AliMpMotifType.h,v 1.11 2006/05/24 13:58:18 ivana Exp $
 
 /// \ingroup motif
 /// \class AliMpMotifType
 /// \brief Class that defines the motif properties.
 ///
-/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+/// \author David Guez, Ivana Hrivnacova; IPN Orsay
 
 #ifndef ALI_MP_MOTIF_TYPE_H
 #define ALI_MP_MOTIF_TYPE_H
 
-#include "AliMpContainers.h"
+#include <TObject.h>
 
-#ifdef WITH_STL
-#include <map>
-#endif
+#include "AliMpContainers.h"
 
+#include "AliMpIntPair.h"
 #ifdef WITH_ROOT
 #include "AliMpExMap.h"
 #endif
 
-#include <TObject.h>
 #include <TString.h>
 
-#include "AliMpIntPair.h"
+#ifdef WITH_STL
+#include <map>
+#endif
 
 class AliMpConnection;
 class AliMpVPadIterator;
@@ -35,18 +35,25 @@ class AliMpMotifType : public TObject
 {
   public:
 #ifdef WITH_STL
+    /// Connection map type
     typedef std::map< AliMpIntPair, AliMpConnection* > ConnectionMap;
+    /// Connection map iterator type
     typedef ConnectionMap::const_iterator     ConnectionMapCIterator;
 #endif    
 #ifdef WITH_ROOT
+    /// Connection map type
     typedef AliMpExMap ConnectionMap;
 #endif    
 
   public:
     AliMpMotifType(const TString &id);
+    AliMpMotifType(const AliMpMotifType& rhs);
+    AliMpMotifType& operator=(const AliMpMotifType& rhs);
     AliMpMotifType();
     virtual ~AliMpMotifType();
 
+    TObject* Clone(const char* newname="") const;
+    
     virtual AliMpVPadIterator* CreateIterator() const;
 
     // find methods
@@ -66,39 +73,47 @@ class AliMpMotifType : public TObject
 
     // set methods
     void SetNofPads(Int_t nofPadsX, Int_t nofPadY);
-    void SetVerboseLevel(Int_t level){fVerboseLevel=level;}
     
     // get methods
+             /// Return unique motif ID
     TString  GetID() const        {return fID;}
+             /// Return number of pads in x direction
     Int_t    GetNofPadsX() const  {return fNofPadsX;}
+             /// Return number of pads in y direction
     Int_t    GetNofPadsY() const  {return fNofPadsY;}
     Int_t    GetNofPads() const;
     
     // Other methods
     void AddConnection(const AliMpIntPair &localIndices, 
                        AliMpConnection* connection);
-    virtual void Print(Option_t *option) const;
+    virtual void Print(Option_t *option="") const;
     Int_t   PadNum(const TString &padName) const;
     TString PadName(Int_t padNum) const;
     Bool_t  HasPad(const AliMpIntPair& localIndices) const;
     Bool_t  IsFull() const;
+    
+    Bool_t Save(const char* motifName) const;
+    Bool_t Save() const;
 
+  private:
+      void Copy(TObject& o) const;
+    
   private:
     // static data members
-    static const Int_t   fgkPadNumForA; // the pad number for the pad "A"
+    static const Int_t  fgkPadNumForA; ///< the pad number for the pad "A"
   
     // data members
-    TString   fID;              // unique motif ID
-    Int_t     fNofPadsX;        // number of pads in x direction
-    Int_t     fNofPadsY;        // number of pads in y direction
-    Int_t     fVerboseLevel;    // verbose level
-    ConnectionMap fConnections; // Map (ix,iy) of connections
+    TString   fID;              ///< unique motif ID
+    Int_t     fNofPadsX;        ///< number of pads in x direction
+    Int_t     fNofPadsY;        ///< number of pads in y direction
+    ConnectionMap fConnections; ///< Map (ix,iy) of connections
     
-  ClassDef(AliMpMotifType,1)  //Motif type
+  ClassDef(AliMpMotifType,1)  // Motif type
 };
 
 // inline functions
 
+/// Return true if the motif conatins all pads
 inline Bool_t AliMpMotifType::IsFull() const 
 { return GetNofPads() == fNofPadsX*fNofPadsY; }