Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

ScanPoints.h

00001 #ifndef SCANPOINTS_H
00002 #define SCANPOINTS_H
00003 
00004 #include <vector>
00005 #include <string>
00006 #include "Sct/Streamable.h"
00007 #include "Sct/Exception.h"
00008 #include "Sct/RangedVector.h"
00009 
00010 using Sct::Streamable;
00011 using Sct::LogicError;
00012 using std::vector;
00013 using std::string;
00014 
00015 class TAxis;
00016 
00017 namespace SctData {
00018 
00025 class ScanPoints : public virtual Streamable{
00026 public:
00034     ScanPoints(const unsigned nPoints, 
00035            const float* points, 
00036            const unsigned* nEvents, 
00037            const unsigned* nErrorEvents) throw() ;
00038     
00040     ScanPoints() throw() ;
00041 
00043     virtual ~ScanPoints() throw() {}
00044     
00046     unsigned getNPoints() const throw();
00047     
00049     double getPoint(const unsigned i) const throw(LogicError);
00050     
00052     double operator[] (const unsigned i) const throw(LogicError);
00053     
00055     double& operator[] (const unsigned i) throw(LogicError);
00056     
00058     unsigned getNEvents(const unsigned i) const throw(LogicError);
00059     
00061     unsigned getNErrorEvents(const unsigned i) const throw(LogicError);
00062     
00064     void addPoint(const double point, const unsigned nEvents, const unsigned nErrorEvents) throw() ;
00065     
00071     double* getEdgesAscending() const throw(LogicError) ;
00072 
00076     bool ascending() const;
00077 
00081     void setAxis(TAxis& axis) const throw(LogicError);
00082     
00084     virtual string getClassName() const throw();
00085     
00086 private:
00088     class ScanPoint{
00089     public:
00090     ScanPoint(const double point, const unsigned nEv, const unsigned nErr) throw() : 
00091         point(point), nEvents(nEv), nErrorEvents(nErr)  {}
00093     ~ScanPoint() throw() {}
00095     operator double&() throw() {return point;}
00097     operator const double() const throw() {return point;}
00098     double point;              
00099     unsigned nEvents;          
00100     unsigned nErrorEvents;     
00101     };
00102 
00103     Sct::RangedVector<ScanPoint> points;   
00104 };
00105 }
00106 #endif //#ifndef SCANPOINTS_H

Generated on Thu Jul 8 11:41:14 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5