Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
FunNameStack.h File Reference
#include <list>
#include <iostream>
#include <cstdlib>
#include "wcpplib/stream/prstream.h"
#include "wcpplib/util/FunNameStack.ic"

Go to the source code of this file.

Classes

class  Heed::ExcFromSpexit
 
class  Heed::FunNameStack
 
class  Heed::FunNameWatch
 

Namespaces

namespace  Heed
 

Macros

#define mfunname(string)
 
#define mfunnamep(string)
 
#define DO_CHECKS
 
#define check_econd1(condition, a1, stream)
 
#define check_wcond1(condition, a1, stream)
 
#define check_econd11(a, signb, stream)
 
#define check_econd12(a, sign, b, stream)
 
#define check_econd11a(a, signb, add, stream)
 
#define check_econd12a(a, sign, b, add, stream)
 
#define check_econd21(a, sign1_b1_sign0, sign2_b2, stream)
 
#define check_econd23(a, sign1, b1, sign0, sign2, b2, stream)
 
#define check_econd24(a1, sign1, b1, sign0, a2, sign2, b2, stream)
 
#define spexit(stream)
 

Functions

void Heed::spexit_action (std::ostream &file)
 
std::ostream & Heed::operator<< (std::ostream &file, const FunNameStack &f)
 
std::ostream & Heed::operator<< (std::ostream &file, const FunNameWatch &f)
 

Macro Definition Documentation

◆ check_econd1

#define check_econd1 (   condition,
  a1,
  stream 
)
Value:
if (condition) { \
stream << "ERROR:\n"; \
stream << '\n' << #condition << '\n'; \
stream << #a1 << '=' << (a1) << '\n'; \
spexit(stream); \
}

Definition at line 141 of file FunNameStack.h.

◆ check_econd11

#define check_econd11 (   a,
  signb,
  stream 
)
Value:
if (a signb) { \
stream << "ERROR:\n"; \
stream << '\n' << #a << #signb << '\n'; \
stream << #a << '=' << (a) << '\n'; \
spexit(stream); \
}

Definition at line 155 of file FunNameStack.h.

◆ check_econd11a

#define check_econd11a (   a,
  signb,
  add,
  stream 
)
Value:
if (a signb) { \
stream << "ERROR:\n"; \
stream << '\n' << #a << #signb << '\n'; \
stream << #a << '=' << (a) << '\n'; \
stream << add; \
spexit(stream); \
}

Definition at line 172 of file FunNameStack.h.

◆ check_econd12

#define check_econd12 (   a,
  sign,
  b,
  stream 
)
Value:
if (a sign b) { \
stream << "ERROR:\n"; \
stream << '\n' << #a << #sign << #b << '\n'; \
stream << #a << '=' << (a) << ' ' << #b << '=' << (b) << '\n'; \
spexit(stream); \
}

Definition at line 163 of file FunNameStack.h.

◆ check_econd12a

#define check_econd12a (   a,
  sign,
  b,
  add,
  stream 
)
Value:
if (a sign b) { \
stream << "ERROR:\n"; \
stream << '\n' << #a << #sign << #b << '\n'; \
stream << #a << '=' << (a) << ' ' << #b << '=' << (b) << '\n'; \
stream << add; \
spexit(stream); \
}

Definition at line 181 of file FunNameStack.h.

◆ check_econd21

#define check_econd21 (   a,
  sign1_b1_sign0,
  sign2_b2,
  stream 
)
Value:
if (a sign1_b1_sign0 a sign2_b2) { \
stream << "ERROR:\n"; \
stream << '\n' << #a << #sign1_b1_sign0 << #a << #sign2_b2 << '\n'; \
stream << #a << '=' << (a) << '\n'; \
spexit(stream); \
}

Definition at line 191 of file FunNameStack.h.

◆ check_econd23

#define check_econd23 (   a,
  sign1,
  b1,
  sign0,
  sign2,
  b2,
  stream 
)
Value:
if (a sign1 b1 sign0 a sign2 b2) { \
stream << "ERROR:\n"; \
stream << '\n' << #a << #sign1 << #b1 << #sign0 << #a << #sign2 << #b2 \
<< '\n'; \
stream << #a << '=' << (a) << ' ' << #b1 << '=' << (b1) << ' ' << #b2 \
<< '=' << (b2) << '\n'; \
spexit(stream); \
}

Definition at line 200 of file FunNameStack.h.

◆ check_econd24

#define check_econd24 (   a1,
  sign1,
  b1,
  sign0,
  a2,
  sign2,
  b2,
  stream 
)
Value:
if (a1 sign1 b1 sign0 a2 sign2 b2) { \
stream << "ERROR:\n"; \
stream << '\n' << #a1 << #sign1 << #b1 << #sign0 << #a2 << #sign2 << #b2 \
<< '\n'; \
stream << #a1 << '=' << (a1) << ' ' << #b1 << '=' << (b1) << '\n'; \
stream << #a2 << '=' << (a2) << ' ' << #b2 << '=' << (b2) << '\n'; \
spexit(stream); \
}

Definition at line 211 of file FunNameStack.h.

◆ check_wcond1

#define check_wcond1 (   condition,
  a1,
  stream 
)
Value:
if (condition) { \
stream << "WARNING:\n"; \
stream << '\n' << #condition << '\n'; \
stream << #a1 << '=' << (a1) << '\n'; \
}

Definition at line 148 of file FunNameStack.h.

◆ DO_CHECKS

#define DO_CHECKS

Definition at line 54 of file FunNameStack.h.

◆ mfunname

#define mfunname (   string)

Definition at line 45 of file FunNameStack.h.

◆ mfunnamep

#define mfunnamep (   string)
Value:
static const char* FunNameIIII = string; \
FunNameWatch funnw(FunNameIIII)

Definition at line 49 of file FunNameStack.h.

◆ spexit

#define spexit (   stream)
Value:
{ \
stream << FunNameStack::instance(); \
stream << "File is " << __FILE__ << " , line number is " << __LINE__ \
<< '\n'; \
spexit_action(stream); \
}

Definition at line 256 of file FunNameStack.h.