/* * ScanDetector.hh * * Class to keep track of the content of the detectors from the sscan data. * * Created on: Nov 26, 2014 * Author: Hovanes Egiyan */ #ifndef SCANDETECTOR_HH_ #define SCANDETECTOR_HH_ #include /* printf */ #include /* system, NULL, EXIT_FAILURE */ #include #include #include #include #include #include #include #include class ScanStream; class ScanDetector : public TObject { protected: int detNumber; // Detector number from the file std::string detName; // Detector name from the file std::string detDescription; // Detector description from the file std::string detUnit; // Units for the detector data const ScanStream* detScanStreamPtr; // Pointer to the scan file std::vector detData; public: ScanDetector( ); // Default constructor ScanDetector( std::istream& inStream, ScanStream* scanFile ); // Actual constructor ScanDetector( const ScanDetector& det ); virtual ~ScanDetector(); ScanDetector& operator=( const ScanDetector& det ); virtual int readData( std::istream& inStream ); virtual void printData(); inline virtual int getNumber() const { return detNumber; } inline virtual std::string getName() const { return detName; } inline virtual std::string getDesciption() const { return detDescription; } inline virtual std::string getUnit() const { return detUnit; } inline virtual std::vector& getData() { return detData; } inline const virtual ScanStream* getScanStream() const { return detScanStreamPtr; } inline const virtual char* GetName() { return getName().c_str(); } virtual void setData(std::vector detData) { this->detData = detData; } virtual void setDescription( std::string detDescription ) { this->detDescription = detDescription; } virtual void setName( std::string detName ) { this->detName = detName; } virtual void setNumber( int detNumber ) { this->detNumber = detNumber; } virtual void setScanStreamPtr( const ScanStream* detScanStreamPtr ) { this->detScanStreamPtr = detScanStreamPtr; } virtual void setUnit( std::string detUnit ) { this->detUnit = detUnit; } ClassDef(ScanDetector, 0) }; #endif /* SCANDETECTOR_HH_ */