]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/CreatePedCDB.C
Update in gain cdb macro: sjena
[u/mrichter/AliRoot.git] / PMD / CreatePedCDB.C
1 void CreatePedCDB(){
2
3     AliCDBManager* man = AliCDBManager::Instance();
4         
5     man->SetDefaultStorage("local://CDB_PED");
6     
7     AliPMDPedestal *pedestal = new AliPMDPedestal();
8     
9     TRandom random;
10     AliCDBId id("PMD/Calib/Ped",0,0);
11
12     const Int_t kDet = 2;
13     const Int_t kMod = 24;
14     const Int_t kRow = 48;
15     const Int_t kCol = 96;
16     
17     Float_t mean = 100.0;
18     
19     for(int idet = 0; idet < kDet; idet++)
20     {
21         for(int imod = 0; imod < kMod; imod++) 
22         {
23             for(int irow = 0; irow < kRow; irow++)
24             {
25                 for(int icol = 0; icol < kCol; icol++)
26                 {
27                     Float_t rms = random.Gaus(15,2);
28                     pedestal->SetPedMeanRms(idet, imod, irow, icol,
29                                             mean, rms);
30                     id.SetRunRange(0,50);
31                 }
32             }
33         }
34     }
35                 
36     AliCDBMetaData md;
37     
38     man->Put(pedestal, id, &md);
39 }