INukeException.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::exceptions::INukeException
5 
6 \brief An exception thrown by SimulateHadronState for kinematics problems.
7  TwoBodyCollision/Kinematics used a lot, has various failure modes.
8  When failure occurs in HAIntranuke, rechoose the fate.
9 
10 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
11  University of Liverpool & STFC Rutherford Appleton Laboratory
12 
13  Steve Dytman <dytman \at pitt.edu>
14  Univ. of Pittsburgh
15 
16 \created October 10, 2011
17 
18 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
19  For the full text of the license visit http://copyright.genie-mc.org
20 
21 */
22 //____________________________________________________________________________
23 
24 #ifndef _INUKE_EXCEPTION_H_
25 #define _INUKE_EXCEPTION_H_
26 
27 #include <string>
28 #include <ostream>
29 
30 #include <TMath.h>
31 
32 using std::string;
33 using std::ostream;
34 
35 namespace genie {
36 namespace exceptions {
37 
39 
40 public :
44 
45  void SetReason(string reason) { fReason = reason; }
46 
47  string ShowReason(void) const { return fReason; }
48 
49  void Init (void);
50  void Copy (const INukeException & exception);
51  void Print (ostream & stream) const;
52 
53  friend ostream & operator << (
54  ostream & stream, const INukeException & exception);
55 
56 private:
57 
58  string fReason;
59 };
60 
61 } // exceptions namespace
62 } // genie namespace
63 
64 #endif // _INUKE_EXCEPTION_H_
An exception thrown by SimulateHadronState for kinematics problems. TwoBodyCollision/Kinematics used ...
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
void Print(ostream &stream) const
std::string string
Definition: nybbler.cc:12
void Copy(const INukeException &exception)
friend ostream & operator<<(ostream &stream, const INukeException &exception)
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33