inlib
1.2.0
|
00001 // Copyright (C) 2010, Guy Barrand. All rights reserved. 00002 // See the file inlib.license for terms. 00003 00004 #ifndef inlib_histo_profile_data 00005 #define inlib_histo_profile_data 00006 00007 #include "histo_data" 00008 00009 namespace inlib { 00010 namespace histo { 00011 00012 template <class TC,class TN,class TW,class TV> 00013 class profile_data : public histo_data<TC,TN,TW> { 00014 public: 00015 profile_data() 00016 : histo_data<TC,TN,TW>() 00017 ,m_is_profile(true) 00018 ,m_cut_v(false) 00019 ,m_min_v(0) 00020 ,m_max_v(0) 00021 {} 00022 00023 profile_data(const histo_data<TC,TN,TW>& a_from) 00024 : histo_data<TC,TN,TW>(a_from) 00025 ,m_is_profile(false) 00026 ,m_cut_v(false) 00027 ,m_min_v(0) 00028 ,m_max_v(0) 00029 {} 00030 00031 public: 00032 profile_data(const profile_data& a_from) 00033 : histo_data<TC,TN,TW>(a_from) 00034 ,m_is_profile(a_from.m_is_profile) 00035 ,m_bin_Svw(a_from.m_bin_Svw) 00036 ,m_bin_Sv2w(a_from.m_bin_Sv2w) 00037 ,m_cut_v(a_from.m_cut_v) 00038 ,m_min_v(a_from.m_min_v) 00039 ,m_max_v(a_from.m_max_v) 00040 {} 00041 00042 profile_data& operator=(const profile_data& a_from) { 00043 histo_data<TC,TN,TW>::operator=(a_from); 00044 m_is_profile = a_from.m_is_profile; 00045 m_bin_Svw = a_from.m_bin_Svw; 00046 m_bin_Sv2w = a_from.m_bin_Sv2w; 00047 m_cut_v = a_from.m_cut_v; 00048 m_min_v = a_from.m_min_v; 00049 m_max_v = a_from.m_max_v; 00050 return *this; 00051 } 00052 00053 virtual ~profile_data(){} 00054 00055 public: 00056 profile_data& operator=(const histo_data<TC,TN,TW>& a_from) { 00057 //for Rio_THisogram. 00058 histo_data<TC,TN,TW>::operator=(a_from); 00059 m_is_profile = false; 00060 m_bin_Svw.clear(); 00061 m_bin_Sv2w.clear(); 00062 m_cut_v = false; 00063 m_min_v = 0; 00064 m_max_v = 0; 00065 return *this; 00066 } 00067 00068 public: 00069 bool m_is_profile; //for Rio_THistogram. 00070 std::vector<TV> m_bin_Svw; 00071 std::vector<TV> m_bin_Sv2w; 00072 bool m_cut_v; 00073 TV m_min_v; 00074 TV m_max_v; 00075 }; 00076 00077 }} 00078 00079 #endif