CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
EcalCondTools Namespace Reference

Functions

def compare
 
def compareBarrel
 
def compareBarrelBorder
 
def compareEndcap
 
def compareEndcapBorder
 
def dumpXML
 
def getObject
 
def getToken
 
def histo
 
def listIovs
 
def listTags
 
def makedist
 
def plot
 

Function Documentation

def EcalCondTools.compare (   tag1,
  db1,
  since1,
  tag2,
  db2,
  since2,
  filename = 'compare.root' 
)
Produce comparison plots for two records. Save plots to file \
   according to format. tag can be an xml file

Definition at line 89 of file EcalCondTools.py.

References compareBarrel(), compareBarrelBorder(), compareEndcap(), compareEndcapBorder(), and EcalPyUtils.fromXML().

Referenced by plot().

89 
90  tag2,db2,since2,filename='compare.root'):
91  '''Produce comparison plots for two records. Save plots to file \
92  according to format. tag can be an xml file'''
93  print "EcalCondTools.py compare tag1 ", tag1, "since1 : ", since1, " tag2 ", tag2," s2 ", since2
94 
95  coeff_1_b=[]
96  coeff_2_b=[]
97 
98  coeff_1_e=[]
99  coeff_2_e=[]
100 
101  if tag1.find(".xml") < 0:
102  found=0
103  try:
104  db1.startTransaction()
105  Plug = __import__(str(db1.payloadModules(tag1)[0]))
106  payload = Plug.Object(db1)
107  listOfIovElem= [iovElem for iovElem in db1.iov(tag1).elements]
108  what = {'how':'barrel'}
109  w = inspect.setWhat(Plug.What(),what)
110  exb = Plug.Extractor(w)
111  what = {'how':'endcap'}
112  w = inspect.setWhat(Plug.What(),what)
113  exe = Plug.Extractor(w)
114 # p = getObject(db1,tag1,since1,ex)
115 # p.extract(ex)
116  print " before loop"
117  for elem in db1.iov(tag1).elements :
118  if str(elem.since())==str(since1):
119  found=1
120  payload.load(elem)
121  payload.extract(exb)
122  coeff_1_b = [i for i in exb.values()]# first set of coefficients
123  payload.extract(exe)
124  coeff_1_e = [i for i in exe.values()]
125  db1.commitTransaction()
126 
127  except Exception,er :
128  print " compare first set exception ",er
129  if not found :
130  print "Could not retrieve payload for tag: " , tag1, " since: ", since1
131  sys.exit(0)
132 
133  else:
134  coeff_1_b,coeff_1_e = EcalPyUtils.fromXML(tag1)
135 
136  if tag2.find(".xml")<0:
137  found=0
138  try:
139  db2.startTransaction()
140  Plug = __import__(str(db2.payloadModules(tag2)[0]))
141  what = {'how':'barrel'}
142  w = inspect.setWhat(Plug.What(),what)
143  exb = Plug.Extractor(w)
144  what = {'how':'endcap'}
145  w = inspect.setWhat(Plug.What(),what)
146  exe = Plug.Extractor(w)
147 # p = getObject(db2,tag2,since2)
148 # p.extract(ex)
149  for elem in db2.iov(tag2).elements :
150  if str(elem.since())==str(since2):
151  found=1
152  payload.load(elem)
153  payload.extract(exb)
154  coeff_2_b = [i for i in exb.values()]# second set of coefficients
155  payload.extract(exe)
156  coeff_2_e = [i for i in exe.values()]
157  db2.commitTransaction()
158 
159  except Exception, er :
160  print " compare second set exception ",er
161  if not found :
162  print "Could not retrieve payload for tag: " , tag2, " since: ", since2
163  sys.exit(0)
164 
165  else:
166  coeff_2_b,coeff_2_e = EcalPyUtils.fromXML(tag2)
167 
168  gStyle.SetPalette(1)
169 
170  savefile = TFile(filename,"RECREATE")
171 
172  ebhisto,ebmap, profx, profy= compareBarrel(coeff_1_b,coeff_2_b)
173  eephisto,eepmap,eemhisto,eemmap=compareEndcap(coeff_1_e,coeff_2_e)
174 
175 #make more canvas (suppressed : use a root file)
176 
177 # cEBdiff = TCanvas("EBdiff","EBdiff")
178 # cEBdiff.Divide(2,2)
179 
180 # cEBdiff.cd(1)
181 # ebhisto.Draw()
182 # cEBdiff.cd(2)
183 # ebmap.Draw("colz")
184 # cEBdiff.cd(3)
185 # profx.Draw()
186 # cEBdiff.cd(4)
187 # profy.Draw()
188 
189 # EBfilename = "EB_"+filename
190 # cEBdiff.SaveAs(EBfilename)
191 
192 # cEEdiff = TCanvas("EEdiff","EEdiff")
193 # cEEdiff.Divide(2,2)
194 
195 # cEEdiff.cd(1)
196 # eephisto.Draw()
197 # cEEdiff.cd(2)
198 # eepmap.Draw("colz")
199 # cEEdiff.cd(3)
200 # eemhisto.Draw()
201 # cEEdiff.cd(4)
202 # eemmap.Draw("colz")
203 
204 # EEfilename = "EE_"+filename
205 # cEEdiff.SaveAs(EEfilename)
206 
207 
208  eeborderphisto,eeborderpmap,eebordermhisto,eebordermmap=compareEndcapBorder(coeff_1_e,coeff_2_e)
209  ebborderhisto,ebbordermap = compareBarrelBorder(coeff_1_b,coeff_2_b)
210 
211  border_diff_distro_can = TCanvas("border_difference","borders difference")
212  border_diff_distro_can.Divide(2,3)
213 
214  border_diff_distro_can.cd(1)
215  ebborderhisto.Draw()
216  border_diff_distro_can.cd(2)
217  ebbordermap.Draw("colz")
218  border_diff_distro_can.cd(3)
219  eeborderphisto.Draw()
220  border_diff_distro_can.cd(4)
221  eeborderpmap.Draw("colz")
222  border_diff_distro_can.cd(5)
223  eebordermhisto.Draw()
224  border_diff_distro_can.cd(6)
225  eebordermmap.Draw("colz")
226 
227  bordersfilename = "borders_"+filename
228  prof_filename = "profiles_"+filename
229 
230 # border_diff_distro_can.SaveAs(bordersfilename)
231 
232  savefile.Write()
233 
234 
def EcalCondTools.compareBarrel (   coeff_barl_1,
  coeff_barl_2 
)
Return an histogram and a map of the differences 

Definition at line 427 of file EcalCondTools.py.

References EcalPyUtils.unhashEBIndex().

Referenced by compare().

428 def compareBarrel(coeff_barl_1,coeff_barl_2) :
429  '''Return an histogram and a map of the differences '''
430 
431  diff_distro_h = TH1F("diffh","diffh",100,-2,2)
432  diff_distro_m = TH2F("diffm","diffm",360,1,361,171,-85,86)
433  diff_distro_m.SetStats(0)
434  ebeta = TH2F("ebeta","ebeta",171,-85,86,100,-2,2)
435  ebphi = TH2F("ebphi","ebphi",360,1,361,100,-2,2)
436 
437 
438  for i,c in enumerate(coeff_barl_1):
439  diff = c - coeff_barl_2[i]
440  ieta,iphi= EcalPyUtils.unhashEBIndex(i)
441  diff_distro_h.Fill(diff)
442  diff_distro_m.Fill(iphi,ieta,diff)
443  ebeta.Fill(ieta,diff)
444  ebphi.Fill(iphi,diff)
445 
446  prof_x_h = ebeta.ProfileX()
447  prof_y_h = ebphi.ProfileX()
448 
449  return diff_distro_h, diff_distro_m, prof_x_h, prof_y_h
450 
451 
def unhashEBIndex
Definition: EcalPyUtils.py:9
def EcalCondTools.compareBarrelBorder (   coeff_barl_1,
  coeff_barl_2 
)
Return an histogram and a map of the differences 

Definition at line 452 of file EcalCondTools.py.

References abs, and EcalPyUtils.unhashEBIndex().

Referenced by compare().

453 def compareBarrelBorder(coeff_barl_1,coeff_barl_2) :
454  '''Return an histogram and a map of the differences '''
455 
456  diff_distro_border_h = TH1F("diffborderh","diffh",100,-2,2)
457  diff_distro_border_m = TH2F("diffborderm","diffm",360,1,361,171,-85,86)
458  diff_distro_border_m.SetStats(0)
459 
460  for i,c in enumerate(coeff_barl_1):
461  diff = c - coeff_barl_2[i]
462  ieta,iphi= EcalPyUtils.unhashEBIndex(i)
463  if (abs(ieta)==85 or abs(ieta)==65 or abs(ieta)==64 or abs(ieta)==45 or abs(ieta)==44 or abs(ieta)==25 or abs(ieta)==24 or abs(ieta)==1 or iphi%20==1 or iphi%20==0):
464  diff_distro_border_h.Fill(diff)
465  if (abs(ieta)==85 or abs(ieta)==65 or abs(ieta)==64 or abs(ieta)==45 or abs(ieta)==44 or abs(ieta)==25 or abs(ieta)==24 or abs(ieta)==1 or iphi%20==0 or iphi%20==1):
466  diff_distro_border_m.Fill(iphi,ieta,diff)
467 
468  return diff_distro_border_h, diff_distro_border_m
469 
470 
471 
472 
#define abs(x)
Definition: mlp_lapack.h:159
def unhashEBIndex
Definition: EcalPyUtils.py:9
def EcalCondTools.compareEndcap (   coeff_endc_1,
  coeff_endc_2 
)
Return an histogram and a map of the differences for each endcap

Definition at line 473 of file EcalCondTools.py.

References mathSSE.sqrt(), and EcalPyUtils.unhashEEIndex().

Referenced by compare().

474 def compareEndcap(coeff_endc_1, coeff_endc_2) :
475  ''' Return an histogram and a map of the differences for each endcap'''
476 
477  diff_distro_h_eep = TH1F("diff EE+","diff EE+",100,-2,2)
478  diff_distro_h_eem = TH1F("diff EE-","diff EE-",100,-2,2)
479 
480 
481  diff_distro_m_eep = TH2F("map EE+","map EE+",100,1,101,100,1,101)
482  diff_distro_m_eem = TH2F("map EE-","map EE-",100,1,101,100,1,101)
483 
484  temp_h = TH1F("tempR","tempR",50,0,50)
485 
486  diff_distro_m_eep.SetStats(0)
487  diff_distro_m_eem.SetStats(0)
488 
489 
490  for i,c in enumerate(coeff_endc_1):
491  diff = c - coeff_endc_2[i]
492  ix,iy,iz = EcalPyUtils.unhashEEIndex(i)
493  R = sqrt((ix-50)*(ix-50)+(iy-50)*(iy-50))
494 
495  if iz >0:
496  diff_distro_h_eep.Fill(diff)
497  diff_distro_m_eep.Fill(ix,iy,diff)
498 
499  else:
500  diff_distro_h_eem.Fill(diff)
501  diff_distro_m_eem.Fill(ix,iy,diff)
502 
503  return diff_distro_h_eep, \
504  diff_distro_m_eep, \
505  diff_distro_h_eem, \
506  diff_distro_m_eem
507 
508 
T sqrt(T t)
Definition: SSEVec.h:48
def unhashEEIndex
Definition: EcalPyUtils.py:14
def EcalCondTools.compareEndcapBorder (   coeff_endc_1,
  coeff_endc_2 
)
Return an histogram and a map of the differences for each endcap

Definition at line 509 of file EcalCondTools.py.

References EcalPyUtils.unhashEEIndex().

Referenced by compare().

510 def compareEndcapBorder(coeff_endc_1, coeff_endc_2) :
511  ''' Return an histogram and a map of the differences for each endcap'''
512 
513  border_diff_distro_h_eep = TH1F("borderdiff EE+","diff EE+",100,-2,2)
514  border_diff_distro_h_eem = TH1F("borderdiff EE-","diff EE-",100,-2,2)
515 
516 
517  border_diff_distro_m_eep = TH2F("bordermap EE+","map EE+",100,1,101,100,1,101)
518  border_diff_distro_m_eem = TH2F("bordermap EE-","map EE-",100,1,101,100,1,101)
519 
520  border_diff_distro_m_eep.SetStats(0)
521  border_diff_distro_m_eem.SetStats(0)
522 
523 
524  for i,c in enumerate(coeff_endc_1):
525  diff = c - coeff_endc_2[i]
526  ix,iy,iz = EcalPyUtils.unhashEEIndex(i)
527  Rsq = ((ix-50.0)**2+(iy-50.0)**2)
528 
529  if (iz >0 and (Rsq<144.0 or Rsq>2500.0)):
530  border_diff_distro_h_eep.Fill(diff)
531  border_diff_distro_m_eep.Fill(ix,iy,diff)
532  elif (iz<0 and (Rsq<144.0 or Rsq>2500.0)):
533  border_diff_distro_h_eem.Fill(diff)
534  border_diff_distro_m_eem.Fill(ix,iy,diff)
535 
536 
537  return border_diff_distro_h_eep, \
538  border_diff_distro_m_eep, \
539  border_diff_distro_h_eem, \
540  border_diff_distro_m_eem
def unhashEEIndex
Definition: EcalPyUtils.py:14
def EcalCondTools.dumpXML (   db,
  tag,
  since,
  filename = 'dump.xml' 
)
Dump record in XML format for a given tag 

Definition at line 42 of file EcalCondTools.py.

Referenced by EcalFloatCondObjectContainerXMLTranslator.dumpXML(), EcalAlignmentXMLTranslator.writeXML(), EcalTPGCrystalStatusXMLTranslator.writeXML(), ESGainXMLTranslator.writeXML(), EcalClusterCrackCorrXMLTranslator.writeXML(), EcalClusterEnergyCorrectionObjectSpecificXMLTranslator.writeXML(), EcalClusterEnergyCorrectionXMLTranslator.writeXML(), EcalClusterLocalContCorrXMLTranslator.writeXML(), EcalTBWeightsXMLTranslator.writeXML(), EcalTPGTowerStatusXMLTranslator.writeXML(), EcalTPGStripStatusXMLTranslator.writeXML(), EcalDAQTowerStatusXMLTranslator.writeXML(), EcalDCSTowerStatusXMLTranslator.writeXML(), EcalPedestalsXMLTranslator.writeXML(), EcalADCToGeVXMLTranslator.writeXML(), EcalTimeOffsetXMLTranslator.writeXML(), EcalChannelStatusXMLTranslator.writeXML(), EcalTPGLinearizationConstXMLTranslator.writeXML(), EcalGainRatiosXMLTranslator.writeXML(), EcalFloatCondObjectContainerXMLTranslator.writeXML(), EcalWeightGroupXMLTranslator.writeXML(), EcalLinearCorrectionsXMLTranslator.writeXML(), EcalWeightSetXMLTranslator.writeXML(), and EcalLaserAPDPNRatiosXMLTranslator.writeXML().

42 
43 def dumpXML(db,tag,since,filename='dump.xml'):
44  '''Dump record in XML format for a given tag '''
45  try :
46  iov = inspect.Iov(db,tag)
47  db.startTransaction()
48  Plug = __import__(str(db.payloadModules(tag)[0]))
49  payload = Plug.Object(db)
50  listOfIovElem= [iovElem for iovElem in db.iov(tag).elements]
51  inst = 0
52  for elem in db.iov(tag).elements :
53  inst = inst + 1
54  if str(elem.since())==str(since):
55  found = inst
56  break
57  db.commitTransaction()
58  payload = inspect.PayLoad(db, tag, elem)
59  out = open(filename,'w')
60  print >> out, payload
61 
62  except Exception,er :
63  print " dumpXML exception ",er
def EcalCondTools.getObject (   db,
  tag,
  since 
)
Return payload object for a given iov, tag, db

Definition at line 348 of file EcalCondTools.py.

349 def getObject(db,tag,since):
350  ''' Return payload object for a given iov, tag, db'''
351  found=0
352  try:
353 # exec('import '+db.moduleName(tag)+' as Plug')
354  db.startReadOnlyTransaction()
355  Plug = __import__(str(db.payloadModules(tag)[0]))
356  print " getObject Plug"
357  payload = Plug.Object(db)
358  db.commitTransaction()
359  listOfIovElem= [iovElem for iovElem in db.iov(tag).elements]
360  print " getObject before loop"
361  for elem in db.iov(tag).elements :
362  if str(elem.since())==str(since):
363  found=1
364  print " getObject found ", elem.since()
365 # return Plug.Object(elem)
366  return elem
367 
368  except Exception, er :
369  print " getObject exception ",er
370 
371  if not found :
372  print "Could not retrieve payload for tag: " , tag, " since: ", since
373  sys.exit(0)
374 
def EcalCondTools.getToken (   db,
  tag,
  since 
)
Return payload token for a given iov, tag, db

Definition at line 332 of file EcalCondTools.py.

333 def getToken(db,tag,since):
334  ''' Return payload token for a given iov, tag, db'''
335  try :
336  iov = inspect.Iov(db,tag)
337  iovlist = iov.list()
338  for p in iovlist:
339  tmpsince=p[1]
340  if str(tmpsince)==str(since) :
341  return p[0]
342  print "Could not retrieve token for tag: " , tag, " since: ", since
343  sys.exit(0)
344 
345  except Exception, er :
346  print er
347 
def EcalCondTools.histo (   db,
  tag,
  since,
  filename = 'histo.root' 
)
Make histograms and save to file. tag can be an xml file

Definition at line 235 of file EcalCondTools.py.

References EcalPyUtils.fromXML(), and makedist().

236 def histo (db, tag,since,filename='histo.root'):
237  '''Make histograms and save to file. tag can be an xml file'''
238 
239  coeff_barl=[]
240  coeff_endc=[]
241 
242  if tag.find(".xml")< 0:
243  found=0
244  try:
245 # exec('import '+db.moduleName(tag)+' as Plug')
246  db.startTransaction()
247  Plug = __import__(str(db.payloadModules(tag)[0]))
248  payload = Plug.Object(db)
249  listOfIovElem= [iovElem for iovElem in db.iov(tag).elements]
250  what = {'how':'barrel'}
251  w = inspect.setWhat(Plug.What(),what)
252  exb = Plug.Extractor(w)
253  what = {'how':'endcap'}
254  w = inspect.setWhat(Plug.What(),what)
255  exe = Plug.Extractor(w)
256  for elem in db.iov(tag).elements :
257  if str(elem.since())==str(since):
258  found=1
259  payload.load(elem)
260  payload.extract(exb)
261  coeff_barl = [i for i in exb.values()]
262  payload.extract(exe)
263  coeff_endc = [i for i in exe.values()]
264  db.commitTransaction()
265 
266  except Exception, er :
267  print " histo exception ",er
268  if not found :
269  print "Could not retrieve payload for tag: " , tag, " since: ", since
270  sys.exit(0)
271 
272  else :
273  coeff_barl,coeff_endc=EcalPyUtils.fromXML(tag)
274 
275  savefile = TFile(filename,"RECREATE")
276 
277  ebmap, ebeta, ebphi, eePmap, ebdist, eeMmap, prof_eePL, prof_eePR, prof_eeML, prof_eeMR, ebBorderdist = makedist(coeff_barl, coeff_endc)
278 
279  gStyle.SetPalette(1)
280 
281  c = TCanvas("CCdist")
282  c.Divide(2,2)
283 
284  c.cd(1)
285  ebmap.Draw("colz")
286  c.cd(2)
287  eePmap.Draw("colz")
288  c.cd(3)
289  ebdist.Draw()
290  c.cd(4)
291  eeMmap.Draw("colz")
292 
293 # c.SaveAs(filename)
294 
295  prof_eb_eta = ebeta.ProfileX()
296  prof_eb_phi = ebphi.ProfileX()
297 
298  c2 = TCanvas("CCprofiles")
299  c2.Divide(2,2)
300 
301  leg = TLegend(0.1,0.7,0.48,0.9)
302 
303  c2.cd(1)
304  prof_eb_eta.Draw()
305  c2.cd(2)
306  prof_eb_phi.Draw()
307  c2.cd(3)
308  prof_eePL.SetMarkerStyle(8)
309  prof_eePL.Draw()
310  prof_eePR.SetMarkerStyle(8)
311  prof_eePR.SetMarkerColor(2)
312  prof_eePR.Draw("same")
313  prof_eeML.SetMarkerStyle(8)
314  prof_eeML.SetMarkerColor(3)
315  prof_eeML.Draw("same")
316  prof_eeMR.SetMarkerStyle(8)
317  prof_eeMR.SetMarkerColor(5)
318  prof_eeMR.Draw("same")
319  leg.AddEntry(prof_eePL,"Dee1","lp")
320  leg.AddEntry(prof_eePR,"Dee2","lp")
321  leg.AddEntry(prof_eeMR,"Dee3","lp")
322  leg.AddEntry(prof_eeML,"Dee4","lp")
323  leg.Draw()
324  c2.cd(4)
325  ebBorderdist.Draw()
326 
327  extrafilename = "profiles_"+filename
328  # c2.SaveAs(extrafilename)
329 
330  savefile.Write()
331 
def EcalCondTools.listIovs (   db,
  tag 
)
List all available iovs for a given tag

Definition at line 29 of file EcalCondTools.py.

29 
30 def listIovs(db,tag):
31  '''List all available iovs for a given tag'''
32 
33  try :
34  iov = inspect.Iov(db,tag)
35  iovlist = iov.list()
36  print "Available iovs for tag: ",tag
37  for p in iovlist:
38  print " Since " , p[1], " Till " , p[2]
39 
40  except Exception,er :
41  print " listIovs exception ",er
def EcalCondTools.listTags (   db)
List all available tags for a given db 

Definition at line 18 of file EcalCondTools.py.

18 
19 def listTags(db):
20  '''List all available tags for a given db '''
21  try:
22  db.startTransaction()
23  tags = db.allTags()
24  db.commitTransaction()
25  for tag in tags.split():
26  print tag
27  except:
28  return ""
def EcalCondTools.makedist (   coeff_barl,
  coeff_endc 
)

Definition at line 375 of file EcalCondTools.py.

References abs, mathSSE.sqrt(), EcalPyUtils.unhashEBIndex(), and EcalPyUtils.unhashEEIndex().

Referenced by histo().

376 def makedist(coeff_barl, coeff_endc) :
377 
378  ebmap = TH2F("EB","EB",360,1,261,171, -85,86)
379  eePmap = TH2F("EE","EE",100, 1,101,100,1,101)
380  eeMmap = TH2F("EEminus","EEminus",100,1,101,100,1,101)
381  ebdist = TH1F("EBdist","EBdist",100,-2,2)
382  ebBorderdist = TH1F("EBBorderdist","EBBorderdist",100,-2,2)
383 
384  ebeta = TH2F("ebeta","ebeta",171,-85,86,100,-2,2)
385  ebphi = TH2F("ebphi","ebphi",360,1,361,100,-2,2)
386 
387  eePL = TH2F("EEPL","EEPlus Left",50,10,55,100,-2,2)
388  eePR = TH2F("EEPR","EEPlus Right",50,10,55,100,-2,2)
389  eeML = TH2F("EEML","EEMinus Left",50,10,55,100,-2,2)
390  eeMR = TH2F("EEMR","EEMinus Right",50,10,55,100,-2,2)
391 
392  for i,c in enumerate(coeff_barl):
393  ieta,iphi = EcalPyUtils.unhashEBIndex(i)
394  ebmap.Fill(iphi,ieta,c)
395  ebdist.Fill(c)
396  ebeta.Fill(ieta,c)
397  ebphi.Fill(iphi,c)
398 
399  if (abs(ieta)==85 or abs(ieta)==65 or abs(ieta)==64 or abs(ieta)==45 or abs(ieta)==44 or abs(ieta)==25 or abs(ieta)==24 or abs(ieta)==1 or iphi%20==1 or iphi%20==0):
400  ebBorderdist.Fill(c)
401 
402 
403  for i,c in enumerate(coeff_endc):
404  ix,iy,iz = EcalPyUtils.unhashEEIndex(i)
405  R = sqrt((ix-50)*(ix-50)+(iy-50)*(iy-50))
406 
407  if iz>0:
408  eePmap.Fill(ix,iy,c)
409  if ix<50:
410  eePL.Fill(R,c,1)
411  if ix>50:
412  eePR.Fill(R,c,1)
413 
414  if iz<0:
415  eeMmap.Fill(ix,iy,c)
416  if ix<50:
417  eeML.Fill(R,c,1)
418  if ix>50:
419  eeMR.Fill(R,c,1)
420 
421  prof_eePL = eePL.ProfileX()
422  prof_eePR = eePR.ProfileX()
423  prof_eeML = eeML.ProfileX()
424  prof_eeMR = eeMR.ProfileX()
425 
426  return ebmap, ebeta, ebphi, eePmap, ebdist, eeMmap, prof_eePL, prof_eePR, prof_eeML, prof_eeMR, ebBorderdist
#define abs(x)
Definition: mlp_lapack.h:159
T sqrt(T t)
Definition: SSEVec.h:48
def unhashEBIndex
Definition: EcalPyUtils.py:9
def unhashEEIndex
Definition: EcalPyUtils.py:14
def EcalCondTools.plot (   db,
  tag,
  since,
  filename = 'plot.root' 
)
Invoke the plot function from the wrapper and save to the specified \
   file. The file format will reflect the extension given.

Definition at line 64 of file EcalCondTools.py.

References compare().

64 
65 def plot (db, tag,since,filename='plot.root'):
66  '''Invoke the plot function from the wrapper and save to the specified \
67  file. The file format will reflect the extension given.'''
68 
69  try :
70  iov = inspect.Iov(db,tag)
71  db.startTransaction()
72  Plug = __import__(str(db.payloadModules(tag)[0]))
73  payload = Plug.Object(db)
74  listOfIovElem= [iovElem for iovElem in db.iov(tag).elements]
75  inst = 0
76  for elem in db.iov(tag).elements :
77  inst = inst + 1
78  if str(elem.since())==str(since):
79  found = inst
80  break
81  db.commitTransaction()
82  payload = inspect.PayLoad(db, tag, elem)
83  payload.plot(filename,"",[],[])
84 
85  except Exception,er :
86  print " plot exception ",er
87