SSD hot chip table
Updated on Mon, 2015-03-16 09:51. Originally created by bouchet on 2015-01-25 12:08.
Masking table for SSD chip.
1) The structure is based on the PXL pxlHotPixels table where only the address of pixel to flag is written to table
2)Table is initialized in StSstDbMaker :
3) A map is built with setHotChips() method in order to be accessible from another maker :
4) Access from another maker is done using the method chipHot()
1) The structure is based on the PXL pxlHotPixels table where only the address of pixel to flag is written to table
struct ssdHotChips { unsigned long hotChip[3840]; /* side*2000 + ladder[0-19]*96 wafer[0-15]*6 + chip[1-6]*/ };The table has a size of 3840 elements : 2(side) * 20(ladder) * 16(wafer) * 6(chips)
2)Table is initialized in StSstDbMaker :
//_____________________________________________________________________________ Int_t StSstDbMaker::InitRun(Int_t runNumber) { mode = m_Mode; St_ssdHotChips *hotChips = (St_ssdHotChips *)GetDataBase("Calibrations/ssd/ssdHotChips"); if (hotChips) { std::cout << "ssd hot chips table found ... initialize" << std::endl; setHotChips(hotChips->GetTable());} else {LOG_WARN << " no pxl hot pixels table " << endm; return kStErr;}
3) A map is built with setHotChips() method in order to be accessible from another maker :
//_____________________________________________________________________________ void StSstDbMaker::setHotChips(ssdHotChips_st *hotChipsTable) { for(Int_t i=0; i<3840; i++){ if(hotChipsTable[0].hotChip[i]>0){ mMapHotChips.insert ( std::pair<unsigned long, short>(hotChipsTable[0].hotChip[i],i) ); std::cout <<" i / val : " << i << " " << hotChipsTable[0].hotChip[i] << endl; } else break; } }
4) Access from another maker is done using the method chipHot()
//_____________________________________________________________________________ Int_t StSstDbMaker::chipHot(Int_t side, Int_t ladder, Int_t wafer, Int_t chip) const { map<unsigned int,short>::const_iterator got; got = mMapHotChips.find(side*2000 + ladder*96 + wafer*6 + chip+1); if ( got == mMapHotChips.end() ) { return 0; } else { return 1; } }
5)To remove a chip during StSstDaqMaker :
//get access to hot chips table std::cout <<" ladder[0-19]/wafer[0-15]/chip[0-5]/side[0-1]/status : " << ladder << " " << wafer <<" " << chip <<" " << id_side <<" " << gStSstDbMaker->chipHot(id_side,ladder,wafer,chip+1) << endl; if(gStSstDbMaker->chipHot(id_side,ladder,wafer,chip))continue;
6) A test entry looked like this :
TDataSet *CreateTable() { if (!gROOT->GetClass("St_ssdHotChips")) return 0; ssdHotChips_st row; St_ssdHotChips *tableSet = new St_ssdHotChips("ssdHotChips",1); row.hotChip[0]=1; //L0W0C1P row.hotChip[1]=6; //L0W0C6P row.hotChip[2]=7; //L0W1C1P row.hotChip[3]=96; //L0W15C6P row.hotChip[4]=97; //L1W0C1P row.hotChip[5]=2037; //L0W6C1N // tempo for(int i=6;i<3840;++i) row.hotChip[i] = 0; // ----------------- end of code --------------- tableSet->AddAt(&row,0); return (TDataSet *)tableSet; }
»
- bouchet's blog
- Login or register to post comments