]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpDEManager.h
New macro to keep track of timing performances of the segmentation methods (Laurent)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDEManager.h
index 77938a5d3c99155628d180b0b2c11b5868081ebb..0849742d94c14f0d3a722051664448fa499f47ec 100644 (file)
@@ -2,31 +2,36 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpDEManager.h,v 1.3 2006/03/13 12:22:08 ivana Exp $ 
+// $MpId: AliMpDEManager.h,v 1.6 2006/05/24 13:58:16 ivana Exp $ 
 
 /// \ingroup management
 /// \class AliMpDEManager
 /// \brief The manager class for definition of detection element types
-//
+///
 /// The detection element types are defined via unique names
 /// in denames.dat file for each station in the mapping data.
 /// Detection element name is composed of DETypeName and planeTypeName.
 /// DETypeName is only one per station in case of station1 and 2 quadrants, 
 /// there are more DETypes in case of slat and trigger stations. 
 ///
-/// Authors: Ivana Hrivnacova, IPN Orsay
-///          Laurent Aphecetche, SUBATECH Nantes
+/// \author Ivana Hrivnacova, IPN Orsay;
+///         Laurent Aphecetche, SUBATECH Nantes
 
 #ifndef ALI_MP_DE_MANAGER_H
 #define ALI_MP_DE_MANAGER_H
 
+#include <TObject.h>
+#include <TArrayI.h>
+
 #include "AliMpExMap.h"
 #include "AliMpPlaneType.h"
+#include "AliMpCathodType.h"
 #include "AliMpStationType.h"
+#include "AliMpStation12Type.h"
+#include "AliMpDEIterator.h"
 
-#include <TObject.h>
-
-class AliMpVSegmentation;
+class AliMpDetElement;
+class TString;
 
 class AliMpDEManager : public  TObject {
 
@@ -35,43 +40,35 @@ class AliMpDEManager : public  TObject {
     
     // methods
     static Bool_t IsValidDetElemId(Int_t detElemId, Bool_t warn = false);
-    static Bool_t IsValidCathod(Int_t cath, Bool_t warn = false);
-    static Bool_t IsValid(Int_t detElemId, Int_t cath, Bool_t warn = false);
-    static Bool_t IsValidModuleId(Int_t moduleId, Bool_t warn = false);
-
-    static TString GetDEName(Int_t detElemId, Int_t cath, Bool_t warn = true);
-    static TString GetDETypeName(Int_t detElemId, Int_t cath, Bool_t warn = true);
-    static Int_t   GetModuleId(Int_t detElemId, Bool_t warn = true);    
-    static AliMpPlaneType   GetPlaneType(Int_t detElemId, Int_t cath);
-    static AliMpStationType GetStationType(Int_t detElemId);
-    static Int_t            GetCathod(Int_t detElemId, AliMpPlaneType planeType);
-
-  protected:
-    AliMpDEManager();
-    AliMpDEManager(const AliMpDEManager& rhs);
-    AliMpDEManager& operator=(const AliMpDEManager& rhs);
+    static Bool_t IsValidChamberId(Int_t chamberId, Bool_t warn = false);
+    static Bool_t IsValidGeomModuleId(Int_t moduleId, Bool_t warn = false);
 
-  private:
-    // methods
-    static Bool_t IsPlaneType(const TString& planeTypeName);
-    static AliMpPlaneType   PlaneType(const TString& planeTypeName);
-    static AliMpStationType StationType(const TString& stationTypeName);
+    static Int_t   GetChamberId(Int_t detElemId, Bool_t warn = true);    
+    static Int_t   GetGeomModuleId(Int_t detElemId, Bool_t warn = true);    
+    static AliMp::PlaneType     GetPlaneType(Int_t detElemId, AliMp::CathodType cath);
+    static AliMp::CathodType    GetCathod(Int_t detElemId, AliMp::PlaneType planeType);
+    static AliMp::StationType   GetStationType(Int_t detElemId);
+    static AliMq::Station12Type GetStation12Type(Int_t detElemId);
 
-    static Bool_t ReadDENames(AliMpStationType station);
-    static void   FillDENames();
+    static AliMpDetElement* GetDetElement(Int_t detElemId, Bool_t warn = true);
+    static AliMpDetElement* GetDetElement(const TString& deName, Bool_t warn = true);
 
-    // static data members     
-    static const char  fgkNameSeparator; // Separator character used in DE names
-    static const char  fgkCommentPrefix; // Comment prefix in DE names file
-    static const Int_t fgkCoefficient;   // Coefficient used in DE Id <-> station
+    static Int_t        GetNofDEInChamber(Int_t chamberId, Bool_t warn = true);
+    static AliMpIntPair GetDetElemIdRange(Int_t chamberId);
 
-    // data members    
-    static  AliMpExMap fgDENamesMap;  // Map between DE Ids and 
-                                      // a pair of DE names for 2 cathods
-    static  AliMpExMap fgDECathBNBMap;// Map between DE Is and a pair
-                                      // of planeTypes for cathodes (0,1)
+  private:
+    /// Not implemented
+    AliMpDEManager();
+    /// Not implemented
+    AliMpDEManager(const AliMpDEManager& rhs);
+    /// Not implemented
+    AliMpDEManager& operator=(const AliMpDEManager& rhs);
+      
+    // static data members     
+    static const Int_t   fgkCoefficient; ///< Coefficient used in DE Id <-> station
+    static    TArrayI fgNofDEPerChamber; ///< Number of detElemId per chamber
 
-  ClassDef(AliMpDEManager,0)  // 
+  ClassDef(AliMpDEManager,0)  // The manager class for definition of detection element types
 };
 
 #endif //ALI_MP_MANAGER_H