ATLAS Offline Software
PhysicsAnalysis
DerivationFramework
DerivationFrameworkTools
src
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
13
#include "
DerivationFrameworkTools/PrescaleTool.h
"
14
#include "
xAODEventInfo/EventInfo.h
"
15
16
namespace
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
25
StatusCode
PrescaleTool::initialize
()
26
{
27
if
(
m_prescale
< 1
u
) {
28
ATH_MSG_FATAL
(
"Prescale of less than 1 makes no sense"
);
29
return
StatusCode::FAILURE;
30
}
31
return
StatusCode::SUCCESS;
32
}
33
34
StatusCode
PrescaleTool::finalize
()
35
{
36
return
StatusCode::SUCCESS;
37
}
38
39
bool
PrescaleTool::eventPassesFilter
()
const
40
{
41
return
(Gaudi::Hive::currentContext().eventID().event_number() %
m_prescale
== 0);
42
}
43
44
}
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:25
DerivationFramework::PrescaleTool::eventPassesFilter
virtual bool eventPassesFilter() const
Definition:
PrescaleTool.cxx:39
DerivationFramework::PrescaleTool::PrescaleTool
PrescaleTool(const std::string &t, const std::string &n, const IInterface *p)
Definition:
PrescaleTool.cxx:18
read_hist_ntuple.t
t
Definition:
read_hist_ntuple.py:5
Trk::u
@ u
Enums for curvilinear frames.
Definition:
ParamDefs.h:77
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:209
beamspotman.n
n
Definition:
beamspotman.py:729
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:34
Generated on Mon Sep 1 2025 21:17:28 for ATLAS Offline Software by
1.8.18