ATLAS Offline Software
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 
16 namespace DerivationFramework {
17 
18  PrescaleTool::PrescaleTool(const std::string& t,
19  const std::string& n,
20  const IInterface* p) :
21  AthAlgTool(t,n,p)
22  {
23  declareInterface<DerivationFramework::ISkimmingTool>(this);
24  }
25 
27  {
28  if (m_prescale < 1u) {
29  ATH_MSG_FATAL("Prescale of less than 1 makes no sense");
30  return StatusCode::FAILURE;
31  }
32  return StatusCode::SUCCESS;
33  }
34 
36  {
37  return StatusCode::SUCCESS;
38  }
39 
41  {
42  return (Gaudi::Hive::currentContext().eventID().event_number() % m_prescale == 0);
43  }
44 
45 }
DerivationFramework::PrescaleTool::m_prescale
Gaudi::Property< unsigned int > m_prescale
Definition: PrescaleTool.h:29
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DerivationFramework::PrescaleTool::initialize
StatusCode initialize()
Definition: PrescaleTool.cxx:26
DerivationFramework::PrescaleTool::eventPassesFilter
virtual bool eventPassesFilter() const
Check that the current event passes this filter.
Definition: PrescaleTool.cxx:40
DerivationFramework::PrescaleTool::PrescaleTool
PrescaleTool(const std::string &t, const std::string &n, const IInterface *p)
Definition: PrescaleTool.cxx:18
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
PrescaleTool.h
EventInfo.h
DerivationFramework::PrescaleTool::finalize
StatusCode finalize()
Definition: PrescaleTool.cxx:35
AthAlgTool
Definition: AthAlgTool.h:26