1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 #include "AliCDBManager.h"
3 #include "AliCDBStorage.h"
4 #include "AliCDBEntry.h"
10 void CheckCDBentries(const char* dest)
12 AliCDBManager* cdb = AliCDBManager::Instance();
13 const char* ref="local://$ALICE_ROOT/OCDB";
14 cdb->SetDefaultStorage(ref);
16 AliCDBStorage* newstor = cdb->GetStorage(dest);
17 // Missing here a check that newstor is a valid storage
19 TList* allentries = cdb->GetAll("*/*/*");
20 TList* allnewentries = newstor->GetAll("*/*/*",0);
21 Int_t nall = allentries->GetEntries();
22 Int_t nallnew = allnewentries->GetEntries();
23 Printf("Number of entries in reference OCDB %d and in checked OCDB %d",nall, nallnew);
28 AliCDBEntry *entry, *newentry;
30 for(Int_t i=0; i<nall; i++)
32 entry = dynamic_cast<AliCDBEntry*>(allentries->At(i));
33 cdbpath = ((AliCDBId)entry->GetId()).GetPath();
34 newentry = newstor->Get(cdbpath.Data(),0);
38 missing.Insert(missing.Length(),'\n');
45 Printf("\n\nEntries missing in destination OCDB folder %s w.r.t. reference folder %s:",dest,ref);
46 Printf("%s",missing.Data());
48 Printf("\n\nNo entry is missing in destination OCDB folder %s w.r.t. reference folder %s:",dest,ref);