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) 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 RBDSDATA_H
19#define RBDSDATA_H
20
21#include "Rtypes.h" // for classdef
22
23#include <map>
24#include <string>
25
26class TDirectory;
27class TFile;
28class TTree;
29
36namespace RBDS
37{
39 TFile* CreateEmptyRebdsimFile(const std::string& fileName,
40 unsigned long long int nOriginalEventsIn = 1);
41
43 TFile* CreateEmptyBdskimFile(const std::string& originalFileName,
44 const std::string& newOutputFileName);
45
46 TFile* CreateEmptyBdskimFile(TFile* originalFile,
47 const std::string& newOutputFileName);
48
52 std::map<std::string, TDirectory*> CreateDirectories(TFile* outputFile,
53 std::string treeName);
54}
55
63{
64public:
66 virtual ~DataDummyClass();
67
68 TFile* CreateEmptyRebdsimFile(const std::string& fileName,
69 unsigned long long int nOriginalEventsIn = 1);
70
71 TFile* CreateEmptyBdskimFile(const std::string& originalFileName,
72 const std::string& newOutputFileName);
73
74 std::map<std::string, TDirectory*> CreateDirectories(TFile* outputFile,
75 std::string treeName);
76 ClassDef(DataDummyClass,1);
77};
78
79#endif
A dummy class as ROOT won't seem to import namespaced functions in CLING for python.
Definition Data.hh:63
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:60
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:87
std::map< std::string, TDirectory * > CreateDirectories(TFile *outputFile, std::string treeName)
Definition Data.cc:142