ATLAS Offline Software
Loading...
Searching...
No Matches
PrescaleTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6// PrescaleTool.cxx, (c) ATLAS Detector software
8// Author: Thomas Gillam (thomas.gillam@cern.ch)
9// Based on the Integrated Simulation Framework
10//
11// Use of ExpressionParsing to analyse a more complex string
12
15
16namespace DerivationFramework {
17
18 PrescaleTool::PrescaleTool(const std::string& t,
19 const std::string& n,
20 const IInterface* p) :
21 base_class(t,n,p)
22 {
23 }
24
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 }
33
35 {
36 return StatusCode::SUCCESS;
37 }
38
40 {
41 return (Gaudi::Hive::currentContext().eventID().event_number() % m_prescale == 0);
42 }
43
44}
#define ATH_MSG_FATAL(x)
virtual bool eventPassesFilter() const
PrescaleTool(const std::string &t, const std::string &n, const IInterface *p)
Gaudi::Property< unsigned int > m_prescale
THE reconstruction tool.