File indexing completed on 2024-04-06 11:56:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _ENTRY_HH
0011 #define _ENTRY_HH
0012 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
0013 #include <vector>
0014 class OpticalObject;
0015 class EntryData;
0016 enum EntryDim { ED_length, ED_angle, ED_nodim };
0017
0018 class Entry {
0019 friend std::ostream& operator<<(std::ostream& os, const Entry& c);
0020
0021 public:
0022
0023
0024 Entry(const ALIstring& type);
0025 virtual ~Entry();
0026
0027
0028 void fill(const std::vector<ALIstring>& wordlist);
0029
0030 virtual void fillName(const ALIstring& name);
0031
0032 void fillNull();
0033
0034
0035 virtual ALIdouble ValueDimensionFactor() const { return 1.; }
0036 virtual ALIdouble SigmaDimensionFactor() const { return 1.; }
0037 virtual ALIdouble OutputValueDimensionFactor() const { return 1.; }
0038 virtual ALIdouble OutputSigmaDimensionFactor() const { return 1.; }
0039
0040
0041 virtual void displace(ALIdouble disp);
0042
0043 virtual void displaceOriginal(ALIdouble disp);
0044 virtual void displaceOriginalOriginal(ALIdouble disp);
0045
0046
0047 virtual ALIdouble valueInGlobalReferenceFrame() const { return value(); };
0048
0049
0050 const ALIstring& name() const { return name_; }
0051 const ALIstring longName() const;
0052 const ALIstring& type() const { return type_; }
0053 ALIdouble value() const { return value_; }
0054 ALIdouble valueOriginalOriginal() const { return valueOriginalOriginal_; }
0055 ALIdouble sigma() const { return sigma_; }
0056 ALIdouble sigmaOriginalOriginal() const { return sigmaOriginalOriginal_; }
0057 ALIint quality() const { return quality_; }
0058 ALIint fitPos() const { return fitPos_; }
0059 OpticalObject* OptOCurrent() const {
0060 return OptOCurrent_;
0061 }
0062 virtual ALIdouble valueDisplaced() const;
0063 ALIdouble valueDisplacementByFitting() const {
0064
0065 return valueDisplacementByFitting_;
0066 }
0067 void resetValueDisplacementByFitting();
0068 virtual ALIdouble startingDisplacement() { return 0.; };
0069 ALIdouble lastAdditionToValueDisplacementByFitting() const { return lastAdditionToValueDisplacementByFitting_; }
0070 void setLastAdditionToValueDisplacementByFitting(const ALIdouble val) {
0071 lastAdditionToValueDisplacementByFitting_ = val;
0072 }
0073
0074 public:
0075
0076 void setName(const ALIstring& name) { name_ = name; }
0077 void setType(ALIstring type) { type_ = type; }
0078 void setValue(ALIdouble val) { value_ = val; }
0079 void setSigma(ALIdouble sig) { sigma_ = sig; }
0080 void setQuality(ALIuint qual) { quality_ = qual; }
0081 void setFitPos(const ALIint fitpos) { fitPos_ = fitpos; }
0082 void setOptOCurrent(OpticalObject* opto) { OptOCurrent_ = opto; }
0083 void addFittedDisplacementToValue(const ALIdouble val);
0084
0085 void substractToHalfFittedDisplacementToValue();
0086
0087 EntryDim getDimType() const { return theDimType; }
0088
0089 private:
0090
0091 void fillFromReportOutFileValue(EntryData* entryData);
0092 void fillFromReportOutFileSigma(const EntryData* entryData);
0093 void fillFromReportOutFileQuality(const EntryData* entryData);
0094
0095 void fillFromInputFileValue(const std::vector<ALIstring>& wordlist);
0096 void fillFromInputFileSigma(const std::vector<ALIstring>& wordlist);
0097 void fillFromInputFileQuality(const std::vector<ALIstring>& wordlist);
0098
0099 private:
0100
0101 protected:
0102 ALIstring name_;
0103 ALIstring type_;
0104 ALIdouble value_;
0105 ALIdouble valueOriginalOriginal_;
0106 ALIdouble sigma_;
0107 ALIdouble sigmaOriginalOriginal_;
0108 ALIuint quality_;
0109 OpticalObject* OptOCurrent_;
0110 ALIint fitPos_;
0111
0112 ALIdouble valueDisplacementByFitting_;
0113 ALIdouble lastAdditionToValueDisplacementByFitting_;
0114
0115
0116
0117
0118
0119
0120 EntryDim theDimType;
0121 };
0122
0123 #endif