ROOT
git-r3/HEAD
Reference Guide
Loading...
Searching...
No Matches
GSLError.cxx
Go to the documentation of this file.
1
// @(#)root/mathmore:$Id$
2
// Authors: L. Moneta, A. Zsenei 08/2005
3
4
/**********************************************************************
5
* *
6
* Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT *
7
* *
8
* This library is free software; you can redistribute it and/or *
9
* modify it under the terms of the GNU General Public License *
10
* as published by the Free Software Foundation; either version 2 *
11
* of the License, or (at your option) any later version. *
12
* *
13
* This library is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16
* General Public License for more details. *
17
* *
18
* You should have received a copy of the GNU General Public License *
19
* along with this library (see file COPYING); if not, write *
20
* to the Free Software Foundation, Inc., 59 Temple Place, Suite *
21
* 330, Boston, MA 02111-1307 USA, or contact the author. *
22
* *
23
**********************************************************************/
24
#include "
TError.h
"
25
26
#include "gsl/gsl_errno.h"
27
28
namespace
ROOT
{
29
namespace
Math
{
30
31
/**
32
class to change GSL Error handler to use ROOT one.
33
It is used only when building the dictionary (G__DICTIONARY is defined)
34
and not in the stand-alone version of the library.
35
In that case the default GSL error handler is used
36
*/
37
38
class
GSLError
{
39
40
public
:
41
42
GSLError
() {
43
gsl_set_error_handler(&
GSLError::Handler
);
44
// set a new handler for GSL
45
}
46
47
static
void
Handler
(
const
char
* reason,
const
char
* file,
int
line
,
int
gsl_errno) {
48
49
Error
(
"GSLError"
,
"Error %d in %s at %d : %s"
,gsl_errno,file,
line
,reason);
50
51
}
52
};
53
54
}
55
}
56
57
// re-define the default error handler when loading the library
58
ROOT::Math::GSLError
gGSLError
;
gGSLError
ROOT::Math::GSLError gGSLError
Definition
GSLError.cxx:58
Error
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
TError.h
ROOT::Math::GSLError
class to change GSL Error handler to use ROOT one.
Definition
GSLError.cxx:38
ROOT::Math::GSLError::GSLError
GSLError()
Definition
GSLError.cxx:42
ROOT::Math::GSLError::Handler
static void Handler(const char *reason, const char *file, int line, int gsl_errno)
Definition
GSLError.cxx:47
line
TLine * line
Definition
entrylistblock_figure1.C:235
ROOT::Math
Definition
HFitInterface.h:32
ROOT
Definition
EExecutionPolicy.hxx:4
math
mathmore
src
GSLError.cxx
ROOTgit-r3/HEAD - Reference Guide Generated on
(GVA Time) using Doxygen 1.16.1