Saving histograms from the payload to a root file
Definition at line 34 of file checkDB-photonYields.py.
◆ initialize()
initialize: saving histograms implemented here
Definition at line 37 of file checkDB-photonYields.py.
38 ''' initialize: saving histograms implemented here '''
44 fileName =
"photonYields-" + time.strftime(
"%Y-%m-%d", time.localtime(db.getTimeStamp())) +
".root"
45 f = TFile.Open(fileName,
"recreate")
47 print(
"- global tag:", globalTag)
48 print(
"- time of measurement:",
49 time.strftime(
"%d %b %Y %H:%M:%S", time.localtime(db.getTimeStamp())),
"(mean), ",
50 round(db.getTimeStampStd() / 3600 / 24, 2),
"days (rms)")
51 for slot
in range(1, 17):
52 h = db.getPhotonYields(slot)
55 h = db.getBackgroundYields(slot)
58 h = db.getAlphaRatio(slot)
61 h = db.getActivePixels(slot)
64 h = db.getPulseHeights(slot)
71 print(
"--> histograms saved to:", fileName)
74 b2.set_log_level(b2.LogLevel.ERROR)
Class to access a DBObjPtr from Python.
The documentation for this class was generated from the following file: