]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/CDBToGrid.C
New class for debugging of the memory consumption and other run time parameters ...
[u/mrichter/AliRoot.git] / STEER / CDBToGrid.C
CommitLineData
ac9339b3 1
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...
4
5void CDBToGrid(const char *detName="", const char* fromUri="local://$ALICE_ROOT",
6 const char* toUri="local://newOCDB"){
7
8AliCDBManager *man = AliCDBManager::Instance();
9
10man->SetDefaultStorage(fromUri);
11
12AliCDBStorage *dest = man->GetStorage(toUri);
13
14man->SetRun(0);
15
16if(detName == ""){
17// drain everything
18 TList *calib = man->GetAll("*/Calib/*");
19 TList *align = man->GetAll("*/Align/Data");
20} else {
21// drain calibration and aliignment for detector "detName"
22
23 TString calibPath = detName;
24 TString alignPath = calibPath;
25 calibPath+="/Calib/*";
26 alignPath+="/Align/Data";
27
28 TList *calib = man->GetAll(calibPath);
29 TList *align = man->GetAll(alignPath);
30}
31
32AliCDBEntry *entry;
33for(int i=0;i<calib->GetEntries();i++){
34
35 entry = (AliCDBEntry*) calib->At(i);
36
37 // change run range
38 entry->GetId().SetRunRange(0,999999999);
39
40 TString path=entry->GetId().GetPath();
41 if (path == "ITS/Resp/RespSDD") entry->GetId().SetPath("ITS/Calib/RespSDD"); // bug in ITS/Resp/RespSDD
42
43 dest->Put(entry);
44}
45
46
47for(int i=0;i<align->GetEntries();i++){
48 entry = (AliCDBEntry*) align->At(i);
49 entry->GetId().SetRunRange(0,999999999);
50 dest->Put(entry);
51}
52
53
54man->Destroy();
55
56}