CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCObTempPyWrapper.cc
Go to the documentation of this file.
3 
6 
9 //#include "CondCore/DBCommon/interface/DbSession.h"
11 
12 //#include "CondCore/ORA/interface/Database.h"
13 //#include "CondCore/DBCommon/interface/PoolToken.h"
14 
16 //#include "DataFormats/GeometryVector/interface/LocalPoint.h"
17 //#include "DataFormats/GeometrySurface/interface/Surface.h"
18 
19 //#include "Geometry/RPCGeometry/interface/RPCGeometry.h"
21 
22 //timestamp stuff
23 //#include "DataFormats/Provenance/interface/Timestamp.h"
24 #include <sys/time.h>
25 
27 #include "TROOT.h"
28 #include "TCanvas.h"
29 #include "TStyle.h"
30 #include "TColor.h"
31 #include "TLine.h"
32 #include "TVirtualPad.h"
33 #include "TH1D.h"
34 #include "TH2D.h"
35 #include "TGraph.h"
36 #include "TMultiGraph.h"
37 #include "TLegend.h"
38 #include "TF1.h"
39 #include "TPaveStats.h"
40 #include "TPaveText.h"
41 
42 #include <string>
43 #include <fstream>
44 #include <sstream>
45 #include <algorithm>
46 #include <numeric>
47 #include <iterator>
48 #include <iostream>
49 #include <fstream>
50 #include <utility>
51 #include <iomanip>
52 #include <boost/ref.hpp>
53 #include <boost/bind.hpp>
54 #include <boost/function.hpp>
55 #include <boost/shared_ptr.hpp>
56 #include <boost/iterator/transform_iterator.hpp>
57 
58 using std::pair;
59 using std::make_pair;
60 
61 namespace cond {
62 
63  namespace rpcobtemp {
64  enum How { detid, day, time, temp};
65 
66  void extractDetId(RPCObTemp const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime, const float& endtime) {
67  std::vector<RPCObTemp::T_Item> const & imon = pl.ObTemp_rpc;
68  for(unsigned int i = 0; i < imon.size(); ++i ){
69  if (which[0] == 0){
70  result.push_back(imon[i].dpid);
71  }
72  else{
73  if(imon[i].dpid == which[0])
74  result.push_back(imon[i].dpid);
75  }
76  }
77  }
78 
79  void extractDay(RPCObTemp const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime, const float& endtime) {
80  std::vector<RPCObTemp::T_Item> const & imon = pl.ObTemp_rpc;
81  for(unsigned int i = 0; i < imon.size(); ++i ){
82  if (which[0] == 0){
83  result.push_back(imon[i].day);
84  }
85  else{
86  if(imon[i].dpid == which[0])
87  result.push_back(imon[i].day);
88  }
89  }
90  }
91 
92  void extractTime(RPCObTemp const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime, const float& endtime) {
93  std::vector<RPCObTemp::T_Item> const & imon = pl.ObTemp_rpc;
94  for(unsigned int i = 0; i < imon.size(); ++i ){
95  if (which[0] == 0){
96  result.push_back(imon[i].time);
97  }
98  else{
99  if(imon[i].dpid == which[0])
100  result.push_back(imon[i].time);
101  }
102  }
103  }
104 
105  void extractTemp(RPCObTemp const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime,const float& endtime) {
106  std::vector<RPCObTemp::T_Item> const & imon = pl.ObTemp_rpc;
107  for(unsigned int i = 0; i < imon.size(); ++i ){
108  if (which[0] == 0){
109  result.push_back(imon[i].value);
110  }
111  else{
112  if(imon[i].dpid == which[0])
113  result.push_back(imon[i].value);
114  }
115  }
116  }
117 
118  typedef boost::function<void(RPCObTemp const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime,const float& endtime)> RPCObTempExtractor;
119  }
120 
121  template<>
123 
125  std::vector<int> m_which;
126  float m_starttime;
127  float m_endtime;
128 
129  rpcobtemp::How const & how() const { return m_how;}
130  std::vector<int> const & which() const { return m_which;}
131  float const & startTime() const {return m_starttime;}
132  float const & endTime() const {return m_endtime;}
133 
134  void set_how(rpcobtemp::How i) {m_how=i;}
135  void set_which(std::vector<int> & i) { m_which.swap(i);}
136  void set_starttime(float& i){m_starttime = i;}
137  void set_endtime(float& i){m_endtime = i;}
138 
139  };
140 
141 
142  template<>
143  class ValueExtractor<RPCObTemp>: public BaseValueExtractor<RPCObTemp> {
144  public:
145 
147  static rpcobtemp::RPCObTempExtractor fun[4] = {
152  };
153  return fun[how];
154  }
155 
156  typedef RPCObTemp Class;
158  static What what() { return What();}
159 
162  : m_what(what)
163  {
164  // here one can make stuff really complicated... (select mean rms, 12,6,1)
165  // ask to make average on selected channels...
166  }
167 
168  void compute(Class const & it) override{
169  std::vector<float> res;
170  extractor(m_what.how())(it,m_what.which(),res,m_what.startTime(),m_what.endTime());
171  swap(res);
172  }
173 
174  private:
176 
177  };
178 
179  template<>
181  std::stringstream ss;
182 
183  //hardcoded values
184  std::string authPath="/afs/cern.ch/cms/DB/conddb";
185  std::string conString="oracle://cms_orcoff_prod/CMS_COND_31X_RPC";
186 
187  //frontend sends token instead of filename
188  std::string token="[DB=00000000-0000-0000-0000-000000000000][CNT=RPCObPVSSmap][CLID=53B2D2D9-1F4E-9CA9-4D71-FFCCA123A454][TECH=00000B01][OID=0000000C-00000000]";
189 
190  //make connection object
191  DbConnection dbConn;
192 
193  //set in configuration object authentication path
194  dbConn.configuration().setAuthenticationPath(authPath);
195  dbConn.configure();
196 
197  //create session object from connection
198  DbSession dbSes=dbConn.createSession();
199 
200  //try to make connection
201  dbSes.open(conString,true);
202 
203  //start a transaction (true=readOnly)
204  dbSes.transaction().start(true);
205 
206  //get the actual object
207  boost::shared_ptr<RPCObPVSSmap> pvssPtr;
208  pvssPtr=dbSes.getTypedObject<RPCObPVSSmap>(token);
209 
210  //we have the object...
211  std::vector<RPCObPVSSmap::Item> pvssCont=pvssPtr->ObIDMap_rpc;
212 
213  std::vector<RPCObTemp::T_Item> const & tmon = object().ObTemp_rpc;
214 
215  ss <<"DetID\t\t"<<"T(C)\t"<<"Time\t"<<"Day\n";
216  for(unsigned int i = 0; i < tmon.size(); ++i ){
217  for(unsigned int p = 0; p < pvssCont.size(); ++p){
218  if(tmon[i].dpid!=pvssCont[p].dpid || pvssCont[p].suptype!=4 || pvssCont[p].region!=0)continue;
219  RPCDetId rpcId(pvssCont[p].region,pvssCont[p].ring,pvssCont[p].station,pvssCont[p].sector,pvssCont[p].layer,pvssCont[p].subsector,1);
220  RPCGeomServ rGS(rpcId);
221  std::string chName(rGS.name().substr(0,rGS.name().find("_Backward")));
222  ss <<chName <<"\t"<<tmon[i].value<<"\t"<<tmon[i].time<<"\t"<<tmon[i].day<<"\n";
223  }
224  }
225 
226  dbSes.close();
227 
228  return ss.str();
229 
230  }
231 
232  Double_t linearF(Double_t *x, Double_t *par){
233  Double_t y=0.;
234  y=par[0]*(*x);
235  return y;
236  }
237 
238  // return the real name of the file including extension...
239  template<>
241  std::string const &, std::vector<int> const&, std::vector<float> const& ) const {
242 
243  std::map<std::string,std::pair<float,float> > geoMap;
244  std::ifstream mapFile("/afs/cern.ch/user/s/stupputi/public/barDetPositions.txt",std::ifstream::in);
245  std::string chamb;
246  float xPos,yPos;
247  while(mapFile >> chamb >> xPos >> yPos)
248  geoMap[chamb]=make_pair(xPos,yPos);
249  std::cout<<"size "<<geoMap.size()<<std::endl;
250  gStyle->SetPalette(1);
251 
252  //BEGIN OF NEW DB-SESSION PART
253  //hardcoded values
254  std::string authPath="/afs/cern.ch/cms/DB/conddb";
255  std::string conString="oracle://cms_orcoff_prod/CMS_COND_31X_RPC";
256 
257  //frontend sends token instead of filename
258  std::string token="[DB=00000000-0000-0000-0000-000000000000][CNT=RPCObPVSSmap][CLID=53B2D2D9-1F4E-9CA9-4D71-FFCCA123A454][TECH=00000B01][OID=0000000C-00000000]";
259 
260  //make connection object
261  DbConnection dbConn;
262 
263  //set in configuration object authentication path
264  dbConn.configuration().setAuthenticationPath(authPath);
265  dbConn.configure();
266 
267  //create session object from connection
268  DbSession dbSes=dbConn.createSession();
269 
270  //try to make connection
271  dbSes.open(conString,true);
272 
273  //start a transaction (true=readOnly)
274  dbSes.transaction().start(true);
275 
276  //get the actual object
277  boost::shared_ptr<RPCObPVSSmap> pvssPtr;
278  pvssPtr=dbSes.getTypedObject<RPCObPVSSmap>(token);
279 
280  //we have the object...
281  std::vector<RPCObPVSSmap::Item> pvssCont=pvssPtr->ObIDMap_rpc;
282  //END OF NEW DB-SESSION PART
283 
284  std::vector<RPCObTemp::T_Item> const & temp = object().ObTemp_rpc;
285 
286  std::map<int,std::map<int,std::vector<double> > > valMap;
287  std::map<int,std::string> detMap;
288  for(unsigned int i = 0;i < temp.size(); ++i){
289  for(unsigned int p = 0; p < pvssCont.size(); ++p){
290  if(temp[i].dpid!=pvssCont[p].dpid || pvssCont[p].suptype!=4 || pvssCont[p].region!=0)continue;
291  int whl(pvssCont[p].ring);
292  if(valMap.find(whl)==valMap.end()){
293  std::map<int,std::vector<double> > dumMap;
294  std::vector<double> dumVec;dumVec.push_back(temp[i].value);
295  dumMap[temp[i].dpid]=dumVec;
296  valMap[whl]=dumMap;
297  }
298  else {
299  if(valMap[whl].find(temp[i].dpid)==valMap[whl].end()){
300  std::vector<double> dumVec;dumVec.push_back(temp[i].value);
301  (valMap[whl])[temp[i].dpid]=dumVec;
302  }
303  else
304  (valMap[whl])[temp[i].dpid].push_back(temp[i].value);
305  }
306  if(detMap.find(temp[i].dpid)==detMap.end()){
307  RPCDetId rpcId(pvssCont[p].region,pvssCont[p].ring,pvssCont[p].station,pvssCont[p].sector,pvssCont[p].layer,pvssCont[p].subsector,1);
308  RPCGeomServ chGS(rpcId);
309  std::string chName(chGS.name());
310  std::string::size_type pos(chName.find("_S"));
311  if(pos!=std::string::npos)
312  chName=chName.substr(0,pos+5);
313  else
314  chName=chName.substr(0,chName.find("_CH")+5);
315  detMap[temp[i].dpid]=chName;
316  }
317  }
318  }
319 
320  float histoScale(710),axisScale(750);
321  int flip(-1);
322  float incr(0.045*histoScale);
323  float midSc(0.267949192431123),diagSc(sqrt((1.+(midSc*midSc))/2.));
324  float dists[]={0.558f*histoScale,0.607f*histoScale,0.697f*histoScale,/*0.6971f*xSc,0.7464f*xSc,*/0.823f*histoScale,0.967f*histoScale};
325 
326  TCanvas *c=new TCanvas("Temp","Temp",1200,700);
327  c->Divide(3,2);
328 
329  for(int w=-2;w<3;w++){
330  // if(w!=1)continue;
331  int canv(w+3);
332  c->cd(canv);
333 
334  char wNumb[8];
335  sprintf(wNumb,"Wheel %i",w);
336 
337  TH2F *histo= new TH2F("","",(2*axisScale)/incr,(-1)*axisScale,axisScale,(2*axisScale)/incr,(-1)*axisScale,axisScale);
338  histo->GetXaxis()->SetTickLength(0);histo->GetXaxis()->SetLabelColor(0);histo->GetXaxis()->SetTitle("Temperature (#circC)");
339  histo->GetYaxis()->SetTickLength(0);histo->GetYaxis()->SetLabelColor(0);
340 
341  double min(1000),max(-1);
342  for(std::map<int,std::vector<double> >::const_iterator mIt=valMap[w].begin();
343  mIt!=valMap[w].end();mIt++){
344 
345  std::pair<double, std::vector<double> > meanAndVals =
346  make_pair(accumulate(mIt->second.begin(),mIt->second.end(),0.)/(double)mIt->second.size(),mIt->second);
347  std::string chName(detMap[mIt->first]);
348  histo->Fill(geoMap[chName].first,geoMap[chName].second,meanAndVals.first);
349  if(meanAndVals.first<min)min=meanAndVals.first;
350  if(meanAndVals.first>max)max=meanAndVals.first;
351  std::cout<<chName<<" "<<geoMap[chName].first<<" "<<geoMap[chName].second<<" "<<meanAndVals.first<<std::endl;
352  }
353 
354  histo->GetZaxis()->SetRangeUser(min,max);
355  histo->Draw("colz");
356 
357  TPaveStats *ptstats = new TPaveStats(0.98,0.98,0.99,0.99,"br");
358  histo->GetListOfFunctions()->Add(ptstats);
359  histo->Draw("same");
360 
361  TPaveText *pt=new TPaveText(-235,763,248,860,"br");
362  pt->SetFillColor(19);
363  pt->AddText(wNumb);
364  pt->Draw("same");
365 
366  TLine *line = new TLine();
367  for(int i=0;i<5;i++){
368  float scDist(midSc*dists[i]),onDiag(diagSc*dists[i]);
369  float furDist(dists[i]+incr),scFurDist(midSc*furDist),furOnDiag(diagSc*furDist);
370 
371  line=new TLine(dists[i],flip*scDist,dists[i],scDist);line->Draw();//S01
372  line=new TLine(dists[i],flip*scDist,furDist,flip*scDist);line->Draw();
373  line=new TLine(dists[i],scDist,furDist,scDist);line->Draw();
374  line=new TLine(furDist,flip*scDist,furDist,scDist);line->Draw();
375  line=new TLine(flip*dists[i],flip*scDist,flip*dists[i],scDist);line->Draw();//S07
376  line=new TLine(flip*dists[i],flip*scDist,flip*furDist,flip*scDist);line->Draw();
377  line=new TLine(flip*dists[i],scDist,flip*furDist,scDist);line->Draw();
378  line=new TLine(flip*furDist,flip*scDist,flip*furDist,scDist);line->Draw();
379  line=new TLine(onDiag,onDiag,dists[i],scDist);line->Draw();//S02
380  line=new TLine(onDiag,onDiag,furOnDiag,furOnDiag);line->Draw();
381  line=new TLine(dists[i],scDist,furDist,scFurDist);line->Draw();
382  line=new TLine(furOnDiag,furOnDiag,furDist,scFurDist);line->Draw();
383  line=new TLine(flip*onDiag,flip*onDiag,flip*dists[i],flip*scDist);line->Draw();//S08
384  line=new TLine(flip*onDiag,flip*onDiag,flip*furOnDiag,flip*furOnDiag);line->Draw();
385  line=new TLine(flip*dists[i],flip*scDist,flip*furDist,flip*scFurDist);line->Draw();
386  line=new TLine(flip*furOnDiag,flip*furOnDiag,flip*furDist,flip*scFurDist);line->Draw();
387  line=new TLine(onDiag,onDiag,scDist,dists[i]);line->Draw();//S03
388  line=new TLine(onDiag,onDiag,furOnDiag,furOnDiag);line->Draw();
389  line=new TLine(scDist,dists[i],scFurDist,furDist);line->Draw();
390  line=new TLine(furOnDiag,furOnDiag,scFurDist,furDist);line->Draw();
391  line=new TLine(flip*onDiag,flip*onDiag,flip*scDist,flip*dists[i]);line->Draw();//S09
392  line=new TLine(flip*onDiag,flip*onDiag,flip*furOnDiag,flip*furOnDiag);line->Draw();
393  line=new TLine(flip*scDist,flip*dists[i],flip*scFurDist,flip*furDist);line->Draw();
394  line=new TLine(flip*furOnDiag,flip*furOnDiag,flip*scFurDist,flip*furDist);line->Draw();
395  if(i==4){
396 
397  line=new TLine(flip*scDist,dists[i],-0.005,dists[i]);line->Draw();//S04-
398  line=new TLine(flip*scDist,dists[i],flip*scDist,furDist);line->Draw();
399  line=new TLine(-0.005,dists[i],-0.005,furDist);line->Draw();
400  line=new TLine(flip*scDist,furDist,-0.005,furDist);line->Draw();
401  line=new TLine(0.005,dists[i],scDist,dists[i]);line->Draw();//S04+
402  line=new TLine(scDist,dists[i],scDist,furDist);line->Draw();
403  line=new TLine(0.005,dists[i],0.005,furDist);line->Draw();
404  line=new TLine(scDist,furDist,0.005,furDist);line->Draw();
405  line=new TLine(flip*scDist,flip*dists[i],-0.005,flip*dists[i]);line->Draw();//S10+
406  line=new TLine(flip*scDist,flip*dists[i],flip*scDist,flip*furDist);line->Draw();
407  line=new TLine(-0.005,flip*dists[i],-0.005,flip*furDist);line->Draw();
408  line=new TLine(flip*scDist,flip*furDist,-0.005,flip*furDist);line->Draw();
409  line=new TLine(0.005,flip*dists[i],scDist,flip*dists[i]);line->Draw();//S10-
410  line=new TLine(0.005,flip*dists[i],0.005,flip*furDist);line->Draw();
411  line=new TLine(scDist,flip*dists[i],scDist,flip*furDist);line->Draw();
412  line=new TLine(scDist,flip*furDist,0.005,flip*furDist);line->Draw();
413  }
414  else{
415  line=new TLine(flip*scDist,dists[i],scDist,dists[i]);line->Draw();//S04
416  line=new TLine(flip*scDist,dists[i],flip*scDist,furDist);line->Draw();
417  line=new TLine(scDist,dists[i],scDist,furDist);line->Draw();
418  line=new TLine(flip*scDist,furDist,scDist,furDist);line->Draw();
419  line=new TLine(flip*scDist,flip*dists[i],scDist,flip*dists[i]);line->Draw();//S10
420  line=new TLine(flip*scDist,flip*dists[i],flip*scDist,flip*furDist);line->Draw();
421  line=new TLine(scDist,flip*dists[i],scDist,flip*furDist);line->Draw();
422  line=new TLine(flip*scDist,flip*furDist,scDist,flip*furDist);line->Draw();
423  }
424  line=new TLine(flip*onDiag,onDiag,flip*scDist,dists[i]);line->Draw();//S05
425  line=new TLine(flip*onDiag,onDiag,flip*furOnDiag,furOnDiag);line->Draw();
426  line=new TLine(flip*scDist,dists[i],flip*scFurDist,furDist);line->Draw();
427  line=new TLine(flip*furOnDiag,furOnDiag,flip*scFurDist,furDist);line->Draw();
428  line=new TLine(onDiag,flip*onDiag,scDist,flip*dists[i]);line->Draw();//S11
429  line=new TLine(onDiag,flip*onDiag,furOnDiag,flip*furOnDiag);line->Draw();
430  line=new TLine(scDist,flip*dists[i],scFurDist,flip*furDist);line->Draw();
431  line=new TLine(furOnDiag,flip*furOnDiag,scFurDist,flip*furDist);line->Draw();
432  line=new TLine(flip*onDiag,onDiag,flip*dists[i],scDist);line->Draw();//S06
433  line=new TLine(flip*onDiag,onDiag,flip*furOnDiag,furOnDiag);line->Draw();
434  line=new TLine(flip*dists[i],scDist,flip*furDist,scFurDist);line->Draw();
435  line=new TLine(flip*furOnDiag,furOnDiag,flip*furDist,scFurDist);line->Draw();
436  line=new TLine(onDiag,flip*onDiag,dists[i],flip*scDist);line->Draw();//S12
437  line=new TLine(onDiag,flip*onDiag,furOnDiag,flip*furOnDiag);line->Draw();
438  line=new TLine(dists[i],flip*scDist,furDist,flip*scFurDist);line->Draw();
439  line=new TLine(furOnDiag,flip*furOnDiag,furDist,flip*scFurDist);line->Draw();
440  }
441  }
442 
443  c->SaveAs(filename.c_str());
444  return filename.c_str();
445 
446  }
447 
448 
449 
450  template <>
452  std::string const & opt_string,
453  std::vector<int> const& nts,
454  std::vector<float> const& floats,
455  std::vector<std::string> const& strings) const {
456 
457  std::stringstream ss("");
458 
459  if(strings.size()<2)
460  return ("Error!Not enough data for initializing connection for making plots!(from template<> std::string PayLoadInspector<BeamSpotObjects>::trend_plot)");
461 
462  std::vector<std::string>::const_iterator strIt=strings.begin();
463 
464  std::string conString=(*strIt);strIt++;
465  std::string authPath=(*strIt);strIt++;
466 
467  //BEGIN OF NEW DB-SESSION PART
468 
469  //make connection object
470  DbConnection dbConn;
471 
472  //set in configuration object authentication path
473  dbConn.configuration().setAuthenticationPath(authPath);
474  dbConn.configure();
475 
476  //create session object from connection
477  DbSession dbSes=dbConn.createSession();
478 
479  //try to make connection
480  dbSes.open(conString,true);
481 
482  //start a transaction (true=readOnly)
483  dbSes.transaction().start(true);
484 
485  std::string pvssToken="[DB=00000000-0000-0000-0000-000000000000][CNT=RPCObPVSSmap][CLID=53B2D2D9-1F4E-9CA9-4D71-FFCCA123A454][TECH=00000B01][OID=0000000C-00000000]";
486  //get the actual object
487  boost::shared_ptr<RPCObTemp> tempPtr;
488  boost::shared_ptr<RPCObPVSSmap> pvssPtr;
489  pvssPtr=dbSes.getTypedObject<RPCObPVSSmap>(pvssToken);
490 
491  //we get the objects...
492  std::vector<RPCObPVSSmap::Item> pvssCont=pvssPtr->ObIDMap_rpc,pvssZero;
493 
494  for(unsigned int p=0;p<pvssCont.size();p++){
495  if(pvssCont[p].suptype!=4)
496  pvssZero.push_back(pvssCont[p]);
497  }
498 
499  std::string token;
500  std::vector<float> vecI;vecI.assign(floats.size(),0.);
501  int elCount(0);
502 
503  for(;strIt!=strings.end();++strIt){
504 
505  token=(*strIt);
506  tempPtr=dbSes.getTypedObject<RPCObTemp>(token);
507  std::vector<RPCObTemp::T_Item> const & temp = tempPtr->ObTemp_rpc;
508 
509  float iCount(0.);
510  for(unsigned int i=0;i<temp.size();i++){
511  for(unsigned int p=0;p<pvssZero.size();p++){
512  if(temp[i].dpid!=pvssZero[p].dpid || pvssZero[p].region!=0)continue;
513  iCount++;
514  vecI[elCount]+=temp[i].value;
515  }
516  }
517  if(iCount!=0)
518  vecI[elCount]/=iCount;
519  elCount++;
520  }
521 
522  //END OF NEW DB-SESSION PART
523 
524  dbSes.close();
525 
526  return ss.str();
527 
528  }
529 
530 }
531 
532 
533 namespace condPython {
534  template<>
536  using namespace boost::python;
537  enum_<cond::rpcobtemp::How>("How")
538  .value("detid",cond::rpcobtemp::detid)
539  .value("day",cond::rpcobtemp::day)
540  .value("time",cond::rpcobtemp::time)
541  .value("temp",cond::rpcobtemp::temp)
542  ;
543 
544  typedef cond::ExtractWhat<RPCObTemp> What;
545  class_<What>("What",init<>())
546  .def("set_how",&What::set_how)
547  .def("set_which",&What::set_which)
548  .def("how",&What::how, return_value_policy<copy_const_reference>())
549  .def("which",&What::which, return_value_policy<copy_const_reference>())
550  .def("set_starttime",&What::set_starttime)
551  .def("set_endtime",&What::set_endtime)
552  .def("startTime",&What::startTime, return_value_policy<copy_const_reference>())
553  .def("endTime",&What::endTime, return_value_policy<copy_const_reference>())
554  ;
555  }
556 }
557 
std::string trend_plot(std::string const &, std::string const &, std::vector< int > const &, std::vector< float > const &, std::vector< std::string > const &) const
std::vector< Item > ObIDMap_rpc
Definition: RPCObPVSSmap.h:34
int i
Definition: DBlmapReader.cc:9
std::vector< T_Item > ObTemp_rpc
Definition: RPCObCond.h:78
std::string plot(std::string const &, std::string const &, std::vector< int > const &, std::vector< float > const &) const
void set_which(std::vector< int > &i)
DbTransaction & transaction()
Definition: DbSession.cc:208
ExtractWhat< Class > What
void open(const std::string &connectionString, bool readOnly=false)
Definition: DbSession.cc:159
void extractDetId(RPCObTemp const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)
DbConnectionConfiguration & configuration()
Definition: DbConnection.cc:83
#define PYTHON_WRAPPER(_class, _name)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
uint16_t size_type
tuple starttime
Definition: lumiContext.py:322
static rpcobtemp::RPCObTempExtractor & extractor(rpcobtemp::How how)
void extractTime(RPCObTemp const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)
Double_t linearF(Double_t *x, Double_t *par)
boost::function< void(RPCObTemp const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)> RPCObTempExtractor
U second(std::pair< T, U > const &p)
double xPos
std::string summary() const
void extractTemp(RPCObTemp const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)
std::vector< int > const & which() const
int start(bool readOnly=false)
start transaction
virtual std::string name()
Definition: RPCGeomServ.cc:20
const T & max(const T &a, const T &b)
T sqrt(T t)
Definition: SSEVec.h:48
tuple result
Definition: query.py:137
double yPos
#define end
Definition: vmac.h:37
bool first
Definition: L1TdeRCT.cc:75
void swap(std::vector< float > &v)
int elCount
Definition: asciidump.py:417
DbSession createSession() const
Definition: DbConnection.cc:66
rpcobtemp::How const & how() const
float const & startTime() const
list object
Definition: dbtoconf.py:77
void compute(Class const &it) override
void setAuthenticationPath(const std::string &p)
#define begin
Definition: vmac.h:30
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
T w() const
Definition: DDAxes.h:10
boost::shared_ptr< T > getTypedObject(const std::string &objectId)
Definition: DbSession.h:126
void extractDay(RPCObTemp const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)
void defineWhat< RPCObTemp >()