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 /////////////////////////////////////////////////////////////////////
27 #include <TObjString.h>
30 #include "AliCDBDump.h"
31 #include "AliCDBEntry.h"
36 //_____________________________________________________________________________
37 AliCDBDump::AliCDBDump(const char* dbFile, Bool_t readOnly):
38 fFile(NULL), fReadOnly(readOnly) {
42 fFile = TFile::Open(dbFile, fReadOnly ? "READ" : "UPDATE");
44 AliError(Form("Can't open file <%s>!" , dbFile));
46 AliDebug(2,Form("File <%s> opened",dbFile));
47 if(fReadOnly) AliDebug(2,Form("in read-only mode"));
54 //_____________________________________________________________________________
55 AliCDBDump::~AliCDBDump() {
65 //_____________________________________________________________________________
66 Bool_t AliCDBDump::KeyNameToId(const char* keyname, AliCDBRunRange& runRange,
67 Int_t& version, Int_t& subVersion) {
68 // build AliCDBId from keyname numbers
72 // valid keyname: Run#firstRun_#lastRun_v#version_s#subVersion.root
73 TRegexp keyPattern("^Run[0-9]+_[0-9]+_v[0-9]+_s[0-9]+$");
74 keyPattern.Index(keyname, &mSize);
76 AliDebug(2,Form("Bad keyname <%s>.", keyname));
80 TObjArray* strArray = (TObjArray*) TString(keyname).Tokenize("_");
82 TString firstRunString(((TObjString*) strArray->At(0))->GetString());
83 runRange.SetFirstRun(atoi(firstRunString.Data() + 3));
84 runRange.SetLastRun(atoi(((TObjString*) strArray->At(1))->GetString()));
86 TString verString(((TObjString*) strArray->At(2))->GetString());
87 version = atoi(verString.Data() + 1);
89 TString subVerString(((TObjString*) strArray->At(3))->GetString());
90 subVersion = atoi(subVerString.Data() + 1);
97 //_____________________________________________________________________________
98 Bool_t AliCDBDump::IdToKeyName(const AliCDBRunRange& runRange, Int_t version,
99 Int_t subVersion, TString& keyname) {
100 // build key name from AliCDBId data (run range, version, subVersion)
102 if (!runRange.IsValid()) {
103 AliDebug(2,Form("Invalid run range <%d, %d>.",
104 runRange.GetFirstRun(), runRange.GetLastRun()));
109 AliDebug(2,Form("Invalid version <%d>.", version));
113 if (subVersion < 0) {
114 AliDebug(2,Form("Invalid subversion <%s>.", subVersion));
119 keyname += runRange.GetFirstRun();
121 keyname += runRange.GetLastRun();
125 keyname += subVersion;
130 //_____________________________________________________________________________
131 Bool_t AliCDBDump::MkDir(const TString& path) {
132 // descend into TDirectory, making TDirectories if they don't exist
133 TObjArray* strArray = (TObjArray*) path.Tokenize("/");
135 TIter iter(strArray);
138 while ((str = (TObjString*) iter.Next())) {
140 TString dirName(str->GetString());
141 if (!dirName.Length()) {
145 if (gDirectory->cd(dirName)) {
149 TDirectory* aDir = gDirectory->mkdir(dirName, "");
151 AliError(Form("Can't create directory <%s>!",
166 //_____________________________________________________________________________
167 Bool_t AliCDBDump::PrepareId(AliCDBId& id) {
168 // prepare id (version, subVersion) of the object that will be stored (called by PutEntry)
170 AliCDBRunRange aRunRange; // the runRange got from filename
171 AliCDBRunRange lastRunRange(-1,-1); // highest runRange found
172 Int_t aVersion, aSubVersion; // the version subVersion got from filename
173 Int_t lastVersion = 0, lastSubVersion = -1; // highest version and subVersion found
176 TIter iter(gDirectory->GetListOfKeys());
179 if (!id.HasVersion()) { // version not specified: look for highest version & subVersion
181 while ((key = (TKey*) iter.Next())) { // loop on keys
183 const char* keyName = key->GetName();
185 if (!KeyNameToId(keyName, aRunRange, aVersion,
188 "Bad keyname <%s>!I'll skip it.", keyName));
192 if (!aRunRange.Overlaps(id.GetAliCDBRunRange())) continue;
193 if(aVersion < lastVersion) continue;
194 if(aVersion > lastVersion) lastSubVersion = -1;
195 if(aSubVersion < lastSubVersion) continue;
196 lastVersion = aVersion;
197 lastSubVersion = aSubVersion;
198 lastRunRange = aRunRange;
201 id.SetVersion(lastVersion);
202 id.SetSubVersion(lastSubVersion + 1);
204 } else { // version specified, look for highest subVersion only
206 while ((key = (TKey*) iter.Next())) { // loop on the keys
208 const char* keyName = key->GetName();
210 if (!KeyNameToId(keyName, aRunRange, aVersion,
213 "Bad keyname <%s>!I'll skip it.", keyName));
217 if (aRunRange.Overlaps(id.GetAliCDBRunRange())
218 && aVersion == id.GetVersion()
219 && aSubVersion > lastSubVersion) {
220 lastSubVersion = aSubVersion;
221 lastRunRange = aRunRange;
226 id.SetSubVersion(lastSubVersion + 1);
229 TString lastStorage = id.GetLastStorage();
230 if(lastStorage.Contains(TString("grid"), TString::kIgnoreCase) &&
231 id.GetSubVersion() > 0 ){
232 AliError(Form("Grid to Dump Storage error! local object with version v%d_s%d found:",id.GetVersion(), id.GetSubVersion()-1));
233 AliError(Form("This object has been already transferred from Grid (check v%d_s0)!",id.GetVersion()));
237 if(lastStorage.Contains(TString("new"), TString::kIgnoreCase) &&
238 id.GetSubVersion() > 0 ){
239 AliDebug(2, Form("A NEW object is being stored with version v%d_s%d",
240 id.GetVersion(),id.GetSubVersion()));
241 AliDebug(2, Form("and it will hide previously stored object with v%d_s%d!",
242 id.GetVersion(),id.GetSubVersion()-1));
245 if(!lastRunRange.IsAnyRange() && !(lastRunRange.IsEqual(& id.GetAliCDBRunRange())))
246 AliWarning(Form("Run range modified w.r.t. previous version (Run%d_%d_v%d_s%d)",
247 lastRunRange.GetFirstRun(), lastRunRange.GetLastRun(),
248 id.GetVersion(), id.GetSubVersion()-1));
254 // //_____________________________________________________________________________
255 // Bool_t AliCDBDump::GetId(const AliCDBId& query, AliCDBId& result) {
256 // // look for filename matching query (called by GetEntry)
259 // AliCDBRunRange aRunRange; // the runRange got from filename
260 // Int_t aVersion, aSubVersion; // the version and subVersion got from filename
262 // TIter iter(gDirectory->GetListOfKeys());
265 // if (!query.HasVersion()) { // neither version and subversion specified -> look for highest version and subVersion
267 // while ((key = (TKey*) iter.Next())) { // loop on the keys
269 // if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
270 // // aRunRange, aVersion, aSubVersion filled from filename
272 // if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
273 // // aRunRange contains requested run!
275 // if (result.GetVersion() < aVersion) {
276 // result.SetVersion(aVersion);
277 // result.SetSubVersion(aSubVersion);
279 // result.SetFirstRun(
280 // aRunRange.GetFirstRun());
281 // result.SetLastRun(
282 // aRunRange.GetLastRun());
284 // } else if (result.GetVersion() == aVersion
285 // && result.GetSubVersion()
288 // result.SetSubVersion(aSubVersion);
290 // result.SetFirstRun(
291 // aRunRange.GetFirstRun());
292 // result.SetLastRun(
293 // aRunRange.GetLastRun());
294 // } else if (result.GetVersion() == aVersion
295 // && result.GetSubVersion() == aSubVersion){
296 // AliDebug(2,Form("More than one object valid for run %d, version %d_%d!",
297 // query.GetFirstRun(), aVersion, aSubVersion));
298 // result.SetRunRange(-1,-1); result.SetVersion(-1); result.SetSubVersion(-1);
303 // } else if (!query.HasSubVersion()) { // version specified but not subversion -> look for highest subVersion
305 // result.SetVersion(query.GetVersion());
307 // while ((key = (TKey*) iter.Next())) { // loop on the keys
309 // if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
310 // // aRunRange, aVersion, aSubVersion filled from filename
312 // if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
313 // // aRunRange contains requested run!
315 // if(query.GetVersion() != aVersion) continue;
316 // // aVersion is requested version!
318 // if(result.GetSubVersion() == aSubVersion){
319 // AliDebug(2,Form("More than one object valid for run %d, version %d_%d!",
320 // query.GetFirstRun(), aVersion, aSubVersion));
321 // result.SetRunRange(-1,-1); result.SetVersion(-1); result.SetSubVersion(-1);
324 // if( result.GetSubVersion() < aSubVersion) {
326 // result.SetSubVersion(aSubVersion);
328 // result.SetFirstRun(
329 // aRunRange.GetFirstRun());
330 // result.SetLastRun(
331 // aRunRange.GetLastRun());
335 // } else { // both version and subversion specified
337 // while ((key = (TKey*) iter.Next())) { // loop on the keys
339 // if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
340 // // aRunRange, aVersion, aSubVersion filled from filename
342 // if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
343 // // aRunRange contains requested run!
345 // if(query.GetVersion() != aVersion || query.GetSubVersion() != aSubVersion) continue;
346 // // aVersion and aSubVersion are requested version and subVersion!
348 // if(result.GetVersion() == aVersion && result.GetSubVersion() == aSubVersion){
349 // AliDebug(2,Form("More than one object valid for run %d, version %d_%d!",
350 // query.GetFirstRun(), aVersion, aSubVersion));
351 // result.SetRunRange(-1,-1); result.SetVersion(-1); result.SetSubVersion(-1);
354 // result.SetVersion(aVersion);
355 // result.SetSubVersion(aSubVersion);
356 // result.SetFirstRun(aRunRange.GetFirstRun());
357 // result.SetLastRun(aRunRange.GetLastRun());
365 //_____________________________________________________________________________
366 AliCDBId* AliCDBDump::GetId(const AliCDBId& query) {
367 // look for filename matching query (called by GetEntry)
370 AliCDBRunRange aRunRange; // the runRange got from filename
371 Int_t aVersion, aSubVersion; // the version and subVersion got from filename
373 TIter iter(gDirectory->GetListOfKeys());
376 AliCDBId* result = new AliCDBId();
377 result->SetPath(query.GetPath());
379 if (!query.HasVersion()) { // neither version and subversion specified -> look for highest version and subVersion
381 while ((key = (TKey*) iter.Next())) { // loop on the keys
383 if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
384 // aRunRange, aVersion, aSubVersion filled from filename
386 if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
387 // aRunRange contains requested run!
389 if (result->GetVersion() < aVersion) {
390 result->SetVersion(aVersion);
391 result->SetSubVersion(aSubVersion);
394 aRunRange.GetFirstRun());
396 aRunRange.GetLastRun());
398 } else if (result->GetVersion() == aVersion
399 && result->GetSubVersion()
402 result->SetSubVersion(aSubVersion);
405 aRunRange.GetFirstRun());
407 aRunRange.GetLastRun());
408 } else if (result->GetVersion() == aVersion
409 && result->GetSubVersion() == aSubVersion){
410 AliError(Form("More than one object valid for run %d, version %d_%d!",
411 query.GetFirstRun(), aVersion, aSubVersion));
417 } else if (!query.HasSubVersion()) { // version specified but not subversion -> look for highest subVersion
419 result->SetVersion(query.GetVersion());
421 while ((key = (TKey*) iter.Next())) { // loop on the keys
423 if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
424 // aRunRange, aVersion, aSubVersion filled from filename
426 if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
427 // aRunRange contains requested run!
429 if(query.GetVersion() != aVersion) continue;
430 // aVersion is requested version!
432 if(result->GetSubVersion() == aSubVersion){
433 AliError(Form("More than one object valid for run %d, version %d_%d!",
434 query.GetFirstRun(), aVersion, aSubVersion));
438 if( result->GetSubVersion() < aSubVersion) {
440 result->SetSubVersion(aSubVersion);
443 aRunRange.GetFirstRun());
445 aRunRange.GetLastRun());
449 } else { // both version and subversion specified
451 while ((key = (TKey*) iter.Next())) { // loop on the keys
453 if (!KeyNameToId(key->GetName(), aRunRange, aVersion, aSubVersion)) continue;
454 // aRunRange, aVersion, aSubVersion filled from filename
456 if (!aRunRange.Comprises(query.GetAliCDBRunRange())) continue;
457 // aRunRange contains requested run!
459 if(query.GetVersion() != aVersion || query.GetSubVersion() != aSubVersion) continue;
460 // aVersion and aSubVersion are requested version and subVersion!
462 if(result->GetVersion() == aVersion && result->GetSubVersion() == aSubVersion){
463 AliError(Form("More than one object valid for run %d, version %d_%d!",
464 query.GetFirstRun(), aVersion, aSubVersion));
468 result->SetVersion(aVersion);
469 result->SetSubVersion(aSubVersion);
470 result->SetFirstRun(aRunRange.GetFirstRun());
471 result->SetLastRun(aRunRange.GetLastRun());
479 //_____________________________________________________________________________
480 AliCDBEntry* AliCDBDump::GetEntry(const AliCDBId& queryId) {
481 // get AliCDBEntry from the database
483 TDirectory::TContext context(gDirectory, fFile);
485 if (!(fFile && fFile->IsOpen())) {
486 AliError("AliCDBDump storage is not initialized properly");
490 if (!gDirectory->cd(queryId.GetPath())) {
494 AliCDBId *dataId = GetEntryId(queryId);
496 if (!dataId || !dataId->IsSpecified()) {
497 if(dataId) delete dataId;
502 if (!IdToKeyName(dataId->GetAliCDBRunRange(), dataId->GetVersion(),
503 dataId->GetSubVersion(), keyname)) {
504 AliDebug(2,Form("Bad ID encountered! Subnormal error!"));
509 // get the only AliCDBEntry object from the file
510 // the object in the file is an AliCDBEntry entry named keyname
511 // keyName = Run#firstRun_#lastRun_v#version_s#subVersion
513 TObject* anObject = gDirectory->Get(keyname);
515 AliDebug(2,Form("Bad storage data: NULL entry object!"));
520 if (AliCDBEntry::Class() != anObject->IsA()) {
521 AliDebug(2,Form("Bad storage data: Invalid entry object!"));
526 ((AliCDBEntry*) anObject)->SetLastStorage("dump");
529 return (AliCDBEntry*) anObject;
532 //_____________________________________________________________________________
533 AliCDBId* AliCDBDump::GetEntryId(const AliCDBId& queryId) {
534 // get AliCDBEntry from the database
536 TDirectory::TContext context(gDirectory, fFile);
538 if (!(fFile && fFile->IsOpen())) {
539 AliError("AliCDBDump storage is not initialized properly");
543 if (!gDirectory->cd(queryId.GetPath())) {
547 AliCDBId* dataId = 0;
549 // look for a filename matching query requests (path, runRange, version, subVersion)
550 if (!queryId.HasVersion()) {
551 // if version is not specified, first check the selection criteria list
552 AliCDBId selectedId(queryId);
553 GetSelection(&selectedId);
554 dataId = GetId(queryId);
556 dataId = GetId(queryId);
559 if (dataId && !dataId->IsSpecified()) {
567 //_____________________________________________________________________________
568 void AliCDBDump::GetEntriesForLevel0(const AliCDBId& queryId, TList* result) {
569 // multiple request (AliCDBStorage::GetAll)
571 TDirectory* saveDir = gDirectory;
573 TIter iter(gDirectory->GetListOfKeys());
576 while ((key = (TKey*) iter.Next())) {
578 TString keyNameStr(key->GetName());
579 if (queryId.GetAliCDBPath().Level1Comprises(keyNameStr)) {
580 gDirectory->cd(keyNameStr);
581 GetEntriesForLevel1(queryId, result);
588 //_____________________________________________________________________________
589 void AliCDBDump::GetEntriesForLevel1(const AliCDBId& queryId, TList* result) {
590 // multiple request (AliCDBStorage::GetAll)
592 TIter iter(gDirectory->GetListOfKeys());
595 TDirectory* level0Dir = (TDirectory*) gDirectory->GetMother();
597 while ((key = (TKey*) iter.Next())) {
599 TString keyNameStr(key->GetName());
600 if (queryId.GetAliCDBPath().Level2Comprises(keyNameStr)) {
602 AliCDBPath aPath(level0Dir->GetName(),
603 gDirectory->GetName(), keyNameStr);
604 AliCDBId anId(aPath, queryId.GetAliCDBRunRange(),
605 queryId.GetVersion(), -1);
607 AliCDBEntry* anEntry = GetEntry(anId);
609 result->Add(anEntry);
618 //_____________________________________________________________________________
619 TList* AliCDBDump::GetEntries(const AliCDBId& queryId) {
620 // multiple request (AliCDBStorage::GetAll)
622 TDirectory::TContext context(gDirectory, fFile);
624 if (!(fFile && fFile->IsOpen())) {
625 AliError("AliCDBDump storage is not initialized properly");
629 TList* result = new TList();
632 TIter iter(gDirectory->GetListOfKeys());
635 while ((key = (TKey*) iter.Next())) {
637 TString keyNameStr(key->GetName());
638 if (queryId.GetAliCDBPath().Level0Comprises(keyNameStr)) {
639 gDirectory->cd(keyNameStr);
640 GetEntriesForLevel0(queryId, result);
649 //_____________________________________________________________________________
650 Bool_t AliCDBDump::PutEntry(AliCDBEntry* entry) {
651 // put an AliCDBEntry object into the database
653 TDirectory::TContext context(gDirectory, fFile);
655 if (!(fFile && fFile->IsOpen())) {
656 AliError("AliCDBDump storage is not initialized properly");
661 AliError("AliCDBDump storage is read only!");
665 AliCDBId& id = entry->GetId();
667 if (!gDirectory->cd(id.GetPath())) {
668 if (!MkDir(id.GetPath())) {
669 AliError(Form("Can't open directory <%s>!",
670 id.GetPath().Data()));
675 // set version and subVersion for the entry to be stored
676 if (!PrepareId(id)) {
680 // build keyname from entry's id
682 if (!IdToKeyName(id.GetAliCDBRunRange(), id.GetVersion(), id.GetSubVersion(), keyname)) {
683 AliError("Invalid ID encountered! Subnormal error!");
687 // write object (key name: Run#firstRun_#lastRun_v#version_s#subVersion)
688 Bool_t result = gDirectory->WriteTObject(entry, keyname);
690 AliError(Form("Can't write entry to file: %s",
695 AliInfo(Form("CDB object stored into file %s",fFile->GetName()));
696 AliInfo(Form("TDirectory/key name: %s/%s",id.GetPath().Data(),keyname.Data()));
701 //_____________________________________________________________________________
702 TList* AliCDBDump::GetIdListFromFile(const char* fileName){
704 TString turl(fileName);
705 if (turl[0] != '/') {
706 turl.Prepend(TString(gSystem->WorkingDirectory()) + '/');
708 TFile *file = TFile::Open(turl);
710 AliError(Form("Can't open selection file <%s>!", turl.Data()));
715 TList *list = new TList();
723 keycycle = "AliCDBId;";
726 id = (AliCDBId*) file->Get(keycycle);
730 file->Close(); delete file; file=0;
734 //_____________________________________________________________________________
735 Bool_t AliCDBDump::Contains(const char* path) const{
736 // check for path in storage
738 TDirectory::TContext context(gDirectory, fFile);
739 if (!(fFile && fFile->IsOpen())) {
740 AliError("AliCDBDump storage is not initialized properly");
744 return gDirectory->cd(path);
748 //_____________________________________________________________________________
749 void AliCDBDump::QueryValidFiles()
751 // Query the CDB for files valid for AliCDBStorage::fRun
752 // fills list fValidFileIds with AliCDBId objects created from file name
754 AliError("Not yet (and maybe never) implemented");
757 //_____________________________________________________________________________
758 Bool_t AliCDBDump::IdToFilename(const AliCDBId& /*id*/, TString& /*filename*/) const {
759 // build file name from AliCDBId (path, run range, version) and fDBFolder
761 AliError("Not implemented");
765 //_____________________________________________________________________________
766 Int_t AliCDBDump::GetLatestVersion(const char* path, Int_t run){
767 // get last version found in the database valid for run and path
769 AliCDBPath aCDBPath(path);
770 if(!aCDBPath.IsValid() || aCDBPath.IsWildcard()) {
771 AliError(Form("Invalid path in request: %s", path));
775 AliCDBId query(path, run, run, -1, -1);
776 AliCDBId *dataId = GetId(query);
778 if(!dataId) return -1;
779 Int_t version = dataId->GetVersion();
785 //_____________________________________________________________________________
786 Int_t AliCDBDump::GetLatestSubVersion(const char* path, Int_t run, Int_t version){
787 // get last version found in the database valid for run and path
789 AliCDBPath aCDBPath(path);
790 if(!aCDBPath.IsValid() || aCDBPath.IsWildcard()) {
791 AliError(Form("Invalid path in request: %s", path));
795 AliCDBId query(path, run, run, version, -1);
796 AliCDBId *dataId = GetId(query);
798 if(!dataId) return -1;
800 Int_t subVersion = dataId->GetSubVersion();
808 /////////////////////////////////////////////////////////////////////////////////////////////////
810 // AliCDBDump factory //
812 /////////////////////////////////////////////////////////////////////////////////////////////////
814 ClassImp(AliCDBDumpFactory)
816 //_____________________________________________________________________________
817 Bool_t AliCDBDumpFactory::Validate(const char* dbString) {
818 // check if the string is valid dump URI
820 TRegexp dbPattern("^dump://.+$");
822 return TString(dbString).Contains(dbPattern);
825 //_____________________________________________________________________________
826 AliCDBParam* AliCDBDumpFactory::CreateParameter(const char* dbString) {
827 // create AliCDBDumpParam class from the URI string
829 if (!Validate(dbString)) {
833 TString pathname(dbString + sizeof("dump://") - 1);
837 if (pathname.Contains(TRegexp(";ReadOnly$"))) {
838 pathname.Resize(pathname.Length() - sizeof(";ReadOnly") + 1);
844 gSystem->ExpandPathName(pathname);
846 if (pathname[0] != '/') {
847 pathname.Prepend(TString(gSystem->WorkingDirectory()) + '/');
850 return new AliCDBDumpParam(pathname, readOnly);
853 //_____________________________________________________________________________
854 AliCDBStorage* AliCDBDumpFactory::Create(const AliCDBParam* param) {
855 // create AliCDBDump storage instance from parameters
857 if (AliCDBDumpParam::Class() == param->IsA()) {
859 const AliCDBDumpParam* dumpParam =
860 (const AliCDBDumpParam*) param;
862 return new AliCDBDump(dumpParam->GetPath(),
863 dumpParam->IsReadOnly());
869 /////////////////////////////////////////////////////////////////////////////////////////////////
871 // AliCDBDump parameter class //
873 /////////////////////////////////////////////////////////////////////////////////////////////////
875 ClassImp(AliCDBDumpParam)
877 //_____________________________________________________________________________
878 AliCDBDumpParam::AliCDBDumpParam():
879 fDBPath(), fReadOnly(kFALSE)
881 // default constructor
885 //_____________________________________________________________________________
886 AliCDBDumpParam::AliCDBDumpParam(const char* dbPath, Bool_t readOnly):
887 fDBPath(dbPath), fReadOnly(readOnly)
903 //_____________________________________________________________________________
904 AliCDBDumpParam::~AliCDBDumpParam() {
909 //_____________________________________________________________________________
910 AliCDBParam* AliCDBDumpParam::CloneParam() const {
913 return new AliCDBDumpParam(fDBPath, fReadOnly);
916 //_____________________________________________________________________________
917 ULong_t AliCDBDumpParam::Hash() const {
918 // return Hash function
920 return fDBPath.Hash();
923 //_____________________________________________________________________________
924 Bool_t AliCDBDumpParam::IsEqual(const TObject* obj) const {
925 // check if this object is equal to AliCDBParam obj
931 if (AliCDBDumpParam::Class() != obj->IsA()) {
935 AliCDBDumpParam* other = (AliCDBDumpParam*) obj;
937 return fDBPath == other->fDBPath;