Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-18 09:06:10

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 Error specialisation for failures relating to event smearing.
0052   struct SmearError : public Error {
0053     SmearError(const std::string& what) : Error(what) {}
0054   };
0055 
0056 
0057   /// @brief Errors relating to event/bin weights
0058   ///
0059   /// Arises in computing statistical quantities because e.g. the bin
0060   /// weight is zero or negative.
0061   struct WeightError : public Error {
0062     WeightError(const std::string& what) : Error(what) {}
0063   };
0064 
0065 
0066   /// @brief Error specialisation for where the problem is between the chair and the computer.
0067   struct UserError : public Error {
0068     UserError(const std::string& what) : Error(what) {}
0069   };
0070 
0071 
0072   /// @brief Error relating to looking up analysis objects in the register
0073   struct LookupError : public Error {
0074     LookupError(const std::string& what) : Error(what) {}
0075   };
0076 
0077 
0078   /// @brief Error for I/O failures.
0079   struct IOError : public Error {
0080     IOError(const std::string& what) : Error(what) {}
0081   };
0082 
0083   /// @brief Error for read failures.
0084   struct ReadError : public IOError {
0085     ReadError(const std::string& what) : IOError(what) {}
0086   };
0087 
0088   /// @brief Error for write failures.
0089   struct WriteError : public IOError {
0090     WriteError(const std::string& what) : IOError(what) {}
0091   };
0092 
0093 
0094 }
0095 
0096 #endif