musrfit  1.9.2
any2many.cpp
Go to the documentation of this file.
1 /***************************************************************************
2 
3  any2many.cpp
4 
5  Author: Andreas Suter
6  e-mail: andreas.suter@psi.ch
7 
8 ***************************************************************************/
9 
10 /***************************************************************************
11  * Copyright (C) 2007-2023 by Andreas Suter *
12  * andreas.suter@psi.ch *
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  * This program is distributed in the hope that it will be useful, *
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22  * GNU General Public License for more details. *
23  * *
24  * You should have received a copy of the GNU General Public License *
25  * along with this program; if not, write to the *
26  * Free Software Foundation, Inc., *
27  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
28  ***************************************************************************/
29 
30 #ifdef HAVE_CONFIG_H
31 #include "config.h"
32 #endif
33 
34 #include <cstdio>
35 #include <cstdlib>
36 #include <cstring>
37 
38 #include <iostream>
39 #include <fstream>
40 #include <memory>
41 
42 #include <TString.h>
43 #include <TSAXParser.h>
44 
45 #ifdef HAVE_GIT_REV_H
46 #include "git-revision.h"
47 #endif
48 
49 #include "PMusr.h"
50 #include "PStartupHandler.h"
51 #include "PRunDataHandler.h"
52 
53 //--------------------------------------------------------------------------
58 {
59  std::cout << std::endl << "usage: any2many [--help] : will show this help.";
60  std::cout << std::endl << " any2many --version : will show the git version.";
61  std::cout << std::endl << " any2many -f <filenameList-input> | -r <runList-input>";
62  std::cout << std::endl << " -c <convert-options> [-p <output-path>] [-y <year>]";
63  std::cout << std::endl << " [-o <outputFileName> | -t <in-template> <out-template>] [-s]";
64  std::cout << std::endl << " [-rebin <n>] [-z <compressed>]";
65  std::cout << std::endl << " -f <filenameList-input> : where <filenameList-input> is space";
66  std::cout << std::endl << " separeted a list of file names (not starting with a '-'),";
67  std::cout << std::endl << " e.g. 2010/lem10_his_0111.root 2010/lem10_his_0112.root";
68  std::cout << std::endl << " -o <outputFileName> : this option only makes sense, if <filenameList-input>";
69  std::cout << std::endl << " is a single input file name!";
70  std::cout << std::endl << " -r <runList-input> : can be:";
71  std::cout << std::endl << " (i) <run0>, <run1>, <run2>, ... <runN> : run numbers, e.g. 123 124";
72  std::cout << std::endl << " (ii) <run0>-<runN> : a range, e.g. 123-125 -> 123 124 125";
73  std::cout << std::endl << " (iii) <run0>:<runN>:<step> : a sequence, e.g. 123:127:2 -> 123 125 127";
74  std::cout << std::endl << " <step> will give the step width and has to be a positive number!";
75  std::cout << std::endl << " a <runList> can also combine (i)-(iii), e.g. 123 128-130 133, etc.";
76  std::cout << std::endl << " -t <in-template> <out-template> : ";
77  std::cout << std::endl << " <in-/out-template> : template file name. Needed for run-lists in";
78  std::cout << std::endl << " order to generate the proper file names. The following template";
79  std::cout << std::endl << " tags can be used: [yy] for year, and [rrrr] for the run number.";
80  std::cout << std::endl << " If the run number tag is used, the number of 'r' will give the";
81  std::cout << std::endl << " number of digits used with leading zeros, e.g. [rrrrrr] and run";
82  std::cout << std::endl << " number 123 will result in 000123. The same is true for the";
83  std::cout << std::endl << " year, i.e. [yyyy] will result in something like 1999.";
84  std::cout << std::endl << " -c <convert-options> : <inFormat> <outFormat>";
85  std::cout << std::endl << " <inFormat> : input data file format. Supported formats are:";
86  std::cout << std::endl << " MusrRoot, PSI-BIN, ROOT (LEM), MUD, NeXus, PSI-MDU, WKM";
87  std::cout << std::endl << " <outFormat> : ouput data file format. Supported formats are:";
88  std::cout << std::endl << " PSI-BIN, MusrRoot, ROOT, MUD, NeXus1-HDF4, NeXus1-HDF5, NeXus1-XML,";
89  std::cout << std::endl << " NeXus2-HDF4, NeXus2-HDF5, NeXus2-XML, WKM, ASCII";
90  std::cout << std::endl << " Comment: ROOT is superseeded by MusrRoot. If there is not a very good";
91  std::cout << std::endl << " reason, avoid it!";
92  std::cout << std::endl << " -h <histo-group-list> : This option is for MusrRoot input files only!";
93  std::cout << std::endl << " Select the the histo groups to be exported. <histo-group-list> is a space";
94  std::cout << std::endl << " separated list of the histo group, e.g. -h 0, 20 will try to export the histo";
95  std::cout << std::endl << " 0 (NPP) and 20 (PPC).";
96  std::cout << std::endl << " -p <output-path> : where <output-path> is the output path for the";
97  std::cout << std::endl << " converted files. If nothing is given, the current directory";
98  std::cout << std::endl << " will be used, unless the option '-s' is used.";
99  std::cout << std::endl << " -y <year> : if the option -y is used, here a year in the form 'yy' or 'yyyy' can";
100  std::cout << std::endl << " be given, if this is the case, any automatic file name";
101  std::cout << std::endl << " generation needs a year, this number will be used.";
102  std::cout << std::endl << " -s : with this option the output data file will be sent to the stdout.";
103  std::cout << std::endl << " -rebin <n> : where <n> is the number of bins to be packed";
104  std::cout << std::endl << " -z [g|b] <compressed> : where <compressed> is the output file name";
105  std::cout << std::endl << " (without extension) of the compressed data collection, and";
106  std::cout << std::endl << " 'g' will result in .tar.gz, and 'b' in .tar.bz2 files.";
107  std::cout << std::endl;
108  std::cout << std::endl << " If the template option '-t' is absent, the output file name will be";
109  std::cout << std::endl << " generated according to the input data file name, and the output data";
110  std::cout << std::endl << " format.";
111  std::cout << std::endl;
112  std::cout << std::endl << "examples:" << std::endl;
113  std::cout << std::endl << " any2many -f 2010/lem10_his_0123.root -c ROOT ASCII -rebin 25";
114  std::cout << std::endl << " Will take the LEM ROOT file '2010/lem10_his_0123.root' rebin it with 25";
115  std::cout << std::endl << " and convert it to ASCII. The output file name will be";
116  std::cout << std::endl << " lem10_his_0123.ascii, and the file will be saved in the current directory." << std::endl;
117  std::cout << std::endl << " any2many -f 2010/lem10_his_0123.root -c MusrRoot NEXUS2-HDF5 -o 2010/lem10_his_0123_v2.nxs";
118  std::cout << std::endl << " Will take the MusrRoot file '2010/lem10_his_0123.root' ";
119  std::cout << std::endl << " and convert it to NeXus IDF V2. The output file name will be";
120  std::cout << std::endl << " lem10_his_0123_v2.nxs, and the file will be saved in the current directory." << std::endl;
121  std::cout << std::endl << " any2many -r 123 137 -c PSI-BIN MUD -t d[yyyy]/deltat_tdc_gps_[rrrr].bin \\";
122  std::cout << std::endl << " [rrrrrr].msr -y 2001";
123  std::cout << std::endl << " Will take the run 123 and 137, will generate the input file names:";
124  std::cout << std::endl << " d2001/deltat_tdc_gps_0123.bin and d2001/deltat_tdc_gps_0137.bin, and";
125  std::cout << std::endl << " output file names 000123.msr and 000137.msr" << std::endl;
126  std::cout << std::endl << " any2many -r 100-117 -c PSI-MDU ASCII -t d[yyyy]/deltat_tdc_alc_[rrrr].mdu \\";
127  std::cout << std::endl << " [rrr].ascii -y 2011 -s";
128  std::cout << std::endl << " Will take the runs 100 through 117 and convert the PSI-MDU input files to";
129  std::cout << std::endl << " ASCII output and instead of saving them into a file, they will be spit to";
130  std::cout << std::endl << " the standard output." << std::endl;
131  std::cout << std::endl << " any2many -r 100-117 -c NEXUS MusrRoot -t d[yyyy]/psi_gps_[rrrr].NXS \\";
132  std::cout << std::endl << " psi_[yyyy]_gps_[rrrr].root -z b psi_gps_run_100to117";
133  std::cout << std::endl << " Will take the runs 100 through 117 and convert the NEXUS input files";
134  std::cout << std::endl << " to MusrRoot output. Afterwards these new files will be collected in a";
135  std::cout << std::endl << " compressed archive psi_gps_run_100to117.tar.bz2." << std::endl;
136  std::cout << std::endl << " any2many -f 2010/lem10_his_0123.root 2010/lem10_his_0012.root -c MusrRoot MusrRoot -rebin 25";
137  std::cout << std::endl << " Will read the two files '2010/lem10_his_0123.root' and '2010/lem10_his_0012.root',";
138  std::cout << std::endl << " rebin them with 25 and export them as LEM ROOT files with adding rebin25 to the";
139  std::cout << std::endl << " name, e.g. 2010/lem10_his_0123_rebin25.root";
140  std::cout << std::endl << std::endl;
141 }
142 
143 //--------------------------------------------------------------------------
154 int main(int argc, char *argv[])
155 {
156  bool show_syntax = false;
157  int status;
158  PAny2ManyInfo info;
159  PStringVector inputFormat;
160  PStringVector outputFormat;
161  TString outputFileName = TString("");
162 
163  // init inputFormat
164  inputFormat.push_back("musrroot");
165  inputFormat.push_back("psi-bin");
166  inputFormat.push_back("root");
167  inputFormat.push_back("mud");
168  inputFormat.push_back("nexus");
169  inputFormat.push_back("psi-mdu");
170  inputFormat.push_back("wkm");
171 
172  // init outputFormat
173  outputFormat.push_back("psi-bin");
174  outputFormat.push_back("musrroot");
175  outputFormat.push_back("root");
176  outputFormat.push_back("mud");
177  outputFormat.push_back("nexus1-hdf4");
178  outputFormat.push_back("nexus1-hdf5");
179  outputFormat.push_back("nexus1-xml");
180  outputFormat.push_back("nexus2-hdf4");
181  outputFormat.push_back("nexus2-hdf5");
182  outputFormat.push_back("nexus2-xml");
183  outputFormat.push_back("wkm");
184  outputFormat.push_back("ascii");
185 
186  // init info structure
187  info.useStandardOutput = false;
188  info.rebin = 1;
189  info.compressionTag = 0; // no compression as default
190  info.idf = 0; // undefined
191  info.inTemplate = TString("");
192  info.outTemplate = TString("");
193  info.outFileName = TString("");
194 
195  // call any2many without arguments
196  if (argc == 1) {
197  any2many_syntax();
198  return PMUSR_SUCCESS;
199  }
200 
201  // call any2many --help or any2many --version
202  if (argc == 2) {
203  if (!strncmp(argv[1], "--help", 128))
204  any2many_syntax();
205  else if (strstr(argv[1], "--v")) {
206 #ifdef HAVE_CONFIG_H
207 #ifdef HAVE_GIT_REV_H
208  std::cout << std::endl << "any2many version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << " (" << BUILD_TYPE << "), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
209 #else
210  std::cout << std::endl << "any2many version: " << PACKAGE_VERSION << " (" << BUILD_TYPE << "), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
211 #endif
212 #else
213 #ifdef HAVE_GIT_REV_H
214  std::cout << std::endl << "any2many git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
215 #else
216  std::cout << std::endl << "any2many version: unkown." << std::endl << std::endl;
217 #endif
218 #endif
219  } else {
220  any2many_syntax();
222  }
223  return PMUSR_SUCCESS;
224  }
225 
226  info.outPath = TString("./");
227 
228  // handle the other command options
229  Int_t ival;
230  for (int i=1; i<argc; i++) {
231 
232  if (!strcmp(argv[i], "-y")) { // handle year option
233  if (i+1 < argc) {
234  // check that date if it is either of the form 'yy' or 'yyyy'
235  if ((strlen(argv[i+1]) != 2) && (strlen(argv[i+1]) != 4)) {
236  std::cerr << std::endl << ">> any2many **ERROR** found in option '-y' the argument '" << argv[i+1] << "' which is neither of the form 'yy' nor 'yyyy'." << std::endl;
237  show_syntax = true;
238  break;
239  }
240  ival=0;
241  status = sscanf(argv[i+1], "%d", &ival);
242  if (status == 1) {
243  info.year = argv[i+1];
244  i++;
245  } else {
246  std::cerr << std::endl << ">> any2many **ERROR** found in option '-y' the argument '" << argv[i+1] << "' which is not a number." << std::endl;
247  show_syntax = true;
248  break;
249  }
250  } else {
251  show_syntax = true;
252  break;
253  }
254  } else if (!strcmp(argv[i], "-s")) { // handle standard output option '-s'
255  info.useStandardOutput = true;
256  } else if (!strcmp(argv[i], "-f")) { // set input option tag
257  if (i+1 < argc) {
258  bool done = false;
259  int j = i+1;
260  do {
261  if (argv[j][0] == '-') { // assuming the next option is found
262  done = true;
263  } else {
264  info.inFileName.push_back(argv[j]);
265  j++; // shift input to the proper place
266  }
267  } while (!done && (j<argc));
268  i = j-1;
269  if (j >= argc) // make sure that counter is still in range
270  break;
271  } else {
272  std::cerr << std::endl << ">> any2many **ERROR** found input option '-f' without any arguments" << std::endl;
273  show_syntax = true;
274  break;
275  }
276  } else if (!strcmp(argv[i], "-o")) { // handle output file name option '-o'
277  if (i+1 < argc) {
278  outputFileName = argv[i+1];
279  i++;
280  } else {
281  std::cerr << std::endl << ">> any2many **ERROR** found output file name option '-o' without any arguments" << std::endl;
282  show_syntax = true;
283  break;
284  }
285  } else if (!strcmp(argv[i], "-r")) {
286  if (i+1 < argc) {
287  int pos{i+1};
288  std::string runStr{""};
289  // collect run list string from input
290  for (int j=i+1; j<argc; j++) {
291  pos = j;
292  if ((argv[j][0] == '-') && isalpha(argv[j][1])) { // next command
293  pos = j-1;
294  break;
295  } else {
296  runStr += argv[j];
297  runStr += " ";
298  }
299  }
300  // extract run list from string
301  PStringNumberList rl(runStr);
302  std::string errMsg{""};
303  if (!rl.Parse(errMsg)) {
304  std::cerr << "**ERROR** in run list: -rl " << runStr << std::endl;
305  std::cerr << errMsg << std::endl;
307  }
308  info.runList = rl.GetList();
309  // move the argument counter to the proper position
310  i = pos;
311  } else {
312  std::cerr << std::endl << ">> any2many **ERROR** found input option '-r' without any arguments" << std::endl;
313  show_syntax = true;
314  break;
315  }
316 
317  // check if any valid input option was found
318  if (info.runList.size() == 0) {
319  std::cerr << std::endl << ">> any2many **ERROR** found input option '-r' without any valid arguments" << std::endl;
320  show_syntax = true;
321  break;
322  }
323  } else if (!strcmp(argv[i], "-c")) { // set convert option tag
324  bool found = false;
325  std::string sval;
326  if (i+2 < argc) {
327  sval = argv[i+1];
328  found = false;
329  for (unsigned int j=0; j<inputFormat.size(); j++) {
330  if (!inputFormat[j].CompareTo(sval, TString::kIgnoreCase)) {
331  info.inFormat = sval;
332  found = true;
333  break;
334  }
335  }
336  if (!found) {
337  std::cerr << std::endl << ">> any2many **ERROR** found unkown input data file format option '" << sval << "'" << std::endl;
338  show_syntax = true;
339  break;
340  }
341  sval = argv[i+2];
342  found = false;
343  for (unsigned int j=0; j<outputFormat.size(); j++) {
344  if (!outputFormat[j].CompareTo(sval, TString::kIgnoreCase)) {
345  info.outFormat = sval;
346  found = true;
347  break;
348  }
349  }
350  if (!found) {
351  std::cerr << std::endl << ">> any2many **ERROR** found unkown output data file format option '" << sval << "'" << std::endl;
352  show_syntax = true;
353  break;
354  }
355  i += 2; // shift argument position
356  } else {
357  std::cerr << std::endl << ">> any2many **ERROR** found option '-c' with missing arguments" << std::endl;
358  show_syntax = true;
359  break;
360  }
361  } else if (!strcmp(argv[i], "-h")) { // filter histo group list (for MusrRoot and ROOT (LEM) only!)
362  bool done = false;
363  int j = i+1;
364  do {
365  status = sscanf(argv[j], "%d", &ival);
366  if (status == 1) {
367  info.groupHistoList.push_back(ival);
368  j++;
369  } else {
370  done = true;
371  }
372  } while (!done && (j<argc));
373  i = j-1;
374  if (j >= argc) // make sure that counter is still in range
375  break;
376  } else if (!strcmp(argv[i], "-p")) { // filter output path name flag
377  if (i+1 < argc) {
378  info.outPath = argv[i+1];
379  if (!info.outPath.EndsWith("/"))
380  info.outPath += "/";
381  i++;
382  } else {
383  std::cerr << std::endl << ">> any2many **ERROR** found output option '-p' without any argument." << std::endl;
384  show_syntax = true;
385  break;
386  }
387  } else if (!strcmp(argv[i], "-rebin")) { // filter out rebinning option
388  if (i+1 < argc) {
389  status = sscanf(argv[i+1], "%d", &ival);
390  if (status == 1) {
391  info.rebin = ival;
392  i++;
393  } else {
394  std::cerr << std::endl << ">> any2many **ERROR** found in option '-rebin " << argv[i+1] << "' which doesn't make any sense." << std::endl;
395  show_syntax = true;
396  break;
397  }
398  } else {
399  std::cerr << std::endl << ">> any2many **ERROR** found output option '-rebin' without any argument." << std::endl;
400  show_syntax = true;
401  break;
402  }
403  } else if (!strcmp(argv[i], "-t")) { // filter out the input/output file template
404  if (i+2 < argc) {
405  if ((argv[i+1][0] == '-') || (argv[i+2][0] == '-')) {
406  std::cerr << std::endl << ">> any2many **ERROR** found invalid template in option '-t'" << std::endl;
407  show_syntax = true;
408  break;
409  }
410  info.inTemplate = argv[i+1];
411  info.outTemplate = argv[i+2];
412  i += 2; // shift argument position
413  } else {
414  std::cerr << std::endl << ">> any2many **ERROR** found option '-t' with missing arguments" << std::endl;
415  show_syntax = true;
416  break;
417  }
418  } else if (!strcmp(argv[i], "-z")) { // filter out if compression is whished
419  if (i+2 < argc) {
420  if ((argv[i+1][0] == '-') || (argv[i+2][0] == '-')) {
421  std::cerr << std::endl << ">> any2many **ERROR** found invalid template in option '-t'" << std::endl;
422  show_syntax = true;
423  break;
424  }
425  if (argv[i+1][0] == 'g') {
426  info.compressionTag = 1;
427  } else if (argv[i+1][0] == 'b') {
428  info.compressionTag = 2;
429  } else {
430  std::cerr << std::endl << ">> any2many **ERROR** found in option '-z' compression tag '" << argv[i+1] << "' which is not supported." << std::endl;
431  show_syntax = true;
432  break;
433  }
434  info.compressFileName = argv[i+2];
435  i += 2; // shift argument position
436  } else {
437  std::cerr << std::endl << ">> any2many **ERROR** found option '-z' with missing arguments" << std::endl;
438  show_syntax = true;
439  break;
440  }
441  } else { // unrecognized command
442  std::cerr << std::endl << ">> any2many **ERROR** found unrecognized option " << argv[i] << std::endl;
443  show_syntax = true;
444  break;
445  }
446  }
447 
448  // make sure that either a filenameList or a runList has been provided
449  if ((info.inFileName.size()==0) && (info.runList.size()==0)) {
450  std::cerr << std::endl << ">> any2many **ERROR** neither a input filename list, nor a run list was given." << std::endl;
451  show_syntax = true;
452  }
453 
454  // make sure that in/out formats are given
455  if ((info.inFormat.Length() == 0) || (info.outFormat.Length() == 0)) {
456  std::cerr << std::endl << ">> any2many **ERROR** conversion information is missing." << std::endl;
457  show_syntax = true;
458  }
459 
460  // check if the output format is nexus
461  if (info.outFormat.Contains("nexus1", TString::kIgnoreCase))
462  info.idf = 1;
463  if (info.outFormat.Contains("nexus2", TString::kIgnoreCase))
464  info.idf = 2;
465 
466  // in case the '-o' is present, make sure that inFileName is only a single file name
467  if (outputFileName.Length() > 0) {
468  if (info.inFileName.size() == 1) {
469  // make sure there is not in addition the template option given
470  if ((info.inTemplate.Length() == 0) && (info.outTemplate.Length() == 0)) {
471  info.outFileName = outputFileName;
472  } else {
473  std::cerr << std::endl << ">> any2many **ERROR** found option '-o' cannot be combined with option '-t'." << std::endl;
474  show_syntax = true;
475  }
476  } else {
477  std::cerr << std::endl << ">> any2many **ERROR** found option '-o' with multiple input file names, which doesn't make any sense." << std::endl;
478  show_syntax = true;
479  }
480  }
481 
482  if (show_syntax) {
483  info.runList.clear();
484  any2many_syntax();
486  }
487 
488  if (!info.inFormat.CompareTo(info.outFormat, TString::kIgnoreCase) && (info.rebin == 1)) {
489  info.runList.clear();
490  std::cerr << std::endl << ">> any2many **ERROR** input data format == output data format, only allowed if rebin != 1.";
491  std::cerr << std::endl << " will ignore the request." << std::endl << std::endl;
492  return PMUSR_SUCCESS;
493  }
494 
495  // read startup file
496  char startup_path_name[128];
497  std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
498  std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
499  if (!startupHandler->StartupFileFound()) {
500  std::cerr << std::endl << ">> any2many **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
501  std::cerr << std::endl;
502  } else {
503  strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
504  saxParser->ConnectToHandler("PStartupHandler", startupHandler.get());
505  //status = saxParser->ParseFile(startup_path_name);
506  // parsing the file as above seems to lead to problems in certain environments;
507  // use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
508  status = parseXmlFile(saxParser.get(), startup_path_name);
509  // check for parse errors
510  if (status) { // error
511  std::cerr << std::endl << ">> any2many **WARNING** Reading/parsing musrfit_startup.xml failed.";
512  std::cerr << std::endl;
513  }
514  }
515 
516  // read all the necessary runs (raw data)
517  std::unique_ptr<PRunDataHandler> dataHandler;
518  if (startupHandler)
519  dataHandler = std::make_unique<PRunDataHandler>(&info, startupHandler->GetDataPathList());
520  else
521  dataHandler = std::make_unique<PRunDataHandler>(&info);
522 
523  // read and convert all data
524  dataHandler->ConvertData();
525 
526  // check if it has been successfull
527  bool success = dataHandler->IsAllDataAvailable();
528  if (!success) {
529  std::cerr << std::endl << ">> any2many **ERROR** Couldn't read all data files, will quit ..." << std::endl;
530  }
531 
532  return PMUSR_SUCCESS;
533 }
534 
535 // end ---------------------------------------------------------------------
536 
virtual PUIntVector GetList()
Definition: PMusr.h:867
int main(int argc, char *argv[])
Definition: any2many.cpp:154
TString year
holds the information about the year to be used
Definition: PMusr.h:831
TString outFileName
holds the output file name
Definition: PMusr.h:835
int parseXmlFile(TSAXParser *, const char *)
UInt_t compressionTag
0=no compression, 1=gzip compression, 2=bzip2 compression
Definition: PMusr.h:839
TString inFormat
holds the information about the input data file format
Definition: PMusr.h:827
PIntVector groupHistoList
holds the histo group list offset (used to define for MusrRoot files, what to be exported) ...
Definition: PMusr.h:833
const char * startup_path_name
virtual bool Parse(std::string &errorMsg, bool ignoreFirstToken=false)
Definition: PMusr.cpp:1938
TString outTemplate
holds the output file template
Definition: PMusr.h:830
UInt_t rebin
holds the number of bins to be packed
Definition: PMusr.h:838
void any2many_syntax()
Definition: any2many.cpp:57
TString compressFileName
holds the name of the outputfile name in case of compression is used
Definition: PMusr.h:840
TString outPath
holds the output path
Definition: PMusr.h:837
Bool_t useStandardOutput
flag showing if the converted shall be sent to the standard output
Definition: PMusr.h:826
#define PMUSR_WRONG_STARTUP_SYNTAX
Definition: PMusr.h:46
if(xmlFile.is_open())
PUIntVector runList
holds the run number list to be converted
Definition: PMusr.h:832
#define PMUSR_SUCCESS
Definition: PMusr.h:44
std::vector< TString > PStringVector
Definition: PMusr.h:214
return status
UInt_t idf
IDF version for NeXus files.
Definition: PMusr.h:841
TString outFormat
holds the information about the output data file format
Definition: PMusr.h:828
PStringVector inFileName
holds the file name of the input data file
Definition: PMusr.h:834
TString inTemplate
holds the input file template
Definition: PMusr.h:829