ATLAS Offline Software
Database
TPTools
src
ITPConverter.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
TPTools/ITPConverter.h
"
7
#include "GaudiKernel/MsgStream.h"
8
#include <stdexcept>
9
10
static
11
void
errorHandler()
12
{
13
static
const
char
*
const
ignore_error =
getenv
(
"ATHENA_TP_IGNORE_NOT_FOUND"
);
14
if
( ignore_error )
return
;
15
static
const
char
*
const
do_abort
=
getenv
(
"ATHENA_TP_DIE_ON_NOT_FOUND"
);
16
if
(
do_abort
) abort();
17
throw
std::runtime_error(
"TP converter not found"
);
18
}
19
20
21
void
22
ITPConverter::converterNotFound
(
const
std::type_info& converterType,
23
ITPConverter
*
c
,
24
const
std::string&
typeName
,
25
MsgStream&
log
)
const
26
{
27
log
<< MSG::ERROR <<
">>>>>> in parent TP converter "
<<
typeid
(*this).name()
28
<<
": could not find matching TP converter for type "
<<
typeName
<<
endmsg
;
29
if
(
c
) {
30
log
<< MSG::ERROR <<
" - found incompatible converter of type "
31
<<
typeid
(*c).name() <<
endmsg
;
32
}
33
log
<< MSG::ERROR <<
" Converter handle type was "
<< converterType.name() <<
endmsg
;
34
errorHandler();
35
}
36
37
38
39
void
40
ITPConverter::converterNotFound
(
unsigned
typeID,
41
ITPConverter
*
c
,
42
const
std::string& reqCnvTypeName,
43
MsgStream&
log
)
const
44
{
45
log
<< MSG::ERROR <<
">>>>>> in parent TP converter "
<<
typeid
(*this).name()
46
<<
" requested TP converter for TP type ID "
<<
typeID
<<
" not found "
<<
endmsg
;
47
if
(
c
) {
48
log
<< MSG::ERROR <<
" - found converter "
<<
typeid
(*c).name()
49
<<
" for "
<<
c
->transientTInfo().name()
50
<<
" with an incompatible base type "
<<
c
->transBaseTInfo().name()
51
<<
endmsg
;
52
}
53
log
<< MSG::ERROR <<
" Converter handle type was "
<< reqCnvTypeName <<
endmsg
;
54
errorHandler();
55
}
56
57
ITPConverter::typeID
virtual const TPObjRef::typeID_t & typeID() const =0
Return TP typeID for persistent objects produced by this converter.
Herwig7Control.do_abort
def do_abort()
Definition:
Herwig7Control.py:142
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
ITPConverter.h
Defines the base ITPConverter class interface for all TP converters. Also defines TPConverterTypeMap ...
SCT_ConditionsAlgorithms::CoveritySafe::getenv
std::string getenv(const std::string &variableName)
get an environment variable
Definition:
SCT_ConditionsUtilities.cxx:17
python.CaloCondTools.log
log
Definition:
CaloCondTools.py:20
ReadCalibFromCool.typeName
typeName
Definition:
ReadCalibFromCool.py:477
ITPConverter
Definition:
TPTools/TPTools/ITPConverter.h:32
ITPConverter::converterNotFound
virtual void converterNotFound(const std::type_info &converterType, ITPConverter *c, const std::string &typeName, MsgStream &log) const
method called when the right TP converter was not found during writing
Definition:
ITPConverter.cxx:22
python.compressB64.c
def c
Definition:
compressB64.py:93
Generated on Thu Nov 7 2024 21:17:39 for ATLAS Offline Software by
1.8.18