Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/histo/base_cloud 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_base_cloud
0005 #define tools_histo_base_cloud
0006 
0007 #include <string>
0008 #include <vector>
0009 
0010 #ifdef TOOLS_MEM
0011 #include "../mem"
0012 #endif
0013 
0014 namespace tools {
0015 namespace histo {
0016 
0017 class base_cloud {
0018   static const std::string& s_class() {
0019     static const std::string s_v("tools::histo::base_cloud");
0020     return s_v;
0021   }
0022 protected:
0023   base_cloud(int aLimit)
0024   :m_limit(aLimit)
0025   ,m_Sw(0)
0026   {
0027 #ifdef TOOLS_MEM
0028     mem::increment(s_class().c_str());
0029 #endif
0030   }
0031   virtual ~base_cloud(){
0032 #ifdef TOOLS_MEM
0033     mem::decrement(s_class().c_str());
0034 #endif
0035   }
0036 public:
0037   base_cloud(const base_cloud& a_from)
0038   :m_title(a_from.m_title)
0039   ,m_limit(a_from.m_limit)
0040   ,m_Sw(a_from.m_Sw)
0041   ,m_ws(a_from.m_ws)
0042   {
0043 #ifdef TOOLS_MEM
0044     mem::increment(s_class().c_str());
0045 #endif
0046   }
0047 
0048   base_cloud& operator=(const base_cloud& a_from){
0049     m_title = a_from.m_title;
0050     m_limit = a_from.m_limit;
0051     m_Sw = a_from.m_Sw;
0052     m_ws = a_from.m_ws;
0053     return *this;
0054   }
0055 public:
0056   const std::string& title() const {return m_title;}
0057   int max_entries() const {return m_limit;}
0058 protected:
0059   static int UNLIMITED() {return -1;}
0060   static unsigned int BINS() {return 100;}
0061 protected:
0062   std::string m_title;
0063   int m_limit;
0064   double m_Sw;
0065   std::vector<double> m_ws;
0066 };
0067 
0068 }}
0069 
0070 #endif