Files
geant4/source/analysis/g4tools/include/tools/histo/h1d
T
2017-12-08 12:52:30 +01:00

50 lines
1.1 KiB
Plaintext

// Copyright (C) 2010, Guy Barrand. All rights reserved.
// See the file tools.license for terms.
#ifndef tools_histo_h1d
#define tools_histo_h1d
#include "h1"
namespace tools {
namespace histo {
// d in h1d is for double (and not dimension).
class h1d : public h1<double,unsigned int,unsigned int,double,double> {
typedef h1<double,unsigned int,unsigned int,double,double> parent;
public:
static const std::string& s_class() {
static const std::string s_v("tools::histo::h1d");
return s_v;
}
const std::string& s_cls() const {return s_class();}
public:
h1d():parent("",10,0,1){} //for I/O when reading.
h1d(const std::string& a_title,unsigned int aXnumber,double aXmin,double aXmax)
:parent(a_title,aXnumber,aXmin,aXmax){}
h1d(const std::string& a_title,const std::vector<double>& a_edges)
:parent(a_title,a_edges){}
virtual ~h1d(){}
public:
h1d(const h1d& a_from):parent(a_from){}
h1d& operator=(const h1d& a_from){
if(&a_from==this) return *this;
parent::operator=(a_from);
return *this;
}
private:static void check_instantiation() {h1d h("",10,0,1);h.gather_bins(5);}
};
}}
#endif