|
| def | __init__ (self, workerID, queues, events, params, subworkers) |
| |
| def | processConfiguration (self) |
| |
| def | Engine (self) |
| |
| def | getCheckAlgs (self) |
| |
| def | checkExecutedPassed (self, algName) |
| |
| def | isEventPassed (self) |
| |
| def | __init__ (self, nodeType, nodeID, queues, events, params, subworkers) |
| |
| def | Start (self) |
| |
| def | SetupGaudiPython (self) |
| |
| def | StartGaudiPython (self) |
| |
| def | LoadTES (self, tbufferfile) |
| |
| def | getEventNumber (self) |
| |
| def | IdentifyWriters (self) |
| |
| def | dumpHistograms (self) |
| |
| def | Initialize (self) |
| |
| def | Finalize (self) |
| |
| def | Report (self) |
| |
Definition at line 1006 of file GMPBase.py.
◆ __init__()
| def GaudiMP.GMPBase.Worker.__init__ |
( |
|
self, |
|
|
|
workerID, |
|
|
|
queues, |
|
|
|
events, |
|
|
|
params, |
|
|
|
subworkers |
|
) |
| |
Definition at line 1007 of file GMPBase.py.
1007 def __init__(self, workerID, queues, events, params, subworkers):
1008 GMPComponent.__init__(
1009 self,
"Worker", workerID, queues, events, params, subworkers
1012 self.writerDict = self.IdentifyWriters()
1014 self.acceptAlgs, self.requireAlgs, self.vetoAlgs = self.getCheckAlgs()
1015 self.log.name =
"Worker-%i" % (self.nodeID)
1016 self.log.info(
"Worker-%i Created OK" % (self.nodeID))
1017 self.eventOutput =
True
◆ checkExecutedPassed()
| def GaudiMP.GMPBase.Worker.checkExecutedPassed |
( |
|
self, |
|
|
|
algName |
|
) |
| |
Definition at line 1201 of file GMPBase.py.
1201 def checkExecutedPassed(self, algName):
1203 self.a.algorithm(algName)._ialg.isExecuted()
1204 and self.a.algorithm(algName)._ialg.filterPassed()
◆ Engine()
| def GaudiMP.GMPBase.Worker.Engine |
( |
|
self | ) |
|
Reimplemented from GaudiMP.GMPBase.GMPComponent.
Definition at line 1060 of file GMPBase.py.
1066 libc = ctypes.CDLL(
"libc.so.6")
1067 name = str(self.nodeType) + str(self.nodeID) +
"\0"
1068 libc.prctl(15, name, 0, 0, 0)
1070 startEngine = time.time()
1071 self.log.info(
"Worker %i starting Engine" % (self.nodeID))
1073 self.filerecordsAgent = FileRecordsAgent(self)
1076 self.log.info(
"EVT WRITERS ON WORKER : %i" % (len(self.writerDict[
"events"])))
1078 nEventWriters = len(self.writerDict[
"events"])
1082 for m
in self.writerDict[
"events"]:
1083 for item
in m.ItemList:
1084 hsh = item.find(
"#")
1088 for item
in m.OptItemList:
1089 hsh = item.find(
"#")
1092 optItemList.add(item)
1094 itemList -= optItemList
1095 for item
in sorted(itemList):
1096 self.log.info(
" adding ItemList Item to ts : %s" % (item))
1097 self.ts.addItem(item)
1098 for item
in sorted(optItemList):
1099 self.log.info(
" adding Optional Item to ts : %s" % (item))
1100 self.ts.addOptItem(item)
1102 self.log.info(
"There is no Event Output for this app")
1103 self.eventOutput =
False
1108 packet = self.evcom.receive()
1113 if packet ==
"FINISHED":
1115 evtNumber, tbin = packet
1116 if self.cntr !=
None:
1117 self.cntr.setEventCounter(evtNumber)
1121 self.log.info(
"Fork new subworkers")
1124 for k
in self.subworkers:
1136 self.a.addAlgorithm(CollectHistograms(self))
1143 self.firstEvTime = time.time() - t
1145 self.rTime += time.time() - t
1149 self.log.warning(
"Did not Execute Event")
1150 self.evt.clearStore()
1152 if self.isEventPassed():
1155 self.log.warning(
"Event did not pass : %i" % (evtNumber))
1156 self.evt.clearStore()
1158 if self.eventOutput:
1161 self.currentEvent = self.getEventNumber()
1163 self.evcom.send((self.currentEvent, tb))
1165 self.inc.fireIncident(gbl.Incident(
"Worker",
"EndEvent"))
1166 self.eventLoopSyncer.set()
1167 self.evt.clearStore()
1168 self.log.info(
"Setting <Last> Event")
1169 self.lastEvent.set()
1171 self.evcom.finalize()
1172 self.log.info(
"Worker-%i Finished Processing Events" % (self.nodeID))
1174 self.filerecordsAgent.SendFileRecords()
1176 self.tTime = time.time() - startEngine
1179 for k
in self.subworkers:
1180 self.log.info(
"Join subworkers")
◆ getCheckAlgs()
| def GaudiMP.GMPBase.Worker.getCheckAlgs |
( |
|
self | ) |
|
For some output writers, a check is performed to see if the event has
executed certain algorithms.
These reside in the AcceptAlgs property for those writers
Definition at line 1183 of file GMPBase.py.
1183 def getCheckAlgs(self):
1185 For some output writers, a check is performed to see if the event has
1186 executed certain algorithms.
1187 These reside in the AcceptAlgs property for those writers
1192 for m
in self.writerDict[
"events"]:
1193 if hasattr(m.w,
"AcceptAlgs"):
1194 acc += m.w.AcceptAlgs
1195 if hasattr(m.w,
"RequireAlgs"):
1196 req += m.w.RequireAlgs
1197 if hasattr(m.w,
"VetoAlgs"):
1199 return (acc, req, vet)
◆ isEventPassed()
| def GaudiMP.GMPBase.Worker.isEventPassed |
( |
|
self | ) |
|
Check the algorithm status for an event.
Depending on output writer settings, the event
may be declined based on various criteria.
This is a transcript of the check that occurs in GaudiSvc::OutputStream
Definition at line 1210 of file GMPBase.py.
1210 def isEventPassed(self):
1212 Check the algorithm status for an event.
1213 Depending on output writer settings, the event
1214 may be declined based on various criteria.
1215 This is a transcript of the check that occurs in GaudiSvc::OutputStream
1219 self.log.debug(
"self.acceptAlgs is %s" % (str(self.acceptAlgs)))
1221 for name
in self.acceptAlgs:
1222 if self.checkExecutedPassed(name):
1228 self.log.debug(
"self.requireAlgs is %s" % (str(self.requireAlgs)))
1229 for name
in self.requireAlgs:
1230 if self.checkExecutedPassed(name):
1233 self.log.info(
"Evt declined (requireAlgs) : %s" % (name))
1236 self.log.debug(
"self.vetoAlgs is %s" % (str(self.vetoAlgs)))
1237 for name
in self.vetoAlgs:
1238 if self.checkExecutedPassed(name):
1241 self.log.info(
"Evt declined : (vetoAlgs) : %s" % (name))
◆ processConfiguration()
| def GaudiMP.GMPBase.Worker.processConfiguration |
( |
|
self | ) |
|
Reimplemented from GaudiMP.GMPBase.GMPComponent.
Definition at line 1019 of file GMPBase.py.
1019 def processConfiguration(self):
1025 self.config[
"EventSelector"].Input = []
1026 self.config[
"ApplicationMgr"].OutStream = []
1027 if "HistogramPersistencySvc" in self.config.
keys():
1028 self.config[
"HistogramPersistencySvc"].OutputFile =
""
1029 formatHead =
"[Worker-%i]" % (self.nodeID)
1030 self.config[
"MessageSvc"].Format =
"%-13s " % formatHead + self.msgFormat
1032 for key, lst
in self.writerDict.
iteritems():
1033 self.log.info(
"Writer Type : %s\t : %i" % (key, len(lst)))
1035 for m
in self.writerDict[
"tuples"]:
1038 newName = m.getNewName(
".",
".w%i." % (self.nodeID))
1039 self.config[m.key].Output = newName
1047 if self.app ==
"Gauss":
1049 if "ToolSvc.EvtCounter" not in self.config:
1050 from Configurables
import EvtCounter
1052 counter = EvtCounter()
1054 counter = self.config[
"ToolSvc.EvtCounter"]
1055 counter.UseIncident =
False
1058 self.log.warning(
"Cannot configure EvtCounter")
◆ app
| GaudiMP.GMPBase.Worker.app |
◆ currentEvent
| GaudiMP.GMPBase.Worker.currentEvent |
◆ eventOutput
| GaudiMP.GMPBase.Worker.eventOutput |
◆ filerecordsAgent
| GaudiMP.GMPBase.Worker.filerecordsAgent |
◆ firstEvTime
| GaudiMP.GMPBase.Worker.firstEvTime |
◆ nIn
| GaudiMP.GMPBase.Worker.nIn |
◆ tTime
| GaudiMP.GMPBase.Worker.tTime |
◆ vetoAlgs
| GaudiMP.GMPBase.Worker.vetoAlgs |
◆ writerDict
| GaudiMP.GMPBase.Worker.writerDict |
The documentation for this class was generated from the following file: