Commit 7622e9eb authored by Keerthi Nakkalil's avatar Keerthi Nakkalil
Browse files

Incomplete codes for all 256 pixels

parent 57e13019
...@@ -45,7 +45,7 @@ TH1D *fit_1d(TH1D* &hist_255,int colors,int markers,int &amplitude,double fitmin ...@@ -45,7 +45,7 @@ TH1D *fit_1d(TH1D* &hist_255,int colors,int markers,int &amplitude,double fitmin
void gain_6() std::vector<TH1D*> gain_measurement(int i, int j)
{ {
int x,y, nbins = 450; int x,y, nbins = 450;
double xmin=850.0,xmax = 1750.0; double xmin=850.0,xmax = 1750.0;
...@@ -58,10 +58,14 @@ void gain_6() ...@@ -58,10 +58,14 @@ void gain_6()
ifstream amp03,amp02,amp01; ifstream amp03,amp02,amp01;
stringstream sfilename;
amp03.open("amp03_255_255.dat"); sfilename << std::setw(3) << std::setfill('0') << i << "_"
amp02.open("amp02_255_255.dat"); << std::setw(3) << std::setfill('0') << j <<".dat";
amp01.open("amp01_255_255.dat"); std::cout << sfilename.str() << std::endl;
amp03.open(std::string("amp03/" + sfilename.str()).c_str());
amp02.open(sfilename.str().c_str());
amp01.open(sfilename.str().c_str());
if(amp03.is_open()) if(amp03.is_open())
{ {
...@@ -102,7 +106,7 @@ void gain_6() ...@@ -102,7 +106,7 @@ void gain_6()
} }
if(amp01.is_open()) if(amp01.is_open())
{ {
cout<<"The data file 255_255 is opened..."<<std::endl; cout<<"The data file " << i << "_" << j << " is opened..."<<std::endl;
TH1D *h1 = new TH1D("h1","Threshold gain measurement",nbins,xmin,xmax); TH1D *h1 = new TH1D("h1","Threshold gain measurement",nbins,xmin,xmax);
hist_255.push_back(h1); hist_255.push_back(h1);
while(!amp01.eof()) while(!amp01.eof())
...@@ -134,5 +138,17 @@ void gain_6() ...@@ -134,5 +138,17 @@ void gain_6()
cout<<"Done..."<<std::endl; cout<<"Done..."<<std::endl;
return hist_255;
}
void complete_plot()
{
for(int row=0;row<256;row++)
{
for(int col=0;col<256;col++)
if(row==col)
{
auto histograms = gain_measurement(row,col);
}
}
} }
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