File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Copyright CERN and copyright holders of ALICE O2. This software is
2+ // distributed under the terms of the GNU General Public License v3 (GPL
3+ // Version 3), copied verbatim in the file "COPYING".
4+ //
5+ // See http://alice-o2.web.cern.ch/license for full licensing information.
6+ //
7+ // In applying this license CERN does not waive the privileges and immunities
8+ // granted to it by virtue of its status as an Intergovernmental Organization
9+ // or submit itself to any jurisdiction.
10+
11+ #if !defined(__CLING__ ) || defined(__ROOTCLING__ )
12+ #include <TTree.h>
13+ #include <DetectorsCommonDataFormats/NameConf.h>
14+ #include <DetectorsCommonDataFormats/DetID.h>
15+ #include <DetectorsCommonDataFormats/SimTraits.h>
16+ #endif
17+
118// A macro with the purpose to produce
219// simulation files in the new layout, where detector hits
320// are stored in individual files.
Original file line number Diff line number Diff line change 3030#include <unistd.h>
3131#include <sstream>
3232#endif
33+ #include "migrateSimFiles.C"
3334
3435FairRunSim * o2sim_init (bool asservice )
3536{
@@ -205,6 +206,14 @@ void o2sim_run(FairRunSim* run, bool asservice)
205206 LOG (INFO ) << "Macro finished succesfully." ;
206207 LOG (INFO ) << "Real time " << rtime << " s, CPU time " << ctime << "s" ;
207208 LOG (INFO ) << "Memory used " << sysinfo .GetMaxMemory () << " MB" ;
209+
210+ // migrate to file format where hits sit in separate files
211+ // (Note: The parallel version is doing this intrinsically;
212+ // The serial version uses FairRootManager IO which handles a common file IO for all outputs)
213+ if (!asservice ) {
214+ LOG (INFO ) << "Migrating simulation output to separate hit file format" ;
215+ migrateSimFiles (confref .getOutPrefix ().c_str ());
216+ }
208217}
209218
210219// asservice: in a parallel device-based context?
You can’t perform that action at this time.
0 commit comments