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 const std::string& yTitle,
28 unsigned int nBinsY,
float yLow,
float yHigh,
29 const std::string& zTitle,
30 unsigned int nBinsZ,
float zLow,
float zHigh,
31 const std::string&
folder ) :
33 m_xTitle( xTitle ), m_yTitle( yTitle ), m_zTitle( zTitle ),
34 m_nBinsX( nBinsX ), m_nBinsY( nBinsY ), m_nBinsZ( nBinsZ ),
35 m_folder(
folder ), m_is1D( false ), m_is2D( false ), m_is3D( false )
42 std::make_pair( std::numeric_limits<float>::quiet_NaN(),
43 std::numeric_limits<float>::quiet_NaN() );
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() );
68 if( m_name.empty() or
m_type.empty() )
return false;
72 (
m_type.find(
"TH1" ) != std::string::npos ) or
73 (
m_type.find(
"TH2" ) != std::string::npos ) or
74 (
m_type.find(
"TH3" ) != std::string::npos ) or
75 (
m_type.find(
"TProfile" ) != std::string::npos ) or
76 (
m_type.find(
"TEfficiency" ) != std::string::npos );
79 const bool sensibleXBins = ( m_nBinsX != 0 ) and ( not std::isnan( m_nBinsX ) );
80 const bool sensibleYBins = ( m_nBinsY != 0 ) and ( not std::isnan( m_nBinsY ) );
81 const bool sensibleZBins = ( m_nBinsZ != 0 ) and ( not std::isnan( m_nBinsZ ) );
86 const bool sensibleXLimits = ( not std::isnan( m_xAxis.first ) ) and
87 ( not std::isnan( m_xAxis.second ) ) and
88 ( m_xAxis.first != m_xAxis.second );
90 const bool sensibleYLimits = ( not std::isnan( m_yAxis.first ) ) and
91 ( not std::isnan( m_yAxis.second ) ) and
92 ( m_yAxis.first != m_yAxis.second );
94 const bool sensibleZLimits = ( not std::isnan( m_zAxis.first ) ) and
95 ( not std::isnan( m_zAxis.second ) ) and
96 ( m_zAxis.first != m_zAxis.second );
99 sane = sane and ( not( m_xTitle.empty() or m_yTitle.empty() ) );
102 sane = sane and sensibleXBins and sensibleXLimits;
106 sane = sane and sensibleYBins and sensibleYLimits;
110 sane = sane and sensibleZBins and sensibleZLimits and ( not m_zTitle.empty() );
125 if( m_folder.empty() ){
126 m_identifier = m_name;
129 if( m_folder[0] ==
'/' ) {
130 m_folder.erase( m_folder.begin() );
133 if( m_folder.back() !=
'/' ) m_folder +=
"/";
134 m_identifier = m_folder + m_name;
145 std::stringstream
ss;
146 ss << m_name <<
" - " <<
m_type <<
" - " << m_title
147 <<
" - " << m_xTitle <<
" : (" << m_nBinsX <<
", " << m_xAxis.first <<
", " << m_xAxis.second <<
" )"
148 <<
" - " << m_yTitle <<
" : (" << m_nBinsY <<
", " << m_yAxis.first <<
", " << m_yAxis.second <<
" )"
149 <<
" - " << m_zTitle <<
" : (" << m_nBinsZ <<
", " << m_zAxis.first <<
", " << m_zAxis.second <<
" )";
151 m_plotDigest =
ss.str();
162 std::stringstream
ss;
163 ss << m_title <<
";" << m_xTitle <<
";" << m_yTitle <<
";" << m_zTitle;
165 m_titleDigest =
ss.str();
175 m_is1D = (
m_type.find(
"TH1") != std::string::npos ) or
176 (
m_type ==
"TProfile" ) or (
m_type ==
"TEfficiency" );
178 m_is2D = (
m_type.find(
"TH2") != std::string::npos ) or
179 (
m_type.find(
"2D") != std::string::npos );
181 m_is3D = (
m_type.find(
"TH3") != std::string::npos ) or
182 (
m_type.find(
"3D") != std::string::npos );