BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Data.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2024.
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 RBDSDATA_H
20#define RBDSDATA_H
21
22#include "Rtypes.h" // for classdef
23
24#include <map>
25#include <string>
26
27class TDirectory;
28class TFile;
29class TTree;
30
37namespace RBDS
38{
40 TFile* CreateEmptyRebdsimFile(const std::string& fileName,
41 unsigned long long int nOriginalEventsIn = 1);
42
44 TFile* CreateEmptyBdskimFile(const std::string& originalFileName,
45 const std::string& newOutputFileName);
46
47 TFile* CreateEmptyBdskimFile(TFile* originalFile,
48 const std::string& newOutputFileName);
49
53 std::map<std::string, TDirectory*> CreateDirectories(TFile* outputFile,
54 std::string treeName);
55}
56
64{
65public:
67 virtual ~DataDummyClass();
68
69 TFile* CreateEmptyRebdsimFile(const std::string& fileName,
70 unsigned long long int nOriginalEventsIn = 1);
71
72 TFile* CreateEmptyBdskimFile(const std::string& originalFileName,
73 const std::string& newOutputFileName);
74
75 std::map<std::string, TDirectory*> CreateDirectories(TFile* outputFile,
76 std::string treeName);
77 ClassDef(DataDummyClass,1);
78};
79
80#endif
A dummy class as ROOT won't seem to import namespaced functions in CLING for python.
Definition Data.hh:64
Utility functions for data files.
TFile * CreateEmptyRebdsimFile(const std::string &fileName, unsigned long long int nOriginalEventsIn=1)
Create a new TFile and add a header to it. The header object is filled and written.
Definition Data.cc:61
TFile * CreateEmptyBdskimFile(const std::string &originalFileName, const std::string &newOutputFileName)
Create a new TFile and add a header to it. The header object if filled and written.
Definition Data.cc:88
std::map< std::string, TDirectory * > CreateDirectories(TFile *outputFile, std::string treeName)
Definition Data.cc:143