diff --git a/Pr/PrMCTools/src/PrCounter2.cpp b/Pr/PrMCTools/src/PrCounter2.cpp index 2626d0bab3fc10a29037f32fbf5091587048ecf5..1be53d67feb9cdcbf72aa715a387a9eeb245de89 100644 --- a/Pr/PrMCTools/src/PrCounter2.cpp +++ b/Pr/PrMCTools/src/PrCounter2.cpp @@ -471,9 +471,9 @@ void PrCounter2::printStatistics ( ) { info() << "**** " << m_title << format( "%7d tracks including %7d ghosts [%5.2f %%], Event average %5.2f %% ****", m_totTrack, m_totGhost, frac, 100. * m_fracGhost / m_nEvent ) << endmsg; - if(m_triggerNumbers) info() << "**** " << strigger - << format( "%7d tracks including %7d ghosts [%4.2f %%] ****", - m_totTrackTrigger, m_totGhostTrigger, 100.*m_totGhostTrigger/m_totTrackTrigger ) << endmsg; + if(m_triggerNumbers && m_totTrackTrigger > 0 ) info() << "**** " << strigger + << format( "%7d tracks including %7d ghosts [%4.2f %%] ****", + m_totTrackTrigger, m_totGhostTrigger, 100.*m_totGhostTrigger/m_totTrackTrigger ) << endmsg; std::FILE * table = nullptr; if(m_writetex){ @@ -486,9 +486,10 @@ void PrCounter2::printStatistics ( ) { std::fprintf(table, "\t\t\\begin{tabular}{rr@{ }lr@{ $[$}r@{ $\\%%]$}r@{ }l@{ $[$}r@{ $\\%%]$}l@{ }r@{ $\\%%$, hitEff: }r}\n"); std::fprintf(table, "\t\t\t\\multicolumn{1}{@{}l}{\\textbf{%s}} & %7d & \\multicolumn{3}{@{}l}{tracks including} & %7d & ghosts & %4.2f & \\multicolumn{3}{@{}l}{, Event average %5.2f \\%%}\\\\ \n", short_title.c_str(),m_totTrack, m_totGhost, frac, 100. * m_fracGhost / m_nEvent ); - if(m_triggerNumbers) + if(m_triggerNumbers && m_totTrackTrigger > 0){ std::fprintf(table, "\t\t\t\\multicolumn{1}{@{}l}{ %s } & %7d & \\multicolumn{3}{@{}l}{tracks including} & %7d & ghosts & %4.2f & \\multicolumn{3}{l}{ }\\\\ \n", - short_trigger.c_str(),m_totTrackTrigger, m_totGhostTrigger, 100.*m_totGhostTrigger/m_totTrackTrigger); + short_trigger.c_str(),m_totTrackTrigger, m_totGhostTrigger, 100.*m_totGhostTrigger/m_totTrackTrigger); + } } for ( unsigned int kk = 0; m_name.size() > kk; ++kk ) {