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 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /externals/g4tools/include/tools/sg/h2plot_cp (Version 11.3.0) and /externals/g4tools/include/tools/sg/h2plot_cp (Version 10.6.p2)


  1 // Copyright (C) 2010, Guy Barrand. All rights    
  2 // See the file tools.license for terms.          
  3                                                   
  4 #ifndef tools_sg_h2plot_cp                        
  5 #define tools_sg_h2plot_cp                        
  6                                                   
  7 // Inheritance :                                  
  8 #include "h2plot"                                 
  9                                                   
 10 namespace tools {                                 
 11 namespace sg {                                    
 12                                                   
 13 class h1d2plot_cp : public h1d2plot {             
 14 public:                                           
 15   TOOLS_SCLASS(tools::sg::h1d2plot_cp)            
 16 public:                                           
 17   virtual void* cast(const std::string& a_clas    
 18     if(void* p = cmp_cast<h1d2plot_cp>(this,a_    
 19     return h1d2plot::cast(a_class);               
 20   }                                               
 21 public:                                           
 22   virtual plottable* copy() const {return new     
 23 public:                                           
 24   h1d2plot_cp(const histo::h1d& a_data)           
 25   :h1d2plot(m_cp) //give ref of m_cp to h1d2pl    
 26   ,m_cp(a_data)   //do a local copy.              
 27   //WARNING : the upper is ok as long as h1d2p    
 28   //          else than keeping the ref to m_c    
 29   //          something on an empty histo (and    
 30   //          passed a_data).                     
 31   {                                               
 32 #ifdef TOOLS_MEM                                  
 33     mem::increment(s_class().c_str());            
 34 #endif                                            
 35   }                                               
 36   virtual ~h1d2plot_cp(){                         
 37 #ifdef TOOLS_MEM                                  
 38     mem::decrement(s_class().c_str());            
 39 #endif                                            
 40   }                                               
 41 public:                                           
 42   h1d2plot_cp(const h1d2plot_cp& a_from)          
 43   :plottable(a_from)                              
 44   ,bins1D(a_from)                                 
 45   ,h1d2plot(m_cp)                                 
 46   ,m_cp(a_from.m_cp)                              
 47   {                                               
 48 #ifdef TOOLS_MEM                                  
 49     mem::increment(s_class().c_str());            
 50 #endif                                            
 51   }                                               
 52   h1d2plot_cp& operator=(const h1d2plot_cp& a_    
 53     h1d2plot::operator=(a_from);                  
 54     m_cp = a_from.m_cp;                           
 55     return *this;                                 
 56   }                                               
 57 public:                                           
 58   const histo::h1d& data() const {return m_cp;    
 59   histo::h1d& data() {return m_cp;}               
 60 protected:                                        
 61   histo::h1d m_cp;                                
 62 };                                                
 63                                                   
 64 class h2d2plot_cp : public h2d2plot {             
 65 public:                                           
 66   TOOLS_SCLASS(tools::sg::h2d2plot_cp)            
 67 public:                                           
 68   virtual void* cast(const std::string& a_clas    
 69     if(void* p = cmp_cast<h2d2plot_cp>(this,a_    
 70     return h2d2plot::cast(a_class);               
 71   }                                               
 72 public:                                           
 73   virtual plottable* copy() const {return new     
 74 public:                                           
 75   h2d2plot_cp(const histo::h2d& a_data)           
 76   :h2d2plot(m_cp)                                 
 77   ,m_cp(a_data)                                   
 78   {                                               
 79 #ifdef TOOLS_MEM                                  
 80     mem::increment(s_class().c_str());            
 81 #endif                                            
 82   }                                               
 83   virtual ~h2d2plot_cp(){                         
 84 #ifdef TOOLS_MEM                                  
 85     mem::decrement(s_class().c_str());            
 86 #endif                                            
 87   }                                               
 88 public:                                           
 89   h2d2plot_cp(const h2d2plot_cp& a_from)          
 90   :plottable(a_from),bins2D(a_from),h2d2plot(m    
 91   ,m_cp(a_from.m_cp)                              
 92   {                                               
 93 #ifdef TOOLS_MEM                                  
 94     mem::increment(s_class().c_str());            
 95 #endif                                            
 96   }                                               
 97   h2d2plot_cp& operator=(const h2d2plot_cp& a_    
 98     h2d2plot::operator=(a_from);                  
 99     m_cp = a_from.m_cp;                           
100     return *this;                                 
101   }                                               
102 protected:                                        
103   histo::h2d m_cp;                                
104 };                                                
105                                                   
106 class p1d2plot_cp : public p1d2plot {             
107 public:                                           
108   TOOLS_SCLASS(tools::sg::p1d2plot_cp)            
109 public:                                           
110   virtual void* cast(const std::string& a_clas    
111     if(void* p = cmp_cast<p1d2plot_cp>(this,a_    
112     return p1d2plot::cast(a_class);               
113   }                                               
114 public:                                           
115   virtual plottable* copy() const {return new     
116 public:                                           
117   p1d2plot_cp(const histo::p1d& a_data)           
118   :p1d2plot(m_cp)                                 
119   ,m_cp(a_data)                                   
120   {                                               
121 #ifdef TOOLS_MEM                                  
122     mem::increment(s_class().c_str());            
123 #endif                                            
124   }                                               
125   virtual ~p1d2plot_cp(){                         
126 #ifdef TOOLS_MEM                                  
127     mem::decrement(s_class().c_str());            
128 #endif                                            
129   }                                               
130 public:                                           
131   p1d2plot_cp(const p1d2plot_cp& a_from)          
132   :plottable(a_from),bins1D(a_from),p1d2plot(m    
133   ,m_cp(a_from.m_cp)                              
134   {                                               
135 #ifdef TOOLS_MEM                                  
136     mem::increment(s_class().c_str());            
137 #endif                                            
138   }                                               
139   p1d2plot_cp& operator=(const p1d2plot_cp& a_    
140     p1d2plot::operator=(a_from);                  
141     m_cp = a_from.m_cp;                           
142     return *this;                                 
143   }                                               
144 protected:                                        
145   histo::p1d m_cp;                                
146 };                                                
147                                                   
148 }}                                                
149                                                   
150 #endif