|
Gaudi Framework, version v22r2 |
| Home | Generated: Tue May 10 2011 |
#include <Prescaler.h>


Public Member Functions | |
| Prescaler (const std::string &name, ISvcLocator *pSvcLocator) | |
| Constructor(s) | |
| ~Prescaler () | |
| Destructor. | |
| StatusCode | initialize () |
| standard initialization method | |
| StatusCode | execute () |
| standard execution method | |
| StatusCode | finalize () |
| standard finalization method | |
Private Attributes | |
| DoubleProperty | m_percentPass |
| Percentage of events that should be passed. | |
| int | m_pass |
| Number of events passed. | |
| int | m_seen |
| Number of events seen. | |
Definition at line 5 of file Prescaler.h.
| Prescaler::Prescaler | ( | const std::string & | name, |
| ISvcLocator * | pSvcLocator | ||
| ) |
Constructor(s)
Definition at line 6 of file Prescaler.cpp.
: GaudiAlgorithm(name, pSvcLocator) , m_pass( 0 ), m_seen( 0 ) { declareProperty( "PercentPass", m_percentPass=100.0 ); m_percentPass.verifier().setBounds( 0.0, 100.0 ); }
| Prescaler::~Prescaler | ( | ) |
| StatusCode Prescaler::execute | ( | ) | [virtual] |
standard execution method
Reimplemented from GaudiAlgorithm.
Definition at line 31 of file Prescaler.cpp.
{
++m_seen;
float fraction = (float(100.0) * (float)(m_pass+1)) / (float)m_seen;
if ( fraction > m_percentPass ) {
setFilterPassed( false );
info() << name() << ":Prescaler::execute - filter failed" << endmsg;
} else {
info() << name() << ":Prescaler::execute - filter passed" << endmsg;
++m_pass;
}
return StatusCode::SUCCESS;
}
| StatusCode Prescaler::finalize | ( | void | ) | [virtual] |
standard finalization method
Reimplemented from GaudiAlgorithm.
Definition at line 46 of file Prescaler.cpp.
| StatusCode Prescaler::initialize | ( | ) | [virtual] |
standard initialization method
Reimplemented from GaudiAlgorithm.
Definition at line 20 of file Prescaler.cpp.
{
const StatusCode sc = GaudiAlgorithm::initialize();
if ( !sc) return sc;
info() << name( ) << ":Prescaler::Initialize - pass: " << m_percentPass << endmsg;
return sc;
}
int Prescaler::m_pass [private] |
Number of events passed.
Definition at line 42 of file Prescaler.h.
DoubleProperty Prescaler::m_percentPass [private] |
Percentage of events that should be passed.
Definition at line 37 of file Prescaler.h.
int Prescaler::m_seen [private] |
Number of events seen.
Definition at line 47 of file Prescaler.h.