gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
a Global And Modular Bsm Inference Tool
Gambit::Piped_invalid_point Class Reference

Gambit piped invalid point exception class. More...

#include <exceptions.hpp>

Collaboration diagram for Gambit::Piped_invalid_point:

Public Member Functions

 Piped_invalid_point ()
 Constructor. More...
 
void request (std::string message)
 Request an exception. More...
 
void check ()
 Check whether an exception was requested, and throw it if necessary. More...
 

Private Attributes

bool flag
 
std::string message
 

Detailed Description

Gambit piped invalid point exception class.

Definition at line 254 of file exceptions.hpp.

Constructor & Destructor Documentation

◆ Piped_invalid_point()

Gambit::Piped_invalid_point::Piped_invalid_point ( )
inline

Constructor.

Definition at line 258 of file exceptions.hpp.

258 : flag(false), message("") {};

Member Function Documentation

◆ check()

void Gambit::Piped_invalid_point::check ( )

Check whether an exception was requested, and throw it if necessary.

Check whether a piped invalid point exception was requested, and throw if necessary.

Definition at line 473 of file exceptions.cpp.

References Gambit::invalid_point(), Gambit::special_exception::message(), and Gambit::invalid_point_exception::raise().

Referenced by Gambit::DarkBit::cascadeMC_LoopManager(), Gambit::DarkBit::IC22_full(), Gambit::DarkBit::IC79SL_full(), Gambit::DarkBit::IC79WH_full(), Gambit::DarkBit::IC79WL_full(), and Gambit::ColliderBit::operateLHCLoop().

474  {
475  if (omp_get_level()==0) // If not in an OpenMP parallel block, throw onwards
476  {
477  if (this->flag)
478  {
479  this->flag = false; // Reset...
480  invalid_point().raise(this->message); // ...and throw.
481  }
482  }
483  else
484  {
485  #pragma omp critical (GAMBIT_invalid_point)
486  {
487  cerr << endl << " \033[00;31;1mFATAL ERROR\033[00m" << endl << endl;
488  cerr << "GAMBIT has exited with fatal exception: Piped_invalid_point::check() called inside an OpenMP block." << endl
489  << "Piped exceptions may be requested inside OpenMP blocks, but should only be checked outside the block." << endl;
490  if (this->flag)
491  cerr << "Invalid point message requested: " << endl << this->message;
492  else cerr << "No invalid point requested." << endl;
493  #ifdef WITH_MPI
494  GMPI::Comm().Abort();
495  #else
496  abort();
497  #endif
498  }
499  }
500  }
virtual void raise(const std::string &)
Raise the exception, i.e. throw it.
Definition: exceptions.cpp:422
invalid_point_exception & invalid_point()
Invalid point exceptions.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ request()

void Gambit::Piped_invalid_point::request ( std::string  message)

Request an exception.

Request a piped invalid point exception.

Definition at line 463 of file exceptions.cpp.

References Gambit::special_exception::message().

Referenced by Gambit::ColliderBit::getColliderPythia(), Gambit::ColliderBit::smearEvent(), and daFunk::throwError().

464  {
465  #pragma omp critical (GAMBIT_piped_invalid_point)
466  {
467  this->message = message;
468  this->flag = true;
469  }
470  }
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ flag

bool Gambit::Piped_invalid_point::flag
private

Definition at line 267 of file exceptions.hpp.

◆ message

std::string Gambit::Piped_invalid_point::message
private

Definition at line 268 of file exceptions.hpp.


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