/* * ProfilerDetComponent.hh * * Created on: Oct 18, 2015 * Author: hovanes */ #ifndef PROFILERDETCOMPONENT_HH_ #define PROFILERDETCOMPONENT_HH_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "MutexedClass.hh" #include "ProfilerPlaneData.hh" #include "ProfilerPVs.hh" class ProfilerDetector; class ProfilerDetComponent : virtual public ProfilerPlaneData { protected: // Pointer to the detector ProfilerDetector* pdcDetector; // Pointer to the EPICS PV object ProfilerPVs* pdcPV; template T getAverageValue( const std::string pvLabel ); template void setAllChannels( const std::string pvLabel, const std::string rbLabel, const T value ); public: ProfilerDetComponent( ProfilerDetector* det ); ProfilerDetComponent( const ProfilerDetComponent& c ); virtual ~ProfilerDetComponent(); ProfilerDetComponent& operator=( const ProfilerDetComponent& c ); inline virtual ProfilerDetector* getDetector() { return pdcDetector; } inline virtual ProfilerDetector* setDetector( ProfilerDetector* det ) { MtxLock objLock( mcMutex ); pdcDetector = det; return pdcDetector; } virtual std::string getDetectorName() const ; inline virtual ProfilerPVs* getPVs() { MtxLock objLock( mcMutex ); return pdcPV; } virtual ProfilerPVs* setPVs( ProfilerPVs* pv ); virtual unsigned getSleepTime() const = 0; virtual unsigned setSleepTime( const unsigned time ) = 0; virtual void startMainThread() = 0; }; #endif /* PROFILERDETCOMPONENT_HH_ */