19 static const std::string set_t =
"set";
34 mechanics = this->mechanics;
49 friend inline std::istream&
operator>>(std::istream&
in, JModifier& modifier)
51 return in >> modifier.id >> modifier.action >> modifier.mechanics;
62 friend inline std::ostream&
operator<<(std::ostream& out,
const JModifier& modifier)
66 out << modifier.action;
68 out << modifier.mechanics;
92 int main(
int argc,
char **argv)
105 JParser<> zap(
"Auxiliary program to modify mechanical model data of detector string.");
107 zap[
'f'] =
make_field(file_name,
"mechanics file");
113 catch(
const exception &error) {
114 FATAL(error.what() << endl);
119 data.load(file_name.c_str());
121 data.comment.add(
JMeta(argc, argv));
125 DEBUG(
"Modifier" <<
' '
126 <<
"(" <<
FILL(2,
'0') << i->id <<
FILL() <<
")" <<
' '
127 <<
"action" <<
' ' << i->mechanics << endl);
131 container_type::iterator p = data.find(i->id);
133 if (p != data.end()) {
134 mechanics = p->second;
137 if (!i->apply(mechanics))
138 ERROR(
"No valid action: " << *i << endl);
140 data[i->id] = mechanics;
143 data.store(file_name.c_str());
Mechanical modelling of string.
Utility class to parse command line options.
int main(int argc, char *argv[])
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
I/O formatting auxiliaries.
Auxiliary wrapper for I/O of container with optional comment (see JComment).
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Auxiliary data structure for sequence of same character.
std::istream & operator>>(std::istream &in, JAANET::JHead &header)
Read header from input.
Utility class to parse command line options.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Auxiliary data structure for parameters of mechanical model.