Project
Loading...
Searching...
No Matches
ConfigurationManager.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
17
18#ifndef ALICE_O2_EVENTVISUALISATION_BASE_CONFIGURATIONMANAGER_H
19#define ALICE_O2_EVENTVISUALISATION_BASE_CONFIGURATIONMANAGER_H
20
21#include <TEnv.h>
22
23namespace o2
24{
25namespace event_visualisation
26{
28const static int o2_eve_version = 172;
29
35
37{
38 private:
39 std::string mOptionsFileName;
40 TEnv mSettings;
41 int mSettingsLoadCounter;
42 const ConfigurationManager* loadSettings();
43
44 public:
47
48 const TEnv& getSettings()
49 {
50 return loadSettings()->mSettings;
51 }
52
54 static void setOptionsFileName(const std::string& fileName)
55 {
56 getInstance().mOptionsFileName = fileName;
57 }
58
60 void getConfig(TEnv& settings) const;
61
62 static UInt_t getRefreshRateInSeconds();
63
64 static std::string getScreenshotPath(const char* prefix);
65 static UInt_t getScreenshotWidth(const char* prefix);
66 static UInt_t getScreenshotHeight(const char* prefix);
67
68 static UInt_t getScreenshotPixelObjectScale3d(const char* prefix);
69 static UInt_t getScreenshotPixelObjectScaleRphi(const char* prefix);
70 static UInt_t getScreenshotPixelObjectScaleZY(const char* prefix);
71
72 static std::string getDataDefault();
73 static std::string getDataSyntheticRunDir();
74 static std::string getDataCosmicRunDir();
75 static std::string getDataPhysicsRunDir();
76 static std::string getSimpleGeomR3Path();
77 static UInt_t getOutreachFilesMax();
78
80 static bool getScreenshotMonthly();
81 static UInt_t getBackgroundColor();
82 static bool getAxesShow();
83 static bool getFullScreenMode();
84 static double getCamera3DRotationHorizontal();
85 static double getCamera3DRotationVertical();
86 static double getCamera3DZoom();
87 static double getCameraRPhiZoom();
88 static double getCameraZYZoom();
89 static const char* getScreenshotLogoO2();
90 static const char* getScreenshotLogoAlice();
91
95 void operator=(ConfigurationManager const&) = delete;
96
97 private:
99 ConfigurationManager() = default;
101 ~ConfigurationManager() = default;
102};
103
104}
105}
106#endif // ALICE_O2_EVENTVISUALISATION_BASE_CONFIGURATIONMANAGER_H
ConfigurationManager(ConfigurationManager const &)=delete
Deleted copy constructor.
static void setOptionsFileName(const std::string &fileName)
sets precise location of option file name (if not empty only this is used)
static std::string getScreenshotPath(const char *prefix)
static UInt_t getScreenshotHeight(const char *prefix)
static ConfigurationManager & getInstance()
Returns an instance of ConfigurationManager.
void operator=(ConfigurationManager const &)=delete
Deleted assignment operator.
void getConfig(TEnv &settings) const
Returns current event display configuration.
static UInt_t getScreenshotPixelObjectScale3d(const char *prefix)
static UInt_t getScreenshotPixelObjectScaleZY(const char *prefix)
static UInt_t getScreenshotWidth(const char *prefix)
static UInt_t getScreenshotPixelObjectScaleRphi(const char *prefix)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...