inlib
1.2.0
|
00001 // Copyright (C) 2010, Guy Barrand. All rights reserved. 00002 // See the file inlib.license for terms. 00003 00004 #ifndef inlib_histo_h1d 00005 #define inlib_histo_h1d 00006 00007 #include "h1" 00008 00009 namespace inlib { 00010 namespace histo { 00011 00012 // d in h1d is for double (and not dimension). 00013 00014 class h1d : public h1<double,unsigned int,double,double> { 00015 typedef h1<double,unsigned int,double,double> parent; 00016 public: 00017 static const std::string& s_class() { 00018 static const std::string s_v("inlib::histo::h1d"); 00019 return s_v; 00020 } 00021 public: 00022 h1d(const std::string& a_title, 00023 bn_t aXnumber,double aXmin,double aXmax) 00024 : parent(a_title,aXnumber,aXmin,aXmax){} 00025 00026 h1d(const std::string& a_title, 00027 const std::vector<double>& aEdges) 00028 : parent(a_title,aEdges){} 00029 00030 virtual ~h1d(){} 00031 public: 00032 h1d(const h1d& a_from): parent(a_from){} 00033 h1d& operator=(const h1d& a_from){ 00034 parent::operator=(a_from); 00035 return *this; 00036 } 00037 public: 00038 #if defined(__CINT__) 00039 bool fill(double aX,double aW = 1) { 00040 h1<double,unsigned int,double,double>::fill(aX,aW); 00041 } 00042 void hprint(std::ostream& a_out) { 00043 h1<double,unsigned int,double,double>::hprint(a_out); 00044 } 00045 #endif 00046 }; 00047 00048 inline void h1d_check_instantiation() { 00049 h1d dummy("",10,0,1); 00050 dummy.gather_bins(5); 00051 } 00052 00053 }} 00054 00055 #endif 00056 00057 00058 00059