R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
testNeulandTrain.C
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2019-2025 Members of R3B Collaboration *
4 * *
5 * This software is distributed under the terms of the *
6 * GNU General Public Licence (GPL) version 3, *
7 * copied verbatim in the file "LICENSE". *
8 * *
9 * In applying this license GSI does not waive the privileges and immunities *
10 * granted to it by virtue of its status as an Intergovernmental Organization *
11 * or submit itself to any jurisdiction. *
12 ******************************************************************************/
13
14// Note: Just to check if tasks are working. Will not produce reasonably trained models with few events.
16{
17 TStopwatch timer;
18 timer.Start();
19
20 FairLogger::GetLogger()->SetLogScreenLevel("debug");
21
22 FairRunAna run;
23 run.SetSource(new FairFileSource("test.digi.root"));
24 run.SetSink(new FairRootFileSink("test.train.root"));
25
26 auto rtdb = run.GetRuntimeDb();
27 auto io = new FairParRootFileIo(true);
28 io->open("test.neul.root");
29 rtdb->setOutput(io);
30
31 run.AddTask(new R3BNeulandMultiplicityBayesTrain());
33
34 run.Init();
35 run.Run(0, 0);
36 rtdb->writeContainers();
37 rtdb->writeVersions();
38 rtdb->saveOutput();
39 rtdb->print();
40 rtdb->closeOutput();
41
42 timer.Stop();
43 cout << "Macro finished successfully." << endl;
44 cout << "Real time: " << timer.RealTime() << "s, CPU time: " << timer.CpuTime() << "s" << endl;
45}
void testNeulandTrain()