00001 #ifndef Alignment_MuonAlignment_MuonAlignmentInputXML_h
00002 #define Alignment_MuonAlignment_MuonAlignmentInputXML_h
00003
00004
00005
00006
00007
00016
00017
00018
00019
00020
00021
00022
00023 #include <string>
00024 #include "xercesc/dom/DOMElement.hpp"
00025 #include "xercesc/util/XercesDefs.hpp"
00026
00027
00028
00029 #include "Alignment/MuonAlignment/interface/MuonAlignmentInputMethod.h"
00030 #include "Alignment/CommonAlignment/interface/Alignable.h"
00031
00032
00033
00034 class MuonAlignmentInputXML: public MuonAlignmentInputMethod {
00035 public:
00036 MuonAlignmentInputXML(std::string fileName);
00037 virtual ~MuonAlignmentInputXML();
00038
00039
00040
00041
00042
00043
00044
00045 virtual AlignableMuon *newAlignableMuon(const edm::EventSetup &iSetup) const;
00046
00047 private:
00048 MuonAlignmentInputXML(const MuonAlignmentInputXML&);
00049
00050 const MuonAlignmentInputXML& operator=(const MuonAlignmentInputXML&);
00051
00052 void recursiveGetId(std::map<unsigned int, Alignable*> &alignableNavigator, const align::Alignables &alignables) const;
00053
00054 void fillAliToIdeal(std::map<Alignable*, Alignable*> &alitoideal, const align::Alignables alignables, const align::Alignables ideals) const;
00055
00056 Alignable *getNode(std::map<unsigned int, Alignable*> &alignableNavigator, const XERCES_CPP_NAMESPACE::DOMElement *node) const;
00057 Alignable *getDTnode(align::StructureType structureType, std::map<unsigned int, Alignable*> &alignableNavigator, const XERCES_CPP_NAMESPACE::DOMElement *node) const;
00058 Alignable *getCSCnode(align::StructureType structureType, std::map<unsigned int, Alignable*> &alignableNavigator, const XERCES_CPP_NAMESPACE::DOMElement *node) const;
00059
00060 double parseDouble(const XMLCh *str, const char *attribute) const;
00061 void set_one_position(Alignable *ali, const align::PositionType &pos, const align::RotationType &rot) const;
00062
00063 void do_setposition (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const;
00064 void do_setape (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const;
00065 void do_setsurveyerr(const XERCES_CPP_NAMESPACE::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const;
00066 void do_moveglobal (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const;
00067 void do_movelocal (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const;
00068 void do_rotatelocal (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const;
00069 void do_rotatebeamline (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const;
00070 void do_rotateglobalaxis(const XERCES_CPP_NAMESPACE::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const;
00071
00072
00073 std::string m_fileName;
00074
00075 XMLCh *str_operation;
00076 XMLCh *str_collection;
00077 XMLCh *str_name;
00078 XMLCh *str_DTBarrel;
00079 XMLCh *str_DTWheel;
00080 XMLCh *str_DTStation;
00081 XMLCh *str_DTChamber;
00082 XMLCh *str_DTSuperLayer;
00083 XMLCh *str_DTLayer;
00084 XMLCh *str_CSCEndcap;
00085 XMLCh *str_CSCStation;
00086 XMLCh *str_CSCRing;
00087 XMLCh *str_CSCChamber;
00088 XMLCh *str_CSCLayer;
00089 XMLCh *str_setposition;
00090 XMLCh *str_setape;
00091 XMLCh *str_setsurveyerr;
00092 XMLCh *str_moveglobal;
00093 XMLCh *str_movelocal;
00094 XMLCh *str_rotatelocal;
00095 XMLCh *str_rotatebeamline;
00096 XMLCh *str_rotateglobalaxis;
00097 XMLCh *str_relativeto;
00098 XMLCh *str_rawId;
00099 XMLCh *str_wheel;
00100 XMLCh *str_station;
00101 XMLCh *str_sector;
00102 XMLCh *str_superlayer;
00103 XMLCh *str_layer;
00104 XMLCh *str_endcap;
00105 XMLCh *str_ring;
00106 XMLCh *str_chamber;
00107 XMLCh *str_axisx;
00108 XMLCh *str_axisy;
00109 XMLCh *str_axisz;
00110 XMLCh *str_angle;
00111 XMLCh *str_x;
00112 XMLCh *str_y;
00113 XMLCh *str_z;
00114 XMLCh *str_phix;
00115 XMLCh *str_phiy;
00116 XMLCh *str_phiz;
00117 XMLCh *str_alpha;
00118 XMLCh *str_beta;
00119 XMLCh *str_gamma;
00120 XMLCh *str_rphi;
00121 XMLCh *str_phi;
00122 XMLCh *str_xx;
00123 XMLCh *str_xy;
00124 XMLCh *str_xz;
00125 XMLCh *str_xa;
00126 XMLCh *str_xb;
00127 XMLCh *str_xc;
00128 XMLCh *str_yy;
00129 XMLCh *str_yz;
00130 XMLCh *str_ya;
00131 XMLCh *str_yb;
00132 XMLCh *str_yc;
00133 XMLCh *str_zz;
00134 XMLCh *str_za;
00135 XMLCh *str_zb;
00136 XMLCh *str_zc;
00137 XMLCh *str_aa;
00138 XMLCh *str_ab;
00139 XMLCh *str_ac;
00140 XMLCh *str_bb;
00141 XMLCh *str_bc;
00142 XMLCh *str_cc;
00143 XMLCh *str_none;
00144 XMLCh *str_ideal;
00145 XMLCh *str_container;
00146 };
00147
00148
00149 #endif