ATLAS Offline Software
Loading...
Searching...
No Matches
OutOfValidityEventHelper.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8//
9// includes
10//
11
13
17
18//
19// method implementations
20//
21
22namespace CP
23{
24 ::StatusCode OutOfValidityEventHelper ::
25 initialize ()
26 {
27 m_isInitialized = true;
28 return StatusCode::SUCCESS;
29 }
30
31
32 ::StatusCode OutOfValidityEventHelper ::
33 check (const CP::CorrectionCode& code,
34 const char *context) const
35 {
36 assert (m_isInitialized);
37
38 switch (code)
39 {
41 return StatusCode::SUCCESS;
43 return StatusCode::FAILURE;
46 {
48 ANA_MSG_ERROR ("encountered OutOfValidity: " << context);
49 return StatusCode::FAILURE;
51 ANA_MSG_WARNING ("encountered OutOfValidity: " << context);
52 return StatusCode::SUCCESS;
54 return StatusCode::SUCCESS;
55 }
56 }
57 ANA_MSG_ERROR (__FILE__ << ":" << __LINE__ << ": invalid enum value encountered " << code << " " << int (m_action));
58 return StatusCode::FAILURE;
59 }
60
61}
macros for messaging and checking status codes
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
#define ANA_MSG_WARNING(xmsg)
Macro printing warning messages.
Return value from object correction CP tools.
@ Error
Some error happened during the object correction.
@ OutOfValidityRange
Input object is out of validity range.
@ Ok
The correction was done successfully.
unsigned m_action
the action to take
bool m_isInitialized
whether we have been initialized
Select isolated Photons, Electrons and Muons.
OutOfValidityAction
the action to perform on encountering an OutOfValidityRange in OutOfValidityHelper
@ WARNING
print a warning message and return a success status code.
@ SILENT
don't print anything and return success
@ ABORT
print an error message and return a failure status code (triggering an abort)