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;