24 const std::string&
name,
const std::string&
type,
const std::string&
title,
25 const std::string& xTitle,
26 unsigned int nBinsX,
float xLow,
float xHigh,
27 bool doLogLinBinsX,
const std::vector<float>& xBinsVec,
28 const std::string& yTitle,
29 unsigned int nBinsY,
float yLow,
float yHigh,
30 bool doLogLinBinsY,
const std::vector<float>& yBinsVec,
31 const std::string& zTitle,
32 unsigned int nBinsZ,
float zLow,
float zHigh,
33 bool doLogLinBinsZ,
const std::vector<float>& zBinsVec,
34 const std::string&
folder ) :
36 m_xTitle( xTitle ), m_yTitle( yTitle ), m_zTitle( zTitle ),
37 m_nBinsX( nBinsX ), m_nBinsY( nBinsY ), m_nBinsZ( nBinsZ ),
38 m_doLogLinBinsX( doLogLinBinsX ), m_doLogLinBinsY( doLogLinBinsY ), m_doLogLinBinsZ( doLogLinBinsZ ),
39 m_folder(
folder ), m_is1D( false ), m_is2D( false ), m_is3D( false )
46 std::make_pair( std::numeric_limits<float>::quiet_NaN(),
47 std::numeric_limits<float>::quiet_NaN() );
50 std::make_pair( std::numeric_limits<float>::quiet_NaN(),
51 std::numeric_limits<float>::quiet_NaN() );
54 std::make_pair( std::numeric_limits<float>::quiet_NaN(),
55 std::numeric_limits<float>::quiet_NaN() );
75 if( m_name.empty() or
m_type.empty() )
return false;
79 (
m_type.find(
"TH1" ) != std::string::npos ) or
80 (
m_type.find(
"TH2" ) != std::string::npos ) or
81 (
m_type.find(
"TH3" ) != std::string::npos ) or
82 (
m_type.find(
"TProfile" ) != std::string::npos ) or
83 (
m_type.find(
"TEfficiency" ) != std::string::npos );
86 const bool sensibleXBins = ( m_nBinsX != 0 ) and ( not std::isnan( m_nBinsX ) );
87 const bool sensibleYBins = ( m_nBinsY != 0 ) and ( not std::isnan( m_nBinsY ) );
88 const bool sensibleZBins = ( m_nBinsZ != 0 ) and ( not std::isnan( m_nBinsZ ) );
93 const bool sensibleXLimits = ( not std::isnan( m_xAxis.first ) ) and
94 ( not std::isnan( m_xAxis.second ) ) and
95 ( m_xAxis.first != m_xAxis.second );
97 const bool sensibleYLimits = ( not std::isnan( m_yAxis.first ) ) and
98 ( not std::isnan( m_yAxis.second ) ) and
99 ( m_yAxis.first != m_yAxis.second );
101 const bool sensibleZLimits = ( not std::isnan( m_zAxis.first ) ) and
102 ( not std::isnan( m_zAxis.second ) ) and
103 ( m_zAxis.first != m_zAxis.second );
106 sane = sane and ( not( m_xTitle.empty() or m_yTitle.empty() ) );
109 sane = sane and sensibleXBins and sensibleXLimits;
113 sane = sane and sensibleYBins and sensibleYLimits;
117 sane = sane and sensibleZBins and sensibleZLimits and ( not m_zTitle.empty() );
132 if( m_folder.empty() ){
133 m_identifier = m_name;
136 if( m_folder[0] ==
'/' ) {
137 m_folder.erase( m_folder.begin() );
140 if( m_folder.back() !=
'/' ) m_folder +=
"/";
141 m_identifier = m_folder + m_name;
152 std::stringstream
ss;
153 ss << m_name <<
" - " <<
m_type <<
" - " << m_title
154 <<
" - " << m_xTitle <<
" : (" << m_nBinsX <<
", " << m_xAxis.first <<
", " << m_xAxis.second <<
" )"
155 <<
" - " << m_yTitle <<
" : (" << m_nBinsY <<
", " << m_yAxis.first <<
", " << m_yAxis.second <<
" )"
156 <<
" - " << m_zTitle <<
" : (" << m_nBinsZ <<
", " << m_zAxis.first <<
", " << m_zAxis.second <<
" )";
158 m_plotDigest =
ss.str();
169 std::stringstream
ss;
170 ss << m_title <<
";" << m_xTitle <<
";" << m_yTitle <<
";" << m_zTitle;
172 m_titleDigest =
ss.str();
182 m_is1D = (
m_type.find(
"TH1") != std::string::npos ) or
183 (
m_type ==
"TProfile" ) or (
m_type ==
"TEfficiency" );
185 m_is2D = (
m_type.find(
"TH2") != std::string::npos ) or
186 (
m_type.find(
"2D") != std::string::npos );
188 m_is3D = (
m_type.find(
"TH3") != std::string::npos ) or
189 (
m_type.find(
"3D") != std::string::npos );