Project
Loading...
Searching...
No Matches
Options.h
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
15
16#ifndef ALICE_O2_EVENTVISUALISATION_VIEW_OPTIONS_H
17#define ALICE_O2_EVENTVISUALISATION_VIEW_OPTIONS_H
18
19#include <string>
20
21namespace o2
22{
23namespace event_visualisation
24{
25
27{
28 private:
29 // stored options
30 bool mJSON; // -j
31 bool mOnline; // -o (must specify -d!)
32 bool mRandomTracks; // -r
33 std::string mOptionsFileName; // -p /home/ed/.o2eve_config_v2
34 std::string mFileName; // -f 'data.root'
35 std::string mDataFolder; // -d './'
36 std::string mSavedDataFolder; // -s './'
37 std::string mImageFolder; // -i './'
38 long mMemoryLimit; // -m 1500 (MB) = 1.5GB
39 bool mHideDplGUI; // -hg
40 std::string mAODConverterPath; // -a 'o2-eve-aodconverter'
41
42 // helper methods
43 static Options instance;
44 bool saveToJSON(std::string filename); // stores options to current folder
45 bool readFromJSON(std::string filename); // read options from option file
46
47 public:
48 static Options* Instance() { return &instance; }
49 std::string printOptions();
50 bool processCommandLine(int argc, char* argv[]);
51
52 // get access methods
53 bool json() { return this->mJSON; }
54 bool online() { return this->mOnline; }
55 std::string dataFolder() { return this->mDataFolder; }
56 std::string imageFolder() { return this->mImageFolder; }
57 std::string savedDataFolder() { return this->mSavedDataFolder; }
58 std::string optionsFileName() { return this->mOptionsFileName; }
59 std::string fileName() { return this->mFileName; }
60 bool randomTracks() { return this->mRandomTracks; }
61 long memoryLimit() { return this->mMemoryLimit; }
62 bool hideDplGUI() { return this->mHideDplGUI; }
63 std::string AODConverterPath() { return this->mAODConverterPath; }
64};
65
66} // namespace event_visualisation
67} // namespace o2
68
69#endif // ALICE_O2_EVENTVISUALISATION_VIEW_OPTIONS_H
static Options * Instance()
Definition Options.h:48
bool processCommandLine(int argc, char *argv[])
Definition Options.cxx:51
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string filename()