Belle II Software
release-06-00-14
b2display.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
#include <framework/utilities/FileSystem.h>
9
10
#include <iostream>
11
#include <cstdlib>
12
17
int
main
(
int
argc,
char
* argv[])
18
{
19
// if you modify the text below, please update the CLI documentation in
20
// display/doc/index.rst
21
if
(argc != 2 or std::string(argv[1]) ==
"--help"
) {
22
std::cerr <<
"Usage: "
<< argv[0] <<
" input_file.root\n\n"
23
" Show data in given input file using the event display.\n\n"
24
25
" You can also open multiple files using wildcards, though you have to\n"
26
" pass the string with wildcards to b2display to prevent expansion by the shell, e.g.\n"
27
" b2display \"my/files/mdst_*.root\".\n\n"
28
29
" Using .sroot files, http:// or root:// URLs is also possible.\n\n"
30
31
" Configuration of the display can be changed from the defaults by\n"
32
" editing display/examples/display.py.\n"
33
" See output of 'basf2 -m Display' for available options.\n"
;
34
return
1;
35
}
36
std::string fullPath =
Belle2::FileSystem::findFile
(
"/display/examples/display.py"
);
37
std::string s =
"basf2 "
+ fullPath +
" -i \""
+ std::string(argv[1]) +
"\""
;
38
return
system(s.c_str());
39
}
Belle2::FileSystem::findFile
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
Definition:
FileSystem.cc:145
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:75
display
tools
b2display.cc
Generated on Thu Jul 14 2022 07:57:25 for Belle II Software by
1.9.1