]>
Commit | Line | Data |
---|---|---|
3f862c88 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // $Id$ | |
17 | // $MpId: $ | |
18 | // Category: management | |
19 | ||
3d1463c8 | 20 | //----------------------------------------------------------------------------- |
3f862c88 | 21 | // Class AliMpCDB |
22 | // ----------------------- | |
23 | // Manager class for mapping CDB IO | |
24 | // Author: Ivana Hrivnacova, IPN Orsay | |
3d1463c8 | 25 | //----------------------------------------------------------------------------- |
3f862c88 | 26 | |
27 | #include "AliMpCDB.h" | |
28 | ||
183279c1 | 29 | #include "AliCDBEntry.h" |
30 | #include "AliCDBManager.h" | |
31 | #include "AliLog.h" | |
3f862c88 | 32 | #include "AliMpDDLStore.h" |
183279c1 | 33 | #include "AliMpDEStore.h" |
34 | #include "AliMpDataMap.h" | |
228fd720 | 35 | #include "AliMpDataProcessor.h" |
36 | #include "AliMpDataStreams.h" | |
183279c1 | 37 | #include "AliMpManuStore.h" |
38 | #include "AliMpSegmentation.h" | |
ff5445c2 | 39 | #include <Riostream.h> |
183279c1 | 40 | #include <TClass.h> |
41 | #include <TSystem.h> | |
3f862c88 | 42 | |
43 | /// \cond CLASSIMP | |
44 | ClassImp(AliMpCDB) | |
45 | /// \endcond | |
46 | ||
228fd720 | 47 | Bool_t AliMpCDB::fgLoadFromData = kTRUE; |
48 | ||
3f862c88 | 49 | // |
228fd720 | 50 | // private static methods |
3f862c88 | 51 | // |
707ad0dc | 52 | |
3f862c88 | 53 | //______________________________________________________________________________ |
228fd720 | 54 | TObject* AliMpCDB::GetCDBEntryObject(const char* dataPath) |
3f862c88 | 55 | { |
228fd720 | 56 | /// Load CDB entry object with checks |
3f862c88 | 57 | |
3f862c88 | 58 | AliCDBManager* cdbManager = AliCDBManager::Instance(); |
3f862c88 | 59 | |
60 | Int_t run = cdbManager->GetRun(); | |
61 | if ( run < 0 ) { | |
0be76c28 | 62 | AliErrorClassStream() << "Cannot get run number from CDB manager." << endl; |
228fd720 | 63 | return 0; |
3f862c88 | 64 | } |
65 | ||
228fd720 | 66 | AliCDBEntry* cdbEntry = cdbManager->Get(dataPath, run); |
67 | if ( ! cdbEntry ) { | |
68 | AliErrorClassStream() << "Cannot get cdbEntry." << endl; | |
69 | return 0; | |
5699c0e6 | 70 | } |
228fd720 | 71 | |
72 | TObject* object = cdbEntry->GetObject(); | |
73 | if ( ! object ) { | |
74 | AliErrorClassStream() << "Cannot get object from cdbEntry." << endl; | |
75 | return 0; | |
76 | } | |
77 | ||
78 | return object; | |
79 | } | |
80 | ||
81 | ||
82 | //______________________________________________________________________________ | |
83 | TObject* AliMpCDB::GetCDBEntryObject(const char* dataPath, | |
84 | const char* cdbpath, | |
85 | Int_t runNumber ) | |
86 | { | |
87 | /// Load CDB entry from CDB and run specified in arguments | |
88 | ||
89 | AliCDBManager* cdbManager = AliCDBManager::Instance(); | |
90 | cdbManager->SetDefaultStorage(cdbpath); | |
91 | ||
92 | AliCDBEntry* cdbEntry = cdbManager->Get(dataPath, runNumber); | |
93 | if ( ! cdbEntry ) { | |
94 | AliErrorClassStream() << "Cannot get cdbEntry." << endl; | |
95 | return 0; | |
96 | } | |
97 | ||
98 | TObject* object = cdbEntry->GetObject(); | |
99 | if ( ! object ) { | |
100 | AliErrorClassStream() << "Cannot get object from cdbEntry." << endl; | |
101 | return 0; | |
102 | } | |
103 | ||
104 | return object; | |
105 | } | |
106 | ||
107 | // | |
108 | // public static methods | |
109 | // | |
110 | ||
111 | ||
112 | //______________________________________________________________________________ | |
113 | Bool_t AliMpCDB::LoadMpSegmentation(Bool_t warn) | |
114 | { | |
115 | /// Load the sementation from the mapping data from OCDB, | |
116 | /// if it does not yet exist; | |
117 | /// return false only in case loading from CDB failed | |
118 | ||
119 | if ( AliMpSegmentation::Instance(false) ) { | |
120 | if ( warn ) | |
121 | AliWarningClass("Segmentation has been already loaded."); | |
122 | return true; | |
123 | } | |
124 | ||
125 | if ( fgLoadFromData ) { | |
126 | AliDebugClassStream(1) | |
127 | << "Loading segmentation from MUON/Calib/MappingData" << endl; | |
128 | ||
129 | TObject* cdbEntryObject = GetCDBEntryObject("MUON/Calib/MappingData"); | |
130 | if ( ! cdbEntryObject ) return kFALSE; | |
131 | ||
132 | // Pass the map to the streams and then read segmentation | |
133 | // from data map | |
134 | AliMpDataMap* dataMap = (AliMpDataMap*)cdbEntryObject; | |
ab167304 | 135 | AliMpDataStreams dataStreams(dataMap); |
136 | AliMpSegmentation::ReadData(dataStreams); | |
228fd720 | 137 | return kTRUE; |
5699c0e6 | 138 | } |
228fd720 | 139 | else { |
140 | AliDebugClassStream(1) | |
141 | << "Loading segmentation from MUON/Calib/Mapping" << endl; | |
142 | ||
143 | TObject* cdbEntryObject = GetCDBEntryObject("MUON/Calib/Mapping"); | |
144 | return cdbEntryObject != 0x0; | |
145 | } | |
3f862c88 | 146 | } |
147 | ||
148 | //______________________________________________________________________________ | |
149 | Bool_t AliMpCDB::LoadDDLStore(Bool_t warn) | |
150 | { | |
228fd720 | 151 | /// Load the DDL store from the mapping data from OCDB, |
152 | /// if it does not yet exist; | |
3f862c88 | 153 | /// return false only in case loading from CDB failed |
154 | ||
3f862c88 | 155 | if ( AliMpDDLStore::Instance(false) ) { |
156 | if ( warn ) | |
157 | AliWarningClass("DDL Store has been already loaded."); | |
158 | return true; | |
159 | } | |
160 | ||
228fd720 | 161 | if ( fgLoadFromData ) { |
162 | AliDebugClassStream(1) | |
163 | << "Loading DDL store from MUON/Calib/MappingData" << endl; | |
707ad0dc | 164 | |
228fd720 | 165 | TObject* cdbEntryObject = GetCDBEntryObject("MUON/Calib/MappingData"); |
166 | if ( ! cdbEntryObject ) return kFALSE; | |
3f862c88 | 167 | |
228fd720 | 168 | AliMpDataMap* dataMap = (AliMpDataMap*)cdbEntryObject; |
ab167304 | 169 | AliMpDataStreams dataStreams(dataMap); |
170 | AliMpDDLStore::ReadData(dataStreams); | |
228fd720 | 171 | return kTRUE; |
5699c0e6 | 172 | } |
228fd720 | 173 | else { |
174 | AliDebugClassStream(1) | |
175 | << "Loading DDL store from MUON/Calib/DDLStore" << endl; | |
176 | ||
177 | // Load segmentation | |
178 | LoadMpSegmentation(warn); | |
179 | ||
180 | // Load DDL store | |
181 | TObject* cdbEntryObject = GetCDBEntryObject("MUON/Calib/DDLStore"); | |
182 | return cdbEntryObject != 0x0; | |
183 | } | |
3f862c88 | 184 | } |
185 | ||
2b34965a | 186 | //______________________________________________________________________________ |
187 | Bool_t AliMpCDB::LoadAll2(const char* cdbpath, Int_t runNumber, Bool_t warn) | |
188 | { | |
189 | /// Load everything in one shot | |
190 | return | |
191 | LoadDDLStore2(cdbpath,runNumber,warn) && | |
192 | LoadManuStore2(cdbpath,runNumber,warn); | |
193 | } | |
194 | ||
195 | //______________________________________________________________________________ | |
196 | Bool_t AliMpCDB::LoadAll(Bool_t warn) | |
197 | { | |
198 | /// Load everything in one shot | |
199 | return LoadDDLStore(warn) && LoadManuStore(warn); | |
200 | } | |
201 | ||
ab167304 | 202 | //______________________________________________________________________________ |
203 | Bool_t AliMpCDB::LoadManuStore(Bool_t warn) | |
204 | { | |
205 | /// Load the DDL store from the mapping data from OCDB, | |
206 | /// if it does not yet exist; | |
207 | /// return false only in case loading from CDB failed | |
208 | ||
209 | if ( AliMpManuStore::Instance(false) ) { | |
210 | if ( warn ) | |
211 | AliWarningClass("Manu Store has been already loaded."); | |
212 | return true; | |
213 | } | |
214 | ||
215 | if ( fgLoadFromData ) { | |
216 | AliDebugClassStream(1) | |
217 | << "Loading Manu store from MUON/Calib/MappingRunData" << endl; | |
218 | ||
219 | // Load segmentation | |
220 | LoadMpSegmentation(warn); | |
221 | ||
222 | TObject* cdbEntryObject = GetCDBEntryObject("MUON/Calib/MappingRunData"); | |
223 | if ( ! cdbEntryObject ) return kFALSE; | |
224 | ||
225 | AliMpDataMap* dataMap = (AliMpDataMap*)cdbEntryObject; | |
226 | AliMpDataStreams dataStreams(dataMap); | |
227 | AliMpManuStore::ReadData(dataStreams); | |
228 | return kTRUE; | |
229 | } | |
230 | else { | |
231 | AliDebugClassStream(1) | |
232 | << "Loading Manu store from MUON/Calib/ManuStore" << endl; | |
233 | ||
234 | // Load Manu store | |
235 | TObject* cdbEntryObject = GetCDBEntryObject("MUON/Calib/ManuStore"); | |
236 | return cdbEntryObject != 0x0; | |
237 | } | |
238 | } | |
d3af4674 | 239 | //______________________________________________________________________________ |
240 | Bool_t AliMpCDB::LoadMpSegmentation2(const char* cdbpath, Int_t runNumber, | |
241 | Bool_t warn) | |
242 | { | |
243 | /// Load the sementation from the CDB if it does not yet exist; | |
244 | /// return false only in case loading from CDB failed. | |
245 | /// In difference from LoadMpSegmentation(), in this method the CDB path | |
246 | /// and run is set directly via arguments. | |
247 | ||
248 | ||
d3af4674 | 249 | if ( AliMpSegmentation::Instance(false) ) { |
250 | if ( warn ) | |
251 | AliWarningClass("Segmentation has been already loaded."); | |
252 | return true; | |
253 | } | |
254 | ||
228fd720 | 255 | if ( fgLoadFromData ) { |
256 | AliDebugClassStream(1) | |
257 | << "Loading segmentation from MUON/Calib/MappingData" << endl; | |
d3af4674 | 258 | |
228fd720 | 259 | TObject* cdbEntryObject |
260 | = GetCDBEntryObject("MUON/Calib/MappingData", cdbpath, runNumber); | |
261 | if ( ! cdbEntryObject ) return kFALSE; | |
262 | ||
263 | // Pass the map to the streams and then read segmentation | |
264 | // from data map | |
265 | AliMpDataMap* dataMap = (AliMpDataMap*)cdbEntryObject; | |
ab167304 | 266 | AliMpDataStreams dataStreams(dataMap); |
267 | AliMpSegmentation::ReadData(dataStreams); | |
228fd720 | 268 | return kTRUE; |
d3af4674 | 269 | } |
228fd720 | 270 | else { |
271 | AliDebugClassStream(1) | |
272 | << "Loading segmentation from MUON/Calib/Mapping" << endl; | |
273 | ||
274 | TObject* cdbEntryObject | |
275 | = GetCDBEntryObject("MUON/Calib/Mapping", cdbpath, runNumber); | |
276 | return cdbEntryObject != 0x0; | |
277 | } | |
d3af4674 | 278 | } |
279 | ||
280 | //______________________________________________________________________________ | |
281 | Bool_t AliMpCDB::LoadDDLStore2(const char* cdbpath, Int_t runNumber, | |
282 | Bool_t warn) | |
283 | { | |
284 | /// Load the DDL store from the CDB if it does not yet exist | |
285 | /// return false only in case loading from CDB failed | |
286 | /// In difference from LoadDDLStore(), in this method the CDB path | |
287 | /// and run is set directly via arguments. | |
288 | ||
d3af4674 | 289 | if ( AliMpDDLStore::Instance(false) ) { |
290 | if ( warn ) | |
291 | AliWarningClass("DDL Store has been already loaded."); | |
292 | return true; | |
293 | } | |
294 | ||
228fd720 | 295 | if ( fgLoadFromData ) { |
296 | AliDebugClassStream(1) | |
297 | << "Loading DDL store from MUON/Calib/MappingData" << endl; | |
d3af4674 | 298 | |
228fd720 | 299 | TObject* cdbEntryObject |
300 | = GetCDBEntryObject("MUON/Calib/MappingData", cdbpath, runNumber); | |
301 | if ( ! cdbEntryObject ) return kFALSE; | |
d3af4674 | 302 | |
228fd720 | 303 | AliMpDataMap* dataMap = (AliMpDataMap*)cdbEntryObject; |
ab167304 | 304 | AliMpDataStreams dataStreams(dataMap); |
305 | AliMpDDLStore::ReadData(dataStreams); | |
228fd720 | 306 | return kTRUE; |
d3af4674 | 307 | } |
228fd720 | 308 | else { |
309 | AliDebugClassStream(1) | |
310 | << "Loading DDL store from MUON/Calib/DDLStore" << endl; | |
311 | ||
312 | // Load segmentation | |
313 | LoadMpSegmentation2(cdbpath, runNumber, warn); | |
314 | ||
315 | // Load DDL store | |
316 | TObject* cdbEntryObject = GetCDBEntryObject("MUON/Calib/DDLStore"); | |
317 | return cdbEntryObject != 0x0; | |
318 | } | |
d3af4674 | 319 | } |
320 | ||
ab167304 | 321 | //______________________________________________________________________________ |
322 | Bool_t AliMpCDB::LoadManuStore2(const char* cdbpath, Int_t runNumber, | |
323 | Bool_t warn) | |
324 | { | |
325 | /// Load the DDL store from the CDB if it does not yet exist | |
326 | /// return false only in case loading from CDB failed | |
327 | /// In difference from LoadDDLStore(), in this method the CDB path | |
328 | /// and run is set directly via arguments. | |
329 | ||
330 | if ( AliMpManuStore::Instance(false) ) { | |
331 | if ( warn ) | |
332 | AliWarningClass("Manu Store has been already loaded."); | |
333 | return true; | |
334 | } | |
335 | ||
336 | if ( fgLoadFromData ) { | |
337 | AliDebugClassStream(1) | |
338 | << "Loading Manu store from MUON/Calib/MappingRunData" << endl; | |
339 | ||
340 | // Load segmentation | |
341 | LoadMpSegmentation2(cdbpath, runNumber, warn); | |
342 | ||
343 | TObject* cdbEntryObject | |
344 | = GetCDBEntryObject("MUON/Calib/MappingRunData", cdbpath, runNumber); | |
345 | if ( ! cdbEntryObject ) return kFALSE; | |
346 | ||
347 | AliMpDataMap* dataMap = (AliMpDataMap*)cdbEntryObject; | |
348 | AliMpDataStreams dataStreams(dataMap); | |
349 | AliMpManuStore::ReadData(dataStreams); | |
350 | return kTRUE; | |
351 | } | |
352 | else { | |
353 | AliDebugClassStream(1) | |
354 | << "Loading Manu store from MUON/Calib/ManuStore" << endl; | |
355 | ||
356 | // Load Manu store | |
357 | TObject* cdbEntryObject = GetCDBEntryObject("MUON/Calib/ManuStore"); | |
358 | return cdbEntryObject != 0x0; | |
359 | } | |
360 | } | |
361 | ||
228fd720 | 362 | //______________________________________________________________________________ |
363 | Bool_t AliMpCDB::WriteMpData() | |
364 | { | |
365 | /// Write mapping data in OCDB | |
366 | ||
367 | AliCDBManager* cdbManager = AliCDBManager::Instance(); | |
368 | if ( ! cdbManager->GetDefaultStorage() ) | |
162637e4 | 369 | cdbManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
228fd720 | 370 | |
371 | AliCDBMetaData* cdbData = new AliCDBMetaData(); | |
372 | cdbData->SetResponsible("Dimuon Offline project"); | |
373 | cdbData->SetComment("MUON mapping"); | |
374 | cdbData->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
375 | AliCDBId id("MUON/Calib/MappingData", 0, AliCDBRunRange::Infinity()); | |
376 | ||
377 | AliMpDataProcessor mp; | |
ab167304 | 378 | AliMpDataMap* map = mp.CreateDataMap("data"); |
379 | return cdbManager->Put(map, id, cdbData); | |
380 | } | |
381 | ||
382 | //______________________________________________________________________________ | |
383 | Bool_t AliMpCDB::WriteMpRunData() | |
384 | { | |
385 | /// Write mapping data in OCDB | |
386 | ||
387 | AliCDBManager* cdbManager = AliCDBManager::Instance(); | |
388 | if ( ! cdbManager->GetDefaultStorage() ) | |
162637e4 | 389 | cdbManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
ab167304 | 390 | |
391 | AliCDBMetaData* cdbData = new AliCDBMetaData(); | |
392 | cdbData->SetResponsible("Dimuon Offline project"); | |
393 | cdbData->SetComment("MUON run-dependent mapping"); | |
394 | cdbData->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
395 | AliCDBId id("MUON/Calib/MappingRunData", 0, AliCDBRunRange::Infinity()); | |
396 | ||
397 | AliMpDataProcessor mp; | |
398 | AliMpDataMap* map = mp.CreateDataMap("data_run"); | |
228fd720 | 399 | return cdbManager->Put(map, id, cdbData); |
400 | } | |
401 | ||
3f862c88 | 402 | //______________________________________________________________________________ |
90bcb4c9 | 403 | Bool_t AliMpCDB::WriteMpSegmentation(Bool_t readData) |
3f862c88 | 404 | { |
405 | /// Write mapping segmentation in OCDB | |
406 | ||
90bcb4c9 | 407 | if ( ! readData && ! AliMpSegmentation::Instance() ) return false; |
408 | ||
3f862c88 | 409 | AliCDBManager* cdbManager = AliCDBManager::Instance(); |
410 | if ( ! cdbManager->GetDefaultStorage() ) | |
162637e4 | 411 | cdbManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
3f862c88 | 412 | |
413 | AliCDBMetaData* cdbData = new AliCDBMetaData(); | |
414 | cdbData->SetResponsible("Dimuon Offline project"); | |
415 | cdbData->SetComment("MUON mapping"); | |
416 | cdbData->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
ebbfcf5c | 417 | AliCDBId id("MUON/Calib/Mapping", 0, AliCDBRunRange::Infinity()); |
3f862c88 | 418 | |
90bcb4c9 | 419 | if ( readData ) { |
ab167304 | 420 | AliMpDataStreams dataStreams; |
421 | AliMpSegmentation::ReadData(dataStreams, false); | |
422 | AliMpDDLStore::ReadData(dataStreams, false); | |
90bcb4c9 | 423 | } |
424 | ||
3f862c88 | 425 | return cdbManager->Put(AliMpSegmentation::Instance(), id, cdbData); |
426 | } | |
427 | ||
428 | //______________________________________________________________________________ | |
90bcb4c9 | 429 | Bool_t AliMpCDB::WriteDDLStore(Bool_t readData) |
3f862c88 | 430 | { |
431 | /// Write mapping DDL store in OCDB | |
432 | ||
90bcb4c9 | 433 | if ( ! readData && ! AliMpDDLStore::Instance() ) return false; |
434 | ||
3f862c88 | 435 | AliCDBManager* cdbManager = AliCDBManager::Instance(); |
436 | if ( ! cdbManager->GetDefaultStorage() ) | |
162637e4 | 437 | cdbManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
3f862c88 | 438 | |
439 | AliCDBMetaData* cdbData = new AliCDBMetaData(); | |
440 | cdbData->SetResponsible("Dimuon Offline project"); | |
441 | cdbData->SetComment("MUON DDL store"); | |
442 | cdbData->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
ebbfcf5c | 443 | AliCDBId id("MUON/Calib/DDLStore", 0, AliCDBRunRange::Infinity()); |
3f862c88 | 444 | |
90bcb4c9 | 445 | if ( readData ) { |
ab167304 | 446 | AliMpDataStreams dataStreams; |
447 | AliMpSegmentation::ReadData(dataStreams, false); | |
448 | AliMpDDLStore::ReadData(dataStreams, false); | |
90bcb4c9 | 449 | } |
3f862c88 | 450 | return cdbManager->Put(AliMpDDLStore::Instance(), id, cdbData); |
451 | } | |
228fd720 | 452 | |
ab167304 | 453 | //______________________________________________________________________________ |
454 | Bool_t AliMpCDB::WriteManuStore(Bool_t readData) | |
455 | { | |
456 | /// Write mapping Manu store in OCDB | |
457 | ||
458 | if ( ! readData && ! AliMpManuStore::Instance() ) return false; | |
459 | ||
460 | AliCDBManager* cdbManager = AliCDBManager::Instance(); | |
461 | if ( ! cdbManager->GetDefaultStorage() ) | |
162637e4 | 462 | cdbManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
ab167304 | 463 | |
464 | AliCDBMetaData* cdbData = new AliCDBMetaData(); | |
465 | cdbData->SetResponsible("Dimuon Offline project"); | |
466 | cdbData->SetComment("MUON Manu store"); | |
467 | cdbData->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
468 | AliCDBId id("MUON/Calib/ManuStore", 0, AliCDBRunRange::Infinity()); | |
469 | ||
470 | if ( readData ) { | |
471 | AliMpDataStreams dataStreams; | |
472 | AliMpSegmentation::ReadData(dataStreams, false); | |
473 | AliMpManuStore::ReadData(dataStreams, false); | |
474 | } | |
475 | return cdbManager->Put(AliMpManuStore::Instance(), id, cdbData); | |
476 | } | |
477 | ||
228fd720 | 478 | //______________________________________________________________________________ |
479 | Bool_t AliMpCDB::GenerateMpData(const char* cdbpath, Int_t runNumber) | |
480 | { | |
481 | /// Generate mapping data ASCII files from OCDB | |
482 | ||
483 | TObject* cdbEntryObject | |
484 | = GetCDBEntryObject("MUON/Calib/MappingData", cdbpath, runNumber); | |
485 | if ( ! cdbEntryObject ) return kFALSE; | |
486 | ||
487 | AliMpDataMap* dataMap = (AliMpDataMap*)cdbEntryObject; | |
488 | AliMpDataProcessor mp; | |
489 | return mp.GenerateData(dataMap); | |
490 | } | |
491 | ||
ab167304 | 492 | //______________________________________________________________________________ |
493 | Bool_t AliMpCDB::GenerateMpRunData(const char* cdbpath, Int_t runNumber) | |
494 | { | |
495 | /// Generate mapping data ASCII files from OCDB | |
496 | ||
497 | TObject* cdbEntryObject | |
498 | = GetCDBEntryObject("MUON/Calib/MappingRunData", cdbpath, runNumber); | |
499 | if ( ! cdbEntryObject ) return kFALSE; | |
500 | ||
501 | AliMpDataMap* dataMap = (AliMpDataMap*)cdbEntryObject; | |
502 | AliMpDataProcessor mp; | |
503 | return mp.GenerateData(dataMap); | |
504 | } | |
505 | ||
183279c1 | 506 | //______________________________________________________________________________ |
507 | void AliMpCDB::UnloadAll() | |
508 | { | |
509 | /// Unload all the mapping from the memory | |
510 | delete AliMpDDLStore::Instance(false); | |
511 | delete AliMpSegmentation::Instance(false); | |
512 | delete AliMpDEStore::Instance(false); | |
513 | } | |
228fd720 | 514 |