Commit a40cf5e9 authored by Stephan Wiederkehr's avatar Stephan Wiederkehr
Browse files

commented the pulseShapeAll scan

parent a8b7f2c2
......@@ -256,7 +256,7 @@ CMD_PROC(pixelDist) {
printf("Taking data...");fflush(stdout);
for (int i=0;i<iterations;i++)
{
ReadImage(map,false);
if (!ReadImage(map,false)) {break;}
std::vector<int> data_single = map.getData();
printf("Iteration %d: data size: %d // should be %d \n",i+1,data_single.size(),IMG_HEIGHT*IMG_WIDTH);
data.push_back(data_single);
......@@ -310,7 +310,7 @@ CMD_PROC(pulseShape) {
for (unsigned int i=0;i<hold_max;i++)
{
tb.r4s_SetHoldPos(i);
ReadImage(map,false);
if (!ReadImage(map,false)) {break;}
std::vector<int> data_single = map.getData();
printf("Hold %d: data size: %d // should be %d \n",i+1,data_single.size(),IMG_HEIGHT*IMG_WIDTH);
data.push_back(data_single);
......@@ -336,3 +336,61 @@ CMD_PROC(pulseShape) {
rootFile->Close();
}
//pulse shape analysis
//As it is, it takes too long...
// CMD_PROC(pulseShapeAll) {
// TFile *rootFile = new TFile("pulseShapeAll.root","recreate");
// TTree *tPulseShape = new TTree("pulseShape","pulseShape");
// int col(0),row(0),hold(0),value(0);
// tPulseShape->Branch("col",&col,"col/I");
// tPulseShape->Branch("row",&row,"row/I");
// tPulseShape->Branch("hold",&hold,"hold/I");
// tPulseShape->Branch("value",&value,"value/I");
// std::vector< std::vector<int> > data;
// R4sImg map;
// const unsigned int hold_max = 255;
// //get the data
// printf("Taking data...");fflush(stdout);
// for (int j=0;j<IMG_HEIGHT*IMG_WIDTH;j++)
// {
// tb.r4s_SetPixCal(j%IMG_WIDTH, j/IMG_WIDTH);
// std::vector<int> readings;
// printf("pixel %d\n",j);
// for (unsigned int i=0;i<hold_max;i++)
// {
// tb.r4s_SetHoldPos(i);
// if (!ReadImage(map,false)) {break;}
// std::vector<int> data_single = map.getData();
// int reading = data_single[j];
// readings.push_back(reading);
// }
// data.push_back(readings);
// }
// printf("Done.\n");
// //filling the data into the tree
// printf("Writing the data into a TTree...");fflush(stdout);
// for (int j=0;j<IMG_HEIGHT*IMG_WIDTH;j++)
// {
// for (unsigned int k=0;k<data[j].size();k++)
// {
// col = j%IMG_WIDTH;
// row = j/IMG_WIDTH;
// hold = k;
// value = data[j][k];
// tPulseShape->Fill();
// }
// }
// printf("Done.\n");
// tPulseShape->Write();
// rootFile->Close();
// }
......@@ -22,6 +22,7 @@ CMD_REG(seqcalscan, "", "Load calibrate scan sequence")
//CMD_REG(test, "" , "print 'Hello World!'")
CMD_REG(pixelAlive, "" ,"performs a pixel alive test")
CMD_REG(pixelDist,"<iterations>","distribution of calibration pulses per pixel");
CMD_REG(pulseShape,"<x> <y>","analogue out as a function of the hold position");
CMD_REG(pulseShape,"<x> <y>","analogue out as a function of the hold position")
//CMD_REG(pulseShapeAll,"","analogue out as a function of the hold position");
//CMD_REG(gui, "", "Start graphical user interface");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment