]>
Commit | Line | Data |
---|---|---|
3f862c88 | 1 | #ifndef ALI_MP_CDB_H |
2 | #define ALI_MP_CDB_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | ||
9 | /// \ingroup management | |
10 | /// \class AliMpCDB | |
11 | /// \brief Manager class for mapping CDB IO | |
12 | /// | |
228fd720 | 13 | /// The mapping can be loaded in two ways: |
14 | /// - from mapping objects stored in the CDB folders Mapping, DDLStore | |
15 | /// (old way) | |
16 | /// - from mapping data store in a form of string map in the CDB | |
17 | /// folder MappingData (new way, now default) | |
18 | /// | |
19 | /// To switch between these two ways: | |
20 | /// - AliMpCDB::SetLoadFromData(Bool_t); | |
21 | /// | |
22 | /// Now it is also possible to regenerate mapping ASCII data | |
23 | /// from the string map: | |
24 | /// - AliMpCDB::GenerateMpData(); | |
25 | /// | |
3f862c88 | 26 | /// \author Ivana Hrivnacova, IPN Orsay |
27 | ||
28 | #ifndef ROOT_TObject | |
29 | # include <TObject.h> | |
30 | #endif | |
31 | ||
32 | class AliMpSegmentation; | |
33 | class AliMpDDLStore; | |
34 | ||
35 | class AliMpCDB : public TObject { | |
36 | ||
37 | public: | |
38 | // static methods | |
228fd720 | 39 | // |
40 | ||
3f862c88 | 41 | static Bool_t LoadMpSegmentation(Bool_t warn = false); |
42 | static Bool_t LoadDDLStore(Bool_t warn = false); | |
ab167304 | 43 | static Bool_t LoadManuStore(Bool_t warn = false); |
877f7c6e | 44 | static Bool_t LoadAll(Bool_t warn = false); |
2b34965a | 45 | |
d3af4674 | 46 | static Bool_t LoadMpSegmentation2( |
162637e4 | 47 | const char* cdbpath = "local://$ALICE_ROOT/OCDB", |
d3af4674 | 48 | Int_t runNumber = 0, |
49 | Bool_t warn = false); | |
50 | static Bool_t LoadDDLStore2( | |
162637e4 | 51 | const char* cdbpath = "local://$ALICE_ROOT/OCDB", |
d3af4674 | 52 | Int_t runNumber = 0, |
53 | Bool_t warn = false); | |
ab167304 | 54 | static Bool_t LoadManuStore2( |
162637e4 | 55 | const char* cdbpath = "local://$ALICE_ROOT/OCDB", |
ab167304 | 56 | Int_t runNumber = 0, |
57 | Bool_t warn = false); | |
877f7c6e | 58 | static Bool_t LoadAll2(const char* cdbpath = "local://$ALICE_ROOT/OCDB", |
59 | Int_t runNumber = 0, | |
60 | Bool_t warn = false); | |
2b34965a | 61 | |
228fd720 | 62 | static Bool_t WriteMpData(); |
ab167304 | 63 | static Bool_t WriteMpRunData(); |
d2d10ee1 | 64 | static Bool_t WriteMpSegmentation(Bool_t readData = true); |
65 | static Bool_t WriteDDLStore(Bool_t readData= true); | |
66 | static Bool_t WriteManuStore(Bool_t readData= true); | |
228fd720 | 67 | |
68 | static Bool_t GenerateMpData( | |
162637e4 | 69 | const char* cdbpath = "local://$ALICE_ROOT/OCDB", |
228fd720 | 70 | Int_t runNumber = 0); |
ab167304 | 71 | static Bool_t GenerateMpRunData( |
162637e4 | 72 | const char* cdbpath = "local://$ALICE_ROOT/OCDB", |
ab167304 | 73 | Int_t runNumber = 0); |
228fd720 | 74 | |
75 | // Switch loading | |
76 | static void SetLoadFromData(Bool_t loadFromData); | |
3f862c88 | 77 | |
183279c1 | 78 | // Unload mapping |
79 | ||
80 | static void UnloadAll(); | |
81 | ||
3f862c88 | 82 | private: |
83 | /// Not implemented | |
84 | AliMpCDB(); | |
85 | /// Not implemented | |
86 | AliMpCDB(const AliMpCDB& rhs); | |
87 | /// Not implemented | |
88 | AliMpCDB& operator=(const AliMpCDB& rhs); | |
89 | ||
228fd720 | 90 | |
91 | static TObject* GetCDBEntryObject(const char* dataPath); | |
92 | static TObject* GetCDBEntryObject(const char* dataPath, | |
93 | const char* cdbpath, | |
94 | Int_t runNumber); | |
95 | ||
01e3d4d7 | 96 | static Bool_t fgLoadFromData; ///< option for loading from CDB mapping data or from CDB mapping objects |
228fd720 | 97 | |
3f862c88 | 98 | ClassDef(AliMpCDB,0) // The factory for building mapping segmentations |
99 | }; | |
100 | ||
228fd720 | 101 | // inline functions |
102 | ||
103 | inline void AliMpCDB::SetLoadFromData(Bool_t loadFromData) | |
104 | { | |
ab167304 | 105 | /// Set option for loading from CDB mapping data or from CDB mapping objects |
228fd720 | 106 | |
107 | fgLoadFromData = loadFromData; | |
108 | } | |
109 | ||
3f862c88 | 110 | #endif //ALI_MP_CDB_H |
111 | ||
112 | ||
113 | ||
114 | ||
115 | ||
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | ||
124 | ||
125 |