gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
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 282 of file exceptions.hpp.

Constructor & Destructor Documentation

◆ Piped_invalid_point()

Gambit::Piped_invalid_point::Piped_invalid_point ( )
inline

Constructor.

Definition at line 286 of file exceptions.hpp.

286 : 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 481 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().

482  {
483  if (omp_get_level()==0) // If not in an OpenMP parallel block, throw onwards
484  {
485  if (this->flag)
486  {
487  this->flag = false; // Reset...
488  invalid_point().raise(this->message); // ...and throw.
489  }
490  }
491  else
492  {
493  #pragma omp critical (GAMBIT_invalid_point)
494  {
495  cerr << endl << " \033[00;31;1mFATAL ERROR\033[00m" << endl << endl;
496  cerr << "GAMBIT has exited with fatal exception: Piped_invalid_point::check() called inside an OpenMP block." << endl
497  << "Piped exceptions may be requested inside OpenMP blocks, but should only be checked outside the block." << endl;
498  if (this->flag)
499  cerr << "Invalid point message requested: " << endl << this->message;
500  else cerr << "No invalid point requested." << endl;
501  #ifdef WITH_MPI
502  GMPI::Comm().Abort();
503  #else
504  abort();
505  #endif
506  }
507  }
508  }
virtual void raise(const std::string &)
Raise the exception, i.e. throw it. Exact override of base method.
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 471 of file exceptions.cpp.

References Gambit::special_exception::message().

Referenced by Gambit::ColliderBit::generateEventPy8Collider(), Gambit::ColliderBit::getPy8Collider(), Gambit::ColliderBit::getYAMLCrossSection_SLHA(), and daFunk::throwError().

472  {
473  #pragma omp critical (GAMBIT_piped_invalid_point)
474  {
475  this->message = message;
476  this->flag = true;
477  }
478  }
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 295 of file exceptions.hpp.

◆ message

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

Definition at line 296 of file exceptions.hpp.


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