BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSOutputROOTEventHeader.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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
61 void SetFileType(std::string fileTypeIn) {fileType = fileTypeIn;}
62
67 void Fill(const std::vector<std::string>& analysedFilesIn = std::vector<std::string>(),
68 const std::vector<std::string>& combinedFilesIn = std::vector<std::string>());
69
70#ifndef __ROOTBUILD__
72 void FillGeant4Side();
73#endif
74
75 ClassDef(BDSOutputROOTEventHeader,4);
76};
77
78#endif
Information about the software and the file.
void SetFileType(std::string fileTypeIn)
Update the file type.
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.
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 >())
void FillGeant4Side()
Fill with information from Geant4 side of things.