25 int main(
int argc,
char **argv)
42 JParser<> zap(
"Example program to build detector from database.");
48 zap[
'f'] =
make_field(inputFile,
"output of JPrintDB -q \"integration\" -c \";\" -W1") =
"";
56 catch(
const exception &error) {
57 FATAL(error.what() << endl);
63 if (inputFile !=
"") {
69 DEBUG(
"Reading database table " << getTable<JDetectorIntegration_t>() << endl);
75 detid = getDetector<string>(detid);
77 ResultSet& rs =
getResultSet(getTable<JDetectorIntegration_t>());
83 catch(
const exception& error) {
84 FATAL(error.what() << endl);
89 FATAL(
"Detector identifier must be object identifier." << endl);
105 cout <<
LEFT(32) << upi << right <<
' ' << router.
getLocation(upi) << endl;
108 }
else if (upi !=
JUPI_t()) {
117 cout << location << endl;
122 cout <<
"Enter UPI." << endl;
128 cout <<
"> " << flush;
138 cout << location << endl;
int main(int argc, char **argv)
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
General purpose messaging.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
ResultSet & getResultSet(const std::string &query)
Get result set.
static JGetPBSSequences getPBSSequences
Function object to get PBS sequences as a function of PBS.
std::vector< JServer > getServernames()
Get list of names of available database servers.
bool is_integer(const std::string &buffer)
Check if string is an integer.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
map_type::const_iterator range_const_iterator
Auxiliary data structure for location of product in detector.
bool is_valid() const
Check validity of location.
Product breakdown structure (PBS).
const JPBS_t & getPBS() const
Get PBS.
Auxiliary class to map UPI to location in detector.
JLocation_t getLocation(const JUPI_t &upi) const
Get location of product with given UPI.
Wrapper class for server name.
Universal product identifier (UPI).