Project
Loading...
Searching...
No Matches
o2sim_evalmat.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 "../macro/o2sim.C"
13
#include <
SimConfig/SimConfig.h
>
14
#include <
SimConfig/MatMapParams.h
>
15
#include <TStopwatch.h>
16
#include <fairlogger/Logger.h>
17
18
int
main
(
int
argc,
char
* argv[])
19
{
20
TStopwatch timer;
21
timer.Start();
22
23
auto
& conf =
o2::conf::SimConfig::Instance
();
24
#ifdef SIM_RUN5
25
conf.setRun5();
26
#endif
27
auto
& matmapP =
o2::conf::MatMapParams::Instance
();
28
if
(!conf.resetFromArguments(argc, argv)) {
29
return
1;
30
}
31
// custom number of events
32
// customize the level of output
33
FairLogger::GetLogger()->SetLogScreenLevel(conf.getLogSeverity().c_str());
34
FairLogger::GetLogger()->SetLogVerbosityLevel(conf.getLogVerbosity().c_str());
35
36
// call o2sim "macro"
37
o2sim(
false
,
true
);
38
39
o2::utils::ShmManager::Instance
().
release
();
40
41
// print total time
42
LOG
(info) <<
"Simulation process took "
<< timer.RealTime() <<
" s"
;
43
44
// We do this instead of return 0
45
// for the reason that we see lots of problems
46
// with TROOTs atexit mechanism often triggering double-free or delete symptoms.
47
// While this is not optimal ... I think it is for the moment
48
// better to have a stable simulation runtime in contrast to
49
// having to debug complicated "atexit" memory problems.
50
_exit(0);
51
}
MatMapParams.h
SimConfig.h
o2::conf::ConfigurableParamHelper< MatMapParams >::Instance
static const MatMapParams & Instance()
Definition
ConfigurableParamHelper.h:81
o2::conf::SimConfig::Instance
static SimConfig & Instance()
Definition
SimConfig.h:111
o2::utils::ShmManager::Instance
static ShmManager & Instance()
Definition
ShmManager.h:61
o2::utils::ShmManager::release
void release()
Definition
ShmManager.cxx:237
main
#define main
Definition
test_OverrideLabels.cxx:13
LOG
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
run
o2sim_evalmat.cxx
Generated on Tue Feb 25 2025 23:16:46 for Project by
1.9.8