Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights reserved. 2 // See the file tools.license for terms. 3 4 #ifndef tools_histo_p1d 5 #define tools_histo_p1d 6 7 #include "p1" 8 9 namespace tools { 10 namespace histo { 11 12 class p1d : public p1<double,unsigned int,unsigned int,double,double,double> { 13 typedef p1<double,unsigned int,unsigned int,double,double,double> parent; 14 public: 15 static const std::string& s_class() { 16 static const std::string s_v("tools::histo::p1d"); 17 return s_v; 18 } 19 const std::string& s_cls() const {return s_class();} 20 public: 21 p1d():parent("",10,0,1){} //for I/O when reading. 22 23 p1d(const std::string& a_title,unsigned int aXnumber,double aXmin,double aXmax) 24 :parent(a_title,aXnumber,aXmin,aXmax) 25 {} 26 27 p1d(const std::string& a_title,unsigned int aXnumber,double aXmin,double aXmax,double aVmin,double aVmax) 28 :parent(a_title,aXnumber,aXmin,aXmax,aVmin,aVmax) 29 {} 30 31 p1d(const std::string& a_title,const std::vector<double>& a_edges) 32 :parent(a_title,a_edges) 33 {} 34 35 p1d(const std::string& a_title,const std::vector<double>& a_edges,double aVmin,double aVmax) 36 :parent(a_title,a_edges,aVmin,aVmax) 37 {} 38 39 virtual ~p1d(){} 40 public: 41 p1d(const p1d& a_from): parent(a_from){} 42 p1d& operator=(const p1d& a_from){ 43 parent::operator=(a_from); 44 return *this; 45 } 46 47 private:static void check_instantiation() {p1d p("",10,0,1);p.gather_bins(5);} 48 }; 49 50 }} 51 52 #endif 53 54 55 56