46 ifstream file(filename);
49 cerr <<
"Can't open the sipm file!" << endl;
54 while(getline(file, line))
56 if(line.find(
"Brand:") != string::npos)
58 sipm->
fBrand = extract_value(line,
"Brand:");
60 else if(line.find(
"TypeNo:") != string::npos)
62 sipm->
fTypeNo = extract_value(line,
"TypeNo:");
64 else if(line.find(
"V =") != string::npos)
66 sipm->
fV = stof(extract_value(line,
"V ="));
68 else if(line.find(
"T =") != string::npos)
70 sipm->
fT = stof(extract_value(line,
"T ="));
72 else if(line.find(
"Sampling speed =") != string::npos)
74 bar->GetDAQ()->fSamplingSpeed_Template = stof(extract_value(line,
"Sampling speed ="));
76 else if(line.find(
"R_shaper =") != string::npos)
80 else if(line.find(
"Gain =") != string::npos)
82 bar->GetDAQ()->fGain_Template = stof(extract_value(line,
"Gain ="));
84 else if(line.find(
"Constant Bins =") != string::npos)
86 bar->GetDAQ()->fIsBinSizeConstant = (extract_value(line,
"Constant Bins =") ==
"true");
88 else if(line.find(
"Sampling speed_sim =") != string::npos)
90 bar->GetDAQ()->
fSamplingSpeed = stof(extract_value(line,
"Sampling speed_sim ="));
92 else if(line.find(
"BinSize sigma =") != string::npos && !bar->GetDAQ()->fIsBinSizeConstant)
94 bar->GetDAQ()->fSigmaBinSize = stod(extract_value(line,
"BinSize sigma ="));
96 else if(line.find(
"Use shaping =") != string::npos)
98 bar->GetDAQ()->fIsShaping = (extract_value(line,
"Use shaping =") ==
"true");
100 else if(line.find(
"Tau_shaping =") != string::npos && bar->GetDAQ()->fIsShaping)
102 bar->GetDAQ()->fTau_shaping = stod(extract_value(line,
"Tau_shaping ="));
104 else if(line.find(
"Gain_sim =") != string::npos)
106 bar->GetDAQ()->
fGain = stof(extract_value(line,
"Gain_sim ="));
108 else if(line.find(
"Noise (sigma) =") != string::npos)
110 bar->GetDAQ()->
fSigmaNoise = stof(extract_value(line,
"Noise (sigma) ="));
112 else if(line.find(
"PathToFile:") != string::npos)
116 else if(line.find(
"Charge cuts:") != string::npos)
118 string data = extract_value(line,
"Charge cuts:");
119 istringstream iss(data);
120 Double_t charge_min, charge_max;
121 if(iss >> charge_min >> charge_max)
126 else if(line.find(
"A histo:") != string::npos)
128 string data = extract_value(line,
"A histo:");
129 istringstream iss(data);
130 Double_t nbins, hist_min, hist_max;
131 if(iss >> nbins >> hist_min >> hist_max)
136 else if(line.find(
"Tau_rise histo:") != string::npos)
138 string data = extract_value(line,
"Tau_rise histo:");
139 istringstream iss(data);
140 Double_t nbins, hist_min, hist_max;
141 if(iss >> nbins >> hist_min >> hist_max)
146 else if(line.find(
"Tau_dec histo:") != string::npos)
148 string data = extract_value(line,
"Tau_dec histo:");
149 istringstream iss(data);
150 Double_t nbins, hist_min, hist_max;
151 if(iss >> nbins >> hist_min >> hist_max)
void SetHisto_Tau_rise(Double_t nbins, Double_t min, Double_t max)
Set the number of bins, the lower and the upper limit related to parameter Tau_rise for the histogram...
void SetHisto_A(Double_t nbins, Double_t min, Double_t max)
Set the number of bins, the lower and the upper limit related to parameter A for the histogram hPars.
void SetHisto_Tau_dec(Double_t nbins, Double_t min, Double_t max)
Set the number of bins, the lower and the upper limit related to parameter Tau_dec for the histogram ...