ATLAS Offline Software
Loading...
Searching...
No Matches
DerivationFramework::PrescaleTool Class Reference

#include <PrescaleTool.h>

Inheritance diagram for DerivationFramework::PrescaleTool:
Collaboration diagram for DerivationFramework::PrescaleTool:

Public Member Functions

 PrescaleTool (const std::string &t, const std::string &n, const IInterface *p)
StatusCode initialize ()
StatusCode finalize ()
virtual bool eventPassesFilter () const

Private Attributes

Gaudi::Property< unsigned int > m_prescale {this, "Prescale", 1}

Detailed Description

Definition at line 20 of file PrescaleTool.h.

Constructor & Destructor Documentation

◆ PrescaleTool()

DerivationFramework::PrescaleTool::PrescaleTool ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 18 of file PrescaleTool.cxx.

20 :
21 base_class(t,n,p)
22 {
23 }

Member Function Documentation

◆ eventPassesFilter()

bool DerivationFramework::PrescaleTool::eventPassesFilter ( ) const
virtual

Definition at line 39 of file PrescaleTool.cxx.

40 {
41 return (Gaudi::Hive::currentContext().eventID().event_number() % m_prescale == 0);
42 }
Gaudi::Property< unsigned int > m_prescale

◆ finalize()

StatusCode DerivationFramework::PrescaleTool::finalize ( )

Definition at line 34 of file PrescaleTool.cxx.

35 {
36 return StatusCode::SUCCESS;
37 }

◆ initialize()

StatusCode DerivationFramework::PrescaleTool::initialize ( )

Definition at line 25 of file PrescaleTool.cxx.

26 {
27 if (m_prescale < 1u) {
28 ATH_MSG_FATAL("Prescale of less than 1 makes no sense");
29 return StatusCode::FAILURE;
30 }
31 return StatusCode::SUCCESS;
32 }
#define ATH_MSG_FATAL(x)

Member Data Documentation

◆ m_prescale

Gaudi::Property<unsigned int> DerivationFramework::PrescaleTool::m_prescale {this, "Prescale", 1}
private

Definition at line 29 of file PrescaleTool.h.

29{this, "Prescale", 1};

The documentation for this class was generated from the following files: