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) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSOUTPUTROOTEVENTHEADER_H
20#define BDSOUTPUTROOTEVENTHEADER_H
21
22#include "Rtypes.h"
23#include "TObject.h"
24
25#include <string>
26#include <vector>
27
34class BDSOutputROOTEventHeader: public TObject
35{
36public:
40 virtual void Flush(){FlushLocal();}
41
43 void FlushLocal();
44
45 std::string bdsimVersion;
46 std::string geant4Version;
47 std::string rootVersion;
48 std::string clhepVersion;
49 std::string timeStamp;
50 std::string fileType;
53 std::vector<std::string> analysedFiles;
54 std::vector<std::string> combinedFiles;
56 std::vector<std::string> trajectoryFilters;
58 unsigned long long int nOriginalEvents;
59 unsigned long long int nEventsRequested;
60 unsigned long long int nEventsInFile;
61 unsigned long long int nEventsInFileSkipped;
62 unsigned int distrFileLoopNTimes;
63
65 void SetFileType(const std::string& fileTypeIn) {fileType = fileTypeIn;}
66
71 void Fill(const std::vector<std::string>& analysedFilesIn = std::vector<std::string>(),
72 const std::vector<std::string>& combinedFilesIn = std::vector<std::string>());
73
74#ifndef __ROOTBUILD__
76 void FillGeant4Side();
77#endif
78
79 ClassDef(BDSOutputROOTEventHeader,5);
80};
81
82#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.