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