3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
10 /// \brief Helper class to experience the OCDB
12 // Author Laurent Aphecetche
16 #include "AliCDBRunRange.h"
20 class AliMUONVCalibParam;
21 class AliMUONTriggerLut;
22 class AliMUONTriggerEfficiencyCells;
23 class AliMUONRegionalTriggerConfig;
24 class AliMUONGlobalCrateConfig;
26 class AliMUONCDB : public TObject
29 /// Ctor. change the path for testing the Shuttle preprocessor, to
30 /// "local://$ALICE_ROOT/OCDB/SHUTTLE/TestShuttle/TestCDB"
31 AliMUONCDB(const char* cdbpath = "local://$ALICE_ROOT/OCDB");
32 virtual ~AliMUONCDB();
34 void SetMaxNofChannelsToGenerate(Int_t n);
36 Int_t MakeNeighbourStore(AliMUONVStore& neighbourStore);
38 Int_t MakeHVStore(TMap& aliasMap, Bool_t defaultValues);
39 Int_t MakeTriggerDCSStore(TMap& aliasMap, Bool_t defaultValues);
40 Int_t MakePedestalStore(AliMUONVStore& pedestalStore, Bool_t defaultValues);
41 Int_t MakeCapacitanceStore(AliMUONVStore& capaStore, Bool_t defaultValues);
42 Int_t MakeCapacitanceStore(AliMUONVStore& capaStore, const char* file);
43 Int_t MakeGainStore(AliMUONVStore& gainStore, Bool_t defaultValues);
44 Int_t MakeOccupancyMapStore(AliMUONVStore& occupancyMapStore, Bool_t defaultValues);
46 Int_t MakeLocalTriggerMaskStore(AliMUONVStore& ltm) const;
47 Int_t MakeRegionalTriggerConfigStore(AliMUONRegionalTriggerConfig& rtm) const;
48 Int_t MakeGlobalTriggerConfigStore(AliMUONGlobalCrateConfig& gtm) const;
50 AliMUONTriggerLut* MakeTriggerLUT(const char* file="$(ALICE_ROOT)/MUON/data/lutAptLpt1Hpt1p7.root") const;
51 AliMUONTriggerEfficiencyCells* MakeTriggerEfficiency(const char* file="$ALICE_ROOT/MUON/data/efficiencyCells.dat") const;
53 /// Compute the difference between two (compatible) stores
54 AliMUONVStore* Diff(AliMUONVStore& store1, AliMUONVStore& store2,
55 const char* opt="abs");
57 void Plot(const AliMUONVStore& store, const char* name, Int_t nbins=512);
59 void WriteToCDB(const char* calibpath, TObject* object,
60 Int_t startRun, Int_t endRun, Bool_t defaultValues);
61 void WriteToCDB(const char* calibpath, TObject* object,
62 Int_t startRun, Int_t endRun, const char* filename);
63 void WriteToCDB(TObject* object, const char* calibpath, Int_t startRun=0, Int_t endRun=AliCDBRunRange::Infinity(),
64 const char* comment="", const char* responsible="AliMUONCDB tester class");
66 void WriteTrigger(Bool_t defaultValues=kTRUE, Int_t startRun=0,Int_t endRun=AliCDBRunRange::Infinity());
67 void WriteTracker(Bool_t defaultValues=kTRUE, Int_t startRun=0,Int_t endRun=AliCDBRunRange::Infinity());
69 void WriteNeighbours(Int_t startRun=0, Int_t endRun=AliCDBRunRange::Infinity());
70 void WriteHV(Bool_t defaultValues, Int_t startRun, Int_t endRun=AliCDBRunRange::Infinity());
71 void WriteTriggerDCS(Bool_t defaultValues, Int_t startRun, Int_t endRun=AliCDBRunRange::Infinity());
72 void WritePedestals(Bool_t defaultValues, Int_t startRun, Int_t endRun=AliCDBRunRange::Infinity());
73 void WriteGains(Bool_t defaultValues, Int_t startRun, Int_t endRun=AliCDBRunRange::Infinity());
74 void WriteCapacitances(Bool_t defaultValues, Int_t startRun=0, Int_t endRun=AliCDBRunRange::Infinity());
75 void WriteCapacitances(const char* file, Int_t startRun=0, Int_t endRun=AliCDBRunRange::Infinity());
76 void WriteOccupancyMap(Bool_t defaultValues, Int_t startRun, Int_t endRun=AliCDBRunRange::Infinity());
78 void WriteLocalTriggerMasks(Int_t startRun=0, Int_t endRun=AliCDBRunRange::Infinity());
79 void WriteRegionalTriggerConfig(Int_t startRun=0, Int_t endRun=AliCDBRunRange::Infinity());
80 void WriteGlobalTriggerConfig(Int_t startRun=0, Int_t endRun=AliCDBRunRange::Infinity());
82 void WriteTriggerLut(Int_t startRun=0, Int_t endRun=AliCDBRunRange::Infinity());
83 void WriteTriggerEfficiency(Int_t startRun=0, Int_t endRun=AliCDBRunRange::Infinity());
87 AliMUONCDB(const AliMUONCDB& rhs);
89 AliMUONCDB& operator=(const AliMUONCDB& rhs);
92 TString fCDBPath; //!< where to write stuff
93 Int_t fMaxNofChannelsToGenerate; //!< to limit the number of generated channels (debug)
95 ClassDef(AliMUONCDB,0) // Helper class to experience OCDB