/* * Scan.hh * * A class to handle a single scan. * One scan class can contain multiple scan plots, but just * a single scan file can be the source of a scan. * * Created on: Dec 25, 2014 * Author: Hovanes Egiyan */ #ifndef SCAN_HH_ #define SCAN_HH_ #include /* printf etc */ #include /* system, NULL, EXIT_FAILURE */ #include #include #include #include #include #include #include #include "TObject.h" #include "ScanFile.hh" #include "ScanPlot.hh" #include "ScanStream.hh" #include "OverviewMainFrame.hh" class Scan : public TObject { protected: // Normalization detector name static std::string sNormDetName; ScanFile* sScanFile; // File object from the scan // Map with pointers to plot objects. The fast changing index is detector #, // the slow changing index is the positioner number. ScanStream* sScanStream; // pointer to the scan stream object std::map > sScanPlot; // Map of MainFrame with a canvas for plotting the overview for each positioner. // The key is the positioner number. std::map sOverviewMainFrame ; void buildPlots(); public: Scan(); // Default constructor // Scan( std::istream& inStream ) ; // Subscan constructor Scan( ScanFile* inFile ); virtual ~Scan(); virtual void removeOverviewMainFrame( const int positionerNumber ); static std::string getNormDetectorName() { return sNormDetName; } static std::string setNormDetectorName( const std::string name ) { return (sNormDetName=name);} inline ScanStream* getScanStream() {return sScanStream; } inline int getScanNumber() { return sScanStream->getScanNumber();} inline int getScanRank() {return sScanStream->getScanRank();} inline int getNPoints() {return sScanStream->getNPoints();} inline int getNDetectors() {return sScanStream->getNDetectors();} inline int getNTriggers() {return sScanStream->getNTriggers();} inline std::string getScanName() {return sScanStream->getScanName();} inline std::string getScanTime() {return sScanStream->getScanTime();} inline std::map& getDetectors() { return sScanStream->getDetectors();} inline ScanDetector* getDetector( int detNumber ) { return sScanStream->getDetector( detNumber);} inline std::map& getPositioners() { return sScanStream->getPositioners();} inline ScanPositioner* getPositioner( int posNumber ) { return sScanStream->getPositioner(posNumber);} ClassDef(Scan, 0) }; #endif /* SCAN_HH_ */