/* * ScanPlot.hh * * Created on: Dec 24, 2014 * Author: Hovanes Egiyan */ #ifndef SCANPLOT_HH_ #define SCANPLOT_HH_ #include "ScanDetector.hh" #include "math.h" #include #include #include //#include "ROOT.h" #include "TGraphErrors.h" #include "TAxis.h" class ScanCorrection; using namespace std; class ScanPlot { protected: TGraphErrors* scanGraph; // Graph for the scan TGraphErrors* scanRawGraph; // Raw unnormalized graph string scanName; // Name of the scan string scanPlotName; // Name of the scan plot ScanDetector* scanDet; // Detector pointer for this plot ScanDetector* scanPos; // Positioner pointer for this plot ScanDetector* scanNormDet; // Normalization detector pointer for this plot bool scanNormalized; // Flag to indicate if this scan has been normalized public: ScanPlot(); // Default constructor ScanPlot( ScanDetector* det, ScanDetector* pos, string sName, bool statErrFlag = true ); // Main constructor virtual ~ScanPlot(); virtual bool normalize(); virtual void applyCorrections( ScanCorrection& corr ); void virtual initialize( bool statErrFlag = true ); inline virtual string getName() const { return scanPlotName; } inline virtual string getScanName() const { return scanName; } inline virtual ScanDetector* getDetector() const { return scanDet; } inline virtual ScanDetector* getPositioner() const { return scanPos; } inline virtual TGraphErrors* getRawGraph() const { return scanRawGraph; } inline virtual TGraphErrors* getGraph() const { return scanGraph; } inline virtual ScanDetector* getNormDetector() const { return scanNormDet; } inline virtual ScanDetector* setNormDetector( const ScanDetector* normDet ) { return (scanNormDet = const_cast( normDet )); } inline bool isNormalized() const { return scanNormalized; } inline bool setNormailzied() { return (scanNormalized = true ); } }; #endif /* SCANPLOT_HH_ */