Database object for correcting a simple threshold model in MC.
More...
#include <CDCCorrToThresholds.h>
|
| CDCCorrToThresholds () |
| Default constructor.
|
|
void | setParam (unsigned short id, double param) |
| Set the paramseter in the array.
|
|
unsigned short | getEntries () const |
| Get the no.
|
|
std::array< float, c_maxNSenseLayers > | getParams () const |
| Get the whole array.
|
|
float | getParam (unsigned short id) const |
| Get the parameter for the id.
|
|
void | dump () const |
| Print all contents.
|
|
void | outputToFile (std::string fileName) const |
| Output the contents in text file format.
|
|
|
std::array< float, c_maxNSenseLayers > | m_crs |
| cr array
|
|
Database object for correcting a simple threshold model in MC.
Definition at line 27 of file CDCCorrToThresholds.h.
◆ CDCCorrToThresholds()
◆ dump()
Print all contents.
Definition at line 74 of file CDCCorrToThresholds.h.
75 {
76 std::cout << " " << std::endl;
77 std::cout << "Correction parametres" << std::endl;
78 std::cout <<
"#entries= " <<
m_crs.size() << std::endl;
79 std::cout << "in order of id and parameter" << std::endl;
80
81 for (unsigned id = 0; id < c_maxNSenseLayers; ++id) {
82 std::cout <<
id <<
" " <<
m_crs[id] << std::endl;
83 }
84 }
std::array< float, c_maxNSenseLayers > m_crs
cr array
◆ getEntries()
unsigned short getEntries |
( |
| ) |
const |
|
inline |
◆ getParam()
float getParam |
( |
unsigned short |
id | ) |
const |
|
inline |
Get the parameter for the id.
- Parameters
-
- Returns
- parameter for the id
Definition at line 66 of file CDCCorrToThresholds.h.
◆ getParams()
std::array< float, c_maxNSenseLayers > getParams |
( |
| ) |
const |
|
inline |
◆ outputToFile()
void outputToFile |
( |
std::string |
fileName | ) |
const |
|
inline |
Output the contents in text file format.
Definition at line 90 of file CDCCorrToThresholds.h.
91 {
92 std::ofstream fout(fileName);
93
94 if (fout.bad()) {
95 B2ERROR("Specified output file could not be opened!");
96 } else {
97 for (unsigned id = 0; id < c_maxNSenseLayers; ++id) {
98 fout <<
id <<
" " <<
m_crs[id] << std::endl;
99 }
100 }
101 fout.close();
102 }
◆ setParam()
void setParam |
( |
unsigned short |
id, |
|
|
double |
param |
|
) |
| |
|
inline |
Set the paramseter in the array.
- Parameters
-
id | layerID(0-55) |
param | parameter for correction |
Definition at line 40 of file CDCCorrToThresholds.h.
◆ m_crs
std::array<float, c_maxNSenseLayers> m_crs |
|
private |
The documentation for this class was generated from the following file: