Commit dda52d8b authored by wiederkehr_s's avatar wiederkehr_s
Browse files

Merge branch 'master' into 'tilman-branch'

# Conflicts:
#   source/r4stest/cmd_analyzer.h
parents 048e5cd2 fb9145a8
......@@ -302,7 +302,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);
......@@ -357,7 +357,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);
......@@ -384,6 +384,64 @@ CMD_PROC(pulseShape) {
}
//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();
// }
//pulse shape, creating a graph
CMD_PROC(pulseShapeGraph) {
int calX,calY, Rgpr, Rgsh, Va, Vcal;
......
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