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

mVfromTrimTargetThresholdVariable.h

00001 #ifndef MVFROMTRIMTARGETTHRESHOLDVARIABLE_H
00002 #define MVFROMTRIMTARGETTHRESHOLDVARIABLE_H
00003 
00004 #include <string>
00005 #include "Sct/round.h"
00006 #include "ThresholdVariable.h"
00007 
00008 using std::string;
00009 using namespace Sct;
00010 
00011 namespace SctData {
00012     
00013 class mVfromTrimTargetThresholdVariable : public ThresholdVariable {
00014 public:
00015     static const mVfromTrimTargetThresholdVariable& instance() throw();
00016     
00017     virtual double getLinkActualPoint(double logicalPt, const ModuleConfiguration& config, unsigned int link) const throw();
00018     virtual double getChipActualPoint(double logicalPt, const ModuleConfiguration& config, unsigned int chip) const throw();
00019     virtual double getChannelActualPoint(double logicalPt, const ModuleConfiguration& config, unsigned int channel) const throw();    
00020     
00021     virtual double getLinkLogicalPoint(double actualPt, const ModuleConfiguration& config, unsigned int link) const throw();
00022     virtual double getChipLogicalPoint(double actualPt, const ModuleConfiguration& config, unsigned int chip) const throw();    
00023     virtual double getChannelLogicalPoint(double actualPt, const ModuleConfiguration& config, unsigned int channel) const throw();   
00024      
00025 private:
00026     mVfromTrimTargetThresholdVariable();
00027     unsigned char getActualPoint(double logicalPt) const throw();
00028     double getLogicalPoint(unsigned char actualPt) const throw();
00029 };
00030 
00032 inline unsigned char mVfromTrimTargetThresholdVariable::getActualPoint(double logicalPt) const throw() {    
00033     return roundToUChar(logicalPt/2.5);
00034 }
00035 
00036 inline double mVfromTrimTargetThresholdVariable::getLogicalPoint(unsigned char actualPt) const throw() {
00037     return 2.5 * actualPt;
00038 }
00039 
00040 
00041 }
00042 
00043 #endif //#ifndef MVFROMTRIMTARGETTHRESHOLDVARIABLE_H

Generated on Thu Jul 15 09:50:48 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5