BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
HistogramDef.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 HISTOGRAMDEF_H
20#define HISTOGRAMDEF_H
21
22#include <iostream>
23#include <string>
24
25#include "Rtypes.h" // for classdef
26
34{
35public:
38
40 HistogramDef(const std::string& treeNameIn,
41 const std::string& histNameIn,
42 int nDimensionsIn,
43 const std::string& variable,
44 const std::string& selectionIn = "1",
45 bool perEnetry = true);
46 virtual ~HistogramDef(){;};
47
49 virtual HistogramDef* Clone() const = 0;
50
52 friend std::ostream& operator<< (std::ostream &out, const HistogramDef& s);
53
55 virtual std::string GetBinningString() const = 0;
56
58 virtual std::string GetHistogramString() const = 0;
59
60 std::string treeName;
61 std::string histName;
62 int nDimensions;
63 std::string variable;
64 std::string selection;
65 bool perEntry;
66
67 ClassDef(HistogramDef, 1);
68};
69
70#endif
Common specification for a histogram.
Definition: HistogramDef.hh:34
HistogramDef()
Public constructor only for compatibility with ROOT - not intended for use.
virtual std::string GetHistogramString() const =0
Get the first string that defines the histogram in rebdsim for feedback.
friend std::ostream & operator<<(std::ostream &out, const HistogramDef &s)
Print out the definition in the original syntax.
Definition: HistogramDef.cc:49
virtual HistogramDef * Clone() const =0
Copy this instance. Virtual to be overridden in derived classes.
virtual std::string GetBinningString() const =0
Provide the binning string in the original input format for feedback.