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
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, MusrRootDir, 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 << "NOTE to MusrRoot and MusrRootDir <outFormat>: MusrRoot will convert to the deprecated TFolder format,";
113 std::cout << std::endl << " whereas MusrRootDir will convert to the TDirectory based format. Typically MusrRootDir should be the";
114 std::cout << std::endl << " preferred MusrRoot-file-format output format.";
115 std::cout << std::endl;
116 std::cout << std::endl << "examples:" << std::endl;
117 std::cout << std::endl << " any2many -f 2010/lem10_his_0123.root -c ROOT ASCII -rebin 25";
118 std::cout << std::endl << " Will take the LEM ROOT file '2010/lem10_his_0123.root' rebin it with 25";
119 std::cout << std::endl << " and convert it to ASCII. The output file name will be";
120 std::cout << std::endl << " lem10_his_0123.ascii, and the file will be saved in the current directory." << std::endl;
121 std::cout << std::endl << " any2many -f 2010/lem10_his_0123.root -c MusrRoot NEXUS2-HDF5 -o 2010/lem10_his_0123_v2.nxs";
122 std::cout << std::endl << " Will take the MusrRoot file '2010/lem10_his_0123.root' ";
123 std::cout << std::endl << " and convert it to NeXus IDF V2. The output file name will be";
124 std::cout << std::endl << " lem10_his_0123_v2.nxs, and the file will be saved in the current directory." << std::endl;
125 std::cout << std::endl << " any2many -r 123 137 -c PSI-BIN MUD -t d[yyyy]/deltat_tdc_gps_[rrrr].bin \\";
126 std::cout << std::endl << " [rrrrrr].msr -y 2001";
127 std::cout << std::endl << " Will take the run 123 and 137, will generate the input file names:";
128 std::cout << std::endl << " d2001/deltat_tdc_gps_0123.bin and d2001/deltat_tdc_gps_0137.bin, and";
129 std::cout << std::endl << " output file names 000123.msr and 000137.msr" << std::endl;
130 std::cout << std::endl << " any2many -r 100-117 -c PSI-MDU ASCII -t d[yyyy]/deltat_tdc_alc_[rrrr].mdu \\";
131 std::cout << std::endl << " [rrr].ascii -y 2011 -s";
132 std::cout << std::endl << " Will take the runs 100 through 117 and convert the PSI-MDU input files to";
133 std::cout << std::endl << " ASCII output and instead of saving them into a file, they will be spit to";
134 std::cout << std::endl << " the standard output." << std::endl;
135 std::cout << std::endl << " any2many -r 100-117 -c NEXUS MusrRoot -t d[yyyy]/psi_gps_[rrrr].NXS \\";
136 std::cout << std::endl << " psi_[yyyy]_gps_[rrrr].root -z b psi_gps_run_100to117";
137 std::cout << std::endl << " Will take the runs 100 through 117 and convert the NEXUS input files";
138 std::cout << std::endl << " to MusrRoot output. Afterwards these new files will be collected in a";
139 std::cout << std::endl << " compressed archive psi_gps_run_100to117.tar.bz2." << std::endl;
140 std::cout << std::endl << " any2many -f 2010/lem10_his_0123.root 2010/lem10_his_0012.root -c MusrRoot MusrRoot -rebin 25";
141 std::cout << std::endl << " Will read the two files '2010/lem10_his_0123.root' and '2010/lem10_his_0012.root',";
142 std::cout << std::endl << " rebin them with 25 and export them as LEM ROOT files with adding rebin25 to the";
143 std::cout << std::endl << " name, e.g. 2010/lem10_his_0123_rebin25.root";
144 std::cout << std::endl << std::endl;
145}
146
147//--------------------------------------------------------------------------
158int main(int argc, char *argv[])
159{
160 bool show_syntax = false;
161 int status;
162 PAny2ManyInfo info;
163 PStringVector inputFormat;
164 PStringVector outputFormat;
165 TString outputFileName = TString("");
166
167 // init inputFormat
168 inputFormat.push_back("musrroot");
169 inputFormat.push_back("psi-bin");
170 inputFormat.push_back("root");
171 inputFormat.push_back("mud");
172 inputFormat.push_back("nexus");
173 inputFormat.push_back("psi-mdu");
174 inputFormat.push_back("wkm");
175
176 // init outputFormat
177 outputFormat.push_back("psi-bin");
178 outputFormat.push_back("musrroot");
179 outputFormat.push_back("musrrootdir");
180 outputFormat.push_back("root");
181 outputFormat.push_back("mud");
182 outputFormat.push_back("nexus1-hdf4");
183 outputFormat.push_back("nexus1-hdf5");
184 outputFormat.push_back("nexus1-xml");
185 outputFormat.push_back("nexus2-hdf4");
186 outputFormat.push_back("nexus2-hdf5");
187 outputFormat.push_back("nexus2-xml");
188 outputFormat.push_back("wkm");
189 outputFormat.push_back("ascii");
190
191 // init info structure
192 info.useStandardOutput = false;
193 info.rebin = 1;
194 info.compressionTag = 0; // no compression as default
195 info.idf = 0; // undefined
196 info.inTemplate = TString("");
197 info.outTemplate = TString("");
198 info.outFileName = TString("");
199
200 // call any2many without arguments
201 if (argc == 1) {
203 return PMUSR_SUCCESS;
204 }
205
206 // call any2many --help or any2many --version
207 if (argc == 2) {
208 if (!strncmp(argv[1], "--help", 128))
210 else if (strstr(argv[1], "--v")) {
211#ifdef HAVE_CONFIG_H
212#ifdef HAVE_GIT_REV_H
213 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;
214#else
215 std::cout << std::endl << "any2many version: " << PACKAGE_VERSION << " (" << BUILD_TYPE << "), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
216#endif
217#else
218#ifdef HAVE_GIT_REV_H
219 std::cout << std::endl << "any2many git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
220#else
221 std::cout << std::endl << "any2many version: unkown." << std::endl << std::endl;
222#endif
223#endif
224 } else {
227 }
228 return PMUSR_SUCCESS;
229 }
230
231 info.outPath = TString("./");
232
233 // handle the other command options
234 Int_t ival;
235 for (int i=1; i<argc; i++) {
236
237 if (!strcmp(argv[i], "-y")) { // handle year option
238 if (i+1 < argc) {
239 // check that date if it is either of the form 'yy' or 'yyyy'
240 if ((strlen(argv[i+1]) != 2) && (strlen(argv[i+1]) != 4)) {
241 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;
242 show_syntax = true;
243 break;
244 }
245 ival=0;
246 status = sscanf(argv[i+1], "%d", &ival);
247 if (status == 1) {
248 info.year = argv[i+1];
249 i++;
250 } else {
251 std::cerr << std::endl << ">> any2many **ERROR** found in option '-y' the argument '" << argv[i+1] << "' which is not a number." << std::endl;
252 show_syntax = true;
253 break;
254 }
255 } else {
256 show_syntax = true;
257 break;
258 }
259 } else if (!strcmp(argv[i], "-s")) { // handle standard output option '-s'
260 info.useStandardOutput = true;
261 } else if (!strcmp(argv[i], "-f")) { // set input option tag
262 if (i+1 < argc) {
263 bool done = false;
264 int j = i+1;
265 do {
266 if (argv[j][0] == '-') { // assuming the next option is found
267 done = true;
268 } else {
269 info.inFileName.push_back(argv[j]);
270 j++; // shift input to the proper place
271 }
272 } while (!done && (j<argc));
273 i = j-1;
274 if (j >= argc) // make sure that counter is still in range
275 break;
276 } else {
277 std::cerr << std::endl << ">> any2many **ERROR** found input option '-f' without any arguments" << std::endl;
278 show_syntax = true;
279 break;
280 }
281 } else if (!strcmp(argv[i], "-o")) { // handle output file name option '-o'
282 if (i+1 < argc) {
283 outputFileName = argv[i+1];
284 i++;
285 } else {
286 std::cerr << std::endl << ">> any2many **ERROR** found output file name option '-o' without any arguments" << std::endl;
287 show_syntax = true;
288 break;
289 }
290 } else if (!strcmp(argv[i], "-r")) {
291 if (i+1 < argc) {
292 int pos{i+1};
293 std::string runStr{""};
294 // collect run list string from input
295 for (int j=i+1; j<argc; j++) {
296 pos = j;
297 if ((argv[j][0] == '-') && isalpha(argv[j][1])) { // next command
298 pos = j-1;
299 break;
300 } else {
301 runStr += argv[j];
302 runStr += " ";
303 }
304 }
305 // extract run list from string
306 PStringNumberList rl(runStr);
307 std::string errMsg{""};
308 if (!rl.Parse(errMsg)) {
309 std::cerr << "**ERROR** in run list: -rl " << runStr << std::endl;
310 std::cerr << errMsg << std::endl;
312 }
313 info.runList = rl.GetList();
314 // move the argument counter to the proper position
315 i = pos;
316 } else {
317 std::cerr << std::endl << ">> any2many **ERROR** found input option '-r' without any arguments" << std::endl;
318 show_syntax = true;
319 break;
320 }
321
322 // check if any valid input option was found
323 if (info.runList.size() == 0) {
324 std::cerr << std::endl << ">> any2many **ERROR** found input option '-r' without any valid arguments" << std::endl;
325 show_syntax = true;
326 break;
327 }
328 } else if (!strcmp(argv[i], "-c")) { // set convert option tag
329 bool found = false;
330 std::string sval;
331 if (i+2 < argc) {
332 sval = argv[i+1];
333 found = false;
334 for (unsigned int j=0; j<inputFormat.size(); j++) {
335 if (!inputFormat[j].CompareTo(sval, TString::kIgnoreCase)) {
336 info.inFormat = sval;
337 found = true;
338 break;
339 }
340 }
341 if (!found) {
342 std::cerr << std::endl << ">> any2many **ERROR** found unkown input data file format option '" << sval << "'" << std::endl;
343 show_syntax = true;
344 break;
345 }
346 sval = argv[i+2];
347 found = false;
348 for (unsigned int j=0; j<outputFormat.size(); j++) {
349 if (!outputFormat[j].CompareTo(sval, TString::kIgnoreCase)) {
350 info.outFormat = sval;
351 found = true;
352 break;
353 }
354 }
355 if (!found) {
356 std::cerr << std::endl << ">> any2many **ERROR** found unkown output data file format option '" << sval << "'" << std::endl;
357 show_syntax = true;
358 break;
359 }
360 i += 2; // shift argument position
361 } else {
362 std::cerr << std::endl << ">> any2many **ERROR** found option '-c' with missing arguments" << std::endl;
363 show_syntax = true;
364 break;
365 }
366 } else if (!strcmp(argv[i], "-h")) { // filter histo group list (for MusrRoot and ROOT (LEM) only!)
367 bool done = false;
368 int j = i+1;
369 do {
370 status = sscanf(argv[j], "%d", &ival);
371 if (status == 1) {
372 info.groupHistoList.push_back(ival);
373 j++;
374 } else {
375 done = true;
376 }
377 } while (!done && (j<argc));
378 i = j-1;
379 if (j >= argc) // make sure that counter is still in range
380 break;
381 } else if (!strcmp(argv[i], "-p")) { // filter output path name flag
382 if (i+1 < argc) {
383 info.outPath = argv[i+1];
384 if (!info.outPath.EndsWith("/"))
385 info.outPath += "/";
386 i++;
387 } else {
388 std::cerr << std::endl << ">> any2many **ERROR** found output option '-p' without any argument." << std::endl;
389 show_syntax = true;
390 break;
391 }
392 } else if (!strcmp(argv[i], "-rebin")) { // filter out rebinning option
393 if (i+1 < argc) {
394 status = sscanf(argv[i+1], "%d", &ival);
395 if (status == 1) {
396 info.rebin = ival;
397 i++;
398 } else {
399 std::cerr << std::endl << ">> any2many **ERROR** found in option '-rebin " << argv[i+1] << "' which doesn't make any sense." << std::endl;
400 show_syntax = true;
401 break;
402 }
403 } else {
404 std::cerr << std::endl << ">> any2many **ERROR** found output option '-rebin' without any argument." << std::endl;
405 show_syntax = true;
406 break;
407 }
408 } else if (!strcmp(argv[i], "-t")) { // filter out the input/output file template
409 if (i+2 < argc) {
410 if ((argv[i+1][0] == '-') || (argv[i+2][0] == '-')) {
411 std::cerr << std::endl << ">> any2many **ERROR** found invalid template in option '-t'" << std::endl;
412 show_syntax = true;
413 break;
414 }
415 info.inTemplate = argv[i+1];
416 info.outTemplate = argv[i+2];
417 i += 2; // shift argument position
418 } else {
419 std::cerr << std::endl << ">> any2many **ERROR** found option '-t' with missing arguments" << std::endl;
420 show_syntax = true;
421 break;
422 }
423 } else if (!strcmp(argv[i], "-z")) { // filter out if compression is whished
424 if (i+2 < argc) {
425 if ((argv[i+1][0] == '-') || (argv[i+2][0] == '-')) {
426 std::cerr << std::endl << ">> any2many **ERROR** found invalid template in option '-z'" << std::endl;
427 show_syntax = true;
428 break;
429 }
430 if (argv[i+1][0] == 'g') {
431 info.compressionTag = 1;
432 } else if (argv[i+1][0] == 'b') {
433 info.compressionTag = 2;
434 } else {
435 std::cerr << std::endl << ">> any2many **ERROR** found in option '-z' compression tag '" << argv[i+1] << "' which is not supported." << std::endl;
436 show_syntax = true;
437 break;
438 }
439 info.compressFileName = argv[i+2];
440 i += 2; // shift argument position
441 } else {
442 std::cerr << std::endl << ">> any2many **ERROR** found option '-z' with missing arguments" << std::endl;
443 show_syntax = true;
444 break;
445 }
446 } else { // unrecognized command
447 std::cerr << std::endl << ">> any2many **ERROR** found unrecognized option " << argv[i] << std::endl;
448 show_syntax = true;
449 break;
450 }
451 }
452
453 // make sure that either a filenameList or a runList has been provided
454 if ((info.inFileName.size()==0) && (info.runList.size()==0)) {
455 std::cerr << std::endl << ">> any2many **ERROR** neither a input filename list, nor a run list was given." << std::endl;
456 show_syntax = true;
457 }
458
459 // make sure that in/out formats are given
460 if ((info.inFormat.Length() == 0) || (info.outFormat.Length() == 0)) {
461 std::cerr << std::endl << ">> any2many **ERROR** conversion information is missing." << std::endl;
462 show_syntax = true;
463 }
464
465 // check if the output format is nexus
466 if (info.outFormat.Contains("nexus1", TString::kIgnoreCase))
467 info.idf = 1;
468 if (info.outFormat.Contains("nexus2", TString::kIgnoreCase))
469 info.idf = 2;
470
471 // in case the '-o' is present, make sure that inFileName is only a single file name
472 if (outputFileName.Length() > 0) {
473 if (info.inFileName.size() == 1) {
474 // make sure there is not in addition the template option given
475 if ((info.inTemplate.Length() == 0) && (info.outTemplate.Length() == 0)) {
476 info.outFileName = outputFileName;
477 } else {
478 std::cerr << std::endl << ">> any2many **ERROR** found option '-o' cannot be combined with option '-t'." << std::endl;
479 show_syntax = true;
480 }
481 } else {
482 std::cerr << std::endl << ">> any2many **ERROR** found option '-o' with multiple input file names, which doesn't make any sense." << std::endl;
483 show_syntax = true;
484 }
485 }
486
487 if (show_syntax) {
488 info.runList.clear();
491 }
492
493 if (!info.inFormat.CompareTo(info.outFormat, TString::kIgnoreCase) && (info.rebin == 1)) {
494 info.runList.clear();
495 std::cerr << std::endl << ">> any2many **ERROR** input data format == output data format, only allowed if rebin != 1.";
496 std::cerr << std::endl << " will ignore the request." << std::endl << std::endl;
497 return PMUSR_SUCCESS;
498 }
499
500 // read startup file
501 char startup_path_name[128];
502 memset(startup_path_name, '\0', sizeof(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 strncpy(startup_path_name, startupHandler->GetStartupFilePath().Data(), sizeof(startup_path_name));
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);
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:53
#define PMUSR_WRONG_STARTUP_SYNTAX
Incorrect startup command syntax provided.
Definition PMusr.h:57
std::vector< TString > PStringVector
Definition PMusr.h:403
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:158
void any2many_syntax()
Definition any2many.cpp:57
virtual PUIntVector GetList()
Definition PMusr.h:1422
virtual bool Parse(std::string &errorMsg, bool ignoreFirstToken=false)
Definition PMusr.cpp:2007
TString inTemplate
holds the input file template
Definition PMusr.h:1355
TString outPath
holds the output path
Definition PMusr.h:1363
UInt_t idf
IDF version for NeXus files.
Definition PMusr.h:1367
TString outFileName
holds the output file name
Definition PMusr.h:1361
PUIntVector runList
holds the run number list to be converted
Definition PMusr.h:1358
PStringVector inFileName
holds the file name of the input data file
Definition PMusr.h:1360
UInt_t compressionTag
0=no compression, 1=gzip compression, 2=bzip2 compression
Definition PMusr.h:1365
TString outTemplate
holds the output file template
Definition PMusr.h:1356
PIntVector groupHistoList
holds the histo group list offset (used to define for MusrRoot files, what to be exported)
Definition PMusr.h:1359
TString outFormat
holds the information about the output data file format
Definition PMusr.h:1354
TString inFormat
holds the information about the input data file format
Definition PMusr.h:1353
Bool_t useStandardOutput
flag showing if the converted shall be sent to the standard output
Definition PMusr.h:1352
UInt_t rebin
holds the number of bins to be packed
Definition PMusr.h:1364
TString year
holds the information about the year to be used
Definition PMusr.h:1357
TString compressFileName
holds the name of the outputfile name in case of compression is used
Definition PMusr.h:1366