GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EVGThreadException.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::exceptions::EVGThreadException
5 
6 \brief An exception thrown by EventRecordVisitorI when the normal processing
7  sequence has to be disrupted (fast-fwd at the end or step-back)
8 
9 \author Costas Andreopoulos <c.andreopoulos \at cern.ch>
10  University of Liverpool
11 
12 \created September 27, 2005
13 
14 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
15  For the full text of the license visit http://copyright.genie-mc.org
16 */
17 //____________________________________________________________________________
18 
19 #ifndef _EVG_THREAD_EXCEPTION_H_
20 #define _EVG_THREAD_EXCEPTION_H_
21 
22 #include <string>
23 #include <ostream>
24 
25 #include <TMath.h>
26 
27 using std::string;
28 using std::ostream;
29 
30 namespace genie {
31 namespace exceptions {
32 
33 class Interaction;
34 
36 
37 public :
38 
40  EVGThreadException(const EVGThreadException & exception);
42 
43  void SetReason (string reason) { fReason = reason; }
44  void SwitchOnFastForward (void) { fFastFwd = true; }
45  void SwitchOnStepBack (void) { fStepBack = true; }
46  void SetReturnStep (int s) { fReturnStep = TMath::Max(0,s); }
47 
48  string ShowReason (void) const { return fReason; }
49  bool FastForward (void) const { return fFastFwd; }
50  bool StepBack (void) const { return fStepBack; }
51  int ReturnStep (void) const { return fReturnStep; }
52 
53  void Init (void);
54  void Copy (const EVGThreadException & exception);
55  void Print (ostream & stream) const;
56 
57  friend ostream & operator << (
58  ostream & stream, const EVGThreadException & exception);
59 
60 private:
61 
62  bool fFastFwd;
63  bool fStepBack;
65  string fReason;
66 };
67 
68 } // exceptions namespace
69 } // genie namespace
70 
71 #endif // _EVG_THREAD_EXCEPTION_H_
static constexpr double s
Definition: Units.h:95
void Copy(const EVGThreadException &exception)
void Print(ostream &stream) const
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
friend ostream & operator<<(ostream &stream, const EVGThreadException &exception)