Project
Loading...
Searching...
No Matches
runMonitor.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
17#include <boost/program_options.hpp>
18#include <iostream>
19
20#include "TRint.h"
21
23
24namespace po = boost::program_options;
25
26int main(int argc, char* argv[])
27{
28 // Arguments parsing
29 std::string file;
30 std::string pedestalFile;
31 int lastTimeBin{512};
32 int firstTimeBin{0};
33 int verbosity{0};
34 int debugLevel{0};
35 int sector{0};
36 bool overview{true};
37
38 po::variables_map vm;
39 po::options_description desc("Allowed options");
40 desc.add_options() //
41 ("fileInfo,i", po::value<std::string>(&file)->required(), "input file(s)") //
42 ("pedestalFile,p", po::value<std::string>(&pedestalFile), "pedestal file") //
43 ("firstTimeBin,f", po::value<int>(&firstTimeBin)->default_value(0), "first time bin to process") //
44 ("lastTimeBin,l", po::value<int>(&lastTimeBin)->default_value(512), "last time bin to process") //
45 ("verbosity,v", po::value<int>(&verbosity)->default_value(0), "verbosity level") //
46 ("debugLevel,d", po::value<int>(&debugLevel)->default_value(0), "debug level") //
47 ("sector,s", po::value<int>(&sector)->default_value(0), "sector to be shown on startup") //
48 ("overview,o", po::value<bool>(&overview)->default_value(true), "show sides overview") //
49 ("help,h", "Produce help message.") //
50 ; //
51
52 po::store(parse_command_line(argc, argv, desc), vm);
53
54 // help
55 if (vm.count("help")) {
56 std::cout << desc << '\n';
57 return EXIT_SUCCESS;
58 }
59
60 po::notify(vm);
61
62 std::cout << "####" << '\n';
63 std::cout << "#### Starting TPC simple online monitor" << '\n';
64 std::cout << "#### filename: " << file << '\n';
65 std::cout << "####" << '\n';
66 std::cout << '\n'
67 << '\n';
68
69 TRint rootApp("TPC Event Monitor", nullptr, nullptr);
70
72 g.runSimpleEventDisplay(file + ":" + std::to_string(lastTimeBin), pedestalFile, firstTimeBin, lastTimeBin, lastTimeBin, verbosity, debugLevel, sector, overview);
73
74 rootApp.Run(true);
75
76 return EXIT_SUCCESS;
77}
#define verbosity
GUI for raw data event display.
void runSimpleEventDisplay(std::string_view fileInfo, std::string_view pedestalFile="", int firstTimeBin=0, int lastTimeBin=500, int nTimeBinsPerCall=500, uint32_t verbosity=0, uint32_t debugLevel=0, int selectedSector=0, bool showSides=1)
GLboolean GLboolean g
Definition glcorearb.h:1233
std::string to_string(gsl::span< T, Size > span)
Definition common.h:52
#define main