BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSOutputROOTEventHeader.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSOUTPUTROOTEVENTHEADER_H
19#define BDSOUTPUTROOTEVENTHEADER_H
20
21#include "Rtypes.h"
22#include "TObject.h"
23
24#include <string>
25#include <vector>
26
33class BDSOutputROOTEventHeader: public TObject
34{
35public:
39 virtual void Flush(){FlushLocal();}
40
42 void FlushLocal();
43
44 std::string bdsimVersion;
45 std::string geant4Version;
46 std::string rootVersion;
47 std::string clhepVersion;
48 std::string timeStamp;
49 std::string fileType;
52 std::vector<std::string> analysedFiles;
53 std::vector<std::string> combinedFiles;
55 std::vector<std::string> trajectoryFilters;
57 unsigned long long int nOriginalEvents;
58 unsigned long long int nEventsRequested;
59 unsigned long long int nEventsInFile;
60 unsigned long long int nEventsInFileSkipped;
61 unsigned int distrFileLoopNTimes;
62
64 void SetFileType(const std::string& fileTypeIn) {fileType = fileTypeIn;}
65
70 void Fill(const std::vector<std::string>& analysedFilesIn = std::vector<std::string>(),
71 const std::vector<std::string>& combinedFilesIn = std::vector<std::string>());
72
73#ifndef __ROOTBUILD__
75 void FillGeant4Side();
76#endif
77
78 ClassDef(BDSOutputROOTEventHeader,5);
79};
80
81#endif
Information about the software and the file.
unsigned long long int nEventsRequested
Number of events requested to be simulated from the file.
unsigned int distrFileLoopNTimes
Number of times a distribution file was replayed.
int nTrajectoryFilters
Length of bitset used for trajectory filtering - compile time info.
int dataVersion
Our data format version.
bool skimmedFile
Whether this is a skimmed output file.
std::vector< std::string > analysedFiles
List of which files were analysed in case of a rebdsim output file.
void SetFileType(const std::string &fileTypeIn)
Update the file type.
unsigned long long int nEventsInFileSkipped
Number of events from distribution file that were skipped due to filters.
bool doublePrecisionOutput
Whether using double precision output - assumed float if not.
void FlushLocal()
We have a non-virtual version as it's bad to call this from a constructor.
unsigned long long int nOriginalEvents
Number of original events if skimmed.
std::vector< std::string > combinedFiles
List of which files were combined in case of a rebdsimCombine output file.
std::vector< std::string > trajectoryFilters
Names of filters.
void Fill(const std::vector< std::string > &analysedFilesIn=std::vector< std::string >(), const std::vector< std::string > &combinedFilesIn=std::vector< std::string >())
unsigned long long int nEventsInFile
Number of events in the input distribution file irrespective of filters.
void FillGeant4Side()
Fill with information from Geant4 side of things.