CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlCaRecoTriggerBitsPyWrapper.cc
Go to the documentation of this file.
1 
3 #include <boost/algorithm/string.hpp>
6 
7 #include <string>
8 #include <fstream>
9 
10 namespace cond {
11 
12  template<>
13  class ValueExtractor<AlCaRecoTriggerBits>: public BaseValueExtractor<AlCaRecoTriggerBits> {
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){
26  }
27  private:
28 
29  };
30 
31 
32  template<>
35  std::stringstream ss;
36  return ss.str();
37 
38  }
39 
40  template<>
42  // std::stringstream ss;
43  std::string result = "empty map";
44  if( object().m_alcarecoToTrig.size() > 0 ) {
45  // ss << "trigger bit : value \n";
46  // std::map<std::string, std::string>::const_iterator it = object().m_alcarecoToTrig.begin();
47 
48  //std::vector<std::string> strs;
49  //boost::split(strs, object().m_alcarecoToTrig.begin()->second, boost::is_any_of(";"));
50  result = object().m_alcarecoToTrig.begin()->first +" :\n"+ object().m_alcarecoToTrig.begin()->second;
51  boost::replace_all(result, ";", ";\n");
52  //ss << it->first << " : " << it->second << "\n";
53  }
54  return result;
55  }
56 
57 
58  template<>
60  std::string const &,
61  std::vector<int> const&,
62  std::vector<float> const& ) const {
63  std::string fname = filename + ".png";
64  std::ofstream f(fname.c_str());
65  return fname;
66  }
67 
68 
69 }
70 
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
tuple result
Definition: query.py:137
double f[11][100]
list object
Definition: dbtoconf.py:77
string fname
main script
tuple filename
Definition: lut2db_cfg.py:20
std::string dump() const