AliRoot Core  3abf5b4 (3abf5b4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpDCSNamer.h
Go to the documentation of this file.
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 
13 // Author Laurent Aphecetche and Diego Stocco, Subatech
14 
15 #ifndef ROOT_TObject
16 # include "TObject.h"
17 #endif
18 
19 #include "AliMpPlaneType.h"
20 
21 class TObjArray;
22 class AliMpDCSNamer : public TObject
23 
24 {
25 public:
26  AliMpDCSNamer();
27  AliMpDCSNamer(const char* detName);
28 
29  virtual ~AliMpDCSNamer();
30 
31  Bool_t SetDetector(const char* detName);
32 
33  TString DCSNameFromAlias(const char* dcsAlias) const;
34 
35  TString DCSAliasFromName(const char* dcsName) const;
36 
37  TString DCSMCHLVAliasName(Int_t detElemId, Int_t voltageType, AliMp::PlaneType planeType=AliMp::kBendingPlane) const;
38 
39  TString DCSAliasName(Int_t detElemId, Int_t sector=0, Int_t dcsMeasure=0) const;
40 
41  TString DCSSwitchAliasName(Int_t detElemId, Int_t pcbNumber) const;
42 
43  Int_t DCS2DE(Int_t chamberId, Int_t side, Int_t dcsNumber) const;
44 
45  Int_t DetElemId2DCS(Int_t detElemId, Int_t& side, Int_t& chId) const;
46 
47  Int_t DCSIndexFromDCSAlias(const char* dcsAlias) const;
48 
49  Bool_t DecodeDCSMCHLVAlias(const char* dcsAlias, Int_t*& detElemId, Int_t& numberOfDetectionElements, AliMp::PlaneType& planeType ) const;
50 
51  Int_t DetElemIdFromDCSAlias(const char* dcsAlias) const;
52 
53  Int_t DCSvariableFromDCSAlias(const char* dcsAlias) const;
54 
55  Int_t ManuId2Index(Int_t detElemId, Int_t manuId) const;
56 
58  Int_t ManuId2PCBIndex(Int_t detElemId, Int_t manuId) const;
59 
61  Int_t ManuId2Sector(Int_t detElemId, Int_t manuId) const;
62 
63  Int_t NumberOfPCBs(Int_t detElemId) const;
64 
65  TObjArray* GenerateAliases(const char* pattern="") const;
66  TObjArray* CompactAliases() const;
67  void AliasesAsLdif(const char* ldiffile) const;
68 
69  // Below this value we consider tracking HV is off
70  static Float_t TrackerHVOFF() { return 30.0; }
71 
72  // Below this value we consider tracking LV is off
73  static Float_t TrackerLVOFF() { return 1.0; }
74 
75  Bool_t TestMCHLV() const;
76 
77  enum
78  {
82  };
83 
84  enum
85  {
88  };
89 
90 
91 private:
93  AliMpDCSNamer(const AliMpDCSNamer& right);
96 
97  Bool_t CheckConsistency(Int_t detElemId) const;
98 
99  static const char* fgkDCSChannelSt345Pattern[];
100  static const char* fgkDCSChannelSt12Pattern[];
101  static const char* fgkDCSQuadrantPattern[];
102  static const char* fgkDCSChamberPattern[];
103  static const char* fgkDCSMCHLVGroupPattern[];
104 
105  static const char* fgkDCSSwitchSt345Pattern;
106  static const char* fgkDCSSideTrackerName[];
107 
108  static const char* fgkDCSChannelTriggerPatternRead[];
109  static const char* fgkDCSChannelTriggerPattern[];
110  static const char* fgkDCSSideTriggerName[];
111  static const char* fgkDCSMeasureName[];
112 
113  static const char* fgkDetectorName[];
114 
115  Int_t fDetector;
116 
117  ClassDef(AliMpDCSNamer,0) // Utility class for coding/decoding DCS aliases
118 };
119 
120 #endif
High Voltage.
Definition: AliMpDCSNamer.h:79
static const char * fgkDCSChannelSt12Pattern[]
DCS Tracker Channel name template.
Int_t ManuId2PCBIndex(Int_t detElemId, Int_t manuId) const
Returns the index of PCB (within a St345 slat) for a given manu number.
void AliasesAsLdif(const char *ldiffile) const
TString DCSMCHLVAliasName(Int_t detElemId, Int_t voltageType, AliMp::PlaneType planeType=AliMp::kBendingPlane) const
#define TObjArray
static const char * fgkDCSChamberPattern[]
DCS Tracker chamber name template.
static Float_t TrackerHVOFF()
Definition: AliMpDCSNamer.h:70
Int_t ManuId2Sector(Int_t detElemId, Int_t manuId) const
Return the HV-sector number (within a St12 quadrant) for a given manu number.
static const char * fgkDCSQuadrantPattern[]
DCS Tracker quadrant name template.
Collection of methods usefull to DCS handling for MUON TRK and TRG.
Definition: AliMpDCSNamer.h:22
Int_t NumberOfPCBs(Int_t detElemId) const
static const char * fgkDCSMCHLVGroupPattern[]
DCS Tracker chamber LV group name template.
Bool_t TestMCHLV() const
static const char * fgkDCSSideTrackerName[]
DCS Tracker Name of the side written in DCS.
Int_t DetElemId2DCS(Int_t detElemId, Int_t &side, Int_t &chId) const
static const char * fgkDCSChannelSt345Pattern[]
DCS Tracker Channel name template.
Definition: AliMpDCSNamer.h:99
static Float_t TrackerLVOFF()
Definition: AliMpDCSNamer.h:73
Number of measured quantities.
Definition: AliMpDCSNamer.h:81
TString DCSNameFromAlias(const char *dcsAlias) const
static const char * fgkDCSChannelTriggerPattern[]
DCS Trigger Channel name template for output.
Bool_t DecodeDCSMCHLVAlias(const char *dcsAlias, Int_t *&detElemId, Int_t &numberOfDetectionElements, AliMp::PlaneType &planeType) const
Bool_t CheckConsistency(Int_t detElemId) const
Int_t ManuId2Index(Int_t detElemId, Int_t manuId) const
TString DCSAliasFromName(const char *dcsName) const
Namer for tracker.
Definition: AliMpDCSNamer.h:86
Int_t DCSIndexFromDCSAlias(const char *dcsAlias) const
static const char * fgkDCSChannelTriggerPatternRead[]
DCS Trigger Channel name template for input.
AliMpDCSNamer & operator=(const AliMpDCSNamer &right)
Not implemented.
bending plane
Bool_t SetDetector(const char *detName)
Int_t DCSvariableFromDCSAlias(const char *dcsAlias) const
Int_t DCS2DE(Int_t chamberId, Int_t side, Int_t dcsNumber) const
static const char * fgkDCSSwitchSt345Pattern
DCS Tracker Switch name template.
TObjArray * GenerateAliases(const char *pattern="") const
TObjArray * CompactAliases() const
TString DCSSwitchAliasName(Int_t detElemId, Int_t pcbNumber) const
static const char * fgkDCSSideTriggerName[]
DCS Trigger Name of the side written in DCS.
static const char * fgkDetectorName[]
Name of detector (Tracker or Trigger)
static const char * fgkDCSMeasureName[]
DCS Trigger Name of the measure (HV or current) written in DCS.
Int_t DetElemIdFromDCSAlias(const char *dcsAlias) const
TString DCSAliasName(Int_t detElemId, Int_t sector=0, Int_t dcsMeasure=0) const
Int_t fDetector
Detector type (either tracker or trigger)
virtual ~AliMpDCSNamer()
Namer for trigger.
Definition: AliMpDCSNamer.h:87