Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/histo/profile_data 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_profile_data
0005 #define tools_histo_profile_data
0006 
0007 #include "histo_data"
0008 
0009 namespace tools {
0010 namespace histo {
0011 
0012 template <class TC,class TO,class TN,class TW,class TV>
0013 class profile_data : public histo_data<TC,TO,TN,TW> {
0014   typedef histo_data<TC,TO,TN,TW> parent;
0015 public:
0016   typedef std::vector<TV> vs_t;
0017 public:
0018   profile_data()
0019   :parent()
0020   ,m_is_profile(true)
0021   ,m_cut_v(false)
0022   ,m_min_v(0)
0023   ,m_max_v(0)
0024   {}
0025 
0026   profile_data(const histo_data<TC,TO,TN,TW>& a_from)
0027   :parent(a_from)
0028   ,m_is_profile(false)
0029   ,m_cut_v(false)
0030   ,m_min_v(0)
0031   ,m_max_v(0)
0032   {}
0033 
0034 public:
0035   profile_data(const profile_data& a_from)
0036   :parent(a_from)
0037   ,m_is_profile(a_from.m_is_profile)
0038   ,m_bin_Svw(a_from.m_bin_Svw)
0039   ,m_bin_Sv2w(a_from.m_bin_Sv2w)
0040   ,m_cut_v(a_from.m_cut_v)
0041   ,m_min_v(a_from.m_min_v)
0042   ,m_max_v(a_from.m_max_v)
0043   {}
0044 
0045   profile_data& operator=(const profile_data& a_from) {
0046     parent::operator=(a_from);
0047     m_is_profile = a_from.m_is_profile;
0048     m_bin_Svw = a_from.m_bin_Svw;
0049     m_bin_Sv2w = a_from.m_bin_Sv2w;
0050     m_cut_v = a_from.m_cut_v;
0051     m_min_v = a_from.m_min_v;
0052     m_max_v = a_from.m_max_v;
0053     return *this;
0054   }
0055 
0056   virtual ~profile_data(){}
0057 
0058 public:
0059   profile_data& operator=(const histo_data<TC,TO,TN,TW>& a_from) {
0060     //for Rio_THisogram.
0061     histo_data<TC,TO,TN,TW>::operator=(a_from);
0062     if(&a_from==this) return *this;
0063     m_is_profile = false;
0064     m_bin_Svw.clear();
0065     m_bin_Sv2w.clear();
0066     m_cut_v = false;
0067     m_min_v = 0;
0068     m_max_v = 0;
0069     return *this;
0070   }
0071 
0072 public:
0073   bool m_is_profile; //for Rio_THistogram.
0074   std::vector<TV> m_bin_Svw;
0075   std::vector<TV> m_bin_Sv2w;
0076   bool m_cut_v;
0077   TV m_min_v;
0078   TV m_max_v;
0079 };
0080 
0081 }}
0082 
0083 #endif