Macros for creating OCDB
[u/mrichter/AliRoot.git] / MFT / MakeMFTRecoParam.C
CommitLineData
a6f7b1e5 1void MakeMFTRecoParam(TString Storage = "alien://folder=/alice/cern.ch/user/a/auras/OCDB/") {
2
3 const char* macroname = "MakeMFTRecoParam.C";
4
5 TObjArray *obj = new TObjArray();
6 AliMFTRecoParam *param = new AliMFTRecoParam();
7 obj -> AddAt(param, 0);
8
9 // save in CDB storage
10 if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
11 Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
12 return;
13 }
14 Info(macroname,"Saving Reconstruction Parameters objects in CDB storage %s", Storage.Data());
15 AliCDBManager* cdb = AliCDBManager::Instance();
16 AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
17 if(!storage){
18 Error(macroname,"Unable to open storage %s\n",Storage.Data());
19 return;
20 }
21 AliCDBMetaData* md = new AliCDBMetaData();
22 md->SetResponsible("Antonio Uras");
23 md->SetComment("MFT Calibration Data");
24 md->SetAliRootVersion(gROOT->GetVersion());
25 AliCDBId id("MFT/Calib/Data",0,AliCDBRunRange::Infinity());
26 // AliCDBId id("MFT/Calib/RecoParam",0,AliCDBRunRange::Infinity());
27 storage->Put(obj,id,md);
28
29}