ATLAS Offline Software
Loading...
Searching...
No Matches
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
< 1u) {
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
}
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition
AthMsgStreamMacros.h:34
PrescaleTool.h
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
DerivationFramework::PrescaleTool::finalize
StatusCode finalize()
Definition
PrescaleTool.cxx:34
DerivationFramework::PrescaleTool::initialize
StatusCode initialize()
Definition
PrescaleTool.cxx:25
DerivationFramework::PrescaleTool::m_prescale
Gaudi::Property< unsigned int > m_prescale
Definition
PrescaleTool.h:29
DerivationFramework
THE reconstruction tool.
Definition
ParticleSortingAlg.h:24
EventInfo.h
Generated on
for ATLAS Offline Software by
1.14.0