]>
Commit | Line | Data |
---|---|---|
49e110ec | 1 | #ifndef ALIMPDCSNAMER_H |
2 | #define ALIMPDCSNAMER_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 AliMpDCSNamer | |
11 | /// \brief Collection of methods usefull to DCS handling for MUON TRK and TRG | |
12 | /// | |
13 | // Author Laurent Aphecetche and Diego Stocco, Subatech | |
14 | ||
15 | #ifndef ROOT_TObject | |
16 | # include "TObject.h" | |
17 | #endif | |
18 | ||
19 | class TObjArray; | |
20 | ||
21 | class AliMpDCSNamer : public TObject | |
22 | { | |
23 | public: | |
24 | AliMpDCSNamer(); | |
25 | AliMpDCSNamer(const char* detName); | |
26 | ||
27 | virtual ~AliMpDCSNamer(); | |
28 | ||
29 | Bool_t SetDetector(const char* detName); | |
30 | ||
49d622ec | 31 | TString DCSNameFromAlias(const char* dcsAlias) const; |
1d5cf0f2 | 32 | |
49d622ec | 33 | TString DCSAliasFromName(const char* dcsName) const; |
1d5cf0f2 | 34 | |
49d622ec | 35 | TString DCSAliasName(Int_t detElemId, Int_t sector=0, Int_t dcsMeasure=0) const; |
36 | ||
37 | TString DCSSwitchAliasName(Int_t detElemId, Int_t pcbNumber) const; | |
49e110ec | 38 | |
39 | Int_t DCS2DE(Int_t chamberId, Int_t side, Int_t dcsNumber) const; | |
40 | ||
41 | Int_t DetElemId2DCS(Int_t detElemId, Int_t& side, Int_t& chId) const; | |
42 | ||
43 | Int_t DCSIndexFromDCSAlias(const char* dcsAlias) const; | |
44 | ||
45 | Int_t DetElemIdFromDCSAlias(const char* dcsAlias) const; | |
46 | ||
47 | Int_t DCSvariableFromDCSAlias(const char* dcsAlias) const; | |
48 | ||
49 | Int_t ManuId2Index(Int_t detElemId, Int_t manuId) const; | |
50 | ||
51 | /// Returns the index of PCB (within a St345 slat) for a given manu number. | |
52 | Int_t ManuId2PCBIndex(Int_t detElemId, Int_t manuId) const; | |
53 | ||
54 | /// Return the HV-sector number (within a St12 quadrant) for a given manu number. | |
55 | Int_t ManuId2Sector(Int_t detElemId, Int_t manuId) const; | |
56 | ||
57 | Int_t NumberOfPCBs(Int_t detElemId) const; | |
58 | ||
59 | TObjArray* GenerateAliases() const; | |
60 | TObjArray* CompactAliases() const; | |
61 | void AliasesAsLdif(const char* ldiffile) const; | |
62 | ||
32f1b761 | 63 | // Below this value we consider tracking HV is off |
64 | static Float_t TrackerHVOFF() { return 30.0; } | |
65 | ||
49e110ec | 66 | enum |
67 | { | |
68 | kDCSHV, ///< High Voltage | |
69 | kDCSI, ///< Currents | |
70 | kNDCSMeas ///< Number of measured quantities | |
71 | }; | |
72 | ||
73 | enum | |
74 | { | |
75 | kTrackerDet, ///< Namer for tracker | |
76 | kTriggerDet ///< Namer for trigger | |
77 | }; | |
78 | ||
79 | ||
80 | private: | |
81 | /// Not implemented | |
82 | AliMpDCSNamer(const AliMpDCSNamer& right); | |
83 | /// Not implemented | |
84 | AliMpDCSNamer& operator = (const AliMpDCSNamer& right); | |
85 | ||
86 | Bool_t CheckConsistency(Int_t detElemId) const; | |
87 | ||
88 | static const char* fgkDCSChannelSt345Pattern[]; ///< DCS Tracker Channel name template | |
89 | static const char* fgkDCSChannelSt12Pattern[]; ///< DCS Tracker Channel name template | |
49d622ec | 90 | static const char* fgkDCSQuadrantPattern[]; ///< DCS Tracker quadrant name template |
91 | static const char* fgkDCSChamberPattern[]; ///< DCS Tracker chamber name template | |
92 | ||
49e110ec | 93 | static const char* fgkDCSSwitchSt345Pattern; ///< DCS Tracker Switch name template |
94 | static const char* fgkDCSSideTrackerName[]; ///< DCS Tracker Name of the side written in DCS | |
95 | ||
8980e5a2 | 96 | static const char* fgkDCSChannelTriggerPatternRead[]; ///< DCS Trigger Channel name template for input |
97 | static const char* fgkDCSChannelTriggerPattern[]; ///< DCS Trigger Channel name template for output | |
49e110ec | 98 | static const char* fgkDCSSideTriggerName[]; ///< DCS Trigger Name of the side written in DCS |
99 | static const char* fgkDCSMeasureName[]; ///< DCS Trigger Name of the measure (HV or current) written in DCS | |
100 | ||
101 | static const char* fgkDetectorName[]; ///< Name of detector (Tracker or Trigger) | |
102 | ||
103 | Int_t fDetector; ///< Detector type (either tracker or trigger) | |
104 | ||
105 | ClassDef(AliMpDCSNamer,0) // Utility class for coding/decoding DCS aliases | |
106 | }; | |
107 | ||
108 | #endif |