Project
Loading...
Searching...
No Matches
TestConfig.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
12#include <SimConfig/SimConfig.h>
13#include <iostream>
14#include <TFile.h>
15#include <TClass.h>
16
17int main(int argc, char* argv[])
18{
19 auto& conf = o2::conf::SimConfig::Instance();
20 conf.resetFromArguments(argc, argv);
21
22 std::cout << "Selected VMC engine " << conf.getMCEngine() << "\n";
23 std::cout << "Selected Modules:\n";
24
25 auto v = conf.getActiveModules();
26 for (auto& m : v) {
27 std::cout << "@ " << m << "\n";
28 }
29
30 std::cout << "Selected Generator " << conf.getGenerator() << "\n";
31
32 // serialize simconfig and read it back
33 TFile outfile("simconfigout_test.root", "RECREATE");
34 auto& configdata = conf.getConfigData();
35 auto cl = TClass::GetClass(typeid(configdata));
36 outfile.WriteObjectAny(&configdata, cl, "SimConfigData");
37 outfile.Close();
38
39 o2::conf::SimConfigData* inconfigdata = nullptr;
40 TFile file("simconfigout_test.root", "OPEN");
41 file.GetObject("SimConfigData", inconfigdata);
42 file.Close();
43
44 if (inconfigdata) {
45 conf.resetFromConfigData(*inconfigdata);
46 auto v2 = conf.getActiveModules();
47 for (auto& m : v2) {
48 std::cout << "@ " << m << "\n";
49 }
50 return 0;
51 } else {
52 return 1;
53 }
54 return 0;
55}
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual Show related Highlight grid Show only individual collision Color clusters belonging to track objects Set line Enable drawing TPC data Enable drawing TOF data Enable drawing magnetic field Set field line step count Invert colors configStandalone Heavy OpenGL display display_heavy Show tracks with ITS contribution Show tracks with TOF contribution Enable propagation of loopers Show clusters at nominal x of pad row for early transformed data Split CE tracks when they cross the central Mark clusters Mark adjacent clusters Hide rejected tracks Apply filter on tracks to be displayed Separate increase X h configStandalone Camera window renderer OpenGL display display_camera Orient the camera such that the y axis is always upwards Full Screen MultiSample Anti Downsampling Anti Enable Vertical Sync Target frame or if the backend cannot limit to the refresh Use OpenGL indirect draws to reduce number of draw calls Display h configStandalone Vulkan display display_vulkan Have uniform buffers in host accessible device memory h configStandalone Internal display display_internal Number of updates the Qt GUI may send ahead of the last one the display has before it waits for the display Opacity of the console background Number of console lines the history is shortened to this when it reaches twice the size Time in seconds an info message fades out after setInfoTime h OpenGL display display Font size Do not use Freetype for font Renderer for event Frontend to use for event ROOT macros used as track filter Console script file
static SimConfig & Instance()
Definition SimConfig.h:112
const GLfloat * m
Definition glcorearb.h:4066
const GLdouble * v
Definition glcorearb.h:832
GLfloat GLfloat GLfloat v2
Definition glcorearb.h:813
#define main