ATLAS Offline Software
LArCalorimeter
LArCnv
LArCondTPCnv
src
CopyFloatWithErrorcode.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//Dear emacs, this is -*-c++-*-
6
#ifndef COPYFLOATWITHERRORCODE_H
7
#define COPYFLOATWITHERRORCODE_H
8
16
#include "
LArElecCalib/LArCalibErrorCode.h
"
17
#include <math.h>
18
19
//A copy rountine to get floats from persistency,
20
// protected against roundoff problems and nans
21
inline
float
copyFloatPT
(
const
float
& pers) {
22
//Protect against rounding effects and nans.
23
if
(std::isnan(pers) || pers<=1.0+
LArElecCalib::ERRORCODE
)
24
return
(
float
)
LArElecCalib::ERRORCODE
;
25
else
26
return
pers;
27
}
28
29
30
#endif
copyFloatPT
float copyFloatPT(const float &pers)
Definition:
CopyFloatWithErrorcode.h:21
LArCalibErrorCode.h
Defines a common ERRORCODE enum for LAr-Calibration objects.
LArElecCalib::ERRORCODE
@ ERRORCODE
Definition:
LArCalibErrorCode.h:17
Generated on Sun Dec 22 2024 21:08:37 for ATLAS Offline Software by
1.8.18