1 void CreateMappingCDB()
4 AliCDBManager* man = AliCDBManager::Instance();
5 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
6 AliPMDMappingData *mapda = new AliPMDMappingData();
9 Int_t moduleno, totPatchBus, bPatchBus, ePatchBus;
10 Int_t ibus, totmcm, rows, rowe, cols, cole;
11 Int_t moduleDDL[6] = {12,12,0,0,12,12};
17 for(Int_t iddl = 0; iddl < 6; iddl++)
19 if(iddl == 0) infile.open("PMD_Mapping_ddl0.dat"); // ascii file
20 if(iddl == 1) infile.open("PMD_Mapping_ddl1.dat"); // ascii file
21 if(iddl == 2) infile.open("PMD_Mapping_ddl2.dat"); // ascii file
22 if(iddl == 3) infile.open("PMD_Mapping_ddl3.dat"); // ascii file
23 if(iddl == 4) infile.open("PMD_Mapping_ddl4.dat"); // ascii file
24 if(iddl == 5) infile.open("PMD_Mapping_ddl5.dat"); // ascii file
27 AliError("Could not read the mapping file for DDL No = 0");
29 Int_t modulePerDDL = moduleDDL[iddl];
31 for (Int_t im = 0; im < modulePerDDL; im++)
34 infile >> totPatchBus >> bPatchBus >> ePatchBus;
35 mapda->SetPatchBus(iddl,moduleno,bPatchBus,ePatchBus);
36 if (totPatchBus == 0) continue;
38 for(Int_t i=0; i<totPatchBus; i++)
40 infile >> ibus >> totmcm >> rows >> rowe >> cols >> cole;
42 printf("%d %d %d %d %d %d %d %d \n",moduleno,totPatchBus,
43 ibus,totmcm,rows,rowe,cols,cole);
45 mapda->SetModuleNo(iddl,ibus,moduleno);
46 mapda->SetMcmperBus(iddl,ibus,totmcm);
47 mapda->SetRowBus(iddl,ibus,rows,rowe);
48 mapda->SetColBus(iddl,ibus,cols,cole);
59 AliCDBMetaData *md= new AliCDBMetaData();
60 md->SetResponsible("Basanta Nandi");
61 md->SetComment("Patchbus Mapping info for PMD");
63 AliCDBId id("PMD/Calib/Mapping",0,AliCDBRunRange::Infinity());
65 man->GetDefaultStorage()->Put(mapda,id, md);