5 #include "PixTestShowIana.hh"
23 PixTestShowIana::PixTestShowIana() :
PixTest()
30 if (parName == sval)
return true;
35 void PixTestShowIana::init()
37 LOG(logINFO) <<
"PixTestShowIana::init()";
38 fDirectory = gFile->GetDirectory( fName.c_str() );
47 fTestTip = string(
"show analog current vs Vana\n measured by testboard and roc readback");
48 fSummaryTip = string(
"summary plot to be implemented");
52 void PixTestShowIana::bookHist(
string name)
54 LOG(logDEBUG) <<
"nothing done with " << name;
58 PixTestShowIana::~PixTestShowIana()
60 LOG(logDEBUG) <<
"PixTestShowIana dtor";
61 std::list<TH1*>::iterator il;
64 LOG(logINFO) <<
"Write out " << (*il)->GetName();
73 uint8_t PixTestShowIana::readRocADC(uint8_t adc)
81 if ( events.size()<32 ){
82 cout <<
"only got " << events.size() << endl;
91 for(vector<pxar::Event>::iterator ie=events.begin(); ie!=events.end(); ie++){
94 if ( ( n>=0 ) && (n<16) ){
95 value = (value << 1 ) + (e.header & 1);
98 else if ( ((e.header & 2) >>1) == 1 ){
105 uint8_t data = value & 0x00FF;
114 LOG(logINFO) <<
"PixTestShowIana::doTest() " ;
121 Form(
"iatb_vs_vana_roc_%02d",0),
122 Form(
"iatb vs vana roc %2d",0),
126 Form(
"iaroc_vs vana_roc_%02d",0),
127 Form(
"iaroc vs vana roc %2d",0),
136 vector<uint8_t> dac2save;
140 for(
int dacvalue=0; dacvalue<=256; dacvalue++){
147 if ( TMath::Abs(ia-ia1) < 1 )
break;
152 int ia2 = readRocADC( 12 );
153 h1->SetBinContent( dacvalue, ia);
154 h2->SetBinContent( dacvalue, ia2);
virtual bool setParameter(std::string parName, std::string sval)
set the string value of a parameter
bool setDAC(std::string dacName, uint8_t dacValue, uint8_t rocI2C)
void maskAllPixels(bool mask, uint8_t rocid)
TDirectory * fDirectory
where the root histograms will end up
void doTest()
function connected to "DoTest" button of PixTab
std::list< TH1 * >::iterator fDisplayedHist
pointer to the histogram currently displayed
std::list< TH1 * > fHistList
list of histograms available in PixTab::next and PixTab::previous
void setToolTips()
implement this to provide updated tool tips if the user changes test parameters
void update()
signal to PixTab to update the canvas
uint8_t getDAC(size_t rocId, std::string dacName)
pxar::pxarCore * fApi
pointer to the API
std::vector< Event > daqGetEventBuffer()
uint16_t daqTrigger(uint32_t nTrig=1, uint16_t period=0)
void init()
sets all test parameters