Initial version (Laurent)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpManuUID.h
1 #ifndef ALIMPMANUUID_H
2 #define ALIMPMANUUID_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup management
10 /// \class AliMpManuUID
11 /// \brief Unique ID for manus
12 /// 
13 //  Author Laurent Aphecetche, Subatech
14
15 #ifndef ROOT_TObject
16 #  include "TObject.h"
17 #endif
18
19 class AliMpManuUID : public TObject
20 {
21 public:
22   AliMpManuUID();
23   AliMpManuUID(Int_t detElemId, Int_t manuId, Int_t nofChannels=0);
24   virtual ~AliMpManuUID();
25   
26   /// Get detection element
27   Int_t DetElemId() const { return AliMpManuUID::DetElemId(GetUniqueID()); }
28
29   /// Get manu identifier
30   Int_t ManuId() const { return AliMpManuUID::ManuId(GetUniqueID()); }
31
32   /// Get number of channels in this manu
33   Int_t NofChannels() const { return fNofChannels; }
34   
35   static UInt_t BuildUniqueID(Int_t detElemId, Int_t manuId);
36   
37   static Int_t DetElemId(UInt_t uniqueID);
38   
39   static Int_t ManuId(UInt_t uniqueID);
40   
41 private:
42     Int_t fNofChannels; ///< number of channels in this manu (<=64)
43   
44   ClassDef(AliMpManuUID,1) // Unique ID for MUON tracker manus
45 };
46
47 #endif