ATLAS Offline Software
TIncident.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: TIncident.cxx 676314 2015-06-18 12:07:05Z krasznaa $
6 
7 // System include(s):
8 #include <iostream>
9 
10 // Local include(s):
12 
13 namespace xAOD {
14 
16  : m_type( type ) {
17 
18  }
19 
20  ::Int_t TIncident::type() const {
21 
22  return m_type;
23  }
24 
25 } // namespace xAOD
26 
28 #define PRINT_TYPE( TYPE ) \
29  case TYPE: \
30  out << #TYPE; \
31  break;
32 
33 std::ostream& operator<< ( std::ostream& out, const xAOD::TIncident& inc ) {
34 
35  // Print a prefix:
36  out << "xAOD::TIncident(";
37 
38  // Print the type of the incident:
39  switch( inc.type() ) {
40 
41  PRINT_TYPE( xAOD::IncidentType::BeginInputFile );
42  PRINT_TYPE( xAOD::IncidentType::EndInputFile );
43  PRINT_TYPE( xAOD::IncidentType::BeginEvent );
44  PRINT_TYPE( xAOD::IncidentType::MetaDataStop );
45 
46  default:
47  out << "<unknown>";
48  break;
49  }
50 
51  // Print a postfix:
52  out << ")";
53 
54  // Return the same output stream:
55  return out;
56 }
xAOD::TIncident::TIncident
TIncident(::Int_t type)
Constructor with a type.
Definition: TIncident.cxx:15
PRINT_TYPE
#define PRINT_TYPE(TYPE)
Helper macro for printing the incident types as a string.
Definition: TIncident.cxx:28
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TIncident::type
::Int_t type() const
Return the type of the incident.
Definition: TIncident.cxx:20
xAOD::TIncident::m_type
::Int_t m_type
The type of this incident.
Definition: TIncident.h:69
m_type
TokenType m_type
the type
Definition: TProperty.cxx:44
xAOD::TIncident
Class describing a certain "incident" that is communicated to user code.
Definition: TIncident.h:58
operator<<
std::ostream & operator<<(std::ostream &out, const xAOD::TIncident &inc)
Convenience print operator for xAOD::TIncident objects.
Definition: TIncident.cxx:33
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TIncident.h