30int main(
int argc,
char **argv)
35 const std::string WILDCARD =
"%";
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.");
55 zap[
's'] =
make_field(server) = getServernames();
60 zap[
'P'] =
make_field(pmtFile,
"PMT parameters file") =
"";
66 catch(
const exception &error) {
67 FATAL(error.what() << endl);
73 if (pmtFile !=
"" && getFileStatus(pmtFile.c_str())) {
74 parameters.
load(pmtFile.c_str());
79 JDB::reset(usr, pwd, cookie);
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 <<
".");
98 parameters[id].TTS_ns = -(p->second);
104 catch(
const exception& error) {
105 FATAL(error.what() << endl);
112 parameters.
store(pmtFile.c_str());
116 cout << parameters << endl;
General purpose messaging.
int main(int argc, char **argv)
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
Auxiliary class for map of PMT parameters.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Wrapper class for server name.
Template definition for getting table specific selector.
void store(const char *file_name) const
Store to output file.
void load(const char *file_name)
Load from input file.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...