|
| def | __init__ (self, gmpComponent) |
| |
| def | register (self, tup) |
| |
| def | Receive (self) |
| |
| def | RebuildHistoStore (self) |
| |
| def | bookDataObject (self, n, o) |
| |
| def | bookTH1D (self, n, o) |
| |
| def | bookTH2D (self, n, o) |
| |
| def | bookTH3D (self, n, o) |
| |
| def | bookTProfile (self, n, o) |
| |
| def | bookTProfile2D (self, n, o) |
| |
Definition at line 61 of file pTools.py.
◆ __init__()
| def GaudiMP.pTools.HistoAgent.__init__ |
( |
|
self, |
|
|
|
gmpComponent |
|
) |
| |
Definition at line 62 of file pTools.py.
62 def __init__(self, gmpComponent):
63 self._gmpc = gmpComponent
64 self.hvt = self._gmpc.hvt
66 self.qin = self._gmpc.hq
67 self.log = self._gmpc.log
72 self.bookingDict[
"DataObject"] = self.bookDataObject
73 self.bookingDict[
"NTuple::Directory"] = self.bookDataObject
74 self.bookingDict[
"NTuple::File"] = self.bookDataObject
75 self.bookingDict[
"TH1D"] = self.bookTH1D
76 self.bookingDict[
"TH2D"] = self.bookTH2D
77 self.bookingDict[
"TH3D"] = self.bookTH3D
78 self.bookingDict[
"TProfile"] = self.bookTProfile
79 self.bookingDict[
"TProfile2D"] = self.bookTProfile2D
◆ bookDataObject()
| def GaudiMP.pTools.HistoAgent.bookDataObject |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a DataObject to the Histo Store
Definition at line 152 of file pTools.py.
152 def bookDataObject(self, n, o):
154 Register a DataObject to the Histo Store
156 self._gmpc.hvt.registerObject(n, o)
◆ bookTH1D()
| def GaudiMP.pTools.HistoAgent.bookTH1D |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a ROOT 1D THisto to the Histo Store
Definition at line 158 of file pTools.py.
158 def bookTH1D(self, n, o):
160 Register a ROOT 1D THisto to the Histo Store
162 obj = self.hvt._ihs.book(
165 o.GetXaxis().GetNbins(),
166 o.GetXaxis().GetXmin(),
167 o.GetXaxis().GetXmax(),
◆ bookTH2D()
| def GaudiMP.pTools.HistoAgent.bookTH2D |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a ROOT 2D THisto to the Histo Store
Definition at line 171 of file pTools.py.
171 def bookTH2D(self, n, o):
173 Register a ROOT 2D THisto to the Histo Store
175 obj = self.hvt._ihs.book(
178 o.GetXaxis().GetNbins(),
179 o.GetXaxis().GetXmin(),
180 o.GetXaxis().GetXmax(),
181 o.GetYaxis().GetNbins(),
182 o.GetYaxis().GetXmin(),
183 o.GetYaxis().GetXmax(),
◆ bookTH3D()
| def GaudiMP.pTools.HistoAgent.bookTH3D |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a ROOT 3D THisto to the Histo Store
Definition at line 187 of file pTools.py.
187 def bookTH3D(self, n, o):
189 Register a ROOT 3D THisto to the Histo Store
191 obj = self.hvt._ihs.book(
194 o.GetXaxis().GetXbins(),
195 o.GetXaxis().GetXmin(),
196 o.GetXaxis().GetXmax(),
197 o.GetYaxis().GetXbins(),
198 o.GetYaxis().GetXmin(),
199 o.GetYaxis().GetXmax(),
200 o.GetZaxis().GetXbins(),
201 o.GetZaxis().GetXmin(),
202 o.GetZaxis().GetXmax(),
◆ bookTProfile()
| def GaudiMP.pTools.HistoAgent.bookTProfile |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a ROOT TProfile to the Histo Store
Definition at line 206 of file pTools.py.
206 def bookTProfile(self, n, o):
208 Register a ROOT TProfile to the Histo Store
210 obj = self.hvt._ihs.bookProf(
213 o.GetXaxis().GetNbins(),
214 o.GetXaxis().GetXmin(),
215 o.GetXaxis().GetXmax(),
◆ bookTProfile2D()
| def GaudiMP.pTools.HistoAgent.bookTProfile2D |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a ROOT TProfile2D to the Histo Store
Definition at line 220 of file pTools.py.
220 def bookTProfile2D(self, n, o):
222 Register a ROOT TProfile2D to the Histo Store
224 obj = self.hvt._ihs.bookProf(
227 o.GetXaxis().GetNbins(),
228 o.GetXaxis().GetXmin(),
229 o.GetXaxis().GetXmax(),
230 o.GetYaxis().GetNbins(),
231 o.GetYaxis().GetXmin(),
232 o.GetYaxis().GetXmax(),
◆ RebuildHistoStore()
| def GaudiMP.pTools.HistoAgent.RebuildHistoStore |
( |
|
self | ) |
|
Rebuild the Histogram Store from the histos received by Receive()
If we have a histo which is not in the store,
book and fill it according to self.bookingDict
If we have a histo with a matching histo in the store,
add the two histos, remembering that aida2root must be used on
the Stored histo for compatibility.
Definition at line 101 of file pTools.py.
101 def RebuildHistoStore(self):
103 Rebuild the Histogram Store from the histos received by Receive()
104 If we have a histo which is not in the store,
105 book and fill it according to self.bookingDict
106 If we have a histo with a matching histo in the store,
107 add the two histos, remembering that aida2root must be used on
108 the Stored histo for compatibility.
111 for tup
in self.histos:
112 workerID, histDict = tup
117 for n
in histDict.keys():
119 obj = self.hvt.retrieve(n)
125 self.log.warning(
"FAILED TO ADD : %s" % (str(obj)))
130 if o.__class__.__name__
in self.bookingDict.
keys():
132 self.bookingDict[o.__class__.__name__](n, o)
135 "FAILED TO REGISTER : %s\tto%s"
136 % (o.__class__.__name__, n)
141 "No booking method for: %s\t%s\t%s"
142 % (n,
type(o), o.__class__.__name__)
146 hs = self.hvt.getHistoNames()
147 self.log.info(
"Histo Store Rebuilt : ")
148 self.log.info(
" Contains %i objects." % (len(hs)))
149 self.log.info(
" Errors in Rebuilding : %i" % (errors))
◆ Receive()
| def GaudiMP.pTools.HistoAgent.Receive |
( |
|
self | ) |
|
Definition at line 86 of file pTools.py.
87 hstatus = self._gmpc.nWorkers + 1
90 if tup ==
"HISTOS_SENT":
91 self.log.debug(
"received HISTOS_SENT message")
97 self._gmpc.sEvent.set()
98 self.log.info(
"Writer received all histo bundles and set sync event")
◆ register()
| def GaudiMP.pTools.HistoAgent.register |
( |
|
self, |
|
|
|
tup |
|
) |
| |
Definition at line 81 of file pTools.py.
81 def register(self, tup):
83 assert tup.__class__.__name__ ==
"tuple"
84 self.histos.append(tup)
◆ _gmpc
| GaudiMP.pTools.HistoAgent._gmpc |
|
private |
◆ bookingDict
| GaudiMP.pTools.HistoAgent.bookingDict |
◆ histos
| GaudiMP.pTools.HistoAgent.histos |
◆ hvt
| GaudiMP.pTools.HistoAgent.hvt |
◆ log
| GaudiMP.pTools.HistoAgent.log |
◆ qin
| GaudiMP.pTools.HistoAgent.qin |
The documentation for this class was generated from the following file: