PSHist/include/Exceptions.h

Go to the documentation of this file.
00001 #ifndef PSHIST_EXCEPTIONS_H
00002 #define PSHIST_EXCEPTIONS_H
00003 
00004 //--------------------------------------------------------------------------
00005 // File and Version Information:
00006 //      $Id: Exceptions.h 2050 2011-06-29 21:30:05Z salnikov@SLAC.STANFORD.EDU $
00007 //
00008 // Description:
00009 //      Class Exceptions.
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------
00014 // C/C++ Headers --
00015 //-----------------
00016 
00017 //----------------------
00018 // Base Class Headers --
00019 //----------------------
00020 #include "ErrSvc/Issue.h"
00021 
00022 //-------------------------------
00023 // Collaborating Class Headers --
00024 //-------------------------------
00025 
00026 //------------------------------------
00027 // Collaborating Class Declarations --
00028 //------------------------------------
00029 
00030 //              ---------------------
00031 //              -- Class Interface --
00032 //              ---------------------
00033 
00034 namespace PSHist {
00035 
00036 /**
00037  *  @ingroup PSHist
00038  *  
00039  *  @brief Base class for exceptions for PSHist package.
00040  *
00041  *  This software was developed for the LCLS project.  If you use all or 
00042  *  part of it, please give an appropriate acknowledgment.
00043  *
00044  *  @version $Id: Exceptions.h 2050 2011-06-29 21:30:05Z salnikov@SLAC.STANFORD.EDU $
00045  *
00046  *  @author Andy Salnikov
00047  */
00048 class Exception : public ErrSvc::Issue {
00049 public:
00050 
00051   /// Constructor takes the reason for an exception
00052   Exception(const ErrSvc::Context& ctx, const std::string& what) ;
00053 
00054 };
00055 
00056 /// Exception thrown when histogram or tuple with identical name already exists
00057 class ExceptionDuplicateName : public Exception {
00058 public:
00059 
00060   /// Constructor takes the name of the histogram
00061   ExceptionDuplicateName(const ErrSvc::Context& ctx, const std::string& name) ;
00062 
00063 };
00064 
00065 /// Exception thrown when number of bins is 0.
00066 class ExceptionBins : public Exception {
00067 public:
00068 
00069   /// Constructor takes no additional parameters
00070   ExceptionBins(const ErrSvc::Context& ctx) ;
00071 
00072 };
00073 
00074 /// Exception thrown when axis low range is same or higher than high range
00075 class ExceptionAxisRange : public Exception {
00076 public:
00077 
00078   /// Constructor takes low and high range
00079   ExceptionAxisRange(const ErrSvc::Context& ctx, double xlow, double xhigh) ;
00080 
00081 };
00082 
00083 /// Exception thrown when axis low range is same or higher than high range
00084 class ExceptionAxisEdgeOrder : public Exception {
00085 public:
00086 
00087   /// Constructor takes no additional parameters
00088   ExceptionAxisEdgeOrder(const ErrSvc::Context& ctx) ;
00089 
00090 };
00091 
00092 /// Exception thrown when manager files to store histograms
00093 class ExceptionStore : public Exception {
00094 public:
00095 
00096   /// Constructor takes the string which describes the reason
00097   ExceptionStore(const ErrSvc::Context& ctx, const std::string& reason) ;
00098 
00099 };
00100 
00101 /// Exception thrown when tuple column with identical name already exists
00102 class ExceptionDuplicateColumn : public Exception {
00103 public:
00104 
00105   /// Constructor takes the name of the tuple and name of the column
00106   ExceptionDuplicateColumn(const ErrSvc::Context& ctx, const std::string& tupleName, 
00107       const std::string& columnName) ;
00108 
00109 };
00110 
00111 } // namespace PSHist
00112 
00113 #endif // PSHIST_EXCEPTIONS_H

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7