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