Project
Loading...
Searching...
No Matches
o2sim_mergeg4scoring.cxx
Go to the documentation of this file.
1// Copyright 2019-2026 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// Sum the per-worker Geant4 scoring dumps of an o2-sim run into one file per mesh
13
15#include <cstdlib>
16#include <iostream>
17
18int main(int argc, char* argv[])
19{
20 const std::string directory = argc > 1 ? argv[1] : ".";
21 const int expectedWorkers = argc > 2 ? std::atoi(argv[2]) : 0;
22 const int merged = o2::conf::mergeG4ScoringDumps(directory, expectedWorkers);
23 if (merged < 0) {
24 return 1;
25 }
26 std::cout << "merged " << merged << " scoring mesh(es) in " << directory << "\n";
27 return 0;
28}
int mergeG4ScoringDumps(const std::string &directory, int expectedWorkers=0)
#define main