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