Public Member Functions | Public Attributes | List of all members
bpfit::BPException Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/BreakPointFitter/func/BPException.h"

Inheritance diagram for bpfit::BPException:

Public Member Functions

 BPException (const char *file, unsigned int line, unsigned int flag, double value=0.0)
 
 ~BPException ()
 
void Print ()
 

Public Attributes

const char * fFile
 Name of file that threw the exception. More...
 
unsigned int fLine
 Line number where exception was thrown. More...
 
unsigned int fFlag
 Exception code thrown. More...
 
double fValue
 (optional) Value of bad variable that caused the exception. More...
 

Detailed Description

Definition at line 31 of file BPException.h.

Constructor & Destructor Documentation

bpfit::BPException::BPException ( const char *  file,
unsigned int  line,
unsigned int  flag,
double  value = 0.0 
)

Definition at line 13 of file BPException.cxx.

14  :
15  fFile(file),
16  fLine(line),
17  fFlag(flag),
18  fValue(value)
19  { }
const XML_Char int const XML_Char * value
Definition: expat.h:331
const char * fFile
Name of file that threw the exception.
Definition: BPException.h:39
unsigned int fLine
Line number where exception was thrown.
Definition: BPException.h:40
unsigned int fFlag
Exception code thrown.
Definition: BPException.h:41
double fValue
(optional) Value of bad variable that caused the exception.
Definition: BPException.h:42
TFile * file
Definition: cellShifts.C:17
bpfit::BPException::~BPException ( )
inline

Definition at line 35 of file BPException.h.

References Print().

35 {};

Member Function Documentation

void bpfit::BPException::Print ( )

Definition at line 22 of file BPException.cxx.

References om::cout, allTimeWatchdog::endl, fFile, fFlag, fLine, fValue, bpfit::kBAD_BETA, bpfit::kBAD_KE, bpfit::kBAD_NDOF, bpfit::kBAD_P, bpfit::kBAD_RADL, bpfit::kBAD_TRACK, bpfit::kINDEX, bpfit::kNAN, bpfit::kNn, bpfit::kNPLANES, bpfit::kSIGSJ, and bpfit::kSIGX.

Referenced by bpfit::BreakPoint::FitTracks(), and ~BPException().

23  {
24  std::cout << "\nBPException ";
25 
26  switch(fFlag) {
27  case kBAD_KE:
28  std::cout << "bad KE";
29  break;
30  case kBAD_RADL:
31  std::cout << "bad radiation length";
32  break;
33  case kNn:
34  std::cout << "num scat surf <= num measurements";
35  break;
36  case kINDEX:
37  std::cout << "index problem";
38  break;
39  case kNAN:
40  std::cout << "nan encountered";
41  break;
42  case kSIGX:
43  std::cout << "bad sigx";
44  break;
45  case kSIGSJ:
46  std::cout << "bad sigSJ";
47  break;
48  case kBAD_P:
49  std::cout << "bad value for p";
50  break;
51  case kBAD_BETA:
52  std::cout << "bad value for beta";
53  break;
54  case kBAD_NDOF:
55  std::cout << "track NDOF is too small";
56  break;
57  case kNPLANES:
58  std::cout << "too few planes in one view";
59  break;
60  case kBAD_TRACK:
61  std::cout << "tracking failure";
62  break;
63  default:
64  std::cout << "UNKNOWN";
65  }
66 
67  std::cout << " with value = " << fValue
68  << " found in " << fFile
69  << " at line " << fLine << "."
70  << std::endl;
71  }
const unsigned int kSIGX
non-positive value of sigx
Definition: BPException.h:23
const unsigned int kBAD_KE
negative KE value < tol
Definition: BPException.h:18
const unsigned int kBAD_P
negative value for p
Definition: BPException.h:25
const unsigned int kNAN
nan encountered
Definition: BPException.h:22
const unsigned int kNn
number of scat surf >= number of measurements
Definition: BPException.h:20
const char * fFile
Name of file that threw the exception.
Definition: BPException.h:39
const unsigned int kNPLANES
too few planes in one (or both) views
Definition: BPException.h:28
unsigned int fLine
Line number where exception was thrown.
Definition: BPException.h:40
const unsigned int kINDEX
index problem
Definition: BPException.h:21
OStream cout
Definition: OStream.cxx:6
const unsigned int kBAD_NDOF
too few hits used to make the track
Definition: BPException.h:27
const unsigned int kSIGSJ
non-positive value of sigSJ
Definition: BPException.h:24
unsigned int fFlag
Exception code thrown.
Definition: BPException.h:41
double fValue
(optional) Value of bad variable that caused the exception.
Definition: BPException.h:42
const unsigned int kBAD_RADL
non-positive radiation length
Definition: BPException.h:19
const unsigned int kBAD_TRACK
a generic catch-all category for tracking failures
Definition: BPException.h:29
const unsigned int kBAD_BETA
negative value for beta
Definition: BPException.h:26

Member Data Documentation

const char* bpfit::BPException::fFile

Name of file that threw the exception.

Definition at line 39 of file BPException.h.

Referenced by Print().

unsigned int bpfit::BPException::fFlag

Exception code thrown.

Definition at line 41 of file BPException.h.

Referenced by bpfit::BreakPoint::FillExceptNt(), and Print().

unsigned int bpfit::BPException::fLine

Line number where exception was thrown.

Definition at line 40 of file BPException.h.

Referenced by Print().

double bpfit::BPException::fValue

(optional) Value of bad variable that caused the exception.

Definition at line 42 of file BPException.h.

Referenced by bpfit::BreakPoint::FillExceptNt(), and Print().


The documentation for this class was generated from the following files: