]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONHVNamer.h
Better selection between menus
[u/mrichter/AliRoot.git] / MUON / AliMUONHVNamer.h
1 #ifndef ALIMUONHVNAMER_H
2 #define ALIMUONHVNAMER_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 shuttle
10 /// \class AliMUONHVNamer
11 /// \brief Collection of methods usefull to HV subprocessor for MUON TRK
12 /// 
13 //  Author Laurent Aphecetche, Subtech
14
15 #ifndef ROOT_TObject
16 #  include "TObject.h"
17 #endif
18
19 class TObjArray;
20
21 class AliMUONHVNamer : public TObject
22 {
23 public:
24   AliMUONHVNamer();
25   virtual ~AliMUONHVNamer();
26   
27   const char* DCSHVChannelName(Int_t detElemId, Int_t sector=0) const;
28   
29   const char* DCSHVSwitchName(Int_t detElemId, Int_t pcbNumber) const;
30
31   Int_t DCS2DE(Int_t chamberId, Int_t side, Int_t dcsNumber) const;
32   
33   Int_t DetElemId2DCS(Int_t detElemId, Int_t& side) const;
34     
35   Int_t DetElemIdFromDCSAlias(const char* dcsAlias) const;
36   
37   /// Returns the index of PCB (within a St345 slat) for a given manu number.
38   Int_t ManuId2PCBIndex(Int_t detElemId, Int_t manuId) const;
39   
40   /// Return the HV-sector number (within a St12 quadrant) for a given manu number.
41   Int_t ManuId2Sector(Int_t detElemId, Int_t manuId) const;
42   
43   Int_t NumberOfPCBs(Int_t detElemId) const;
44
45   TObjArray* GenerateAliases() const;
46   TObjArray* CompactAliases() const;
47   
48 private:
49   /// Not implemented
50   AliMUONHVNamer(const AliMUONHVNamer& right);
51   /// Not implemented
52   AliMUONHVNamer&  operator = (const AliMUONHVNamer& right);
53     
54   static const char* fgHVChannelSt345Pattern[]; ///< HV Channel name template
55   static const char* fgHVChannelSt12Pattern[]; ///< HV Channel name template
56   static const char* fgHVSwitchSt345Pattern; ///< HV Switch name template
57   
58   ClassDef(AliMUONHVNamer,0) // Utility class for coding/decoding DCS HV aliases
59 };
60
61 #endif