1 #ifndef ALIMUONTRACKERCONDITIONDATAMAKER_H
2 #define ALIMUONTRACKERCONDITIONDATAMAKER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONTrackerConditionDataMaker
11 /// \brief Producer of AliMUONVTrackerData from OCDB or ASCII condition files
13 // Author Laurent Aphecetche
15 #ifndef ALIMUONVTRACKERDATAMAKER_H
16 # include "AliMUONVTrackerDataMaker.h"
25 class AliMUONTrackerConditionDataMaker : public AliMUONVTrackerDataMaker
28 AliMUONTrackerConditionDataMaker();
29 AliMUONTrackerConditionDataMaker(Int_t runNumber, const char* ocdbPath, const char* type);
30 AliMUONTrackerConditionDataMaker(const char* filename, const char* type);
31 AliMUONTrackerConditionDataMaker(const char* data, const char* type, Bool_t);
32 virtual ~AliMUONTrackerConditionDataMaker();
34 static AliMUONVStore* CreateStore(Int_t runNumber, const char* source, const char* type, Int_t& startOfValidity);
36 static AliMUONVTrackerData* CreateData(const char* type, AliMUONVStore& source, Int_t startOfValidity);
38 virtual void SetOwnerOfData(Bool_t flag) { fIsOwnerOfData = flag; }
40 /// Whether we've been properly initialized or not
41 Bool_t IsValid() const { return (fData != 0x0); }
44 virtual AliMUONVTrackerData* Data() const { return fData; }
46 /// We are not runnable (i.e. # of event is fixed = 1)
47 virtual Bool_t IsRunnable() const { return kFALSE; }
49 /// We cannot be running as we are not runnable...
50 virtual Bool_t IsRunning() const { return kFALSE; }
53 virtual void SetRunning(Bool_t /*flag*/) {}
56 virtual Bool_t ProcessEvent() { return kTRUE; }
59 virtual void Rewind() { }
61 /// Set our source URI
62 virtual void SetSource(const char* source) { fSource = source; }
64 /// Get our source URI
65 virtual TString Source() const { return fSource.Data(); }
67 /// Number of events is always 1
68 Int_t NumberOfEvents() const { return 1; }
70 virtual Long64_t Merge(TCollection* li);
74 AliMUONTrackerConditionDataMaker(const AliMUONTrackerConditionDataMaker& rhs);
76 AliMUONTrackerConditionDataMaker& operator=(const AliMUONTrackerConditionDataMaker& rhs);
78 static AliMUONVStore* CreateHVStore(TMap& m);
79 static AliMUONVStore* CreateStatusMapStore(Int_t runNumber);
80 static AliMUONVStore* CreateStatusStore(Int_t runNumber);
81 static AliMUONVStore* PatchGainStore(const AliMUONVStore& gains);
82 static AliMUONVStore* ExpandConfig(const AliMUONVStore& config);
85 AliMUONVTrackerData* fData; ///< our data
86 TString fSource; ///< source name
87 Bool_t fIsOwnerOfData; ///< is fData ours or not
89 ClassDef(AliMUONTrackerConditionDataMaker,2) // Producer of AliMUONVTrackerData from condition data (either OCDB or ascii files)