68 JParser<> zap(
"Auxiliary program to print run setup parameters from the database.");
80 catch(
const exception& error) {
81 FATAL(error.what() << endl);
91 catch(
const exception& error) {
92 FATAL(error.what() << endl);
104 if (rs >> parameters) {
105 rs_oid = parameters.RUNSETUPID;
110 DEBUG(
"Run setup " << rs_oid << endl);
112 catch(
const exception& error) {
113 FATAL(error.what() << endl);
123 ResultSet& rs =
getResultSet(getTable<JAllParams>(), getSelector<JAllParams>(
"OPTICS"));
125 while (rs >> parameters) {
126 if (parameters.NAME.find(
"PMT_THRESHOLD") != string::npos) {
137 catch(
const exception& error) {
138 FATAL(error.what() << endl);
150 while (rs >> parameters) {
152 if (parameters.PAR_OID == upars.OID && parameters.ISINPUT ==
'Y') {
155 writer.put(parameters);
158 if (parameters.VALUE !=
"") {
159 umap[parameters.UPIFILTER] = to_value<int>(parameters.VALUE);
166 catch(
const exception& error) {
167 FATAL(error.what() << endl);
171 DEBUG(left << setw(20) << i->first <<
' ' << right << setw(3) << i->second << endl);
181 ResultSet& rs =
getResultSet(getTable<JDetectorIntegration>(), getSelector<JDetectorIntegration>(
is_integer(detid) ? to_value<int>(detid) :
getDetector(detid)));
183 while (rs >> parameters) {
189 catch(
const exception& error) {
190 FATAL(error.what() << endl);
198 if (i->PMTID != -1) {
200 const JUPI_t upi = i->PMTUPI;
204 bool is_default = (p == umap.end());
206 if (p == umap.end()) {
210 os << upi.getPBS() << JUPI_t::SEPARATOR
211 << upi.getVariant() << JUPI_t::SEPARATOR
214 p = umap.find(os.str());
217 if (p != umap.end()) {
220 cout << setw(4) << i->DUID <<
' '
221 << setw(2) << i->FLOORID <<
' '
222 << setw(2) << i->CABLEPOS <<
' '
223 << setw(3) << p->second <<
' '
224 << (is_default ?
"" :
"*") << endl;
229 ERROR(
"Missing threshold data PMT " << upi << endl);
Utility class to parse command line options.
*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
JDetectorsHelper getDetector
Function object for mapping serial number to object identifier of detector and vice versa...
T & getInstance(const T &object)
Get static instance from temporary object.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
bool is_integer(const std::string &buffer)
Check if string is an integer.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
ResultSet & getResultSet(const std::string &query)
Get result set.
std::vector< JServer > getServernames()
Get list of names of available database servers.
do set_variable DETECTOR_TXT $WORKDIR detector