Diana Software
QOptions.cc
Go to the documentation of this file.
1 #include "QOptions.hh"
2 #include "QMessage.hh"
3 
4 #include <stdexcept>
5 #include <iostream>
6 #include <fstream>
7 #include <sstream>
8 #include <unistd.h>
9 #include <time.h>
10 #include <string.h>
11 #include "QStringHandler.hh"
12 #include "QError.hh"
13 #include "QRealComplexFFT.hh"
14 #include "QDianaVersion.hh"
15 #include <limits>
16 
17 using namespace QStringHandler;
18 extern char *optarg;
19 extern int optind, opterr, optopt;
20 
22 
24 {
25 
26  static QOptions me;
27  return me;
28 }
29 
31 {
32  fUserParams.clear();
33  fParams.clear();
34  fFirstSequenceName = "";
35  fLastSequenceName = "";
36  SetParameter("General.MainConfigFile",std::string(""));
37  SetParameter("General.LogFile",std::string(""));
38  // see QMessageHandler::Init for defaults
39  SetParameter("General.PrintVerbosity",QVdt(1)); // debug
40  SetParameter("General.LogVerbosity",QVdt(1)); // debug
41  SetParameter("General.EventsToBeSkipped",0);
42  SetParameter("General.EventsToBeProcessed",0);
43  SetParameter("General.Driver",QVdt(""));
44  SetParameter("General.OverWrite",QVdt(false));
45  SetParameter("General.TimeProfilingOn",QVdt(false));
46  SetParameter("General.SkipRequiredNotValid",QVdt(false));
47  Diana::DianaDebug = false;
48 
49  QVdt::QVdt_vector versions;
50  versions.push_back(QVdt(Diana::QSWInfo::GetROOTVersion(),"DIANA_VERSION_ROOT"));
51  versions.push_back(QVdt(Diana::QSWInfo::GetPSQLVersion(),"DIANA_VERSION_PSQL"));
52  versions.push_back(QVdt(Diana::QSWInfo::GetGSLVersion(),"DIANA_VERSION_GSL"));
53  versions.push_back(QVdt(QRealComplexFFT::GetFFTLibrary(),"DIANA_FFT_LIB"));
54  if(!strcmp(QRealComplexFFT::GetFFTLibrary(),"FFTW3"))
55  versions.push_back(QVdt(Diana::QSWInfo::GetFFTWVersion(),"DIANA_VERSION_FFTW"));
56  versions.push_back(QVdt(Diana::QSWInfo::GetQtVersion(),"DIANA_VERSION_QT"));
57  versions.push_back(QVdt(Diana::QSWInfo::GetBoostVersion(),"DIANA_VERSION_BOOST"));
58  SetParameter("General.DIANA_EXTSWREVISION",versions);
59  SetParameter("General.DIANA_SWREVISION",QVdt(Diana::QSWInfo::GetDianaSWRevision()));
60  SetParameter("General.DIANA_VERSIONTAG",QVdt(Diana::QSWInfo::GetDianaVersionTag()));
61  SetParameter("General.GlobalDataInputVersion",QVdt(Diana::QSWInfo::GetDianaVersionTag()));
62 
63 }
64 
66 {
67 
68 }
69 void QOptions::CheckNotGet(const std::string& seq, std::ostream& o)
70 {
71  std::map< std::string, ParamInfo >::const_iterator iter = fParams.begin();
72  std::vector<std::string> floatingOptions;
73  while(iter != fParams.end()) {
74  std::string name = iter->first;
75  std::string myseq = name.substr(0,name.find_first_of("."));
76  std::string rest = name.substr(0,name.find_last_of("."));
77  bool enabled = false;
78  try {
79  enabled = GetParameter(rest + ".enable").GetBool();
80  }
81  catch (...) {};
82  if(myseq == seq && enabled && iter->second.get == 0) {
83  floatingOptions.push_back(iter->first);
84  }
85  iter++;
86  }
87  if(!floatingOptions.empty()) {
88  o << "The following configuration file parameters were not read by modules (useless directives?): "<<std::endl;
89  for(size_t i = 0; i < floatingOptions.size(); i++ ) {
90  o << "Parameter: "<<floatingOptions[i]<<std::endl;
91  }
92  }
93 }
94 
95 void QOptions::CheckAtDefault(const std::string& seq, std::ostream& o)
96 {
97  std::map< std::string, ParamInfo >::const_iterator iter = fParams.begin();
98  std::vector<std::string> floatingOptions;
99  while(iter != fParams.end()) {
100  std::string name = iter->first;
101  std::string myseq = name.substr(0,name.find_first_of("."));
102  std::string rest = name.substr(0,name.find_last_of("."));
103  bool enabled = false;
104  try {
105  enabled = GetParameter(rest + ".enable").GetBool();
106  }
107  catch (...) {};
108  if(myseq == seq && enabled && iter->second.get == 2) {
109  floatingOptions.push_back(iter->first);
110  }
111  iter++;
112  }
113  if(!floatingOptions.empty()) {
114  o << "The following configuration parameters were set at default values: "<<std::endl;
115  for(size_t i = 0; i < floatingOptions.size(); i++ ) {
116  o << "Parameter: "<<floatingOptions[i]<<" = "<<fParams[floatingOptions[i]].param<<std::endl;
117  }
118  }
119 }
120 
121 void QOptions::Dump(std::ostream& o)
122 {
123  o << "(CC) Dump of configuration parameters\n";
124  std::map< std::string, ParamInfo>::iterator it;
125  for(it=fParams.begin(); it!=fParams.end(); it++) {
126  o <<"(CC) "<< it->first<< "\t=\t";
127  if(it->second.param.GetType() == QVdt::Vector_QVdt) {
128  const QVdt::QVdt_vector& vec = it->second.param.GetVector();
129  o<<"{";
130  for(size_t i = 0; i < vec.size(); i++) {
131  o<<vec[i].GetName()<<"="<<vec[i].GetString()<<",";
132  }
133  o<<"}"<<std::endl;
134  } else {
135  o <<it->second.param.GetString()<<std::endl;
136  }
137  }
138  o << "(CC) End of dump of configuration parameters\n";
139 }
140 
141 void QOptions::Help(const char* exe)
142 {
143  std::cout << "Usage: "<<exe<<" -C file [options]" << std::endl;
144  std::cout << "Options:" << std::endl;
145  std::cout << " -c file file overriding config file parameters\n";
146  std::cout << " -C file config file name (mandatory)\n";
147  std::cout << " -e n number of events to be processed\n";
148  std::cout << " -D driver automatically load a driver module\n";
149  std::cout << " -f file input filename or filelist (must have .list extension) \n";
150  std::cout << " -g abort instead of throwing an exception (useful to trace back errors)\n";
151  std::cout << " -h this command \n";
152  std::cout << " -i version version of input gloabl data quantities (e.g. 2.10) \n";
153  std::cout << " -l logfile logfile name\n";
154  std::cout << " -o filep output file prefix \n";
155  std::cout << " -O overwrite objects already present in input files \n";
156  std::cout << " -p param val override config file parameter sequence.module.occurrence.parameter with value val\n";
157  std::cout << " -q decrease screen verbosity by 1 level\n";
158  std::cout << " -s n number of events to be skipped\n";
159  std::cout << " -S switch to true the SkipRequiredNotValid option when present\n";
160  std::cout << " -T enable time profiling of Do() methods in modules\n";
161  std::cout << " -v increase screen verbosity by 1 level\n";
162  std::cout << " -V var val define config file variable var with value val\n";
163 }
164 
165 
166 void QOptions::Init(int argc, char * const argv[])
167 {
168 
169  // set default values
170  int GeneralVerbosity = 2; // Info
171  std::string UserConfigFile = "";
172  std::string MainConfigFile = "";
173  std::string LogFileName;
174  std::string Driver = "";
175  time_t t = time (0);
176  char time_string[31];
177  ::strftime(time_string, 31, "diana_%Y_%m_%d_%H%M%S.log", ::localtime(&t));
178  const char *p = ::getenv("DIANA_INSTALL");
179  if(p) SetParameter("CFGVar.DIANA_INSTALL",QVdt(p));
180  const char *pext = ::getenv("DIANA_EXT_INSTALL");
181  if(pext) SetParameter("CFGVar.DIANA_EXT_INSTALL",QVdt(pext));
182 
183 
184  if(pext) p = pext;
185  if (p) {
186  LogFileName = p;
187  LogFileName += "/log/";
188  LogFileName += time_string;
189  } else {
190  LogFileName = "log/";
191  LogFileName += time_string;
192  }
193 
194  const char* dbv;
195  dbv = ::getenv("DIANA_DB_NAME");
196  if(dbv) SetParameter("General.DIANA_DB_NAME",QVdt(dbv));
197  dbv = ::getenv("DIANA_DB_HOST");
198  if(dbv) SetParameter("General.DIANA_DB_HOST",QVdt(dbv));
199  dbv = ::getenv("DIANA_DB_PORT");
200  if(dbv) SetParameter("General.DIANA_DB_PORT",QVdt(dbv));
201  dbv = ::getenv("DIANA_DB_USER");
202  if(dbv) SetParameter("General.DIANA_DB_USER",QVdt(dbv));
203  dbv = ::getenv("DIANA_DB_PWD");
204  if(dbv) SetParameter("General.DIANA_DB_PWD",QVdt(dbv));
205 
206 
207  int EventsToBeSkipped = 0;
208  int EventsToBeProcessed = std::numeric_limits<int>::max();
209 
210  std::string InputFileName="";
211  std::string InputFilesList="";
212  std::string OutputFilePrefix="";
213 
214  // handle inline options using standard C libraries
215  opterr = 0;
216  SetParameter("General.GSLErrorHandler",std::string("diana"));
217  while (1) {
218  const char valid_options[] = ":vqhgc:i:C:G:f:F:Ss:e:n:OTp:lo:D:V:";
219 
220  int c = ::getopt (argc, argv, valid_options);
221 
222  if (c == -1) break;
223 
224 
225  switch (c) {
226  case 'c': // change USER configuration file name
227  UserConfigFile = optarg;
228  SetParameter("General.UserConfigFile",QVdt(UserConfigFile));
229  break;
230 
231  case 'C': // change MAIN configuration file name
232  MainConfigFile = optarg;
233  break;
234 
235  case 'h':
236  Help(argv[0]);
237  exit(0);
238  break;
239 
240  case 'i': {
241  std::string inputVersion = optarg;
242  SetParameter("General.GlobalDataInputVersion",QVdt(inputVersion));
243  break;
244  }
245  case 'f': // input file name
246  InputFileName = optarg;
247  SetParameter("General.InputFile",QVdt(InputFileName));
248  SetParameter("General.ReadFilesList",QVdt(false));
249  break;
250 
251  case 'F': // input file list
252  InputFilesList = optarg;
253  SetParameter("General.InputFilesList",QVdt(InputFilesList));
254  SetParameter("General.ReadFilesList",QVdt(true));
255  break;
256  case 'g':
257  SetParameter("General.GSLErrorHandler",std::string("default"));
258  Diana::DianaDebug = true;
259  break;
260  case 's': // number of triggers to be processed
261  EventsToBeSkipped = atoi( optarg );
262  if (EventsToBeSkipped < 0)
263  EventsToBeSkipped=0;
264  break;
265 
266  case 'S':
267  SetParameter("General.SkipRequiredNotValid",QVdt(true));
268  break;
269  case 'T':
270  SetParameter("General.TimeProfilingOn",QVdt(true));
271  break;
272 
273  case 'e':
274  EventsToBeProcessed = atoi( optarg );
275  if (EventsToBeProcessed < 0)
276  EventsToBeProcessed=999999999;
277  break;
278  case 'O':
279  SetParameter("General.OverWrite",QVdt(true));
280  break;
281 
282  case 'p': // change the value of any parameter with inline command
283  // optind is the index to the next option (so argv[optind] is the second opt parameter)
284  if(!argv[optind])
285  throw std::runtime_error ("option -p requires 2 parameters with the \"sequence.module.occurrence.parameter value\" syntax");
286  if ( !argv[optind] || argv[optind][0] == '-' ) {
287  for (size_t k = 0; k < ::strlen (valid_options); k++) {
288  if (valid_options[k] != ':' && valid_options[k] == argv[optind][1])
289  throw std::runtime_error ("option -p requires 2 parameters with the \"sequence.module.occurrence.parameter value\" syntax");
290  }
291  }
292  fUserParams[optarg] = QVdt(std::string(argv[optind++]));
293  break;
294 
295  case 'V':
296  {
297  // change the value of any parameter with inline command
298  // optind is the index to the next option (so argv[optind] is the second opt parameter)
299  if(!argv[optind])
300  throw std::runtime_error ("option -V requires 2 parameters with the \"variable_name variable_value\" syntax");
301  if ( !argv[optind] || argv[optind][0] == '-' ) {
302  for (size_t k = 0; k < ::strlen (valid_options); k++) {
303  if (valid_options[k] != ':' && valid_options[k] == argv[optind][1])
304  throw std::runtime_error ("option -V requires 2 parameters with the \"variable_name variable_value\" syntax");
305  }
306  }
307  std::string cfgvar = "CFGVar.";
308  cfgvar += std::string(optarg);
309  QOptions::GetInstance().SetParameter(cfgvar,std::string(argv[optind++]));
310  }
311  break;
312 
313 
314  case 'l':
315  if (optind < argc && argv[optind] && argv[optind][0] != '-')
316  LogFileName = argv[optind++];
317  else
318  LogFileName = "";
319  break;
320 
321  case 'v': // each "v" decrease GeneralVerbositythreshold by one level
322  GeneralVerbosity --;
323  if(GeneralVerbosity<0) GeneralVerbosity = 0;
324  break;
325 
326  case 'q': // each "q" invrease GeneralVerbositythreshold by one level
327  GeneralVerbosity ++;
328  break;
329 
330  case 'o':
331  OutputFilePrefix = optarg;
332  SetParameter("General.OutputFilePrefix",QVdt(OutputFilePrefix));
333  break;
334  case 'D':
335  Driver = optarg;
336  break;
337 
338  case ':':
339  throw std::runtime_error (std::string("Missing value on command line option -") + char (optopt));
340  break;
341 
342  default:
343  throw std::runtime_error (std::string("Unknown command line option: -") + char (optopt));
344  break;
345  }
346  }
347 
348 
349  if(MainConfigFile.empty()) {
350  Help(argv[0]);
351  exit(1);
352  }
353 
354  SetParameter("General.MainConfigFile",QVdt(MainConfigFile));
355  SetParameter("General.LogFile",QVdt(LogFileName));
356  SetParameter("General.PrintVerbosity",QVdt(GeneralVerbosity));
357  SetParameter("General.LogVerbosity",QVdt(1));
358  SetParameter("General.EventsToBeSkipped",QVdt(EventsToBeSkipped));
359  SetParameter("General.EventsToBeProcessed",QVdt(EventsToBeProcessed));
360  SetParameter("General.Driver",QVdt(Driver));
361  QMessageHandler::Get()->Init((MsgLevel)GetInt("General.PrintVerbosity"),
362  (MsgLevel)GetInt("General.LogVerbosity"),
363  GetString("General.LogFile")
364  );
365 }
366 
367 // replace parameters defined with command line
369 {
370  std::map<std::string,QVdt>::const_iterator itb;
371  for(itb=fUserParams.begin(); itb!=fUserParams.end(); itb++) {
372  const std::string& n = itb->first;
373  SetParameter(n,itb->second);
374  }
375 
376  std::map<std::string,ParamInfo>::const_iterator itp = fParams.begin();
377  while(itp != fParams.end()) {
378  std::string key = itp->first;
379  // override input file list
380  if ((key.substr(key.find_last_of(".0"),std::string::npos) == ".InputFilesList") &&
381  (key.substr(0,key.find_first_of(".")) == fFirstSequenceName)) {
382  try {
383  QVdt s = GetParameter("General.InputFilesList");
384  if (s.GetString() != "") {
385  SetParameter(itp->first,s);
386  }
387  }
388  catch(QError &err) {
389  QMessageHandler::Panic(GetName(),"Command line option error for parameter InputFilesList: " + err.GetDescription());
390  }
391  catch(...) {
392  }
393  }
394  // override output file prefix
395  if ((key.substr(key.find_last_of(".0"),std::string::npos) == ".OutputFilePrefix") &&
396  (key.substr(0,key.find_first_of(".")) == fLastSequenceName)) {
397  try {
398  QVdt s = GetParameter("General.OutputFilePrefix");
399  if (s.GetString() != "") {
400  SetParameter(itp->first,s);
401  }
402  }
403  catch(QError &err) {
404  QMessageHandler::Panic(GetName(),"Command line option error for parameter OutputFilePrefix: " + err.GetDescription());
405  }
406  catch(...) {
407  }
408  }
409  // override input file name
410  if ((key.substr(key.find_last_of(".0"),std::string::npos) == ".InputFile") &&
411  (key.substr(0,key.find_first_of(".")) == fFirstSequenceName)) {
412 
413  try {
414  QVdt s = GetParameter("General.InputFile");
415  if (s.GetString() != "") {
416  SetParameter(itp->first,s);
417  }
418  }
419  catch(QError &err) {
420  QMessageHandler::Panic(GetName(),"Command line option error for parameter InputFile: " + err.GetDescription());
421  }
422  catch(...) {
423  }
424  }
425  // override read fileslist
426  if ((key.substr(key.find_last_of(".0"),std::string::npos) == ".ReadFilesList") &&
427  (key.substr(0,key.find_first_of(".")) == fFirstSequenceName)) {
428  try {
429  QVdt b = GetParameter("General.ReadFilesList");
430  SetParameter(itp->first,b);
431  }
432  catch(QError &err) {
433  QMessageHandler::Panic(GetName(),"Command line option error for parameter ReadFilesList: " + err.GetDescription());
434  }
435  catch(...) {
436  }
437  }
438 
439  // override SkipRequiredNotValid
440  if ((key.substr(key.find_last_of("."),std::string::npos) == ".SkipRequiredNotValid") ) {
441 
442  try {
443  QVdt s = GetParameter("General.SkipRequiredNotValid");
444  if (s.GetBool() == true) {
445  SetParameter(itp->first,s);
446  }
447  }
448  catch(QError &err) {
449  QMessageHandler::Panic(GetName(),"Command line option error for parameter SkipRequiredNotValid: " + err.GetDescription());
450  }
451  catch(...) {
452  }
453  }
454 
455  itp++;
456 
457 
458  }
459 
460 }
461 
462 const QVdt& QOptions::GetParameter(const std::string& n)
463 {
464  if ( fParams.find(n) ==fParams.end() ){
465  throw std::runtime_error("Parameter: \""+n+"\" does not exist");
466  }
467  if(fParams[n].get != 2)
468  fParams[n].get=1;
469  return fParams[n].param;
470 }
471 
472 const QVdt& QOptions::GetParameter(const std::string& seq, const std::string& mod, size_t occ, const std::string& par)
473 {
474  char o[128];
475  snprintf(o,128,"%u",(unsigned int)occ);
476  std::string n = seq+"."+mod+"."+o+"."+par;
477  return GetParameter(n);
478 }
479 
480 void QOptions::SetParameter(const std::string& seq, const std::string& mod, size_t occ, const std::string& par, const QVdt& p, const bool isDefault)
481 {
482  char o[128];
483  snprintf(o,128,"%u",(unsigned int)occ);
484  std::string n = seq+"."+mod+"."+o+"."+par;
485  SetParameter(n,p, isDefault);
486 }
487 
488 // double
489 double QOptions::GetDouble(const std::string& seq, const std::string& mod,size_t occ, const std::string& par)
490 {
491  return GetParameter(seq,mod,occ,par).GetDouble();
492 }
493 
494 double QOptions::GetDouble(const std::string& n)
495 {
496  return GetParameter(n).GetDouble();
497 }
498 std::vector<double> QOptions::GetVectorDouble(const std::string& seq, const std::string& mod,size_t occ, const std::string& par)
499 {
500  return GetParameter(seq,mod,occ,par).GetVectorDouble();
501 }
502 std::vector<double> QOptions::GetVectorDouble(const std::string& n)
503 {
504  return GetParameter(n).GetVectorDouble();
505 }
506 
507 // int
508 int QOptions::GetInt(const std::string& seq, const std::string& mod,size_t occ, const std::string& par)
509 {
510  return GetParameter(seq,mod,occ,par).GetInt();
511 }
512 int QOptions::GetInt(const std::string& n)
513 {
514  return GetParameter(n).GetInt();
515 }
516 std::vector<int> QOptions::GetVectorInt(const std::string& seq, const std::string& mod,size_t occ, const std::string& par)
517 {
518  return GetParameter(seq,mod,occ,par).GetVectorInt();
519 }
520 std::vector<int> QOptions::GetVectorInt(const std::string& n)
521 {
522  return GetParameter(n).GetVectorInt();
523 }
524 
525 // bool
526 bool QOptions::GetBool(const std::string& seq, const std::string& mod,size_t occ, const std::string& par)
527 {
528  return GetParameter(seq,mod,occ,par).GetBool();
529 }
530 bool QOptions::GetBool(const std::string& n)
531 {
532  return GetParameter(n).GetBool();
533 }
534 std::vector<bool> QOptions::GetVectorBool(const std::string& seq, const std::string& mod,size_t occ, const std::string& par)
535 {
536  return GetParameter(seq,mod,occ,par).GetVectorBool();
537 }
538 std::vector<bool> QOptions::GetVectorBool(const std::string& n)
539 {
540  return GetParameter(n).GetVectorBool();
541 }
542 
543 // string
544 std::vector<std::string> QOptions::GetVectorString(const std::string& seq, const std::string& mod,size_t occ, const std::string& par)
545 {
546  return GetParameter(seq,mod,occ,par).GetVectorString();
547 }
548 std::vector<std::string> QOptions::GetVectorString(const std::string& n)
549 {
550  return GetParameter(n).GetVectorString();
551 }
552 
553 
554 
555 
556 const std::string& QOptions::GetString(const std::string& seq, const std::string& mod,size_t occ, const std::string& par)
557 {
558  return GetParameter(seq,mod,occ,par).GetString();
559 }
560 
561 const std::string& QOptions::GetString(const std::string& n)
562 {
563  return GetParameter(n).GetString();
564 }
565 
566 // replace a parameter
567 void QOptions::SetParameter(const std::string& n, const QVdt& val, const bool isDefault)
568 {
569  if(fParams.find(n) != fParams.end()) {
570  fParams[n].param.SetName(n);
571  }
572  fParams[n].param = val;
573  if(isDefault) {
574  fParams[n].get = 2;
575  }else
576  fParams[n].get = 0;
577 }
578 
579 
580 std::map<std::string, QVdt*> QOptions::GetModuleParameters(const std::string& seq, const std::string& mod, size_t occ)
581 {
582  std::map<std::string,QVdt*> theMap;
583  theMap.clear();
584  std::map<std::string, ParamInfo>::iterator p = fParams.begin();
585 
586  while(p != fParams.end()) {
587  char o[128];
588  snprintf(o,128,"%u",(unsigned int)occ);
589  std::string os=o;
590  std::string::size_type loc = p->first.find(seq + "." + mod+"." + os, 0 );
591  if( loc != std::string::npos ) {
592  size_t len = seq.size() + 1 + mod.size() + 1 + os.size();
593  std::string paramName = p->first.substr(len+1,std::string::npos);
594  theMap[paramName] = &(p->second.param);
595 
596  }
597  p++;
598  }
599  return theMap;
600 }
601 
double max
Definition: CheckOF.C:53
err
Definition: CheckOF.C:114
QVector b
Definition: CheckOF.C:21
QVector vec(3)
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
MsgLevel
Definition: QMessageDefs.hh:4
int optopt
Definition: QOptions.cc:19
int optind
char * optarg
int opterr
Definition: QOptions.cc:19
error class with error type and description
Definition: QError.hh:115
static QMessageHandler * Get()
Definition: QMessage.cc:24
static void Panic(const std::string &sender, const std::string &msg)
Definition: QMessage.hh:43
const std::string & GetString(const std::string &seq, const std::string &mod, size_t occ, const std::string &par)
Definition: QOptions.cc:556
double GetDouble(const std::string &seq, const std::string &mod, size_t occ, const std::string &par)
Definition: QOptions.cc:489
std::vector< double > GetVectorDouble(const std::string &seq, const std::string &mod, size_t occ, const std::string &par)
Definition: QOptions.cc:498
void SetParameter(const std::string &n, const QVdt &value, const bool isDefault=false)
void Init(int argc, char *const argv[])
Definition: QOptions.cc:166
std::vector< bool > GetVectorBool(const std::string &seq, const std::string &mod, size_t occ, const std::string &par)
Definition: QOptions.cc:534
virtual ~QOptions()
Definition: QOptions.cc:65
void CheckNotGet(const std::string &seq, std::ostream &o)
Definition: QOptions.cc:69
void Help(const char *exe)
Definition: QOptions.cc:141
const QVdt & GetParameter(const std::string &seq, const std::string &mod, size_t occ, const std::string &par)
Definition: QOptions.cc:472
void Dump(std::ostream &)
Definition: QOptions.cc:121
std::map< std::string, QVdt * > GetModuleParameters(const std::string &seq, const std::string &mod, size_t occ)
Definition: QOptions.cc:580
void ReplaceUserParams()
replace parameters that where super-seeded with inline command
Definition: QOptions.cc:368
std::vector< std::string > GetVectorString(const std::string &seq, const std::string &mod, size_t occ, const std::string &par)
Definition: QOptions.cc:544
int GetInt(const std::string &seq, const std::string &mod, size_t occ, const std::string &par)
Definition: QOptions.cc:508
static QOptions & GetInstance()
Definition: QOptions.cc:23
QOptions()
Definition: QOptions.cc:30
std::vector< int > GetVectorInt(const std::string &seq, const std::string &mod, size_t occ, const std::string &par)
Definition: QOptions.cc:516
bool GetBool(const std::string &seq, const std::string &mod, size_t occ, const std::string &par)
Definition: QOptions.cc:526
void CheckAtDefault(const std::string &seq, std::ostream &o)
Definition: QOptions.cc:95
static const char * GetFFTLibrary()
Variable Data Type.
Definition: QVdt.hh:26
@ Vector_QVdt
Definition: QVdt.hh:34
bool GetBool() const
Definition: QVdt.hh:102
std::vector< QVdt > QVdt_vector
Definition: QVdt.hh:38
const std::string & GetString() const
Definition: QVdt.cc:225
bool DianaDebug
Definition: QDianaDebug.cc:16
const char * GetFFTWVersion()
Return the FFTW version.
const char * GetBoostVersion()
Return the Boost version.
const char * GetDianaVersionTag()
Return the DIANA version tag.
const char * GetQtVersion()
Return the Qt version.
const char * GetGSLVersion()
Return the GSL version.
const char * GetROOTVersion()
Return the ROOT version.
const char * GetDianaSWRevision()
Return the DIANA SW version string.
Definition: QDianaVersion.cc:9
const char * GetPSQLVersion()
Return the PSQL version.
general purpose string manipulation functions