Fork me on GitHub

source: svn/trunk/Utilities/Fastjet/include/fastjet/Error.hh@ 77

Last change on this file since 77 was 11, checked in by severine ovyn, 16 years ago

Fastjet added; CDFCones directory has been changed

File size: 2.0 KB
Line 
1//STARTHEADER
2// $Id: Error.hh,v 1.1 2008-11-06 14:32:08 ovyn Exp $
3//
4// Copyright (c) 2005-2006, Matteo Cacciari and Gavin Salam
5//
6//----------------------------------------------------------------------
7// This file is part of FastJet.
8//
9// FastJet is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; either version 2 of the License, or
12// (at your option) any later version.
13//
14// The algorithms that underlie FastJet have required considerable
15// development and are described in hep-ph/0512210. If you use
16// FastJet as part of work towards a scientific publication, please
17// include a citation to the FastJet paper.
18//
19// FastJet is distributed in the hope that it will be useful,
20// but WITHOUT ANY WARRANTY; without even the implied warranty of
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22// GNU General Public License for more details.
23//
24// You should have received a copy of the GNU General Public License
25// along with FastJet; if not, write to the Free Software
26// Foundation, Inc.:
27// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28//----------------------------------------------------------------------
29//ENDHEADER
30
31
32
33#ifndef __FASTJET_ERROR_HH__
34#define __FASTJET_ERROR_HH__
35
36#include<iostream>
37#include<string>
38#include "Utilities/Fastjet/include/fastjet/internal/base.hh"
39
40FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
41
42/// class corresponding to errors that will be thrown by fastjet
43class Error {
44public:
45 // constructors
46 Error() {;};
47 Error(const std::string & message) {
48 _message = message;
49 if (_print_errors) std::cerr << "fastjet::Error: "<<message << std::endl;
50 };
51
52 std::string message() const {return _message;};
53
54 static void set_print_errors(bool print_errors) {
55 _print_errors = print_errors;};
56
57private:
58 std::string _message;
59 static bool _print_errors;
60};
61
62
63FASTJET_END_NAMESPACE
64
65#endif // __FASTJET_ERROR_HH__
Note: See TracBrowser for help on using the repository browser.