1 void CreateGainCDB(TString type){
3 AliCDBManager* man = AliCDBManager::Instance();
6 man->SetDefaultStorage("local://CDB_IDEAL");
7 }else if (type == "DECALIB"){
8 man->SetDefaultStorage("local://CDB_DECALIB");
10 cout << "Not a valid type!" << endl;
15 AliPMDCalibData *calibda = new AliPMDCalibData();
18 AliCDBId id("PMD/Calib/Gain",0,0);
21 const Int_t kMod = 24;
22 const Int_t kRow = 48;
23 const Int_t kCol = 96;
27 for(int a=0;a<kDet;a++)
28 for(int b=0;b<kMod;b++)
29 for(int c=0;c<kRow;c++)
30 for(int d=0;d<kCol;d++)
31 calibda->SetGainFact(a, b, c, d, random.Gaus(15,2));
36 } else if (type == "DECALIB"){
38 for(int a=0;a<kDet;a++)
39 for(int b=0;b<kMod;b++)
40 for(int c=0;c<kRow;c++)
41 for(int d=0;d<kCol;d++)
42 calibda->SetGainFact(a, b, c, d, TMath::Abs(random.Gaus(5,0.2)));
51 man->Put(calibda, id, &md);