CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RunSummaryPyWrapper.cc
Go to the documentation of this file.
1 
3 
6 
7 #include <string>
8 #include <fstream>
9 
10 namespace cond {
11 
12  template<>
13  class ValueExtractor<RunSummary>: public BaseValueExtractor<RunSummary> {
14  public:
15 
16  typedef RunSummary Class;
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 
32  template<>
35  std::stringstream ss;
36  return ss.str();
37 
38  }
39 
40  template<>
42  std::stringstream ss;
43  ss << "RUN: "<<object().m_run;
44  ss << ", NAME: " <<object().m_name;
45  ss << ", START TIME: " << object().m_start_time_str;
46  ss << ", STOP TIME:" << object().m_stop_time_str;
47  ss << ", LUMISECTIONS: " << object().m_lumisections;
48  ss << ", HLT_KEY: " << object().m_hltkey;
49  ss << ", TRG_NEVENTS: " << object().m_nevents;
50  ss << ", TRG_RATE: " << object().m_rate;
51  ss << ", SUBDETS IB RUN: ";
52  for (size_t i=0; i<object().m_subdt_in.size() ; i++){
53  if (object().m_subdt_in[i]==0) {
54  ss<< "PIXEL, ";
55  }
56  if (object().m_subdt_in[i]==1) {
57  ss<<"TRACKER, ";
58  }
59  if (object().m_subdt_in[i]==2) {
60  ss<< "ECAL, " ;
61  }
62  if (object().m_subdt_in[i]==3) {
63  ss<< "HCAL, ";
64  }
65  if (object().m_subdt_in[i]==4) {
66  ss<<"DT," ;
67  }
68  if (object().m_subdt_in[i]==5) {
69  ss<<"CSC,";
70  }
71  if (object().m_subdt_in[i]==6) {
72  ss<<"RPC, ";
73  }
74  }
75 
76 
77  return ss.str();
78  }
79 
80 
81  template<>
83  std::string const &,
84  std::vector<int> const&,
85  std::vector<float> const& ) const {
86  std::string fname = filename + ".png";
87  std::ofstream f(fname.c_str());
88  return fname;
89  }
90 
91 
92 }
93 
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
std::string dump() const