de01cdf0 |
1 | #ifndef ALIMUONCDB_H |
2 | #define ALIMUONCDB_H |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ |
5 | |
6 | /* $Id$ */ |
7 | |
8 | /// \ingroup base |
9 | /// \class AliMUONCDB |
10 | /// \brief Helper class to experience the OCDB |
11 | /// |
12 | // Author Laurent Aphecetche |
13 | |
14 | #include <TObject.h> |
15 | #include <TString.h> |
16 | |
17 | class TList; |
a0eca509 |
18 | class AliMUONVStore; |
19 | class AliMUONVStore; |
de01cdf0 |
20 | class TMap; |
21 | class AliMUONVCalibParam; |
22 | class AliMUONTriggerLut; |
23 | class AliMUONTriggerEfficiencyCells; |
24 | |
25 | #define ALIMUONCDBINFINITY 99999999 |
26 | |
27 | class AliMUONCDB : public TObject |
28 | { |
29 | public: |
30 | /// Ctor. change the path for testing the Shuttle preprocessor, to |
31 | /// "local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB" |
32 | AliMUONCDB(const char* cdbpath = "local://$ALICE_ROOT"); |
33 | virtual ~AliMUONCDB(); |
34 | |
046e5fd4 |
35 | void SetMaxNofChannelsToGenerate(Int_t n); |
36 | |
a0eca509 |
37 | Int_t MakeNeighbourStore(AliMUONVStore& neighbourStore); |
de01cdf0 |
38 | |
39 | Int_t MakeHVStore(TMap& aliasMap, Bool_t defaultValues); |
a0eca509 |
40 | Int_t MakePedestalStore(AliMUONVStore& pedestalStore, Bool_t defaultValues); |
41 | Int_t MakeCapacitanceStore(AliMUONVStore& capaStore, Bool_t defaultValues); |
25e1df3e |
42 | Int_t MakeCapacitanceStore(AliMUONVStore& capaStore, const char* file); |
a0eca509 |
43 | Int_t MakeGainStore(AliMUONVStore& gainStore, Bool_t defaultValues); |
de01cdf0 |
44 | |
a0eca509 |
45 | Int_t MakeLocalTriggerMaskStore(AliMUONVStore& ltm) const; |
46 | Int_t MakeRegionalTriggerMaskStore(AliMUONVStore& rtm) const; |
de01cdf0 |
47 | Int_t MakeGlobalTriggerMaskStore(AliMUONVCalibParam& gtm) const; |
48 | AliMUONTriggerLut* MakeTriggerLUT(const char* file="$(ALICE_ROOT)/MUON/data/lutAptLpt1Hpt1p7.root") const; |
49 | AliMUONTriggerEfficiencyCells* MakeTriggerEfficiency(const char* file="$ALICE_ROOT/MUON/data/efficiencyCells.dat") const; |
50 | |
51 | /// Compute the difference between two (compatible) stores |
a0eca509 |
52 | AliMUONVStore* Diff(AliMUONVStore& store1, AliMUONVStore& store2, |
de01cdf0 |
53 | const char* opt="abs"); |
54 | |
a0eca509 |
55 | void Plot(const AliMUONVStore& store, const char* name, Int_t nbins=512); |
de01cdf0 |
56 | |
57 | void WriteToCDB(const char* calibpath, TObject* object, |
58 | Int_t startRun, Int_t endRun, Bool_t defaultValues); |
25e1df3e |
59 | void WriteToCDB(const char* calibpath, TObject* object, |
60 | Int_t startRun, Int_t endRun, const char* filename); |
de01cdf0 |
61 | |
62 | void WriteTrigger(Int_t startRun=0,Int_t endRun=ALIMUONCDBINFINITY); |
63 | void WriteTracker(Bool_t defaultValues=kTRUE, Int_t startRun=0,Int_t endRun=ALIMUONCDBINFINITY); |
64 | |
65 | void WriteNeighbours(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY); |
66 | void WriteHV(Bool_t defaultValues, Int_t startRun, Int_t endRun); |
67 | void WritePedestals(Bool_t defaultValues, Int_t startRun, Int_t endRun=ALIMUONCDBINFINITY); |
68 | void WriteGains(Bool_t defaultValues, Int_t startRun, Int_t endRun=ALIMUONCDBINFINITY); |
69 | void WriteCapacitances(Bool_t defaultValues, Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY); |
25e1df3e |
70 | void WriteCapacitances(const char* file, Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY); |
de01cdf0 |
71 | |
72 | void WriteLocalTriggerMasks(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY); |
73 | void WriteRegionalTriggerMasks(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY); |
74 | void WriteGlobalTriggerMasks(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY); |
75 | void WriteTriggerLut(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY); |
76 | void WriteTriggerEfficiency(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY); |
77 | |
78 | private: |
ef447c30 |
79 | /// Not implemented |
80 | AliMUONCDB(const AliMUONCDB& rhs); |
81 | /// Not implemented |
de01cdf0 |
82 | AliMUONCDB& operator=(const AliMUONCDB& rhs); |
83 | |
a0eca509 |
84 | TList* ManuList(); |
85 | |
de01cdf0 |
86 | private: |
87 | TString fCDBPath; //!< where to write stuff |
88 | TList* fManuList; //!< full list of manus |
046e5fd4 |
89 | Int_t fMaxNofChannelsToGenerate; //!< to limit the number of generated channels (debug) |
de01cdf0 |
90 | |
91 | ClassDef(AliMUONCDB,0) // Helper class to experience OCDB |
92 | }; |
93 | |
94 | #endif |