Line data Source code
1 : #ifndef ALIMUONTRACKERVOLTAGES_H
2 : #define ALIMUONTRACKERVOLTAGES_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : #ifndef ROOT_TObject
8 : # include "TObject.h"
9 : #endif
10 : #ifndef ROOT_TString
11 : # include "TString.h"
12 : #endif
13 :
14 : #include <vector>
15 : #include <cfloat>
16 :
17 : class TMultiGraph;
18 : class TMap;
19 : class TGraph;
20 : class AliMpDCSNamer;
21 :
22 : class AliMUONTrackerVoltages : public TObject
23 : {
24 : public:
25 :
26 : AliMUONTrackerVoltages(const char* runlist, const char* ocdbPath="raw://");
27 : AliMUONTrackerVoltages(Int_t runNumber, const char* ocdbPath="raw://");
28 : virtual ~AliMUONTrackerVoltages();
29 :
30 0 : void SetOCDB(const char* ocdbPath="raw://") { fOCDBPath = ocdbPath; }
31 : void SetRunList(Int_t runNumber);
32 : void SetRunList(const char* runlist);
33 :
34 : virtual void Scan(Int_t verbose=0) = 0;
35 :
36 : void Plot(const char* dcsname=0x0, Bool_t withPatch=kFALSE, Bool_t plotIntermediate=kFALSE);
37 :
38 : void Print(Option_t* dcsname="") const;
39 :
40 : TGraph* Combine(TObjArray& graphs);
41 :
42 : TMultiGraph* CombineMulti(TObjArray& graphs);
43 :
44 : protected:
45 :
46 : TMap* CreateMap(Int_t runNumber, Bool_t patched=kFALSE) const;
47 :
48 : TMultiGraph* Map2Graph(TMap* m, const char* dcsname);
49 :
50 : bool IsAlmostEqualRelative(float A, float B, float maxRelDiff = FLT_EPSILON) const;
51 :
52 : void ReadIntegers(const char* filename, std::vector<int>& integers);
53 :
54 : TGraph* GraphValues(TMap* m, const char* name);
55 :
56 : void TimeAxis(TMultiGraph* g);
57 :
58 : AliMpDCSNamer* DCSNamer() const;
59 :
60 : AliMUONTrackerVoltages(const AliMUONTrackerVoltages& rhs); // not implemented on purpose
61 : AliMUONTrackerVoltages& operator=(const AliMUONTrackerVoltages& rhs); // not implemented on purpose
62 :
63 : std::vector<int> fRunList; // input run list
64 : TString fOCDBPath; // ocdb path (raw:// by default)
65 : mutable AliMpDCSNamer* fDCSNamer; // helper to name things
66 : TString fOCDBObjectPath; // path to the object to retrieve from the OCDB
67 :
68 12 : ClassDef(AliMUONTrackerVoltages,1) // Utility class to inspect MUON Tracker HV values
69 : };
70 :
71 : #endif
|