|
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 150 of file pTools.py.
150 def bookDataObject(self, n, o):
152 Register a DataObject to the Histo Store
154 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 156 of file pTools.py.
156 def bookTH1D(self, n, o):
158 Register a ROOT 1D THisto to the Histo Store
160 obj = self.hvt._ihs.book(
163 o.GetXaxis().GetNbins(),
164 o.GetXaxis().GetXmin(),
165 o.GetXaxis().GetXmax(),
◆ bookTH2D()
def GaudiMP.pTools.HistoAgent.bookTH2D |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a ROOT 2D THisto to the Histo Store
Definition at line 169 of file pTools.py.
169 def bookTH2D(self, n, o):
171 Register a ROOT 2D THisto to the Histo Store
173 obj = self.hvt._ihs.book(
176 o.GetXaxis().GetNbins(),
177 o.GetXaxis().GetXmin(),
178 o.GetXaxis().GetXmax(),
179 o.GetYaxis().GetNbins(),
180 o.GetYaxis().GetXmin(),
181 o.GetYaxis().GetXmax(),
◆ bookTH3D()
def GaudiMP.pTools.HistoAgent.bookTH3D |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a ROOT 3D THisto to the Histo Store
Definition at line 185 of file pTools.py.
185 def bookTH3D(self, n, o):
187 Register a ROOT 3D THisto to the Histo Store
189 obj = self.hvt._ihs.book(
192 o.GetXaxis().GetXbins(),
193 o.GetXaxis().GetXmin(),
194 o.GetXaxis().GetXmax(),
195 o.GetYaxis().GetXbins(),
196 o.GetYaxis().GetXmin(),
197 o.GetYaxis().GetXmax(),
198 o.GetZaxis().GetXbins(),
199 o.GetZaxis().GetXmin(),
200 o.GetZaxis().GetXmax(),
◆ bookTProfile()
def GaudiMP.pTools.HistoAgent.bookTProfile |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a ROOT TProfile to the Histo Store
Definition at line 204 of file pTools.py.
204 def bookTProfile(self, n, o):
206 Register a ROOT TProfile to the Histo Store
208 obj = self.hvt._ihs.bookProf(
211 o.GetXaxis().GetNbins(),
212 o.GetXaxis().GetXmin(),
213 o.GetXaxis().GetXmax(),
◆ bookTProfile2D()
def GaudiMP.pTools.HistoAgent.bookTProfile2D |
( |
|
self, |
|
|
|
n, |
|
|
|
o |
|
) |
| |
Register a ROOT TProfile2D to the Histo Store
Definition at line 218 of file pTools.py.
218 def bookTProfile2D(self, n, o):
220 Register a ROOT TProfile2D to the Histo Store
222 obj = self.hvt._ihs.bookProf(
225 o.GetXaxis().GetNbins(),
226 o.GetXaxis().GetXmin(),
227 o.GetXaxis().GetXmax(),
228 o.GetYaxis().GetNbins(),
229 o.GetYaxis().GetXmin(),
230 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
116 for n
in histDict.keys():
118 obj = self.hvt.retrieve(n)
124 self.log.warning(
"FAILED TO ADD : %s" % (str(obj)))
128 if o.__class__.__name__
in self.bookingDict.
keys():
130 self.bookingDict[o.__class__.__name__](n, o)
133 "FAILED TO REGISTER : %s\tto%s"
134 % (o.__class__.__name__, n)
139 "No booking method for: %s\t%s\t%s"
140 % (n,
type(o), o.__class__.__name__)
144 hs = self.hvt.getHistoNames()
145 self.log.info(
"Histo Store Rebuilt : ")
146 self.log.info(
" Contains %i objects." % (len(hs)))
147 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: