]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpCDB.h
Extacting the OCDB in a separate module. The detectors have write permission in the...
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpCDB.h
CommitLineData
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
32class AliMpSegmentation;
33class AliMpDDLStore;
34
35class 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);
d3af4674 44
d3af4674 45 static Bool_t LoadMpSegmentation2(
162637e4 46 const char* cdbpath = "local://$ALICE_ROOT/OCDB",
d3af4674 47 Int_t runNumber = 0,
48 Bool_t warn = false);
49 static Bool_t LoadDDLStore2(
162637e4 50 const char* cdbpath = "local://$ALICE_ROOT/OCDB",
d3af4674 51 Int_t runNumber = 0,
52 Bool_t warn = false);
ab167304 53 static Bool_t LoadManuStore2(
162637e4 54 const char* cdbpath = "local://$ALICE_ROOT/OCDB",
ab167304 55 Int_t runNumber = 0,
56 Bool_t warn = false);
3f862c88 57
228fd720 58 static Bool_t WriteMpData();
ab167304 59 static Bool_t WriteMpRunData();
90bcb4c9 60 static Bool_t WriteMpSegmentation(Bool_t readData = true);
61 static Bool_t WriteDDLStore(Bool_t readData= true);
ab167304 62 static Bool_t WriteManuStore(Bool_t readData= true);
228fd720 63
64 static Bool_t GenerateMpData(
162637e4 65 const char* cdbpath = "local://$ALICE_ROOT/OCDB",
228fd720 66 Int_t runNumber = 0);
ab167304 67 static Bool_t GenerateMpRunData(
162637e4 68 const char* cdbpath = "local://$ALICE_ROOT/OCDB",
ab167304 69 Int_t runNumber = 0);
228fd720 70
71 // Switch loading
72 static void SetLoadFromData(Bool_t loadFromData);
3f862c88 73
183279c1 74 // Unload mapping
75
76 static void UnloadAll();
77
3f862c88 78 private:
79 /// Not implemented
80 AliMpCDB();
81 /// Not implemented
82 AliMpCDB(const AliMpCDB& rhs);
83 /// Not implemented
84 AliMpCDB& operator=(const AliMpCDB& rhs);
85
228fd720 86
87 static TObject* GetCDBEntryObject(const char* dataPath);
88 static TObject* GetCDBEntryObject(const char* dataPath,
89 const char* cdbpath,
90 Int_t runNumber);
91
92 /// option for loading from CDB mapping data or from CDB mapping objects
93 static Bool_t fgLoadFromData;
94
3f862c88 95 ClassDef(AliMpCDB,0) // The factory for building mapping segmentations
96};
97
228fd720 98// inline functions
99
100inline void AliMpCDB::SetLoadFromData(Bool_t loadFromData)
101{
ab167304 102/// Set option for loading from CDB mapping data or from CDB mapping objects
228fd720 103
104 fgLoadFromData = loadFromData;
105}
106
3f862c88 107#endif //ALI_MP_CDB_H
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122