- bouchet's home page
- Posts
- 2016
- 2015
- December (1)
- November (3)
- October (2)
- September (2)
- August (2)
- June (2)
- April (5)
- March (2)
- February (3)
- January (2)
- 2014
- December (2)
- November (2)
- October (3)
- September (2)
- August (3)
- July (1)
- June (3)
- May (6)
- April (6)
- March (1)
- February (2)
- January (1)
- 2013
- December (2)
- November (3)
- October (3)
- September (4)
- August (1)
- July (1)
- May (4)
- April (6)
- March (4)
- February (3)
- 2012
- 2011
- December (2)
- November (2)
- October (4)
- September (1)
- August (2)
- July (6)
- June (2)
- May (3)
- April (3)
- March (2)
- 2010
- 2009
- December (2)
- November (1)
- October (3)
- September (1)
- August (1)
- July (1)
- June (2)
- April (1)
- March (2)
- February (2)
- January (1)
- 2008
- My blog
- Post new blog entry
- All blogs
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