The Gaudi Framework  master (37c0b60a)
Gaudi::TestSuite::Prescaler Struct Referencefinal
Inheritance diagram for Gaudi::TestSuite::Prescaler:
Collaboration diagram for Gaudi::TestSuite::Prescaler:

Public Member Functions

 Prescaler (const std::string &name, ISvcLocator *pSvc)
 
bool operator() () const override
 

Public Attributes

Gaudi::CheckedProperty< double > m_percentPass
 
Gaudi::Accumulators::BinomialCounter m_passed { this, "passed" }
 

Detailed Description

Definition at line 15 of file Prescaler.cpp.

Constructor & Destructor Documentation

◆ Prescaler()

Gaudi::TestSuite::Prescaler::Prescaler ( const std::string name,
ISvcLocator pSvc 
)
inline

Definition at line 16 of file Prescaler.cpp.

16  : FilterPredicate( name, pSvc ) {
17  m_percentPass.verifier().setBounds( 0, 100 );
18  }

Member Function Documentation

◆ operator()()

bool Gaudi::TestSuite::Prescaler::operator() ( ) const
inlineoverride

Definition at line 20 of file Prescaler.cpp.

20  {
21  // if the current pass efficiency is less then requested, we let the event go through
22  const bool pass = m_passed.eff() * 100. <= m_percentPass;
23  m_passed += pass;
24  if ( msgLevel( MSG::DEBUG ) ) { debug() << ( pass ? "filter passed" : "filter failed" ) << endmsg; }
25  return pass;
26  }

Member Data Documentation

◆ m_passed

Gaudi::Accumulators::BinomialCounter Gaudi::TestSuite::Prescaler::m_passed { this, "passed" }
mutable

Definition at line 31 of file Prescaler.cpp.

◆ m_percentPass

Gaudi::CheckedProperty<double> Gaudi::TestSuite::Prescaler::m_percentPass
Initial value:
{ this, "PercentPass", 100.0,
"percentage of events that should be passed" }

Definition at line 28 of file Prescaler.cpp.


The documentation for this struct was generated from the following file:
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
Gaudi::Functional::FilterPredicate
details::FilterPredicate< Signature, Traits_, details::isLegacy< Traits_ > > FilterPredicate
Definition: FilterPredicate.h:68
Gaudi::Accumulators::BinomialAccumulator::eff
auto eff() const
Definition: Accumulators.h:716
Gaudi::TestSuite::Prescaler::m_passed
Gaudi::Accumulators::BinomialCounter m_passed
Definition: Prescaler.cpp:31
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
Gaudi::TestSuite::Prescaler::m_percentPass
Gaudi::CheckedProperty< double > m_percentPass
Definition: Prescaler.cpp:28