30 int main(
int argc,
char **argv)
46 TTS[
"HAMA-R12199"] = 1;
47 TTS[
"HAMA-R14374"] = 67;
48 TTS[
"HAMA-R14374-02"] = 67;
53 JParser<> zap(
"Auxiliary program to set TTS function identifier in PMT parameters file according PMT variant.");
60 zap[
'P'] =
make_field(pmtFile,
"PMT parameters file") =
"";
66 catch(
const exception &error) {
67 FATAL(error.what() << endl);
81 ResultSet& rs =
getResultSet(getTable<JDetectorIntegration>(), getSelector<JDetectorIntegration>(getDetector<int>(detid)));
83 for (JDetectorIntegration component; rs >> component; ) {
85 if (component.PMTUPI.getPBS() ==
PBS::PMT) {
89 if ((p = TTS.find(component.PMTUPI.getVariant())) != TTS.end())
91 else if ((p = TTS.find(WILDCARD)) != TTS.end())
94 FATAL(
"Invalid variant " << component.PMTUPI <<
".");
96 const JPMTIdentifier id(component.DOMID, component.CABLEPOS);
104 catch(
const exception& error) {
105 FATAL(error.what() << endl);
Utility class to parse command line options.
int main(int argc, char *argv[])
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT)
*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
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
static JStat getFileStatus
Function object for file status.
Utility class to parse command line options.
ResultSet & getResultSet(const std::string &query)
Get result set.
std::vector< JServer > getServernames()
Get list of names of available database servers.