CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalAlignmentPyWrapper.cc
Go to the documentation of this file.
4 #include "TH2F.h"
5 #include "TCanvas.h"
6 #include "TLine.h"
7 #include "TStyle.h"
8 #include "TPave.h"
9 #include "TPaveStats.h"
10 
13 
14 #include <string>
15 #include <fstream>
16 
17 using namespace std;
18 namespace cond {
19 
20  template<>
21  class ValueExtractor<Alignments>: public BaseValueExtractor<Alignments> {
22  public:
23 
24  typedef Alignments Class;
26  static What what() { return What();}
27 
29  ValueExtractor(What const & what)
30  {
31  // here one can make stuff really complicated...
32  }
33  void compute(Class const & it){
34  }
35  private:
36 
37  };
38 
39  template<>
41 
42  stringstream ss;
44  ss << EcalAlignmentXMLTranslator::dumpXML(header,object());
45  return ss.str();
46  }
47 
48  template<>
50 
51  stringstream ss;
52  ss << " Id x y z phi theta psi " << endl;
53  for ( vector<AlignTransform>::const_iterator it = object().m_align.begin();
54  it != object().m_align.end(); it++ ) {
55  ss << hex << (*it).rawId()
56  << " " << (*it).translation().x()
57  << " " << (*it).translation().y()
58  << " " << (*it).translation().z()
59  << " " << (*it).rotation().getPhi()
60  << " " << (*it).rotation().getTheta()
61  << " " << (*it).rotation().getPsi()
62  << endl;
63  }
64  return ss.str();
65  }
66 
67 
68  template<>
70  string const &,
71  vector<int> const&,
72  vector<float> const& ) const {
73  return filename;
74  }
75 }
76 
#define PYTHON_WRAPPER(_class, _name)
static std::string dumpXML(const EcalCondHeader &header, const Alignments &record)
list object
Definition: dbtoconf.py:77
tuple filename
Definition: lut2db_cfg.py:20