Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:06:51

0001 #ifndef RIVET_EXCEPTIONS_HH
0002 #define RIVET_EXCEPTIONS_HH
0003 
0004 #include <string>
0005 #include <exception>
0006 #include <stdexcept>
0007 
0008 namespace Rivet {
0009 
0010 
0011   /// @brief Generic runtime Rivet error.
0012   struct Error : public std::runtime_error {
0013     Error(const std::string& what) : std::runtime_error(what) {}
0014   };
0015 
0016 
0017   /// @brief Rivet::Exception is a synonym for Rivet::Error.
0018   typedef Error Exception;
0019 
0020 
0021   /// @brief Error for e.g. use of invalid bin ranges.
0022   struct RangeError : public Error {
0023     RangeError(const std::string& what) : Error(what) {}
0024   };
0025 
0026 
0027   /// @brief Error specialisation for places where alg logic has failed.
0028   struct LogicError : public Error {
0029     LogicError(const std::string& what) : Error(what) {}
0030   };
0031 
0032 
0033   /// @brief Error specialisation for failures relating to particle ID codes.
0034   struct PidError : public Error {
0035     PidError(const std::string& what) : Error(what) {}
0036   };
0037 
0038 
0039   /// @brief Error specialisation for failures relating to analysis info.
0040   struct InfoError : public Error {
0041     InfoError(const std::string& what) : Error(what) {}
0042   };
0043 
0044 
0045   /// @brief Error specialisation for failures relating to beams.
0046   struct BeamError : public Error {
0047     BeamError(const std::string& what) : Error(what) {}
0048   };
0049 
0050 
0051   /// @brief Errors relating to event/bin weights
0052   ///
0053   /// Arises in computing statistical quantities because e.g. the bin
0054   /// weight is zero or negative.
0055   struct WeightError : public Error {
0056     WeightError(const std::string& what) : Error(what) {}
0057   };
0058 
0059 
0060   /// @brief Error specialisation for where the problem is between the chair and the computer.
0061   struct UserError : public Error {
0062     UserError(const std::string& what) : Error(what) {}
0063   };
0064 
0065 
0066   /// @brief Error relating to looking up analysis objects in the register
0067   struct LookupError : public Error {
0068     LookupError(const std::string& what) : Error(what) {}
0069   };
0070 
0071 
0072   /// @brief Error for I/O failures.
0073   struct IOError : public Error {
0074     IOError(const std::string& what) : Error(what) {}
0075   };
0076 
0077   /// @brief Error for read failures.
0078   struct ReadError : public IOError {
0079     ReadError(const std::string& what) : IOError(what) {}
0080   };
0081 
0082   /// @brief Error for write failures.
0083   struct WriteError : public IOError {
0084     WriteError(const std::string& what) : IOError(what) {}
0085   };
0086 
0087 
0088 }
0089 
0090 #endif