ATLAS Offline Software
Loading...
Searching...
No Matches
EventStatusSelectionAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6
10
12 ISvcLocator *svcLoc)
13 : EL::AnaAlgorithm(name, svcLoc)
14{
15}
16
18{
19 ANA_CHECK(m_filterParams.initialize());
20 return StatusCode::SUCCESS;
21}
22
24{
25 FilterReporter filter (m_filterParams, false);
26
27 const xAOD::EventInfo *eventInfo = 0;
28 ANA_CHECK(evtStore()->retrieve(eventInfo, "EventInfo"));
29
30 // Reject bad events due to problems in Tile calorimeter
32 {
33 ATH_MSG_VERBOSE("Rejecting event due to problems in Tile calorimeter");
34 filter.setPassed(false);
35 return StatusCode::SUCCESS;
36 }
37
38 // Reject bad events due to problems in LAr calorimeter
40 {
41 ATH_MSG_VERBOSE("Rejecting event due to problems in LAr calorimeter");
42 filter.setPassed(false);
43 return StatusCode::SUCCESS;
44 }
45
46 // Reject bad events due to problems in SCT
48 {
49 ATH_MSG_VERBOSE("Rejecting event due to problems in SCT");
50 filter.setPassed(false);
51 return StatusCode::SUCCESS;
52 }
53
54 // Reject incomplete events
55 if (eventInfo->isEventFlagBitSet(xAOD::EventInfo::Core, 18))
56 {
57 ATH_MSG_VERBOSE("Rejecting incomplete events");
58 filter.setPassed(false);
59 return StatusCode::SUCCESS;
60 }
61
62 ATH_MSG_VERBOSE("Event passed all status checks.");
63 filter.setPassed(true);
64
65 return StatusCode::SUCCESS;
66}
67
69{
70 ANA_MSG_INFO (m_filterParams.summary());
71
72 return StatusCode::SUCCESS;
73}
#define ATH_MSG_VERBOSE(x)
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
#define ANA_CHECK(EXP)
check whether the given expression was successful
FilterReporterParams m_filterParams
the filter reporter parameters
virtual StatusCode execute() final
EventStatusSelectionAlg(const std::string &name, ISvcLocator *svcLoc=nullptr)
virtual StatusCode finalize() final
virtual StatusCode initialize() final
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
a guard class for use with ref FilterReporterParams
@ Tile
The Tile calorimeter.
@ Core
Core flags describing the event.
@ LAr
The LAr calorimeter.
bool isEventFlagBitSet(EventFlagSubDet subDet, size_t bit) const
Check one particular bit of one particular sub-detector.
@ Error
The sub-detector issued an error.
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
EventInfo_v1 EventInfo
Definition of the latest event info version.