Auxiliary class for PMT thresholds.
More...
#include <JPMTThreshold.hh>
|
| JPMTThreshold () |
| Default constructor.
|
|
| JPMTThreshold (const int id, const int run) |
| Constructor.
|
|
void | configure (const int id, const int run) |
| Configure PMT thresholds for given detector and run.
|
|
void | configure (const int id, const int run, const std::string ¶meter) |
| Configure PMT run setup parameters for given detector and run.
|
|
result_type | operator() (const JUPI_t &upi) const |
| Get PMT parameter value for given UPI of PMT.
|
|
Auxiliary class for PMT thresholds.
Definition at line 18 of file JPMTThreshold.hh.
◆ JPMTThreshold() [1/2]
JDATABASE::JPMTThreshold::JPMTThreshold |
( |
| ) |
|
|
inline |
◆ JPMTThreshold() [2/2]
JDATABASE::JPMTThreshold::JPMTThreshold |
( |
const int | id, |
|
|
const int | run ) |
|
inline |
Constructor.
- Parameters
-
id | detector identifier |
run | run number |
Definition at line 39 of file JPMTThreshold.hh.
40 {
42 }
void configure(const int id, const int run)
Configure PMT thresholds for given detector and run.
◆ configure() [1/2]
void JDATABASE::JPMTThreshold::configure |
( |
const int | id, |
|
|
const int | run ) |
|
inline |
Configure PMT thresholds for given detector and run.
- Parameters
-
id | detector identifier |
run | run number |
Definition at line 51 of file JPMTThreshold.hh.
52 {
54 }
const char *const PMT_THRESHOLD_t
parameter name of PMT threshold
◆ configure() [2/2]
Configure PMT run setup parameters for given detector and run.
- Parameters
-
id | detector identifier |
run | run number |
parameter | parameter name |
Definition at line 83 of file JPMTRunsetupParams.hh.
84 {
87
88 this->clear();
89
90 string rs_oid;
92
93 {
95
97
98 if (rs >> parameters) {
100 }
101
102 rs.Close();
103 }
104 {
106
107 for (
JAllParams parameters; rs >> parameters; ) {
108 if (parameters.NAME == parameter) {
109 upars = parameters;
110 }
111 }
112
113 rs.Close();
114 }
115 {
117
119 if (parameters.PAR_OID == upars.
OID && parameters.ISINPUT ==
'Y') {
120 if (parameters.VALUE != "") {
121
123
124 if (parameters.ORDER > value.first) {
125
126 value.first = parameters.ORDER;
127
128 istringstream(parameters.VALUE) >> value.second;
129 }
130 }
131 }
132 }
133
134 rs.Close();
135 }
136 }
const char *const OPTICS_t
sub-system of PMT
ResultSet & getResultSet(const std::string &query)
Get result set.
const char * getTable()
Get table name.
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for fallback order of PMT data.
Template definition for getting table specific selector.
◆ operator()()
Get PMT parameter value for given UPI of PMT.
- Parameters
-
- Returns
- PMT parameter value
Definition at line 145 of file JPMTRunsetupParams.hh.
146 {
147 typename JPMTRunsetupParams::const_iterator p = this->find(upi.toString()), p0 = p,
p1 = p;
148
149
150
151 const JUPI_t buffer[] = {
156 };
157
158 for (const JUPI_t& i : buffer) {
159 if ((p = this->find(i.toString())) != this->end()) {
160 if (
p1 == this->end() || p->first >
p1->first) {
162 }
163 }
164 }
165
166 if (
p1 != this->end()) {
167 return { p0 !=
p1,
p1->second.second };
168 }
169
170 THROW(JDatabaseException,
"Invalid UPI " << upi);
171 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
static const int DEFAULT_VERSION
Default version.
static const int DEFAULT_NUMBER
Default number.
The documentation for this class was generated from the following file: