CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CondFormats/OptAlignObjects/interface/OpticalAlignInfo.h

Go to the documentation of this file.
00001 #ifndef OpticalAlignInfo_H
00002 #define OpticalAlignInfo_H
00003 
00004 #include <string>
00005 #include <vector>
00006 #include <iostream>
00007 
00008 #include "CondFormats/OptAlignObjects/interface/OAQuality.h"
00009 
00014 class OpticalAlignInfo;
00015 
00016 std::ostream & operator<<(std::ostream &, const OpticalAlignInfo &);
00017 
00022 class OpticalAlignParam;
00023 
00024 std::ostream & operator<<(std::ostream &, const OpticalAlignParam &);
00025 
00026 
00033 class OpticalAlignParam {
00034  public:
00035   OpticalAlignParam();
00036   OpticalAlignParam( const OpticalAlignParam &rhs );
00037 
00038   std::string name() const { return name_; }
00039   double value() const { return value_; }
00040   double sigma() const { return error_; }
00041   int quality() const { return quality_; }
00042   std::string dimType() const { return dim_type_; }
00043 
00044  public:
00045   double value_;
00046   double error_;
00047   int quality_; // f = fixed, c = calibrated, u = unknown.
00048   std::string name_;
00049   std::string dim_type_;
00050 
00051   void clear() {
00052     value_ = 0.0;
00053     error_ = 0.0;
00054     quality_ = int( oa_unknown );
00055     name_.clear();
00056   }
00057 };
00058 
00059 // a Class holding data for an Optical Alignment transformation
00068 class  OpticalAlignInfo {
00069  public:  
00070   /*
00071   OpticalAlignParam x() const { return x_; }
00072   OpticalAlignParam y() const { return y_; }
00073   OpticalAlignParam z() const { return z_; }
00074   OpticalAlignParam angX() const { return angx_; }
00075   OpticalAlignParam angY() const { return angy_; }
00076   OpticalAlignParam angZ() const { return angz_; }
00077   std::vector<OpticalAlignParam> extraEntries() const { return extraEntries_; }
00078   std::string type() { return type_; }
00079   std::string name() const { return name_; }
00080   std::string parentName() const { return parentObjectName_; }
00081   unsigned int ID() const { return ID_; }
00082   */
00083   OpticalAlignParam* findExtraEntry( std::string& name );
00084 
00085  public:
00086   OpticalAlignParam x_, y_, z_, angx_, angy_, angz_;
00087   std::vector<OpticalAlignParam> extraEntries_;
00088   std::string type_;
00089   std::string name_;
00090   std::string parentName_;
00091   unsigned int ID_;
00092   void clear() {
00093     x_.clear();
00094     y_.clear();
00095     z_.clear();
00096     angx_.clear();
00097     angy_.clear();
00098     angz_.clear();
00099     extraEntries_.clear();
00100     type_.clear();
00101     ID_ = 0;
00102   }
00103 };
00104 
00105 
00114 /* class  OpticalAlignCOPSInfo : public OpticalAlignInfo { */
00115 /*  public:   */
00116 /*   OpticalAlignParam dowel1X_, dowel1Y_; */
00117 /*   OpticalAlignParam upCCDtoDowel2X_, upCCDtoDowel2Y_; */
00118 /*   OpticalAlignParam downCCDtoDowel2X_, downCCDtoDowel2Y_; */
00119 /*   OpticalAlignParam leftCCDtoDowel2X_, leftCCDtoDowel2Y_; */
00120 /*   OpticalAlignParam rightCCDtoDowel2X_, rightCCDtoDowel2Y_; */
00121 /* }; */
00122 
00123 #endif //OpticalAlignInfo_H