]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONCDB.h
Coding conventions fixed.
[u/mrichter/AliRoot.git] / MUON / AliMUONCDB.h
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 AliMUONVStore;
18 class AliMUONVStore;
19 class TMap;
20 class AliMUONVCalibParam;
21 class AliMUONTriggerLut;
22 class AliMUONTriggerEfficiencyCells;
23
24 #define ALIMUONCDBINFINITY 99999999
25
26 class AliMUONCDB : public TObject
27 {
28 public:
29   /// Ctor. change the path for testing the Shuttle preprocessor, to
30   /// "local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"
31   AliMUONCDB(const char* cdbpath = "local://$ALICE_ROOT");
32   virtual ~AliMUONCDB();
33   
34   void SetMaxNofChannelsToGenerate(Int_t n);
35   
36   Int_t MakeNeighbourStore(AliMUONVStore& neighbourStore);
37
38   Int_t MakeHVStore(TMap& aliasMap, Bool_t defaultValues);
39   Int_t MakePedestalStore(AliMUONVStore& pedestalStore, Bool_t defaultValues);
40   Int_t MakeCapacitanceStore(AliMUONVStore& capaStore, Bool_t defaultValues);
41   Int_t MakeCapacitanceStore(AliMUONVStore& capaStore, const char* file);
42   Int_t MakeGainStore(AliMUONVStore& gainStore, Bool_t defaultValues);
43   
44   Int_t MakeLocalTriggerMaskStore(AliMUONVStore& ltm) const;
45   Int_t MakeRegionalTriggerMaskStore(AliMUONVStore& rtm) const;
46   Int_t MakeGlobalTriggerMaskStore(AliMUONVCalibParam& gtm) const;
47   AliMUONTriggerLut* MakeTriggerLUT(const char* file="$(ALICE_ROOT)/MUON/data/lutAptLpt1Hpt1p7.root") const;
48   AliMUONTriggerEfficiencyCells* MakeTriggerEfficiency(const char* file="$ALICE_ROOT/MUON/data/efficiencyCells.dat") const;
49
50   /// Compute the difference between two (compatible) stores
51   AliMUONVStore* Diff(AliMUONVStore& store1, AliMUONVStore& store2, 
52                         const char* opt="abs");
53     
54   void Plot(const AliMUONVStore& store, const char* name, Int_t nbins=512);
55
56   void WriteToCDB(const char* calibpath, TObject* object, 
57                   Int_t startRun, Int_t endRun, Bool_t defaultValues);
58   void WriteToCDB(const char* calibpath, TObject* object, 
59                   Int_t startRun, Int_t endRun, const char* filename);
60
61   void WriteTrigger(Int_t startRun=0,Int_t endRun=ALIMUONCDBINFINITY);
62   void WriteTracker(Bool_t defaultValues=kTRUE, Int_t startRun=0,Int_t endRun=ALIMUONCDBINFINITY);
63   
64   void WriteNeighbours(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY);
65   void WriteHV(Bool_t defaultValues, Int_t startRun, Int_t endRun);
66   void WritePedestals(Bool_t defaultValues, Int_t startRun, Int_t endRun=ALIMUONCDBINFINITY);
67   void WriteGains(Bool_t defaultValues, Int_t startRun, Int_t endRun=ALIMUONCDBINFINITY);
68   void WriteCapacitances(Bool_t defaultValues, Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY);
69   void WriteCapacitances(const char* file, Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY);
70   
71   void WriteLocalTriggerMasks(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY);
72   void WriteRegionalTriggerMasks(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY);
73   void WriteGlobalTriggerMasks(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY);
74   void WriteTriggerLut(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY);
75   void WriteTriggerEfficiency(Int_t startRun=0, Int_t endRun=ALIMUONCDBINFINITY);
76   
77 private:
78   /// Not implemented
79   AliMUONCDB(const AliMUONCDB& rhs);
80   /// Not implemented
81   AliMUONCDB& operator=(const AliMUONCDB& rhs);
82   
83 private:
84   TString fCDBPath; //!< where to write stuff
85   Int_t fMaxNofChannelsToGenerate; //!< to limit the number of generated channels (debug)
86   
87   ClassDef(AliMUONCDB,0) // Helper class to experience OCDB
88 };
89
90 #endif