2 // This macro transfers OCDB data of one single ("detName") or all ALICE detectors from one location to another,
3 // It is possible to set new run range, path etc...
5 void CDBToGrid(const char *detName="", const char* fromUri="local://$ALICE_ROOT",
6 const char* toUri="local://newOCDB"){
8 AliCDBManager *man = AliCDBManager::Instance();
10 man->SetDefaultStorage(fromUri);
12 AliCDBStorage *dest = man->GetStorage(toUri);
18 TList *calib = man->GetAll("*/Calib/*");
19 TList *align = man->GetAll("*/Align/Data");
21 // drain calibration and aliignment for detector "detName"
23 TString calibPath = detName;
24 TString alignPath = calibPath;
25 calibPath+="/Calib/*";
26 alignPath+="/Align/Data";
28 TList *calib = man->GetAll(calibPath);
29 TList *align = man->GetAll(alignPath);
33 for(int i=0;i<calib->GetEntries();i++){
35 entry = (AliCDBEntry*) calib->At(i);
38 entry->GetId().SetRunRange(0,999999999);
40 TString path=entry->GetId().GetPath();
41 if (path == "ITS/Resp/RespSDD") entry->GetId().SetPath("ITS/Calib/RespSDD"); // bug in ITS/Resp/RespSDD
47 for(int i=0;i<align->GetEntries();i++){
48 entry = (AliCDBEntry*) align->At(i);
49 entry->GetId().SetRunRange(0,999999999);