1 #ifndef __JDB_JPMTTHRESHOLD__
2 #define __JDB_JPMTTHRESHOLD__
22 namespace JDATABASE {}
23 namespace JPP {
using namespace JDATABASE; }
87 if (rs >> parameters) {
108 if (parameters.PAR_OID == upars.OID && parameters.ISINPUT ==
'Y') {
109 if (parameters.VALUE !=
"") {
110 istringstream(parameters.VALUE) >> (*this)[parameters.UPIFILTER];
128 const_iterator p = this->find(upi.
toString());
130 const bool is_default = (p == this->end());
134 std::ostringstream os;
142 p = this->find(os.str());
145 if (p != this->end())
146 return { is_default, p->second };
163 for (JPMTThreshold::const_iterator i =
object.begin(); i !=
object.end(); ++i) {
164 out << left << setw(32) << i->first <<
' ' << right << setw(3) << i->second << endl;
Auxiliary class for PMT thresholds.
const std::string & getVariant() const
Get variant.
JPMTThreshold(const int id, const int run)
Constructor.
void configure(const int id, const int run)
Configure PMT thresholds for given detector and run.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
*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
friend std::ostream & operator<<(std::ostream &out, const JPMTThreshold &object)
Write PMT thresholds to output stream.
Universal product identifier (UPI).
static const char SEPARATOR
Separator between PBS, variant and version.
const char *const PMT_THRESHOLD_t
name of PMT threshold
const JPBS_t & getPBS() const
Get PBS.
threshold_type operator()(const JUPI_t &upi) const
Get PMT threshold for given UPI of PMT.
JDetectorsHelper getDetector
Function object for mapping serial number to object identifier of detector and vice versa...
const char *const OPTICS_t
sub-system of PMT
JPMTThreshold()
Default constructor.
std::string toString() const
Convert UPI.
Type definition of PMT threshold.
ResultSet & getResultSet(const std::string &query)
Get result set.
bool is_default
true by default; else false
static const char DOT
Separator between PBS values.
Template definition for getting table specific selector.