50 lines
1.1 KiB
Plaintext
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
|
|
|
|
|
|
|
|
|