CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCObImonPyWrapper.cc
Go to the documentation of this file.
3 
6 //#include "CondCore/DBCommon/interface/DbSession.h"
8 
9 //#include "CondCore/ORA/interface/Database.h"
10 //#include "CondCore/DBCommon/interface/PoolToken.h"
11 
14 //#include "CondCore/IOVService/interface/IOVProxy.h"
15 
18 
19 //timestamp stuff
20 //#include "DataFormats/Provenance/interface/Timestamp.h"
21 #include "CoralBase/TimeStamp.h"
22 #include <sys/time.h>
23 
25 #include "TROOT.h"
26 #include "TCanvas.h"
27 #include "TStyle.h"
28 #include "TColor.h"
29 #include "TLine.h"
30 #include "TVirtualPad.h"
31 #include "TH1D.h"
32 #include "TH2D.h"
33 #include "TGraph.h"
34 #include "TMultiGraph.h"
35 #include "TLegend.h"
36 #include "TF1.h"
37 #include "TDatime.h"
38 
39 #include <string>
40 #include <fstream>
41 #include <sstream>
42 #include <algorithm>
43 #include <numeric>
44 #include <iterator>
45 #include <iostream>
46 #include <fstream>
47 #include <utility>
48 #include <iomanip>
49 #include <boost/ref.hpp>
50 #include <boost/bind.hpp>
51 #include <boost/function.hpp>
52 #include <boost/shared_ptr.hpp>
53 #include <boost/iterator/transform_iterator.hpp>
54 
55 using std::pair;
56 using std::make_pair;
57 
58 namespace cond {
59 
60  namespace rpcobimon {
61  enum How { detid, day, time, current};
62 
63  void extractDetId(RPCObImon const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime, const float& endtime) {
64  std::vector<RPCObImon::I_Item> const & imon = pl.ObImon_rpc;
65  for(unsigned int i = 0; i < imon.size(); ++i ){
66  if (which[0] == 0){
67  result.push_back(imon[i].dpid);
68  }
69  else{
70  if(imon[i].dpid == which[0])
71  result.push_back(imon[i].dpid);
72  }
73  }
74  }
75 
76  void extractDay(RPCObImon const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime, const float& endtime) {
77  std::vector<RPCObImon::I_Item> const & imon = pl.ObImon_rpc;
78  for(unsigned int i = 0; i < imon.size(); ++i ){
79  if (which[0] == 0){
80  result.push_back(imon[i].day);
81  }
82  else{
83  if(imon[i].dpid == which[0])
84  result.push_back(imon[i].day);
85  }
86  }
87  }
88 
89  void extractTime(RPCObImon const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime, const float& endtime) {
90  std::vector<RPCObImon::I_Item> const & imon = pl.ObImon_rpc;
91  for(unsigned int i = 0; i < imon.size(); ++i ){
92  if (which[0] == 0){
93  result.push_back(imon[i].time);
94  }
95  else{
96  if(imon[i].dpid == which[0])
97  result.push_back(imon[i].time);
98  }
99  }
100  }
101 
102  void extractCurrent(RPCObImon const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime,const float& endtime) {
103  std::vector<RPCObImon::I_Item> const & imon = pl.ObImon_rpc;
104  for(unsigned int i = 0; i < imon.size(); ++i ){
105  if (which[0] == 0){
106  result.push_back(imon[i].value);
107  }
108  else{
109  if(imon[i].dpid == which[0])
110  result.push_back(imon[i].value);
111  }
112  }
113  }
114 
115  typedef boost::function<void(RPCObImon const & pl, std::vector<int> const & which,std::vector<float> & result,const float& starttime,const float& endtime)> RPCObImonExtractor;
116  }
117 
118  template<>
120 
122  std::vector<int> m_which;
123  float m_starttime;
124  float m_endtime;
125 
126  rpcobimon::How const & how() const { return m_how;}
127  std::vector<int> const & which() const { return m_which;}
128  float const & startTime() const {return m_starttime;}
129  float const & endTime() const {return m_endtime;}
130 
131  void set_how(rpcobimon::How i) {m_how=i;}
132  void set_which(std::vector<int> & i) { m_which.swap(i);}
133  void set_starttime(float& i){m_starttime = i;}
134  void set_endtime(float& i){m_endtime = i;}
135 
136  };
137 
138 
139  template<>
140  class ValueExtractor<RPCObImon>: public BaseValueExtractor<RPCObImon> {
141  public:
142 
144  static rpcobimon::RPCObImonExtractor fun[4] = {
149  };
150  return fun[how];
151  }
152 
153  typedef RPCObImon Class;
155  static What what() { return What();}
156 
159  : m_what(what)
160  {
161  // here one can make stuff really complicated... (select mean rms, 12,6,1)
162  // ask to make average on selected channels...
163  }
164 
165  void compute(Class const & it) override{
166  std::vector<float> res;
167  extractor(m_what.how())(it,m_what.which(),res,m_what.startTime(),m_what.endTime());
168  swap(res);
169  }
170 
171  private:
173 
174  };
175 
176  template<>
178 
179  std::stringstream ss;
180 
181  //BEGIN OF NEW DB-SESSION PART
182  //hardcoded values
183  std::string authPath="/afs/cern.ch/cms/DB/conddb";
184  std::string conString="oracle://cms_orcoff_prod/CMS_COND_31X_RPC";
185 
186  //frontend sends token instead of filename
187  std::string token="[DB=00000000-0000-0000-0000-000000000000][CNT=RPCObPVSSmap][CLID=53B2D2D9-1F4E-9CA9-4D71-FFCCA123A454][TECH=00000B01][OID=0000000C-00000000]";
188 
189  //make connection object
190  DbConnection dbConn;
191 
192  //set in configuration object authentication path
193  dbConn.configuration().setAuthenticationPath(authPath);
194  dbConn.configure();
195 
196  //create session object from connection
197  DbSession dbSes=dbConn.createSession();
198 
199  //try to make connection
200  dbSes.open(conString,true);
201 
202  //start a transaction (true=readOnly)
203  //cond::DbTransaction dbTr=
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  //END OF NEW DB-SESSION PART
213 
214  std::vector<RPCObImon::I_Item> const & imon = object().ObImon_rpc;
215 
216  ss<<"DetID\t\t\tI(uA)\tTime\tDay\n";
217  for(unsigned int i = 0; i < imon.size(); ++i ){
218  for(unsigned int p = 0; p < pvssCont.size(); ++p){
219  if(imon[i].dpid!=pvssCont[p].dpid || pvssCont[p].suptype!=0 || pvssCont[p].region!=0)continue;
220  RPCDetId rpcId(pvssCont[p].region,pvssCont[p].ring,pvssCont[p].station,pvssCont[p].sector,pvssCont[p].layer,pvssCont[p].subsector,1);
221  RPCGeomServ rGS(rpcId);
222  std::string chName(rGS.name().substr(0,rGS.name().find("_Backward")));
223  ss <<chName <<"\t"<<imon[i].value<<"\t"<<imon[i].time<<"\t"<<imon[i].day<<"\n";
224  }
225  }
226 
227  //close db session
228  dbSes.close();
229 
230  return ss.str();
231  }
232 
233 
234  Double_t linearF(Double_t *x, Double_t *par){
235  Double_t y=0.;
236  y=par[0]*(*x);
237  return y;
238  }
239 
240  unsigned long long toUNIX(int date, int time)
241  {
242  int yea_ = (int)date/100;
243  int yea = 2000 + (date - yea_*100);
244  int mon_ = (int)yea_/100;
245  int mon = yea_ - mon_*100;
246  int day = (int)yea_/100;
247  int sec_ = (int)time/100;
248  int sec = time - sec_*100;
249  int min_ = (int)sec_/100;
250  int min = sec_ - min_*100;
251  int hou = (int)sec_/100;
252  int nan = 0;
253  coral::TimeStamp TS;
254  TS = coral::TimeStamp(yea, mon, day, hou, min, sec, nan);
255 
256  long long UT = (TS.year()-1970)*31536000+static_cast<int>(trunc((TS.year()-1972)/4))*86400+
257  (((TS.month()-1)*31)*86400)+((TS.day()-1)*86400)+TS.hour()*3600+TS.minute()*60+TS.second();
258 
259  if (TS.month() == 3) UT = UT - 3*86400;
260  if (TS.month() == 4) UT = UT - 3*86400;
261  if (TS.month() == 5) UT = UT - 4*86400;
262  if (TS.month() == 6) UT = UT - 4*86400;
263  if (TS.month() == 7) UT = UT - 5*86400;
264  if (TS.month() == 8) UT = UT - 5*86400;
265  if (TS.month() == 9) UT = UT - 5*86400;
266  if (TS.month() == 10) UT = UT - 6*86400;
267  if (TS.month() == 11) UT = UT - 6*86400;
268  if (TS.month() == 12) UT = UT - 7*86400;
269 
270  return UT;
271  }
272 
273  // return the real name of the file including extension...
274  template<>
276  std::string const & str,
277  std::vector<int> const & vInt,
278  std::vector<float> const& vFlt) const {
279 
280  gStyle->SetPalette(1);
281 
282  TH1D *iDistr=new TH1D("iDistr","IOV-averaged Current Distribution;Average Current (#muA);Entries/0.2 #muA",500,0.,100.);
283  TH1D *rmsDistr=new TH1D("rmsDistr","RMS over IOV-Current Distribution;Current RMS (#muA);Entries/0.2 #muA",5000,0.,1000.);
284 
285  //BEGIN OF NEW DB-SESSION PART
286  //hardcoded values
287  std::string authPath="/afs/cern.ch/cms/DB/conddb";
288  std::string conString="oracle://cms_orcoff_prod/CMS_COND_31X_RPC";
289 
290  //frontend sends token instead of filename
291  std::string token="[DB=00000000-0000-0000-0000-000000000000][CNT=RPCObPVSSmap][CLID=53B2D2D9-1F4E-9CA9-4D71-FFCCA123A454][TECH=00000B01][OID=0000000C-00000000]";
292 
293  //make connection object
294  DbConnection dbConn;
295 
296  //set in configuration object authentication path
297  dbConn.configuration().setAuthenticationPath(authPath);
298  dbConn.configure();
299 
300  //create session object from connection
301  DbSession dbSes=dbConn.createSession();
302 
303  //try to make connection
304  dbSes.open(conString,true);
305 
306  //start a transaction (true=readOnly)
307  dbSes.transaction().start(true);
308 
309  //get the actual object
310  boost::shared_ptr<RPCObPVSSmap> pvssPtr;
311  pvssPtr=dbSes.getTypedObject<RPCObPVSSmap>(token);
312 
313  //we have the object...
314  std::vector<RPCObPVSSmap::Item> pvssCont=pvssPtr->ObIDMap_rpc;
315  //END OF NEW DB-SESSION PART
316 
317  std::vector<RPCObImon::I_Item> const & imon = object().ObImon_rpc;
318 
319  // RPCRunIOV *iovHelp=new RPCRunIOV();
320 
321  std::map<int,std::pair<std::vector<double>,std::vector<double> > > dpidMap;
322  for(unsigned int i = 0;i < imon.size(); ++i){
323  for(unsigned int p = 0; p < pvssCont.size(); ++p){
324  if(imon[i].dpid!=pvssCont[p].dpid || pvssCont[p].suptype!=0 || pvssCont[p].region!=0)continue;
325  if(dpidMap.find(imon[i].dpid)==dpidMap.end()){
326  std::vector<double> dumVec1;dumVec1.push_back(imon[i].value);
327  std::vector<double> dumVec2;dumVec2.push_back((double)/*iovHelp->*/toUNIX(imon[i].day,imon[i].time));
328  dpidMap[imon[i].dpid]=make_pair(dumVec1,dumVec2);
329  }
330  else {
331  dpidMap[imon[i].dpid].first.push_back(imon[i].value);
332  dpidMap[imon[i].dpid].second.push_back((double)/*iovHelp->*/toUNIX(imon[i].day,imon[i].time));
333  }
334  }
335  }
336 
337  // delete iovHelp;
338 
339  double maxMean(-1.),maxRms(-1.);
340  double minMean(9999.),minRms(9999.);
341  std::map<int,std::pair<std::vector<double>,std::vector<double> > >::const_iterator minIt,maxIt;
342  std::vector<float> means,rmss;
343  for(std::map<int,std::pair<std::vector<double>,std::vector<double> > >::const_iterator mIt=dpidMap.begin();
344  mIt!=dpidMap.end();mIt++){
345  std::pair<double, std::vector<double> > meanAndVals =
346  make_pair(accumulate(mIt->second.first.begin(),mIt->second.first.end(),0.)/(double)mIt->second.first.size(),mIt->second.first);
347 
348  iDistr->Fill(meanAndVals.first);
349  if(meanAndVals.first>maxMean)maxMean=meanAndVals.first;
350  if(meanAndVals.first<minMean)minMean=meanAndVals.first;
351  double rms(0.);
352  for(std::vector<double>::iterator rmsIt=meanAndVals.second.begin();
353  rmsIt!=meanAndVals.second.end();++rmsIt){
354  rms+=pow((*rmsIt-meanAndVals.first)/(double)meanAndVals.second.size(),2);
355  }
356  rmsDistr->Fill(sqrt(rms));
357  if(sqrt(rms)>maxRms){
358  maxRms=sqrt(rms);
359  maxIt=mIt;
360  }
361  if(sqrt(rms)<minRms){
362  minRms=sqrt(rms);
363  if(mIt->second.first.size()>10)
364  minIt=mIt;
365  }
366  means.push_back(meanAndVals.first);
367  rmss.push_back(sqrt(rms));
368  }
369 
370  if(maxMean<100.)
371  iDistr->GetXaxis()->SetRangeUser(minMean-0.00001,maxMean+1.);
372  if(maxRms<1000.)
373  rmsDistr->GetXaxis()->SetRangeUser(minRms-0.00001,maxRms+1.);
374 
375  TCanvas c("Imon","Imon",1200,700);
376  c.Divide(2,2);
377 
378  TVirtualPad *p1=c.cd(1);
379  p1->SetLogy(1);
380  iDistr->SetFillColor(4);
381  iDistr->SetLineColor(4);
382  iDistr->Draw();
383  c.cd(1);
384 
385  TVirtualPad *p2=c.cd(2);
386  p2->SetLogy(1);
387  rmsDistr->SetFillColor(3);
388  rmsDistr->SetLineColor(3);
389  rmsDistr->Draw();
390 
391  c.cd(3);
392  TGraph *iRmsDistr=new TGraph(means.size(),static_cast<const float *>(&rmss[0]),static_cast<const float *>(&means[0]));
393  iRmsDistr->SetMarkerStyle(7);
394  iRmsDistr->SetMarkerColor(2);
395  TF1 *func=new TF1("linearF",linearF,minRms,maxRms,1);
396  iRmsDistr->Fit(func,"r");
397  iRmsDistr->GetXaxis()->SetTitle("Current RMS (#muA)");
398  iRmsDistr->GetYaxis()->SetTitle("Current Means (#muA)");
399  iRmsDistr->Draw("AP");
400 
401 
402  TVirtualPad *p4=c.cd(4);
403  p4->SetLogy(1);
404  TMultiGraph *mProf=new TMultiGraph();
405  TLegend *leg=new TLegend(0.65,0.91,0.99,0.99);
406  TGraph *minProf=new TGraph(minIt->second.first.size(),&minIt->second.second[0],&minIt->second.first[0]);
407  TGraph *maxProf=new TGraph(maxIt->second.first.size(),&maxIt->second.second[0],&maxIt->second.first[0]);
408  minProf->SetMarkerStyle(20);
409  maxProf->SetMarkerStyle(20);
410  minProf->SetMarkerColor(2);
411  maxProf->SetMarkerColor(4);
412  mProf->Add(minProf);
413  leg->AddEntry(minProf,"I vs IOV for Min RMS case","lpf");
414  mProf->Add(maxProf);
415  leg->AddEntry(maxProf,"I vs IOV for Max RMS case","lpf");
416  leg->Draw();
417  mProf->Draw("AP");
418  mProf->GetXaxis()->SetTitle("IOV");
419  mProf->GetYaxis()->SetTitle("I (#muA)");
420 
421  c.SaveAs(filename.c_str());
422 
423  return filename.c_str();
424 
425  }
426 
427  template <>
429  std::string const & opt_string,
430  std::vector<int> const& nts,
431  std::vector<float> const& floats,
432  std::vector<std::string> const& strings) const {
433 
434  std::stringstream ss("");
435 
436  if(strings.size()<2)
437  return ("Error!Not enough data for initializing connection for making plots!(from template<> std::string PayLoadInspector<BeamSpotObjects>::trend_plot)");
438 
439  std::vector<std::string>::const_iterator strIt=strings.begin();
440 
441  std::string conString=(*strIt);strIt++;
442  std::string authPath=(*strIt);strIt++;
443 
444  //BEGIN OF NEW DB-SESSION PART
445 
446  //make connection object
447  DbConnection dbConn;
448 
449  //set in configuration object authentication path
450  dbConn.configuration().setAuthenticationPath(authPath);
451  dbConn.configure();
452 
453  //create session object from connection
454  DbSession dbSes=dbConn.createSession();
455 
456  //try to make connection
457  dbSes.open(conString,true);
458 
459  //start a transaction (true=readOnly)
460  dbSes.transaction().start(true);
461 
462  std::string pvssToken="[DB=00000000-0000-0000-0000-000000000000][CNT=RPCObPVSSmap][CLID=53B2D2D9-1F4E-9CA9-4D71-FFCCA123A454][TECH=00000B01][OID=0000000C-00000000]";
463  //get the actual object
464  boost::shared_ptr<RPCObImon> imonPtr;
465  boost::shared_ptr<RPCObPVSSmap> pvssPtr;
466  pvssPtr=dbSes.getTypedObject<RPCObPVSSmap>(pvssToken);
467 
468  //we get the objects...
469  std::vector<RPCObPVSSmap::Item> pvssCont=pvssPtr->ObIDMap_rpc,pvssZero;
470 
471  for(unsigned int p=0;p<pvssCont.size();p++){
472  if(pvssCont[p].suptype!=0)
473  pvssZero.push_back(pvssCont[p]);
474  }
475 
476  std::string token;
477  std::vector<float> vecI;vecI.assign(floats.size(),0.);
478  int elCount(0);
479 
480  for(;strIt!=strings.end();++strIt){
481 
482  token=(*strIt);
483  imonPtr=dbSes.getTypedObject<RPCObImon>(token);
484  std::vector<RPCObImon::I_Item> const & imon = imonPtr->ObImon_rpc;
485 
486  float iCount(0.);
487  for(unsigned int i=0;i<imon.size();i++){
488  for(unsigned int p=0;p<pvssZero.size();p++){
489  if(imon[i].dpid!=pvssZero[p].dpid || pvssZero[p].region!=0)continue;
490  iCount++;
491  vecI[elCount]+=imon[i].value;
492  }
493  }
494  if(iCount!=0)
495  vecI[elCount]/=iCount;
496  elCount++;
497  }
498 
499  //END OF NEW DB-SESSION PART
500 
501  dbSes.close();
502 
503  std::vector<unsigned long long> lngs ;
504  for(std::vector<float>::const_iterator fIt=floats.begin();fIt!=floats.end();fIt++){
505  lngs.push_back((unsigned long long)*fIt);
506  // std::cout<<*fIt<<" "<<(long double)*fIt<<" "<<(unsigned long long)*fIt<<" "<<vecI[0]<<" "<<(unsigned long long)vecI[0]<<std::endl;
507  }
508  std::vector<unsigned long long> const longs=lngs;
509 
510  // TGraph trend(vecI.size(),static_cast<const float *>(&longs[0]),static_cast<const float *>(&vecI[0]));
511  std::cout<<(int)longs[longs.size()-1]-longs[0]<<std::endl;
512  TH1F trend("trend","trend",(int)longs[longs.size()-1]-longs[0],longs[0],longs[longs.size()-1]);
513  //TH1F trend("trend","trend",floats.size(),static_cast<const float* >(&floats[0]));
514  trend.GetXaxis()->SetTimeDisplay(1);
515  trend.GetXaxis()->SetTimeFormat("%d/%m/%y %H:%M");
516  trend.SetLineColor(2);
517  trend.SetLineWidth(2);
518  trend.GetYaxis()->SetTitle("<I> (#muA)");
519 
520  std::cout<<"Bins "<<trend.GetNbinsX()<<std::endl;
521  for(unsigned int fill=0;fill<=longs.size();fill++){
522  trend.SetBinContent(longs[fill]-longs[0],vecI[fill]);
523  std::cout<<fill<<" "<<floats[fill]<<" "<<longs[fill]-longs[0]<<" "<<vecI[fill]<<std::endl;
524  }
525 
526  float min(*(floats.begin())),max(*(floats.end()-1));
527  float scaleToggle((max-min)/max);
528  TCanvas c("Itrend","Itrend",1200,700);
529 
530  if(scaleToggle>=0.1)
531  c.SetLogx(1);
532 
533  trend.Draw(/*"LA*"*/);
534 
535  TLegend leg(0.65,0.91,0.99,0.99);
536  leg.AddEntry(&trend,"Imon trend","lpf");
537 
538  leg.Draw("");
539 
540  ss.str("");
541  ss<<filename<<".C";
542  c.SaveAs((ss.str()).c_str());
543 
544  return ss.str();
545 
546  }
547 
548 }
549 
550 
551 namespace condPython {
552  template<>
554  using namespace boost::python;
555  enum_<cond::rpcobimon::How>("How")
556  .value("detid",cond::rpcobimon::detid)
557  .value("day",cond::rpcobimon::day)
558  .value("time",cond::rpcobimon::time)
559  .value("current",cond::rpcobimon::current)
560  ;
561 
562  typedef cond::ExtractWhat<RPCObImon> What;
563  class_<What>("What",init<>())
564  .def("set_how",&What::set_how)
565  .def("set_which",&What::set_which)
566  .def("how",&What::how, return_value_policy<copy_const_reference>())
567  .def("which",&What::which, return_value_policy<copy_const_reference>())
568  .def("set_starttime",&What::set_starttime)
569  .def("set_endtime",&What::set_endtime)
570  .def("startTime",&What::startTime, return_value_policy<copy_const_reference>())
571  .def("endTime",&What::endTime, return_value_policy<copy_const_reference>())
572  ;
573  }
574 }
575 
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
string fill
Definition: lumiContext.py:319
std::string plot(std::string const &, std::string const &, std::vector< int > const &, std::vector< float > const &) const
DbTransaction & transaction()
Definition: DbSession.cc:208
ExtractWhat< Class > What
void open(const std::string &connectionString, bool readOnly=false)
Definition: DbSession.cc:159
DbConnectionConfiguration & configuration()
Definition: DbConnection.cc:83
#define PYTHON_WRAPPER(_class, _name)
void defineWhat< RPCObImon >()
std::vector< int > const & which() const
static rpcobimon::RPCObImonExtractor & extractor(rpcobimon::How how)
void set_which(std::vector< int > &i)
void compute(Class const &it) override
tuple starttime
Definition: lumiContext.py:322
Double_t linearF(Double_t *x, Double_t *par)
std::string summary() const
int start(bool readOnly=false)
start transaction
virtual std::string name()
Definition: RPCGeomServ.cc:20
rpcobimon::How const & how() const
T sqrt(T t)
Definition: SSEVec.h:48
double p4[4]
Definition: TauolaWrapper.h:92
tuple result
Definition: query.py:137
void extractDay(RPCObImon const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)
T min(T a, T b)
Definition: MathUtil.h:58
double p2[4]
Definition: TauolaWrapper.h:90
void swap(std::vector< float > &v)
void extractTime(RPCObImon const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)
unsigned long long toUNIX(int date, int time)
int elCount
Definition: asciidump.py:417
DbSession createSession() const
Definition: DbConnection.cc:66
boost::function< void(RPCObImon const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)> RPCObImonExtractor
std::vector< I_Item > ObImon_rpc
Definition: RPCObCond.h:27
list object
Definition: dbtoconf.py:77
void setAuthenticationPath(const std::string &p)
double p1[4]
Definition: TauolaWrapper.h:89
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
void extractCurrent(RPCObImon const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)
Definition: DDAxes.h:10
boost::shared_ptr< T > getTypedObject(const std::string &objectId)
Definition: DbSession.h:126
float const & startTime() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void extractDetId(RPCObImon const &pl, std::vector< int > const &which, std::vector< float > &result, const float &starttime, const float &endtime)