1 #ifndef __JDB_JPMTRUNSETUPPARAMS__
2 #define __JDB_JPMTRUNSETUPPARAMS__
24 namespace JDATABASE {}
25 namespace JPP {
using namespace JDATABASE; }
37 template<
class JValue_t>
45 std::pair<int, JValue_t>(-1, JValue_t())
55 template<
class JValue_t>
57 public std::map<std::string, JPMTValue<JValue_t> >
98 if (rs >> parameters) {
108 if (parameters.NAME == parameter) {
119 if (parameters.PAR_OID == upars.OID && parameters.ISINPUT ==
'Y') {
120 if (parameters.VALUE !=
"") {
124 if (parameters.ORDER > value.first) {
126 value.first = parameters.ORDER;
128 istringstream(parameters.VALUE) >> value.second;
147 typename JPMTRunsetupParams::const_iterator p = this->find(upi.
toString()), p0 = p,
p1 = p;
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) {
166 if (
p1 != this->end()) {
167 return { p0 !=
p1,
p1->second.second };
185 for (
typename JPMTRunsetupParams::const_iterator
i =
object.begin();
i !=
object.end(); ++
i) {
186 out << left << setw(32) <<
i->first <<
' ' << right <<
i->second.second << endl;
Auxiliary class for PMT run setup parameters.
void configure(const int id, const int run, const std::string ¶meter)
Configure PMT run setup parameters for given detector and run.
const std::string & getVariant() const
Get variant.
Auxiliary data structure for fallback order of PMT data.
static const int DEFAULT_VERSION
Default version.
friend std::ostream & operator<<(std::ostream &out, const JPMTRunsetupParams &object)
Write PMT run setup parameters to output stream.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Type definition of PMT parameter value.
JPMTValue()
Default constructor.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Universal product identifier (UPI).
static const int DEFAULT_NUMBER
Default number.
const char *const PMT_THRESHOLD_t
parameter name of PMT threshold
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
const JPBS_t & getPBS() const
Get PBS.
result_type operator()(const JUPI_t &upi) const
Get PMT parameter value for given UPI of PMT.
const char *const PMT_HV_t
parameter name of PMT high voltage
I/O formatting auxiliaries.
const char *const OPTICS_t
sub-system of PMT
JPMTRunsetupParams()
Default constructor.
std::string toString() const
Convert UPI.
bool is_default
true if fallback; else false
ResultSet & getResultSet(const std::string &query)
Get result set.
Template definition for getting table specific selector.