1 void CreateDDLinfoCDB()
4 AliCDBManager* man = AliCDBManager::Instance();
5 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
6 // man->SetDefaultStorage("local:///Users/basanta/ALISOFT/PMD/VarInit/OCDB");
7 AliPMDddlinfoData *mapda = new AliPMDddlinfoData();
11 Int_t serialmodno[12];
12 // Int_t moduleDDL[6] = {12,12,0,0,12,12};
15 infile.open("PMD_ddl_info.dat"); // ascii file
16 if(!infile) AliError("Could not open the DDL info file");
19 for(Int_t iddl = 0; iddl < 6; iddl++)
21 infile >> ddlno >> totmod;
23 mapda->SetNoOfModulePerDdl(iddl,totmod);
25 //printf("%d %d\n", ddlno, totmod);
26 if(totmod == 0) continue;
28 for(Int_t imod = 0; imod < 12; imod++)
31 serialmodno[imod] = modno;
32 //printf("%d \n", modno);
35 mapda->SetModuleNoPerDdl(iddl,serialmodno);
40 infile.open("PMD_removed_chains.dat"); // ascii file
41 if(!infile) AliError("Could not open the DDL info file");
44 Int_t rows1, rowe1, cols1, cole1;
45 Int_t rows2, rowe2, cols2, cole2;
57 for(Int_t idet = 0; idet < 2; idet++)
59 for(Int_t ismn = 0; ismn < 24; ismn++)
61 infile >> det >> smn >> rows1 >> rowe1 >> cols1 >> cole1
62 >> rows2 >> rowe2 >> cols2 >> cole2;
64 srowa[idet][ismn] = rows1;
65 erowa[idet][ismn] = rowe1;
66 scola[idet][ismn] = cols1;
67 ecola[idet][ismn] = cole1;
68 srowb[idet][ismn] = rows2;
69 erowb[idet][ismn] = rowe2;
70 scolb[idet][ismn] = cols2;
71 ecolb[idet][ismn] = cole2;
76 mapda->SetStartRowA(srowa);
77 mapda->SetStartRowB(srowb);
78 mapda->SetStartColA(scola);
79 mapda->SetStartColB(scolb);
80 mapda->SetEndRowA(erowa);
81 mapda->SetEndRowB(erowb);
82 mapda->SetEndColA(ecola);
83 mapda->SetEndColB(ecolb);
86 AliCDBMetaData *md= new AliCDBMetaData();
87 md->SetResponsible("Basanta Nandi");
88 md->SetComment("DDL info for PMD");
90 AliCDBId id("PMD/Calib/Ddlinfo",0,AliCDBRunRange::Infinity());
92 man->GetDefaultStorage()->Put(mapda,id, md);