1#ifndef __JDB_JPMTRUNSETUPPARAMS__ 
    2#define __JDB_JPMTRUNSETUPPARAMS__ 
   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> >
 
   83    void configure(
const int id, 
const int run, 
const std::string& parameter)
 
   98        if (rs >> parameters) {
 
  107        for (
JAllParams parameters; 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;
 
 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
 
I/O formatting auxiliaries.
 
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.
 
friend std::ostream & operator<<(std::ostream &out, const JPMTRunsetupParams &object)
Write PMT run setup parameters to output stream.
 
result_type operator()(const JUPI_t &upi) const
Get PMT parameter value for given UPI of PMT.
 
JPMTRunsetupParams()
Default constructor.
 
Auxiliary classes and methods for database I/O.
 
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.
 
const char *const PMT_THRESHOLD_t
parameter name of PMT threshold
 
const char *const PMT_HV_t
parameter name of PMT high voltage
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
const JPBS_t & getPBS() const
Get PBS.
 
Type definition of PMT parameter value.
 
bool is_default
true if fallback; else false
 
Auxiliary data structure for fallback order of PMT data.
 
JPMTValue()
Default constructor.
 
Universal product identifier (UPI).
 
static const int DEFAULT_VERSION
Default version.
 
std::string toString() const
Convert UPI.
 
static const int DEFAULT_NUMBER
Default number.
 
const std::string & getVariant() const
Get variant.
 
Template definition for getting table specific selector.