Auxiliary program to print run setup parameters from the database.  
More...
#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
#include "JDB/JDB.hh"
#include "JDB/JSelector.hh"
#include "JDB/JSelectorSupportkit.hh"
#include "JDB/JDBToolkit.hh"
#include "JDB/JPMTThreshold.hh"
#include "JDB/JDetectorIntegration.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (const int argc, const char *const argv[]) | 
|   | 
Auxiliary program to print run setup parameters from the database. 
- Author
 - mdejong 
 
Definition in file examples/JDB/JPMTThreshold.cc.
 
      
        
          | int main  | 
          ( | 
          const int  | 
          argc,  | 
        
        
           | 
           | 
          const char *const  | 
          argv[]  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 50 of file examples/JDB/JPMTThreshold.cc.
   65     JParser<> zap(
"Auxiliary program to print run setup parameters from the database.");
 
   77   catch(
const exception& error) {
 
   78     FATAL(error.what() << endl);
 
   84   JPMTThreshold getPMTThreshold;
 
   91     const int id = getDetector<int>(detid);
 
   93     getPMTThreshold.configure(
id, run);
 
   95     DEBUG(getPMTThreshold);
 
   97     ResultSet& rs = 
getResultSet(getTable<JDetectorIntegration>(), getSelector<JDetectorIntegration>(
id));
 
  105   catch(
const exception& error) {
 
  106     FATAL(error.what() << endl);
 
  113     if (
i->PMTID != -1) {
 
  117         const JPMTThreshold::result_type threshold = getPMTThreshold(
i->PMTUPI);
 
  120           cout << setw(4) << 
i->DUID                << 
' '  
  121                << setw(2) << 
i->FLOORID             << 
' '  
  122                << setw(2) << 
i->CABLEPOS            << 
' '  
  123                << setw(3) << threshold.value        << 
' ' 
  124                << (threshold.is_default ? 
"" : 
"*") << endl;
 
  127       catch(
const exception& error) {
 
  128         ERROR(error.what() << 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
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
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
 
#define DEBUG(A)
Message macros.