]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpHVNamer.h
Removal of the check for the default cdb storage - anyway it is done inside cdb manag...
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpHVNamer.h
1 #ifndef ALIMPHVNAMER_H
2 #define ALIMPHVNAMER_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 AliMpHVNamer
11 /// \brief Collection of methods usefull to HV handling for MUON TRK
12 /// 
13 //  Author Laurent Aphecetche, Subatech
14
15 #ifndef ROOT_TObject
16 #  include "TObject.h"
17 #endif
18
19 class TObjArray;
20
21 class AliMpHVNamer : public TObject
22 {
23 public:
24   AliMpHVNamer();
25   virtual ~AliMpHVNamer();
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 HVIndexFromDCSAlias(const char* dcsAlias) const;
36   
37   Int_t DetElemIdFromDCSAlias(const char* dcsAlias) const;
38   
39   Int_t ManuId2Index(Int_t detElemId, Int_t manuId) const;
40   
41   /// Returns the index of PCB (within a St345 slat) for a given manu number.
42   Int_t ManuId2PCBIndex(Int_t detElemId, Int_t manuId) const;
43   
44   /// Return the HV-sector number (within a St12 quadrant) for a given manu number.
45   Int_t ManuId2Sector(Int_t detElemId, Int_t manuId) const;
46   
47   Int_t NumberOfPCBs(Int_t detElemId) const;
48
49   TObjArray* GenerateAliases() const;
50   TObjArray* CompactAliases() const;
51   void AliasesAsLdif(const char* ldiffile) const;
52   
53 private:
54   /// Not implemented
55   AliMpHVNamer(const AliMpHVNamer& right);
56   /// Not implemented
57   AliMpHVNamer&  operator = (const AliMpHVNamer& right);
58     
59   static const char* fgHVChannelSt345Pattern[]; ///< HV Channel name template
60   static const char* fgHVChannelSt12Pattern[]; ///< HV Channel name template
61   static const char* fgHVSwitchSt345Pattern; ///< HV Switch name template
62   
63   ClassDef(AliMpHVNamer,0) // Utility class for coding/decoding DCS HV aliases
64 };
65
66 #endif