CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FillInfoPyWrapper.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<FillInfo>: public BaseValueExtractor<FillInfo> {
14  public:
15 
16  typedef FillInfo Class;
18  static What what() { return What();}
19 
22  {
23  // here one can make stuff really complicated...
24  }
25  void compute( Class const & it ){
26  this->add( it.fillNumber() );
27  this->add( it.bunchesInBeam1() );
28  this->add( it.bunchesInBeam2() );
29  this->add( it.collidingBunches() );
30  this->add( it.targetBunches() );
31  this->add( it.crossingAngle() );
32  this->add( it.betaStar() );
33  this->add( it.intensityForBeam1() );
34  this->add( it.intensityForBeam2() );
35  this->add( it.energy() );
36  this->add( it.createTime() );
37  this->add( it.beginTime() );
38  this->add( it.endTime() );
39  }
40  private:
41 
42  };
43 
44  template<>
46  std::stringstream ss;
47  ss << this->object();
48  return ss.str();
49  }
50 
51  template<>
53  std::string const &,
54  std::vector<int> const&,
55  std::vector<float> const& ) const {
56  std::string fname = filename + ".png";
57  std::ofstream f(fname.c_str());
58  return fname;
59  }
60 
61 }
62 
float const intensityForBeam1() const
Definition: FillInfo.cc:183
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)
cond::Time_t const beginTime() const
Definition: FillInfo.cc:199
unsigned short const fillNumber() const
Definition: FillInfo.cc:139
std::string summary() const
unsigned short const bunchesInBeam1() const
Definition: FillInfo.cc:147
double f[11][100]
float const betaStar() const
Definition: FillInfo.cc:179
cond::Time_t const createTime() const
Definition: FillInfo.cc:195
list object
Definition: dbtoconf.py:77
string fname
main script
cond::Time_t const endTime() const
Definition: FillInfo.cc:203
tuple filename
Definition: lut2db_cfg.py:20
float const energy() const
Definition: FillInfo.cc:191
unsigned short const bunchesInBeam2() const
Definition: FillInfo.cc:151
float const intensityForBeam2() const
Definition: FillInfo.cc:187
unsigned short const targetBunches() const
Definition: FillInfo.cc:159
float const crossingAngle() const
Definition: FillInfo.cc:175
unsigned short const collidingBunches() const
Definition: FillInfo.cc:155