1 /**************************************************************************
2 * To Convert Ascii DDL file into DDL-CDB object
4 * Mon Nov 22 19:54:27 CET 2010
6 **************************************************************************/
7 void MakePMDDDLinfoCDB()
10 AliCDBManager* man = AliCDBManager::Instance();
11 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
12 // man->SetDefaultStorage("local:///Users/basanta/ALISOFT/PMD/VarInit/OCDB");
13 AliPMDddlinfoData *mapda = new AliPMDddlinfoData();
17 Int_t serialmodno[12];
18 // Int_t moduleDDL[6] = {12,12,0,0,12,12};
21 infile.open("PMD_ddl_info.dat"); // ascii file
22 if(!infile) AliError("Could not open the DDL info file");
25 for(Int_t iddl = 0; iddl < 6; iddl++)
27 infile >> ddlno >> totmod;
29 mapda->SetNoOfModulePerDdl(iddl,totmod);
31 //printf("%d %d\n", ddlno, totmod);
32 if(totmod == 0) continue;
34 for(Int_t imod = 0; imod < 12; imod++)
37 serialmodno[imod] = modno;
38 //printf("%d \n", modno);
41 mapda->SetModuleNoPerDdl(iddl,serialmodno);
46 infile.open("PMD_removed_chains.dat"); // ascii file
47 if(!infile) AliError("Could not open the DDL info file");
50 Int_t rows1, rowe1, cols1, cole1;
51 Int_t rows2, rowe2, cols2, cole2;
63 for(Int_t idet = 0; idet < 2; idet++)
65 for(Int_t ismn = 0; ismn < 24; ismn++)
67 infile >> det >> smn >> rows1 >> rowe1 >> cols1 >> cole1
68 >> rows2 >> rowe2 >> cols2 >> cole2;
70 srowa[idet][ismn] = rows1;
71 erowa[idet][ismn] = rowe1;
72 scola[idet][ismn] = cols1;
73 ecola[idet][ismn] = cole1;
74 srowb[idet][ismn] = rows2;
75 erowb[idet][ismn] = rowe2;
76 scolb[idet][ismn] = cols2;
77 ecolb[idet][ismn] = cole2;
82 mapda->SetStartRowA(srowa);
83 mapda->SetStartRowB(srowb);
84 mapda->SetStartColA(scola);
85 mapda->SetStartColB(scolb);
86 mapda->SetEndRowA(erowa);
87 mapda->SetEndRowB(erowb);
88 mapda->SetEndColA(ecola);
89 mapda->SetEndColB(ecolb);
92 AliCDBMetaData *md= new AliCDBMetaData();
93 md->SetResponsible("Basanta Nandi");
94 md->SetComment("DDL info for PMD");
96 AliCDBId id("PMD/Calib/Ddlinfo",0,AliCDBRunRange::Infinity());
98 man->GetDefaultStorage()->Put(mapda,id, md);