GENIEGenerator
Loading...
Searching...
No Matches
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-2025, 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
27using std::string;
28using std::ostream;
29
30namespace genie {
31namespace exceptions {
32
33class Interaction;
34
36
37public :
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
60private:
61
65 string fReason;
66};
67
68} // exceptions namespace
69} // genie namespace
70
71#endif // _EVG_THREAD_EXCEPTION_H_
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
friend ostream & operator<<(ostream &stream, const EVGThreadException &exception)
void Copy(const EVGThreadException &exception)
GENIE-defined C++ exceptions.
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25