CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCObPVSSmapPyWrapper.cc
Go to the documentation of this file.
4 
5 #include <string>
6 #include <fstream>
7 #include <sstream>
8 #include <iostream>
9 
10 namespace cond {
11 
12  template<>
13  class ValueExtractor<RPCObPVSSmap>: public BaseValueExtractor<RPCObPVSSmap> {
14  public:
15 
18  static What what() { return What();}
19 
22  {
23  // here one can make stuff really complicated...
24  }
25  void compute(Class const & it) override{
26  }
27  private:
28 
29  };
30 
31  template<>
33  std::stringstream ss;
34 
35  std::vector<RPCObPVSSmap::Item> const & vdetid = object().ObIDMap_rpc;
36 
37 
38  for(unsigned int i = 0; i < vdetid.size(); ++i ){
39  ss <<vdetid[i].dpid <<" "<<vdetid[i].region<<" "<<vdetid[i].ring<<" "<<vdetid[i].sector<<" "<<vdetid[i].station<<" "<<vdetid[i].layer<<" "<<vdetid[i].subsector<<" "<<vdetid[i].suptype<<" ";
40  }
41 
42  return ss.str();
43  }
44 
45 
46  template<>
48  std::string const &,
49  std::vector<int> const&,
50  std::vector<float> const& ) const {
51  std::string fname = filename + ".png";
52  std::ofstream f(fname.c_str());
53  return fname;
54  }
55 
56 
57 }
58 
59 
61 
int i
Definition: DBlmapReader.cc:9
std::string plot(std::string const &, std::string const &, std::vector< int > const &, std::vector< float > const &) const
ExtractWhat< Class > What
#define PYTHON_WRAPPER(_class, _name)
std::string summary() const
double f[11][100]
void compute(Class const &it) override
list object
Definition: dbtoconf.py:77
string fname
main script
tuple filename
Definition: lut2db_cfg.py:20