X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2Fmapping%2FAliMpMotifType.h;h=9b636fa46bcf2f4d5a77e3e33ff7a4fccc811607;hb=5bb8775a024e3a8c620bd7756f2aeceedb62b69f;hp=e86c6f4f7a0aa7881fee71bef62091b6c9ae6076;hpb=ffb471394fe423395c9ebdc5d0c8c336773e9963;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/mapping/AliMpMotifType.h b/MUON/mapping/AliMpMotifType.h index e86c6f4f7a0..9b636fa46bc 100755 --- a/MUON/mapping/AliMpMotifType.h +++ b/MUON/mapping/AliMpMotifType.h @@ -1,31 +1,59 @@ +/* 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.11 2006/05/24 13:58:18 ivana Exp $ + +/// \ingroup motif +/// \class AliMpMotifType +/// \brief Class that defines the motif properties. +/// +/// \author David Guez, Ivana Hrivnacova; IPN Orsay #ifndef ALI_MP_MOTIF_TYPE_H #define ALI_MP_MOTIF_TYPE_H #include -#include -#include "AliMpMotifTypes.h" +#include "AliMpContainers.h" + #include "AliMpIntPair.h" +#ifdef WITH_ROOT +#include "AliMpExMap.h" +#endif + +#include + +#ifdef WITH_STL +#include +#endif class AliMpConnection; class AliMpVPadIterator; 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 @@ -40,45 +68,52 @@ class AliMpMotifType : public TObject AliMpIntPair FindLocalIndicesByGassiNum(Int_t gassiNum) const; AliMpIntPair FindLocalIndicesByKaptonNum(Int_t kaptonNum) const; AliMpIntPair FindLocalIndicesByBergNum(Int_t bergNum) const; - AliMpIntPair FindLocalIndicesByConnection(const AliMpConnection* connection); + AliMpIntPair FindLocalIndicesByConnection( + const AliMpConnection* connection) const; // 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 {return fConnections.size();} + 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_t fConnections; //! Map (ix,iy) of connections - // EXCLUDED FOR CINT (does not compile on HP) - - ClassDef(AliMpMotifType,1) //Motif type + 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 }; // inline functions +/// Return true if the motif conatins all pads inline Bool_t AliMpMotifType::IsFull() const { return GetNofPads() == fNofPadsX*fNofPadsY; }