Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/histo/h1d is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_histo_h1d
0005 #define tools_histo_h1d
0006 
0007 #include "h1"
0008 
0009 namespace tools {
0010 namespace histo {
0011 
0012 // d in h1d is for double (and not dimension).
0013 
0014 class h1d : public h1<double,unsigned int,unsigned int,double,double> {
0015   typedef h1<double,unsigned int,unsigned int,double,double> parent;
0016 public:
0017   static const std::string& s_class() {
0018     static const std::string s_v("tools::histo::h1d");
0019     return s_v;
0020   }
0021   const std::string& s_cls() const {return s_class();}
0022 public:
0023   h1d():parent("",10,0,1){} //for I/O when reading.
0024 
0025   h1d(const std::string& a_title,unsigned int aXnumber,double aXmin,double aXmax)
0026   :parent(a_title,aXnumber,aXmin,aXmax){}
0027 
0028   h1d(const std::string& a_title,const std::vector<double>& a_edges)
0029   :parent(a_title,a_edges){}
0030 
0031   virtual ~h1d(){}
0032 public:
0033   h1d(const h1d& a_from):parent(a_from){}
0034   h1d& operator=(const h1d& a_from){
0035     if(&a_from==this) return *this;
0036     parent::operator=(a_from);
0037     return *this;
0038   }
0039 
0040 private:static void check_instantiation() {h1d h("",10,0,1);h.gather_bins(5);}
0041 };
0042 
0043 }}
0044 
0045 #endif
0046 
0047 
0048 
0049