ATLAS Offline Software
EvtRangeScatterer.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "EvtRangeScatterer.h"
8 
10 #include "CxxUtils/xmalloc.h"
11 #include "GaudiKernel/IEvtSelector.h"
12 #include "GaudiKernel/IIoComponentMgr.h"
13 #include "GaudiKernel/IFileMgr.h"
14 
15 #include <sys/stat.h>
16 #include <sstream>
17 #include <unistd.h>
18 #include <stdio.h>
19 #include <stdint.h>
20 
21 #include "yampl/SocketFactory.h"
22 #include <queue>
23 #include <fstream>
24 #include <cstdlib>
25 #include <filesystem>
26 
28  , const std::string& name
29  , const IInterface* parent)
31 {
32  m_subprocDirPrefix = "range_scatterer";
33 }
34 
36 {
37 }
38 
40 {
41  ATH_MSG_DEBUG("In initialize");
42 
44  if(!sc.isSuccess()) return sc;
45 
46  return StatusCode::SUCCESS;
47 }
48 
50 {
51  return StatusCode::SUCCESS;
52 }
53 
54 int EvtRangeScatterer::makePool(int maxevt, int nprocs, const std::string& topdir)
55 {
56  ATH_MSG_DEBUG("In makePool " << getpid());
57 
58  if(maxevt < -1) {
59  ATH_MSG_ERROR("Invalid number of events requested: " << maxevt);
60  return -1;
61  }
62 
63  if(topdir.empty()) {
64  ATH_MSG_ERROR("Empty name for the top directory!");
65  return -1;
66  }
67 
68  m_nprocs = (nprocs==-1?sysconf(_SC_NPROCESSORS_ONLN):nprocs);
69  m_subprocTopDir = topdir;
70 
71  // Create the process group with only one process and map_async bootstrap
73  ATH_MSG_INFO("Token Scatterer process created");
74  if(mapAsyncFlag(AthenaMPToolBase::FUNC_BOOTSTRAP))
75  return -1;
76 
77  return 1;
78 }
79 
81 {
82  ATH_MSG_DEBUG("In exec " << getpid());
83 
84  if(mapAsyncFlag(AthenaMPToolBase::FUNC_EXEC))
85  return StatusCode::FAILURE;
86 
87  // Set exit flag on reader
88  if(m_processGroup->map_async(0,0)){
89  ATH_MSG_ERROR("Unable to set exit to the reader");
90  return StatusCode::FAILURE;
91  }
92  return StatusCode::SUCCESS;
93 }
94 
95 void EvtRangeScatterer::subProcessLogs(std::vector<std::string>& filenames)
96 {
97  filenames.clear();
100  filenames.push_back(reader_rundir.string()+std::string("/AthenaMP.log"));
101 }
102 
104 {
106  return jobOutputs;
107 }
108 
109 std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeScatterer::bootstrap_func()
110 {
111  std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
112  outwork->data = CxxUtils::xmalloc(sizeof(int));
113  *(int*)(outwork->data) = 1; // Error code: for now use 0 success, 1 failure
114  outwork->size = sizeof(int);
115 
116  // ...
117  // (possible) TODO: extend outwork with some error message, which will be eventually
118  // reported in the master proces
119  // ...
120 
121  // Reader dir: mkdir
122  std::filesystem::path reader_rundir(m_subprocTopDir);
123  reader_rundir /= std::filesystem::path(m_subprocDirPrefix);
124 
125  if(mkdir(reader_rundir.string().c_str(),S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)==-1) {
126  ATH_MSG_ERROR("Unable to make reader run directory: " << reader_rundir.string() << ". " << fmterror(errno));
127  return outwork;
128  }
129 
130  // Redirect logs
131  if(redirectLog(reader_rundir.string()))
132  return outwork;
133 
134  ATH_MSG_INFO("Logs redirected in the AthenaMP Event Range Scatterer PID=" << getpid());
135 
136  // Update Io Registry
137  if(updateIoReg(reader_rundir.string()))
138  return outwork;
139 
140  ATH_MSG_INFO("Io registry updated in the AthenaMP Event Range Scatterer PID=" << getpid());
141 
142  // _______________________ Handle saved PFC (if any) ______________________
143  std::filesystem::path abs_reader_rundir = std::filesystem::absolute(reader_rundir);
144  if(handleSavedPfc(abs_reader_rundir))
145  return outwork;
146 
147  // Reopen file descriptors
148  if(reopenFds())
149  return outwork;
150 
151  ATH_MSG_INFO("File descriptors re-opened in the AthenaMP Event Range Scatterer PID=" << getpid());
152 
153  // ________________________ I/O reinit ________________________
154  if(!m_ioMgr->io_reinitialize().isSuccess()) {
155  ATH_MSG_ERROR("Failed to reinitialize I/O");
156  return outwork;
157  } else {
158  ATH_MSG_DEBUG("Successfully reinitialized I/O");
159  }
160 
161  // Start the event selector
162  SmartIF<IService> evtSelSvc(m_evtSelector);
163  if(!evtSelSvc) {
164  ATH_MSG_ERROR("Failed to dyncast event selector to IService");
165  return outwork;
166  }
167  if(!evtSelSvc->start().isSuccess()) {
168  ATH_MSG_ERROR("Failed to restart the event selector");
169  return outwork;
170  } else {
171  ATH_MSG_DEBUG("Successfully restarted the event selector");
172  }
173 
174  // Reader dir: chdir
175  if(chdir(reader_rundir.string().c_str())==-1) {
176  ATH_MSG_ERROR("Failed to chdir to " << reader_rundir.string());
177  return outwork;
178  }
179 
180  // Declare success and return
181  *(int*)(outwork->data) = 0;
182  return outwork;
183 }
184 
185 std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeScatterer::exec_func()
186 {
187  ATH_MSG_INFO("Exec function in the AthenaMP Token Scatterer PID=" << getpid());
188 
189  yampl::ISocketFactory* socketFactory = new yampl::SocketFactory();
190  // Create a socket to communicate with the Pilot
191  yampl::ISocket* socket2Pilot = socketFactory->createClientSocket(yampl::Channel(m_eventRangeChannel.value(),yampl::LOCAL),yampl::MOVE_DATA);
192  ATH_MSG_INFO("Created CLIENT socket for communicating Event Ranges with the Pilot");
193  // Create a socket to communicate with EvtRangeProcessors
194  std::string socket2ProcessorName = m_processorChannel.value() + std::string("_") + m_randStr;
195  yampl::ISocket* socket2Processor = socketFactory->createServerSocket(yampl::Channel(socket2ProcessorName,yampl::LOCAL),yampl::MOVE_DATA);
196  ATH_MSG_INFO("Created SERVER socket to token processors: " << socket2ProcessorName);
197 
198  bool all_ok=true;
199  int procReportPending(0); // Keep track of how many output files are yet to be reported by Token Processors
200 
201  AthenaInterprocess::SharedQueue* sharedFailedPidQueue(0);
202  if(detStore()->retrieve(sharedFailedPidQueue,"AthenaMPFailedPidQueue_"+m_randStr).isFailure()) {
203  ATH_MSG_ERROR("Unable to retrieve the pointer to Shared Failed PID Queue");
204  all_ok=false;
205  }
206 
207  // Communication protocol with the Pilot
208  std::string strReady("Ready for events");
209  std::string strStopProcessing("No more events");
210  std::string processorWaitRequest("");
211  int workerPid{-1};
212 
213  ATH_MSG_INFO("Starting main loop");
214 
215  while(all_ok) {
216  // NO CACHING MODE: first get a request from one of the processors and only after that request the next event range from the pilot
217  if(!m_doCaching && processorWaitRequest.empty()) {
218  ATH_MSG_DEBUG("Waiting for event range request from one of the processors ... ");
219  while(processorWaitRequest.empty()) {
220  processorWaitRequest = getNewRangeRequest(socket2Processor,socket2Pilot,procReportPending);
221  pollFailedPidQueue(sharedFailedPidQueue,socket2Pilot,procReportPending);
222  usleep(1000);
223  }
224  ATH_MSG_INFO("One of the processors is ready for the next range");
225  // Get PID from the request and Update m_pid2RangeID
226  workerPid = std::atoi(processorWaitRequest.c_str());
227  auto it = m_pid2RangeID.find(workerPid);
228  if(it!=m_pid2RangeID.end()) {
229  m_pid2RangeID.erase(it);
230  }
231  }
232 
233  // Signal the Pilot that AthenaMP is ready for event processing
234  void* ready_message = CxxUtils::xmalloc(strReady.size());
235  memcpy(ready_message,strReady.data(),strReady.size());
236  socket2Pilot->send(ready_message,strReady.size());
237  void* eventRangeMessage;
238  std::string strPeerId;
239  ssize_t eventRangeSize = socket2Pilot->recv(eventRangeMessage,strPeerId);
240  std::string eventRange((const char*)eventRangeMessage,eventRangeSize);
241  size_t carRet = eventRange.find('\n');
242  if(carRet!=std::string::npos)
243  eventRange.resize(carRet);
244 
245  // Break the loop if no more ranges are expected
246  if(eventRange.find(strStopProcessing)!=std::string::npos) {
247  ATH_MSG_INFO("Stopped the loop. Last message from the Event Range Channel: " << eventRange);
248  break;
249  }
250  ATH_MSG_INFO("Got Event Range from the pilot: " << eventRange);
251 
252  // Parse the Event Range string
253  // Expected the following format: [{KEY:VALUE[,KEY:VALUE]}]
254  // First get rid of the leading '[{' and the trailing '}]'
255  if(eventRange.starts_with( "[{")) eventRange=eventRange.substr(2);
256  if(eventRange.ends_with("}]")) eventRange.resize(eventRange.size()-2);
257 
258  std::map<std::string,std::string> eventRangeMap;
259  size_t startpos(0);
260  size_t endpos = eventRange.find(',');
261  while(endpos!=std::string::npos) {
262  // Get the Key-Value pair
263  std::string keyValue(eventRange.substr(startpos,endpos-startpos));
264  size_t colonPos = keyValue.find(':');
265  std::string strKey = keyValue.substr(0,colonPos);
266  std::string strVal = keyValue.substr(colonPos+1);
267  trimRangeStrings(strKey);
268  trimRangeStrings(strVal);
269  eventRangeMap[strKey]=std::move(strVal);
270  // Next iteration
271  startpos = endpos+1;
272  endpos = eventRange.find(',',startpos);
273  }
274  // Get the final Key-Value pair
275  std::string keyValue(eventRange.substr(startpos));
276  size_t colonPos = keyValue.find(':');
277  std::string strKey = keyValue.substr(0,colonPos);
278  std::string strVal = keyValue.substr(colonPos+1);
279  trimRangeStrings(strKey);
280  trimRangeStrings(strVal);
281  eventRangeMap[strKey]=std::move(strVal);
282 
283  if(eventRangeMap.find("eventRangeID")==eventRangeMap.end()
284  || eventRangeMap.find("startEvent")==eventRangeMap.end()
285  || eventRangeMap.find("lastEvent")==eventRangeMap.end()
286  || eventRangeMap.find("GUID")==eventRangeMap.end()) {
287  std::string errorStr("ERR_ATHENAMP_PARSE \"" + eventRange + "\": Wrong format");
289  ATH_MSG_INFO("Ignoring this event range ");
290  void* errorMessage = CxxUtils::xmalloc(errorStr.size());
291  memcpy(errorMessage,errorStr.data(),errorStr.size());
292  socket2Pilot->send(errorMessage,errorStr.size());
293  continue;
294  }
295  else {
296  ATH_MSG_DEBUG("*** Decoded Event Range ***");
297  std::map<std::string,std::string>::const_iterator it = eventRangeMap.begin(),
298  itEnd = eventRangeMap.end();
299  for(;it!=itEnd;++it)
300  ATH_MSG_DEBUG(it->first << ":" << it->second);
301  ATH_MSG_DEBUG("*** ***");
302  }
303 
304  std::string rangeID = eventRangeMap["eventRangeID"];
305  std::string guid = eventRangeMap["GUID"];
306  int startEvent = std::atoi(eventRangeMap["startEvent"].c_str());
307  int lastEvent = std::atoi(eventRangeMap["lastEvent"].c_str());
308  if(rangeID.empty()
309  || guid.empty()
310  || lastEvent < startEvent) {
311  std::string errorStr("ERR_ATHENAMP_PARSE \"" + eventRange + "\": Wrong values of range fields");
313  ATH_MSG_INFO("Ignoring this event range ");
314  void* errorMessage = CxxUtils::xmalloc(errorStr.size());
315  memcpy(errorMessage,errorStr.data(),errorStr.size());
316  socket2Pilot->send(errorMessage,errorStr.size());
317  continue;
318  }
319 
320  std::string message2ProcessorStr;
321  char* message2Processor(0);
322 
323  std::ostringstream ostr;
324  ostr << rangeID;
325  if(eventRangeMap.find("PFN")!=eventRangeMap.end()) {
326  ostr << "," << "PFN:" << eventRangeMap["PFN"];
327  }
328  ostr << "," << eventRangeMap["startEvent"]
329  << "," << eventRangeMap["lastEvent"];
330  message2ProcessorStr = ostr.str();
331 
332  // CACHING MODE: first get an event range from the pilot, transform it into the tokens
333  // and only after that wait for a new range request by one of the processors
334  if(m_doCaching) {
335  ATH_MSG_DEBUG("Waiting for event range request from one of the processors");
336  while(processorWaitRequest.empty()) {
337  processorWaitRequest = getNewRangeRequest(socket2Processor,socket2Pilot,procReportPending);
338  pollFailedPidQueue(sharedFailedPidQueue,socket2Pilot,procReportPending);
339  usleep(1000);
340  }
341  ATH_MSG_INFO("One of the processors is ready for the next range");
342  // Get PID from the request and Update m_pid2RangeID
343  workerPid = std::atoi(processorWaitRequest.c_str());
344  auto it = m_pid2RangeID.find(workerPid);
345  if(it!=m_pid2RangeID.end()) {
346  m_pid2RangeID.erase(it);
347  }
348  }
349 
350  // Send to the Processor: RangeID,evtToken[,evtToken]
351  message2Processor = (char*)CxxUtils::xmalloc(message2ProcessorStr.size());
352  memcpy(message2Processor,message2ProcessorStr.data(),message2ProcessorStr.size());
353  socket2Processor->send(message2Processor,message2ProcessorStr.size());
354  procReportPending++;
355 
356  // Get PID from the request and Update m_pid2RangeID
357  m_pid2RangeID[workerPid] = std::move(rangeID);
358  processorWaitRequest.clear();
359 
360  ATH_MSG_INFO("Sent response to the processor : " << message2ProcessorStr);
361  }
362 
363  if(all_ok) {
364  // We are done distributing event tokens.
365  // Tell the workers that the event processing is over
366  // i.e. send out m_nprocs empty messages
367  void* emptyMess4Processor(0);
368  if(!processorWaitRequest.empty()) {
369  // We already have one processor waiting for the answer
370  emptyMess4Processor = CxxUtils::xmalloc(1);
371  socket2Processor->send(emptyMess4Processor,1);
372  ATH_MSG_INFO("Set worker PID=" << workerPid << " free");
373  processorWaitRequest.clear();
374  }
375  bool endLoop{false};
376  while(true) {
377  ATH_MSG_DEBUG("Going to set another processor free");
378  while(processorWaitRequest.empty()) {
379  processorWaitRequest = getNewRangeRequest(socket2Processor,socket2Pilot,procReportPending);
380  if(pollFailedPidQueue(sharedFailedPidQueue,socket2Pilot,procReportPending)==-1) {
381  endLoop = true;
382  break;
383  }
384  usleep(1000);
385  }
386  if(endLoop) break;
387  // Remove worker from m_pid2RangeID
388  workerPid = std::atoi(processorWaitRequest.c_str());
389  auto it = m_pid2RangeID.find(workerPid);
390  if(it!=m_pid2RangeID.end()) {
391  m_pid2RangeID.erase(it);
392  }
393  emptyMess4Processor = CxxUtils::xmalloc(1);
394  socket2Processor->send(emptyMess4Processor,1);
395  ATH_MSG_INFO("Set worker PID=" << workerPid << " free");
396  ATH_MSG_INFO("Still " << procReportPending << " pending reports");
397  processorWaitRequest.clear();
398  }
399  }
400 
401  if(m_appMgr->stop().isFailure()) {
402  ATH_MSG_ERROR("Unable to stop AppMgr");
403  all_ok=false;
404  }
405  else {
406  if(m_appMgr->finalize().isFailure()) {
407  std::cerr << "Unable to finalize AppMgr" << std::endl;
408  all_ok=false;
409  }
410  }
411 
412  std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
413  outwork->data = CxxUtils::xmalloc(sizeof(int));
414  *(int*)(outwork->data) = (all_ok?0:1); // Error code: for now use 0 success, 1 failure
415  outwork->size = sizeof(int);
416 
417  // ...
418  // (possible) TODO: extend outwork with some error message, which will be eventually
419  // reported in the master proces
420  // ...
421  delete socket2Processor;
422  delete socket2Pilot;
423  delete socketFactory;
424 
425  return outwork;
426 }
427 
428 std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeScatterer::fin_func()
429 {
430  // Dummy
431  std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
432  outwork->data = CxxUtils::xmalloc(sizeof(int));
433  *(int*)(outwork->data) = 0; // Error code: for now use 0 success, 1 failure
434  outwork->size = sizeof(int);
435  return outwork;
436 }
437 
439 {
440  size_t i(0);
441  // get rid of leading spaces
442  while(i<str.size() && str[i]==' ') i++;
443  if(i) str = str.substr(i);
444 
445  if(str.empty()) return; // Corner case: string consists only of spaces
446 
447  // get rid of trailing spaces
448  i=str.size()-1;
449  while(str[i]==' ') i--;
450  if(i) str.resize(i+1);
451 
452  // the string might be enclosed by either
453  // "u\'" and "\'"
454  // or
455  // "\"" and "\""
456  // Get rid of them!
457  if(str.starts_with( "u\'")) {
458  str = str.substr(2);
459  if(str.ends_with( "\'")) {
460  str.resize(str.size()-1);
461  }
462  }
463  else if(str.starts_with( "\"")) {
464  str = str.substr(1);
465  if(str.ends_with( "\"")) {
466  str.resize(str.size()-1);
467  }
468  }
469 }
470 
471 std::string EvtRangeScatterer::getNewRangeRequest(yampl::ISocket* socket2Processor
472  , yampl::ISocket* socket2Pilot
473  , int& procReportPending)
474 {
475  void* processor_request(0);
476  std::string strPeerId;
477  ssize_t processorRequestSize = socket2Processor->tryRecv(processor_request,0,strPeerId);
478 
479  if(processorRequestSize==-1) return std::string("");
480  if(processorRequestSize==sizeof(pid_t)+sizeof(AthenaMPToolBase::ESRange_Status)) {
481  ATH_MSG_INFO("Processor reported event range processing error");
482  pid_t pid = *((pid_t*)processor_request);
483  AthenaMPToolBase::ESRange_Status status = *reinterpret_cast<AthenaMPToolBase::ESRange_Status*>((pid_t*)processor_request+1);
484  std::string errorStr("ERR_ATHENAMP_PROCESS "+ m_pid2RangeID[pid] + ": ");
485  switch(status) {
487  errorStr+=std::string("Not found in the input file");
488  break;
490  errorStr+=std::string("Seek failed");
491  break;
493  errorStr+=std::string("Failed to process event range");
494  break;
496  errorStr+=std::string("Failed to make output file");
497  break;
499  errorStr+=std::string("Failed to set input file");
500  break;
501  default:
502  break;
503  }
504  void* errorMessage = CxxUtils::xmalloc(errorStr.size());
505  memcpy(errorMessage,errorStr.data(),errorStr.size());
506  socket2Pilot->send(errorMessage,errorStr.size());
507  procReportPending--;
508  ATH_MSG_INFO("Error reported to the pilot. Reports pending: " << procReportPending);
509  return std::string("");
510  }
511  std::string strProcessorRequest((const char*)processor_request,processorRequestSize);
512  ATH_MSG_INFO("Received request from a processor: " << strProcessorRequest);
513  // Decode the request. If it contains output file name then pass it over to the pilot and return empty string
514  if(strProcessorRequest.starts_with( "/")) {
515  void* outpFileNameMessage = CxxUtils::xmalloc(strProcessorRequest.size());
516  memcpy(outpFileNameMessage,strProcessorRequest.data(),strProcessorRequest.size());
517  socket2Pilot->send(outpFileNameMessage,strProcessorRequest.size());
518  procReportPending--;
519  ATH_MSG_INFO("Output file reported to the pilot. Reports pending: " << procReportPending);
520  return std::string("");
521  }
522  return strProcessorRequest;
523 }
524 
526  , yampl::ISocket* socket2Pilot
527  , int& procReportPending)
528 {
529  pid_t pid{0};
530  if(sharedFailedPidQueue->try_receive_basic<pid_t>(pid)
531  && pid!=-1) {
532  ATH_MSG_INFO("Procesor with PID=" << pid << " has failed!");
533  auto itPid = m_pid2RangeID.find(pid);
534  if(itPid!=m_pid2RangeID.end()) {
535  ATH_MSG_WARNING("The failed RangeID = " << m_pid2RangeID[pid] << " will be reported to Pilot");
536 
537  std::string errorStr("ERR_ATHENAMP_PROCESS " + m_pid2RangeID[pid] + ": Failed to process event range");
538  void* errorMessage = CxxUtils::xmalloc(errorStr.size());
539  memcpy(errorMessage,errorStr.data(),errorStr.size());
540  socket2Pilot->send(errorMessage,errorStr.size());
541  --procReportPending;
542  m_pid2RangeID.erase(pid);
543  }
544  ATH_MSG_INFO("Reports pending: " << procReportPending);
545  }
546  return pid;
547 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
pid_t
int32_t pid_t
Definition: FPGATrackSimTypes.h:19
EvtRangeScatterer::subProcessLogs
virtual void subProcessLogs(std::vector< std::string > &) override
Definition: EvtRangeScatterer.cxx:95
EvtRangeScatterer::initialize
virtual StatusCode initialize() override
Definition: EvtRangeScatterer.cxx:39
EvtRangeScatterer::getNewRangeRequest
std::string getNewRangeRequest(yampl::ISocket *socket2Processor, yampl::ISocket *socket2Pilot, int &procReportPending)
Definition: EvtRangeScatterer.cxx:471
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
AthenaMPToolBase::ESRANGE_BADINPFILE
@ ESRANGE_BADINPFILE
Definition: AthenaMPToolBase.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
plot_material.mkdir
def mkdir(path, recursive=True)
Definition: plot_material.py:15
LArBadChanBlobUtils::Channel
Identifier32::value_type Channel
Definition: LArBadChanBlobUtils.h:24
EvtRangeScatterer::pollFailedPidQueue
pid_t pollFailedPidQueue(AthenaInterprocess::SharedQueue *sharedFailedPidQueue, yampl::ISocket *socket2Pilot, int &procReportPending)
Definition: EvtRangeScatterer.cxx:525
IEventShare.h
AthenaInterprocess::ScheduledWork::size
int size
Definition: IMessageDecoder.h:14
AthenaMPToolBase::m_processGroup
AthenaInterprocess::ProcessGroup * m_processGroup
Definition: AthenaMPToolBase.h:91
AthenaInterprocess::ScheduledWork
Definition: IMessageDecoder.h:12
EvtRangeScatterer::generateOutputReport
virtual AthenaMP::AllWorkerOutputs_ptr generateOutputReport() override
Definition: EvtRangeScatterer.cxx:103
AthenaMPToolBase::m_randStr
std::string m_randStr
Definition: AthenaMPToolBase.h:101
AthenaMPToolBase::m_nprocs
int m_nprocs
Number of workers spawned by the master process.
Definition: AthenaMPToolBase.h:85
AthenaMPToolBase::ESRange_Status
ESRange_Status
Definition: AthenaMPToolBase.h:58
AthenaMPToolBase
Definition: AthenaMPToolBase.h:25
plotting.yearwise_luminosity.absolute
absolute
Definition: yearwise_luminosity.py:29
skel.it
it
Definition: skel.GENtoEVGEN.py:407
AthenaMPToolBase::fmterror
std::string fmterror(int errnum)
Definition: AthenaMPToolBase.cxx:333
EvtRangeScatterer::trimRangeStrings
void trimRangeStrings(std::string &)
Definition: EvtRangeScatterer.cxx:438
EvtRangeScatterer::finalize
virtual StatusCode finalize() override
Definition: EvtRangeScatterer.cxx:49
AthenaInterprocess::ScheduledWork::data
void * data
Definition: IMessageDecoder.h:13
AthenaInterprocess::SharedQueue::try_receive_basic
bool try_receive_basic(T &)
Definition: SharedQueue.h:119
EvtRangeScatterer::~EvtRangeScatterer
virtual ~EvtRangeScatterer() override
Definition: EvtRangeScatterer.cxx:35
ProcessGroup.h
AthenaMPToolBase::ESRANGE_SEEKFAILED
@ ESRANGE_SEEKFAILED
Definition: AthenaMPToolBase.h:61
EvtRangeScatterer::m_processorChannel
Gaudi::Property< std::string > m_processorChannel
Definition: EvtRangeScatterer.h:63
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
EvtRangeScatterer.h
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthenaMPToolBase::FUNC_EXEC
@ FUNC_EXEC
Definition: AthenaMPToolBase.h:69
EvtRangeScatterer::fin_func
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > fin_func() override
Definition: EvtRangeScatterer.cxx:428
LHEonly.nprocs
nprocs
Definition: LHEonly.py:17
AthenaMPToolBase::m_evtSelector
SmartIF< IEvtSelector > m_evtSelector
Definition: AthenaMPToolBase.h:98
AthenaInterprocess::SharedQueue
Definition: SharedQueue.h:21
RunTileMonitoring.keyValue
keyValue
Definition: RunTileMonitoring.py:150
AthenaMPToolBase::m_appMgr
ServiceHandle< IAppMgrUI > m_appMgr
Definition: AthenaMPToolBase.h:95
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EvtRangeScatterer::exec_func
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > exec_func() override
Definition: EvtRangeScatterer.cxx:185
lumiFormat.i
int i
Definition: lumiFormat.py:85
EvtRangeScatterer::EvtRangeScatterer
EvtRangeScatterer()
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthenaInterprocess::ProcessGroup
Definition: ProcessGroup.h:27
LArG4FSStartPointFilter.exec
exec
Definition: LArG4FSStartPointFilter.py:103
EvtRangeScatterer::bootstrap_func
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > bootstrap_func() override
Definition: EvtRangeScatterer.cxx:109
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthenaMPToolBase::updateIoReg
int updateIoReg(const std::string &rundir)
Definition: AthenaMPToolBase.cxx:322
AthenaMPToolBase::initialize
virtual StatusCode initialize() override
Definition: AthenaMPToolBase.cxx:48
EvtRangeScatterer::m_eventRangeChannel
Gaudi::Property< std::string > m_eventRangeChannel
Definition: EvtRangeScatterer.h:64
pool_uuid.guid
guid
Definition: pool_uuid.py:112
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
AthenaMPToolBase::ESRANGE_PROCFAILED
@ ESRANGE_PROCFAILED
Definition: AthenaMPToolBase.h:62
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
checkRpcDigits.errorStr
string errorStr
Definition: checkRpcDigits.py:182
AthenaMPToolBase::m_ioMgr
ServiceHandle< IIoComponentMgr > m_ioMgr
Definition: AthenaMPToolBase.h:97
AthenaMPToolBase::redirectLog
int redirectLog(const std::string &rundir, bool addTimeStamp=true)
Definition: AthenaMPToolBase.cxx:269
grepfile.filenames
list filenames
Definition: grepfile.py:34
EvtRangeScatterer::m_pid2RangeID
Pid2RangeID m_pid2RangeID
Definition: EvtRangeScatterer.h:67
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
EvtRangeScatterer::m_doCaching
Gaudi::Property< bool > m_doCaching
Definition: EvtRangeScatterer.h:65
AthenaMP::AllWorkerOutputs_ptr
std::unique_ptr< AllWorkerOutputs > AllWorkerOutputs_ptr
Definition: IAthenaMPTool.h:32
SharedQueue.h
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
str
Definition: BTagTrackIpAccessor.cxx:11
merge.status
status
Definition: merge.py:16
AthenaMPToolBase::m_subprocDirPrefix
std::string m_subprocDirPrefix
For ex. "worker__".
Definition: AthenaMPToolBase.h:88
AthenaMPToolBase::m_subprocTopDir
std::string m_subprocTopDir
Top run directory for subprocesses.
Definition: AthenaMPToolBase.h:87
AthenaMPToolBase::ESRANGE_NOTFOUND
@ ESRANGE_NOTFOUND
Definition: AthenaMPToolBase.h:60
CxxUtils::xmalloc
void * xmalloc(size_t size)
Trapping version of malloc.
Definition: xmalloc.cxx:31
AthenaMPToolBase::handleSavedPfc
int handleSavedPfc(const std::filesystem::path &dest_path)
Definition: AthenaMPToolBase.cxx:396
AthenaMP::AllWorkerOutputs
std::map< std::string, SingleWorkerOutputs > AllWorkerOutputs
Definition: IAthenaMPTool.h:29
AthenaMPToolBase::FUNC_BOOTSTRAP
@ FUNC_BOOTSTRAP
Definition: AthenaMPToolBase.h:68
xmalloc.h
Trapping version of malloc.
AthenaMPToolBase::reopenFds
int reopenFds()
Definition: AthenaMPToolBase.cxx:340
AthenaMPToolBase::ESRANGE_FILENOTMADE
@ ESRANGE_FILENOTMADE
Definition: AthenaMPToolBase.h:63