1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /////////////////////////////////////////////////////////////////////
18 // class AliCDBDump //
19 // access class to a DataBase in a dump storage (single file) //
21 /////////////////////////////////////////////////////////////////////
28 #include <TObjString.h>
31 #include "AliCDBDump.h"
32 #include "AliCDBEntry.h"
37 //_____________________________________________________________________________
38 AliCDBDump::AliCDBDump(const char* dbFile, Bool_t readOnly):
39 fFile(NULL), fReadOnly(readOnly) {
43 fFile = TFile::Open(dbFile, fReadOnly ? "READ" : "UPDATE");
45 AliError(Form("Can't open file <%s>!" , dbFile));
47 AliDebug(2,Form("File <%s> opened",dbFile));
48 if(fReadOnly) AliDebug(2,Form("in read-only mode"));
55 //_____________________________________________________________________________
56 AliCDBDump::~AliCDBDump() {
66 //_____________________________________________________________________________
67 Bool_t AliCDBDump::KeyNameToId(const char* keyname, AliCDBRunRange& runRange,
68 Int_t& version, Int_t& subVersion) {
69 // build AliCDBId from keyname numbers
73 // valid keyname: Run#firstRun_#lastRun_v#version_s#subVersion.root
74 TRegexp keyPattern("^Run[0-9]+_[0-9]+_v[0-9]+_s[0-9]+$");
75 keyPattern.Index(keyname, &mSize);
77 AliDebug(2,Form("Bad keyname <%s>.", keyname));
81 TObjArray* strArray = (TObjArray*) TString(keyname).Tokenize("_");
83 TString firstRunString(((TObjString*) strArray->At(0))->GetString());
84 runRange.SetFirstRun(atoi(firstRunString.Data() + 3));
85 runRange.SetLastRun(atoi(((TObjString*) strArray->At(1))->GetString()));
87 TString verString(((TObjString*) strArray->At(2))->GetString());
88 version = atoi(verString.Data() + 1);
90 TString subVerString(((TObjString*) strArray->At(3))->GetString());
91 subVersion = atoi(subVerString.Data() + 1);
98 //_____________________________________________________________________________
99 Bool_t AliCDBDump::IdToKeyName(const AliCDBRunRange& runRange, Int_t version,
100 Int_t subVersion, TString& keyname) {
101 // build key name from AliCDBId data (run range, version, subVersion)
103 if (!runRange.IsValid()) {
104 AliDebug(2,Form("Invalid run range <%d, %d>.",
105 runRange.GetFirstRun(), runRange.GetLastRun()));
110 AliDebug(2,Form("Invalid version <%d>.", version));
114 if (subVersion < 0) {
115 AliDebug(2,Form("Invalid subversion <%s>.", subVersion));
120 keyname += runRange.GetFirstRun();
122 keyname += runRange.GetLastRun();
126 keyname += subVersion;
131 //_____________________________________________________________________________
132 Bool_t AliCDBDump::MkDir(const TString& path) {
133 // descend into TDirectory, making TDirectories if they don't exist
134 TObjArray* strArray = (TObjArray*) path.Tokenize("/");
136 TIter iter(strArray);
139 while ((str = (TObjString*) iter.Next())) {
141 TString dirName(str->GetString());
142 if (!dirName.Length()) {
146 if (gDirectory->cd(dirName)) {
150 TDirectory* aDir = gDirectory->mkdir(dirName, "");
152 AliError(Form("Can't create directory <%s>!",
167 //_____________________________________________________________________________
168 Bool_t AliCDBDump::PrepareId(AliCDBId& id) {
169 // prepare id (version, subVersion) of the object that will be stored (called by PutEntry)
171 AliCDBRunRange aRunRange; // the runRange got from filename
172 AliCDBRunRange lastRunRange(-1,-1); // highest runRange found
173 Int_t aVersion, aSubVersion; // the version subVersion got from filename
174 Int_t lastVersion = 0, lastSubVersion = -1; // highest version and subVersion found
177 TIter iter(gDirectory->GetListOfKeys());
180 if (!id.HasVersion()) { // version not specified: look for highest version & subVersion
182 while ((key = (TKey*) iter.Next())) { // loop on keys
184 const char* keyName = key->GetName();
186 if (!KeyNameToId(keyName, aRunRange, aVersion,
189 "Bad keyname <%s>!I'll skip it.", keyName));
193 if (!aRunRange.Overlaps(id.GetAliCDBRunRange())) continue;
194 if(aVersion < lastVersion) continue;
195 if(aVersion > lastVersion) lastSubVersion = -1;
196 if(aSubVersion < lastSubVersion) continue;
197 lastVersion = aVersion;
198 lastSubVersion = aSubVersion;
199 lastRunRange = aRunRange;
202 id.SetVersion(lastVersion);
203 id.SetSubVersion(lastSubVersion + 1);
205 } else { // version specified, look for highest subVersion only
207 while ((key = (TKey*) iter.Next())) { // loop on the keys
209 const char* keyName = key->GetName();
211 if (!KeyNameToId(keyName, aRunRange, aVersion,
214 "Bad keyname <%s>!I'll skip it.", keyName));
218 if (aRunRange.Overlaps(id.GetAliCDBRunRange())
219 && aVersion == id.GetVersion()
220 && aSubVersion > lastSubVersion) {
221 lastSubVersion = aSubVersion;
222 lastRunRange = aRunRange;
227 id.SetSubVersion(lastSubVersion + 1);
230 TString lastStorage = id.GetLastStorage();
231 if(lastStorage.Contains(TString("grid"), TString::kIgnoreCase) &&
232 id.GetSubVersion() > 0 ){
233 AliError(Form("Grid to Dump Storage error! local object with version v%d_s%d found:",id.GetVersion(), id.GetSubVersion()-1));
234 AliError(Form("This object has been already transferred from Grid (check v%d_s0)!",id.GetVersion()));
238 if(lastStorage.Contains(TString("new"), TString::kIgnoreCase) &&
239 id.GetSubVersion() > 0 ){
240 AliDebug(2, Form("A NEW object is being stored with version v%d_s%d",
241 id.GetVersion(),id.GetSubVersion()));
242 AliDebug(2, Form("and it will hide previously stored object with v%d_s%d!",
243 id.GetVersion(),id.GetSubVersion()-1));
246 if(!lastRunRange.IsAnyRange() && !(lastRunRange.IsEqual(& id.GetAliCDBRunRange())))
247 AliWarning(Form("Run range modified w.r.t. previous version (Run%d_%d_v%d_s%d)",
248 lastRunRange.GetFirstRun(), lastRunRange.GetLastRun(),
249 id.GetVersion(), id.GetSubVersion()-1));
255 // //_____________________________________________________________________________
256 // Bool_t AliCDBDump::GetId(const AliCDBId& query, AliCDBId& result) {
257 // // look for filename matching query (called by GetEntry)
260 // AliCDBRunRange aRunRange; // the runRange got from filename
261 // Int_t aVersion, aSubVersion; // the version and subVersion got from filename
263 // TIter iter(gDirectory->GetListOfKeys());
266 // if (!query.HasVersion()) { // neither version and subversion specified -> look for highest version and subVersion
268 // while ((key = (TKey*) iter.Next())) { // loop on the keys
270 // if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
271 // // aRunRange, aVersion, aSubVersion filled from filename
273 // if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
274 // // aRunRange contains requested run!
276 // if (result.GetVersion() < aVersion) {
277 // result.SetVersion(aVersion);
278 // result.SetSubVersion(aSubVersion);
280 // result.SetFirstRun(
281 // aRunRange.GetFirstRun());
282 // result.SetLastRun(
283 // aRunRange.GetLastRun());
285 // } else if (result.GetVersion() == aVersion
286 // && result.GetSubVersion()
289 // result.SetSubVersion(aSubVersion);
291 // result.SetFirstRun(
292 // aRunRange.GetFirstRun());
293 // result.SetLastRun(
294 // aRunRange.GetLastRun());
295 // } else if (result.GetVersion() == aVersion
296 // && result.GetSubVersion() == aSubVersion){
297 // AliDebug(2,Form("More than one object valid for run %d, version %d_%d!",
298 // query.GetFirstRun(), aVersion, aSubVersion));
299 // result.SetRunRange(-1,-1); result.SetVersion(-1); result.SetSubVersion(-1);
304 // } else if (!query.HasSubVersion()) { // version specified but not subversion -> look for highest subVersion
306 // result.SetVersion(query.GetVersion());
308 // while ((key = (TKey*) iter.Next())) { // loop on the keys
310 // if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
311 // // aRunRange, aVersion, aSubVersion filled from filename
313 // if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
314 // // aRunRange contains requested run!
316 // if(query.GetVersion() != aVersion) continue;
317 // // aVersion is requested version!
319 // if(result.GetSubVersion() == aSubVersion){
320 // AliDebug(2,Form("More than one object valid for run %d, version %d_%d!",
321 // query.GetFirstRun(), aVersion, aSubVersion));
322 // result.SetRunRange(-1,-1); result.SetVersion(-1); result.SetSubVersion(-1);
325 // if( result.GetSubVersion() < aSubVersion) {
327 // result.SetSubVersion(aSubVersion);
329 // result.SetFirstRun(
330 // aRunRange.GetFirstRun());
331 // result.SetLastRun(
332 // aRunRange.GetLastRun());
336 // } else { // both version and subversion specified
338 // while ((key = (TKey*) iter.Next())) { // loop on the keys
340 // if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
341 // // aRunRange, aVersion, aSubVersion filled from filename
343 // if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
344 // // aRunRange contains requested run!
346 // if(query.GetVersion() != aVersion || query.GetSubVersion() != aSubVersion) continue;
347 // // aVersion and aSubVersion are requested version and subVersion!
349 // if(result.GetVersion() == aVersion && result.GetSubVersion() == aSubVersion){
350 // AliDebug(2,Form("More than one object valid for run %d, version %d_%d!",
351 // query.GetFirstRun(), aVersion, aSubVersion));
352 // result.SetRunRange(-1,-1); result.SetVersion(-1); result.SetSubVersion(-1);
355 // result.SetVersion(aVersion);
356 // result.SetSubVersion(aSubVersion);
357 // result.SetFirstRun(aRunRange.GetFirstRun());
358 // result.SetLastRun(aRunRange.GetLastRun());
366 //_____________________________________________________________________________
367 AliCDBId* AliCDBDump::GetId(const AliCDBId& query) {
368 // look for filename matching query (called by GetEntry)
371 AliCDBRunRange aRunRange; // the runRange got from filename
372 Int_t aVersion, aSubVersion; // the version and subVersion got from filename
374 TIter iter(gDirectory->GetListOfKeys());
377 AliCDBId* result = new AliCDBId();
378 result->SetPath(query.GetPath());
380 if (!query.HasVersion()) { // neither version and subversion specified -> look for highest version and subVersion
382 while ((key = (TKey*) iter.Next())) { // loop on the keys
384 if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
385 // aRunRange, aVersion, aSubVersion filled from filename
387 if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
388 // aRunRange contains requested run!
390 if (result->GetVersion() < aVersion) {
391 result->SetVersion(aVersion);
392 result->SetSubVersion(aSubVersion);
395 aRunRange.GetFirstRun());
397 aRunRange.GetLastRun());
399 } else if (result->GetVersion() == aVersion
400 && result->GetSubVersion()
403 result->SetSubVersion(aSubVersion);
406 aRunRange.GetFirstRun());
408 aRunRange.GetLastRun());
409 } else if (result->GetVersion() == aVersion
410 && result->GetSubVersion() == aSubVersion){
411 AliError(Form("More than one object valid for run %d, version %d_%d!",
412 query.GetFirstRun(), aVersion, aSubVersion));
418 } else if (!query.HasSubVersion()) { // version specified but not subversion -> look for highest subVersion
420 result->SetVersion(query.GetVersion());
422 while ((key = (TKey*) iter.Next())) { // loop on the keys
424 if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
425 // aRunRange, aVersion, aSubVersion filled from filename
427 if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
428 // aRunRange contains requested run!
430 if(query.GetVersion() != aVersion) continue;
431 // aVersion is requested version!
433 if(result->GetSubVersion() == aSubVersion){
434 AliError(Form("More than one object valid for run %d, version %d_%d!",
435 query.GetFirstRun(), aVersion, aSubVersion));
439 if( result->GetSubVersion() < aSubVersion) {
441 result->SetSubVersion(aSubVersion);
444 aRunRange.GetFirstRun());
446 aRunRange.GetLastRun());
450 } else { // both version and subversion specified
452 while ((key = (TKey*) iter.Next())) { // loop on the keys
454 if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
455 // aRunRange, aVersion, aSubVersion filled from filename
457 if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
458 // aRunRange contains requested run!
460 if(query.GetVersion() != aVersion || query.GetSubVersion() != aSubVersion) continue;
461 // aVersion and aSubVersion are requested version and subVersion!
463 if(result->GetVersion() == aVersion && result->GetSubVersion() == aSubVersion){
464 AliError(Form("More than one object valid for run %d, version %d_%d!",
465 query.GetFirstRun(), aVersion, aSubVersion));
469 result->SetVersion(aVersion);
470 result->SetSubVersion(aSubVersion);
471 result->SetFirstRun(aRunRange.GetFirstRun());
472 result->SetLastRun(aRunRange.GetLastRun());
480 //_____________________________________________________________________________
481 AliCDBEntry* AliCDBDump::GetEntry(const AliCDBId& queryId) {
482 // get AliCDBEntry from the database
484 TDirectory::TContext context(gDirectory, fFile);
486 if (!(fFile && fFile->IsOpen())) {
487 AliError("AliCDBDump storage is not initialized properly");
491 if (!gDirectory->cd(queryId.GetPath())) {
495 AliCDBId *dataId = GetEntryId(queryId);
497 if (!dataId || !dataId->IsSpecified()) {
498 if(dataId) delete dataId;
503 if (!IdToKeyName(dataId->GetAliCDBRunRange(), dataId->GetVersion(),
504 dataId->GetSubVersion(), keyname)) {
505 AliDebug(2,Form("Bad ID encountered! Subnormal error!"));
510 // get the only AliCDBEntry object from the file
511 // the object in the file is an AliCDBEntry entry named keyname
512 // keyName = Run#firstRun_#lastRun_v#version_s#subVersion
514 TObject* anObject = gDirectory->Get(keyname);
516 AliDebug(2,Form("Bad storage data: NULL entry object!"));
521 if (AliCDBEntry::Class() != anObject->IsA()) {
522 AliDebug(2,Form("Bad storage data: Invalid entry object!"));
527 ((AliCDBEntry*) anObject)->SetLastStorage("dump");
530 return (AliCDBEntry*) anObject;
533 //_____________________________________________________________________________
534 AliCDBId* AliCDBDump::GetEntryId(const AliCDBId& queryId) {
535 // get AliCDBEntry from the database
537 TDirectory::TContext context(gDirectory, fFile);
539 if (!(fFile && fFile->IsOpen())) {
540 AliError("AliCDBDump storage is not initialized properly");
544 if (!gDirectory->cd(queryId.GetPath())) {
548 AliCDBId* dataId = 0;
550 // look for a filename matching query requests (path, runRange, version, subVersion)
551 if (!queryId.HasVersion()) {
552 // if version is not specified, first check the selection criteria list
553 AliCDBId selectedId(queryId);
554 GetSelection(&selectedId);
555 dataId = GetId(queryId);
557 dataId = GetId(queryId);
560 if (dataId && !dataId->IsSpecified()) {
568 //_____________________________________________________________________________
569 void AliCDBDump::GetEntriesForLevel0(const AliCDBId& queryId, TList* result) {
570 // multiple request (AliCDBStorage::GetAll)
572 TDirectory* saveDir = gDirectory;
574 TIter iter(gDirectory->GetListOfKeys());
577 while ((key = (TKey*) iter.Next())) {
579 TString keyNameStr(key->GetName());
580 if (queryId.GetAliCDBPath().Level1Comprises(keyNameStr)) {
581 gDirectory->cd(keyNameStr);
582 GetEntriesForLevel1(queryId, result);
589 //_____________________________________________________________________________
590 void AliCDBDump::GetEntriesForLevel1(const AliCDBId& queryId, TList* result) {
591 // multiple request (AliCDBStorage::GetAll)
593 TIter iter(gDirectory->GetListOfKeys());
596 TDirectory* level0Dir = (TDirectory*) gDirectory->GetMother();
598 while ((key = (TKey*) iter.Next())) {
600 TString keyNameStr(key->GetName());
601 if (queryId.GetAliCDBPath().Level2Comprises(keyNameStr)) {
603 AliCDBPath aPath(level0Dir->GetName(),
604 gDirectory->GetName(), keyNameStr);
605 AliCDBId anId(aPath, queryId.GetAliCDBRunRange(),
606 queryId.GetVersion(), -1);
608 AliCDBEntry* anEntry = GetEntry(anId);
610 result->Add(anEntry);
619 //_____________________________________________________________________________
620 TList* AliCDBDump::GetEntries(const AliCDBId& queryId) {
621 // multiple request (AliCDBStorage::GetAll)
623 TDirectory::TContext context(gDirectory, fFile);
625 if (!(fFile && fFile->IsOpen())) {
626 AliError("AliCDBDump storage is not initialized properly");
630 TList* result = new TList();
633 TIter iter(gDirectory->GetListOfKeys());
636 while ((key = (TKey*) iter.Next())) {
638 TString keyNameStr(key->GetName());
639 if (queryId.GetAliCDBPath().Level0Comprises(keyNameStr)) {
640 gDirectory->cd(keyNameStr);
641 GetEntriesForLevel0(queryId, result);
650 //_____________________________________________________________________________
651 Bool_t AliCDBDump::PutEntry(AliCDBEntry* entry) {
652 // put an AliCDBEntry object into the database
654 TDirectory::TContext context(gDirectory, fFile);
656 if (!(fFile && fFile->IsOpen())) {
657 AliError("AliCDBDump storage is not initialized properly");
662 AliError("AliCDBDump storage is read only!");
666 AliCDBId& id = entry->GetId();
668 if (!gDirectory->cd(id.GetPath())) {
669 if (!MkDir(id.GetPath())) {
670 AliError(Form("Can't open directory <%s>!",
671 id.GetPath().Data()));
676 // set version and subVersion for the entry to be stored
677 if (!PrepareId(id)) {
681 // build keyname from entry's id
683 if (!IdToKeyName(id.GetAliCDBRunRange(), id.GetVersion(), id.GetSubVersion(), keyname)) {
684 AliError("Invalid ID encountered! Subnormal error!");
688 // write object (key name: Run#firstRun_#lastRun_v#version_s#subVersion)
689 Bool_t result = gDirectory->WriteTObject(entry, keyname);
691 AliError(Form("Can't write entry to file: %s",
696 AliInfo(Form("CDB object stored into file %s",fFile->GetName()));
697 AliInfo(Form("TDirectory/key name: %s/%s",id.GetPath().Data(),keyname.Data()));
702 //_____________________________________________________________________________
703 TList* AliCDBDump::GetIdListFromFile(const char* fileName){
705 TString turl(fileName);
706 if (turl[0] != '/') {
707 turl.Prepend(TString(gSystem->WorkingDirectory()) + '/');
709 TFile *file = TFile::Open(turl);
711 AliError(Form("Can't open selection file <%s>!", turl.Data()));
716 TList *list = new TList();
724 keycycle = "AliCDBId;";
727 id = (AliCDBId*) file->Get(keycycle);
731 file->Close(); delete file; file=0;
735 //_____________________________________________________________________________
736 Bool_t AliCDBDump::Contains(const char* path) const{
737 // check for path in storage
739 TDirectory::TContext context(gDirectory, fFile);
740 if (!(fFile && fFile->IsOpen())) {
741 AliError("AliCDBDump storage is not initialized properly");
745 return gDirectory->cd(path);
749 //_____________________________________________________________________________
750 void AliCDBDump::QueryValidFiles()
752 // Query the CDB for files valid for AliCDBStorage::fRun
753 // fills list fValidFileIds with AliCDBId objects created from file name
755 AliError("Not yet (and maybe never) implemented");
758 //_____________________________________________________________________________
759 Bool_t AliCDBDump::IdToFilename(const AliCDBId& /*id*/, TString& /*filename*/) const {
760 // build file name from AliCDBId (path, run range, version) and fDBFolder
762 AliError("Not implemented");
766 //_____________________________________________________________________________
767 Int_t AliCDBDump::GetLatestVersion(const char* path, Int_t run){
768 // get last version found in the database valid for run and path
770 AliCDBPath aCDBPath(path);
771 if(!aCDBPath.IsValid() || aCDBPath.IsWildcard()) {
772 AliError(Form("Invalid path in request: %s", path));
776 AliCDBId query(path, run, run, -1, -1);
777 AliCDBId *dataId = GetId(query);
779 if(!dataId) return -1;
780 Int_t version = dataId->GetVersion();
786 //_____________________________________________________________________________
787 Int_t AliCDBDump::GetLatestSubVersion(const char* path, Int_t run, Int_t version){
788 // get last version found in the database valid for run and path
790 AliCDBPath aCDBPath(path);
791 if(!aCDBPath.IsValid() || aCDBPath.IsWildcard()) {
792 AliError(Form("Invalid path in request: %s", path));
796 AliCDBId query(path, run, run, version, -1);
797 AliCDBId *dataId = GetId(query);
799 if(!dataId) return -1;
801 Int_t subVersion = dataId->GetSubVersion();
809 /////////////////////////////////////////////////////////////////////////////////////////////////
811 // AliCDBDump factory //
813 /////////////////////////////////////////////////////////////////////////////////////////////////
815 ClassImp(AliCDBDumpFactory)
817 //_____________________________________________________________________________
818 Bool_t AliCDBDumpFactory::Validate(const char* dbString) {
819 // check if the string is valid dump URI
821 TRegexp dbPattern("^dump://.+$");
823 return TString(dbString).Contains(dbPattern);
826 //_____________________________________________________________________________
827 AliCDBParam* AliCDBDumpFactory::CreateParameter(const char* dbString) {
828 // create AliCDBDumpParam class from the URI string
830 if (!Validate(dbString)) {
834 TString pathname(dbString + sizeof("dump://") - 1);
838 if (pathname.Contains(TRegexp(";ReadOnly$"))) {
839 pathname.Resize(pathname.Length() - sizeof(";ReadOnly") + 1);
845 gSystem->ExpandPathName(pathname);
847 if (pathname[0] != '/') {
848 pathname.Prepend(TString(gSystem->WorkingDirectory()) + '/');
851 return new AliCDBDumpParam(pathname, readOnly);
854 //_____________________________________________________________________________
855 AliCDBStorage* AliCDBDumpFactory::Create(const AliCDBParam* param) {
856 // create AliCDBDump storage instance from parameters
858 if (AliCDBDumpParam::Class() == param->IsA()) {
860 const AliCDBDumpParam* dumpParam =
861 (const AliCDBDumpParam*) param;
863 return new AliCDBDump(dumpParam->GetPath(),
864 dumpParam->IsReadOnly());
870 /////////////////////////////////////////////////////////////////////////////////////////////////
872 // AliCDBDump parameter class //
874 /////////////////////////////////////////////////////////////////////////////////////////////////
876 ClassImp(AliCDBDumpParam)
878 //_____________________________________________________________________________
879 AliCDBDumpParam::AliCDBDumpParam():
880 fDBPath(), fReadOnly(kFALSE)
882 // default constructor
886 //_____________________________________________________________________________
887 AliCDBDumpParam::AliCDBDumpParam(const char* dbPath, Bool_t readOnly):
888 fDBPath(dbPath), fReadOnly(readOnly)
904 //_____________________________________________________________________________
905 AliCDBDumpParam::~AliCDBDumpParam() {
910 //_____________________________________________________________________________
911 AliCDBParam* AliCDBDumpParam::CloneParam() const {
914 return new AliCDBDumpParam(fDBPath, fReadOnly);
917 //_____________________________________________________________________________
918 ULong_t AliCDBDumpParam::Hash() const {
919 // return Hash function
921 return fDBPath.Hash();
924 //_____________________________________________________________________________
925 Bool_t AliCDBDumpParam::IsEqual(const TObject* obj) const {
926 // check if this object is equal to AliCDBParam obj
932 if (AliCDBDumpParam::Class() != obj->IsA()) {
936 AliCDBDumpParam* other = (AliCDBDumpParam*) obj;
938 return fDBPath == other->fDBPath;