BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Model.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 MODEL_H
20#define MODEL_H
21
22#include "Rtypes.h" // for classdef
23
24#include "RebdsimTypes.hh"
25
27class TTree;
28
35class Model
36{
37public:
38 Model();
39 Model(bool debugIn,
40 int dataVersionIn = 0);
41 virtual ~Model();
42
44 std::vector<std::string> SamplerNames() const;
45 std::vector<std::string> SamplerCNames() const;
46 std::vector<std::string> SamplerSNames() const;
47
49 std::vector<std::string> CollimatorNames() const;
50
52 int DataVersion() const {return dataVersion;}
53
56 inline void SetDataVersion(int dataVersionIn) {dataVersion = dataVersionIn;}
57
59 void SetBranchAddress(TTree* t,
60 bool allBranchesOn = true,
61 const RBDS::VectorString* branchesToTurnOn = nullptr);
62
66
67private:
68 bool debug;
69 int dataVersion;
70
71 ClassDef(Model, 2);
72};
73
74#endif
Information stored per model representing accelerator.
Model loader.
Definition: Model.hh:36
BDSOutputROOTEventModel * model
Member that ROOT can map file data to locally.
Definition: Model.hh:64
std::vector< std::string > CollimatorNames() const
Access all the sampler branch names from the model.
Definition: Model.cc:91
void SetBranchAddress(TTree *t, bool allBranchesOn=true, const RBDS::VectorString *branchesToTurnOn=nullptr)
Set the branch addresses to address the contents of the file.
Definition: Model.cc:50
void SetDataVersion(int dataVersionIn)
Definition: Model.hh:56
std::vector< std::string > SamplerNames() const
Access all the unique sampler names from the model.
Definition: Model.cc:73
int DataVersion() const
Accessor.
Definition: Model.hh:52