#include <AlgCaddy.h>
Public Member Functions | |
| AlgCaddy () | |
| AlgCaddy (Handle< T > alg_, const std::string &name_) | |
| ~AlgCaddy () | |
| void | AllEvent (double weight) |
| void | OutEvent (double weight) |
| void | AllSnarl (const Record &record) |
| void | OutSnarl (const Record &record) |
| unsigned int | Width (unsigned int number) const |
| void | Print (unsigned int nw, unsigned int cw, const std::string &opt, std::ostream &o=std::cout) const |
Public Attributes | |
| Handle< T > | alg |
| std::string | name |
| unsigned int | NSnarlAll |
| unsigned int | NSnarlOut |
| unsigned int | NEventAll |
| unsigned int | NEventOut |
| double | WEventAll |
| double | WEventOut |
|
|||||||||
|
Definition at line 93 of file AlgCaddy.h. 00094 : alg(0), name(), 00095 NSnarlAll(0), NSnarlOut(0), NEventAll(0), NEventOut(0), WEventAll(0.0), WEventOut(0.0) 00096 { 00097 }
|
|
||||||||||||||||
|
Definition at line 100 of file AlgCaddy.h. 00101 : alg(alg_), name(name_), 00102 NSnarlAll(0), NSnarlOut(0), NEventAll(0), NEventOut(0), WEventAll(0.0), WEventOut(0.0) 00103 { 00104 }
|
|
|||||||||
|
Definition at line 107 of file AlgCaddy.h. 00108 {
00109 }
|
|
||||||||||
|
Definition at line 112 of file AlgCaddy.h. References Anp::AlgCaddy< T >::WEventAll. 00113 {
00114 ++NEventAll;
00115 WEventAll += weight;
00116 }
|
|
||||||||||
|
Definition at line 126 of file AlgCaddy.h. References Anp::Record::EventBeg(), Anp::Record::EventEnd(), Anp::EventIter, and Anp::AlgCaddy< T >::WEventAll. Referenced by Anp::RunAlgStore::Run(), Anp::RunAlgSnarl::Run(), and Anp::RunAlgEvent::Run(). 00127 {
00128 ++NSnarlAll;
00129 for(EventIter ievent = record.EventBeg(); ievent != record.EventEnd(); ++ievent)
00130 {
00131 ++NEventAll;
00132 WEventAll += ievent -> Weight();
00133 }
00134 }
|
|
||||||||||
|
Definition at line 119 of file AlgCaddy.h. References Anp::AlgCaddy< T >::WEventOut. 00120 {
00121 ++NEventOut;
00122 WEventOut += weight;
00123 }
|
|
||||||||||
|
Definition at line 137 of file AlgCaddy.h. References Anp::Record::EventBeg(), Anp::Record::EventEnd(), Anp::EventIter, and Anp::AlgCaddy< T >::WEventOut. Referenced by Anp::RunAlgStore::Run(), Anp::RunAlgSnarl::Run(), and Anp::RunAlgEvent::Run(). 00138 {
00139 ++NSnarlOut;
00140 for(EventIter ievent = record.EventBeg(); ievent != record.EventEnd(); ++ievent)
00141 {
00142 ++NEventOut;
00143 WEventOut += ievent -> Weight();
00144 }
00145 }
|
|
||||||||||||||||||||||||
|
Definition at line 159 of file AlgCaddy.h. References Anp::AlgCaddy< T >::name, Anp::AlgCaddy< T >::NEventAll, Anp::AlgCaddy< T >::NEventOut, Anp::AlgCaddy< T >::NSnarlAll, Anp::AlgCaddy< T >::NSnarlOut, Anp::AlgCaddy< T >::WEventAll, Anp::AlgCaddy< T >::WEventOut, and Anp::AlgCaddy< T >::Width(). Referenced by Anp::RunAlgSnarl::End(), Anp::RunAlgEvent::End(), Anp::SelectCount::Print(), and Anp::RunAlgStore::~RunAlgStore(). 00160 {
00161 if(nw < name.size())
00162 {
00163 nw = name.size();
00164 }
00165 if(cw < 1)
00166 {
00167 cw = std::max<unsigned int>(cw, Width(NSnarlAll));
00168 cw = std::max<unsigned int>(cw, Width(NSnarlOut));
00169 cw = std::max<unsigned int>(cw, Width(NEventAll));
00170 cw = std::max<unsigned int>(cw, Width(NEventOut));
00171 }
00172
00173 if(opt.find("snarl") != std::string::npos)
00174 {
00175 if(nw > 0)
00176 {
00177 o << std::setfill(' ') << std::setw(nw) << std::left << name << " ";
00178 }
00179
00180 o << " snarl pass/total = ";
00181 o << std::setfill(' ') << std::setw(cw) << std::right << NSnarlOut << "/";
00182 o << std::setfill(' ') << std::setw(cw) << std::right << NSnarlAll;
00183
00184 if(NSnarlAll > 0)
00185 {
00186 o << " = " << std::setfill(' ')
00187 << std::setprecision(5) << std::showpoint << double(NSnarlOut)/double(NSnarlAll);
00188 }
00189 o << std::noshowpoint << std::endl;
00190 }
00191
00192 if(opt.find("event") != std::string::npos)
00193 {
00194 if(nw > 0)
00195 {
00196 o << std::setfill(' ') << std::setw(nw) << std::left << name << " ";
00197 }
00198
00199 o << " event pass/total = ";
00200 o << std::setfill(' ') << std::setw(cw) << std::right << NEventOut << "/";
00201 o << std::setfill(' ') << std::setw(cw) << std::right << NEventAll;
00202
00203 if(NEventAll > 0)
00204 {
00205 o << " = " << std::setfill(' ')
00206 << std::setprecision(5) << std::showpoint << double(NEventOut)/double(NEventAll);
00207 }
00208 o << std::noshowpoint << std::endl;
00209 }
00210
00211 if(opt.find("weight") != std::string::npos)
00212 {
00213 if(nw > 0)
00214 {
00215 o << std::setfill(' ') << std::setw(nw) << std::left << name << " ";
00216 }
00217
00218 o << "weight pass/total = "
00219 << std::setfill(' ') << std::setw(cw) << std::right << static_cast<long int>(WEventOut) << "/"
00220 << std::setfill(' ') << std::setw(cw) << std::right << static_cast<long int>(WEventAll);
00221
00222 if(WEventAll > 0.0)
00223 {
00224 o << " = " << std::setfill(' ')
00225 << std::setprecision(5) << std::showpoint << WEventOut/WEventAll;
00226 }
00227 o << std::noshowpoint << std::endl;
00228 }
00229 }
|
|
||||||||||
|
Definition at line 148 of file AlgCaddy.h. Referenced by Anp::AlgCaddy< T >::Print(). 00149 {
00150 if(number > 0)
00151 {
00152 return static_cast<unsigned int>(1 + std::log10(double(number)));
00153 }
00154
00155 return 1;
00156 }
|
|
|||||
|
Definition at line 45 of file AlgCaddy.h. Referenced by Anp::SelectCount::End(), and Anp::SelectCount::GetCount(). |
|
|||||
|
Definition at line 47 of file AlgCaddy.h. Referenced by Anp::SelectCount::GetCount(), and Anp::AlgCaddy< T >::Print(). |
|
|||||
|
Definition at line 52 of file AlgCaddy.h. Referenced by Anp::AlgCaddy< T >::Print(). |
|
|||||
|
Definition at line 53 of file AlgCaddy.h. Referenced by Anp::AlgCaddy< T >::Print(). |
|
|||||
|
Definition at line 49 of file AlgCaddy.h. Referenced by Anp::AlgCaddy< T >::Print(). |
|
|||||
|
Definition at line 50 of file AlgCaddy.h. Referenced by Anp::AlgCaddy< T >::Print(). |
|
|||||
|
Definition at line 55 of file AlgCaddy.h. Referenced by Anp::AlgCaddy< T >::AllEvent(), Anp::AlgCaddy< T >::AllSnarl(), and Anp::AlgCaddy< T >::Print(). |
|
|||||
|
Definition at line 56 of file AlgCaddy.h. Referenced by Anp::AlgCaddy< T >::OutEvent(), Anp::AlgCaddy< T >::OutSnarl(), and Anp::AlgCaddy< T >::Print(). |
1.3.9.1