ATLAS Offline Software
EventTypeFillerTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: EventTypeFillerTool.cxx 603418 2014-06-24 15:37:50Z ssnyder $
6 
7 // Gaudi/Athena include(s):
9 
10 // Local include(s):
11 #include "EventTypeFillerTool.h"
12 
13 using xAOD::EventInfo;
14 
15 namespace D3PD {
16 
18  const std::string& name,
19  const IInterface* parent )
21 
22  EventTypeFillerTool::book().ignore(); // Avoid coverity warnings.
23  }
24 
26 
27  CHECK( addVariable( "isSimulation", m_is_simulation,
28  "True if the event comes from MC simulation" ) );
29  CHECK( addVariable( "isCalibration", m_is_calibration,
30  "True if this is a calibration data event" ) );
31  CHECK( addVariable( "isTestBeam", m_is_testbeam,
32  "True if the event was recorded at a test-beam" ) );
33 
34  return StatusCode::SUCCESS;
35  }
36 
38 
39  *m_is_simulation = ei.eventType( EventInfo::IS_SIMULATION );
40  *m_is_calibration = ei.eventType( EventInfo::IS_CALIBRATION );
41  *m_is_testbeam = ei.eventType( EventInfo::IS_TESTBEAM );
42 
43  return StatusCode::SUCCESS;
44  }
45 
46 } // namespace D3PD
D3PD::EventTypeFillerTool::m_is_calibration
bool * m_is_calibration
Variable: Is this a calibration event?
Definition: EventTypeFillerTool.h:47
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition: IEventInfoCnvTool.h:17
D3PD::EventTypeFillerTool::book
virtual StatusCode book()
Book variables for this block.
Definition: EventTypeFillerTool.cxx:25
D3PD::AddVariable::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Add a variable to the tuple.
Definition: AddVariable.cxx:85
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
D3PD::EventTypeFillerTool::EventTypeFillerTool
EventTypeFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard AlgTool constructor.
Definition: EventTypeFillerTool.cxx:17
test_pyathena.parent
parent
Definition: test_pyathena.py:15
EventTypeFillerTool.h
D3PD::EventTypeFillerTool::m_is_simulation
bool * m_is_simulation
Variable: Is this a simulation event?
Definition: EventTypeFillerTool.h:45
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition: BlockFillerTool.h:68
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
errorcheck.h
Helpers for checking error return status codes and reporting errors.
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:42
D3PD::EventTypeFillerTool::m_is_testbeam
bool * m_is_testbeam
Variable: Is this a testbeam event?
Definition: EventTypeFillerTool.h:49
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::EventTypeFillerTool::fill
virtual StatusCode fill(const xAOD::EventInfo &ei)
Fill the variables for this block.
Definition: EventTypeFillerTool.cxx:37