26   static const int         WILDCARD    =  -1;
 
   28   static const std::string set_t       = 
"set";               
 
   29   static const std::string add_t       = 
"add";               
 
   30   static const std::string sub_t       = 
"sub";               
 
   31   static const std::string setx_t      = 
"setx";              
 
   32   static const std::string sety_t      = 
"sety";              
 
   33   static const std::string setz_t      = 
"setz";              
 
   34   static const std::string addx_t      = 
"addx";              
 
   35   static const std::string addy_t      = 
"addy";              
 
   36   static const std::string addz_t      = 
"addz";              
 
   37   static const std::string subx_t      = 
"subx";              
 
   38   static const std::string suby_t      = 
"suby";              
 
   39   static const std::string subz_t      = 
"subz";              
 
   41   static const std::string rand_t      = 
"rand";              
 
   42   static const std::string randset_t   =  rand_t + set_t;     
 
   43   static const std::string randadd_t   =  rand_t + add_t;     
 
   44   static const std::string randsub_t   =  rand_t + sub_t;     
 
   64       return (action != 
"" && !data.empty());
 
   75       switch (data.size()) {
 
   78         return  apply(tripod, action, data[0]);
 
   81         return  apply(tripod, action, 
JUTMPosition(data[0], data[1], data[2]));
 
   97     static bool apply(
JTripod& tripod, 
const std::string& action, 
const double value)
 
  101       else if (action == addx_t)
 
  103       else if (action == subx_t)
 
  105       else if (action == sety_t)
 
  107       else if (action == addy_t)
 
  109       else if (action == suby_t)
 
  111       else if (action == setz_t)
 
  113       else if (action == addz_t)
 
  115       else if (action == subz_t)
 
  136                                  gRandom->Gaus(0.0, pos.
getUTMZ()));
 
  140       else if (action == add_t)
 
  142       else if (action == sub_t)
 
  144       else if (action == randset_t)                      
 
  146       else if (action == randadd_t)
 
  148       else if (action == randsub_t)
 
  164     friend inline std::istream& 
operator>>(std::istream& 
in, JModifier& modifier)
 
  166       if (in >> modifier.id >> modifier.action) {
 
  168         modifier.data.clear();
 
  170         for (
double x; in >> 
x; ) {
 
  171           modifier.data.push_back(x);
 
  174         in.clear(std::ios_base::eofbit);
 
  188     friend inline std::ostream& 
operator<<(std::ostream& out, 
const JModifier& modifier)
 
  192       out << modifier.action;
 
  231 int main(
int argc, 
char **argv)
 
  248     JParser<> zap(
"Auxiliary program to modify tripod configuration.");
 
  250     zap[
'f'] = 
make_field(file_name,   
"tripod file");
 
  260   catch(
const exception &error) {
 
  261     FATAL(error.what() << endl);
 
  267   if (!del.empty() && !keep.empty()) {
 
  268     FATAL(
"Use either option -K or -D." << endl);
 
  274     tripods.load(file_name.c_str());
 
  276   catch(
const exception&) {}
 
  292       if (
target->getID() == i->id || i->id == WILDCARD) {
 
  294         DEBUG(
"Modifier"                                                << 
' ' 
  296               << i->action << 
' ' << 
JEEPZ() << i->data << endl);
 
  299           ERROR(
"No valid action: " << *i << endl);
 
  307       if (del.count(
target->getID()) != 0)
 
  316       if (keep.count(
target->getID()) == 0)
 
  325   tripods.store(file_name.c_str());
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member. 
 
JUTMPosition & sub(const JUTMPosition &pos)
Subtract UTM position. 
 
double getUTMEast() const 
Get UTM east. 
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
void setUTMPosition(const JUTMPosition &position)
Set UTM position. 
 
Data structure for UTM position. 
 
double getUTMZ() const 
Get UTM Z. 
 
I/O formatting auxiliaries. 
 
double getUTMNorth() const 
Get UTM north. 
 
Auxiliary wrapper for I/O of container with optional comment (see JComment). 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
bool is_valid(const json &js)
Check validity of JSon data. 
 
Auxiliary data structure for streaming of STL containers. 
 
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. 
 
Data structure for tripod. 
 
JUTMPosition & add(const JUTMPosition &pos)
Add UTM position. 
 
Data structure for tripod. 
 
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
 
then usage $script< archive >< detectorfile >< run > nGet tripod
 
#define DEBUG(A)
Message macros.