ATLAS Offline Software
AthenaPoolCnvSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 #include "AthenaPoolCnvSvc.h"
11 
12 #include "GaudiKernel/AttribStringParser.h"
13 #include "GaudiKernel/ClassID.h"
14 #include "GaudiKernel/FileIncident.h"
15 #include "GaudiKernel/IIncidentSvc.h"
16 #include "GaudiKernel/IIoComponentMgr.h"
17 #include "GaudiKernel/IOpaqueAddress.h"
18 
23 
24 #include "StorageSvc/DbReflex.h"
25 #include "RootUtils/APRDefaults.h"
26 
27 #include <algorithm>
28 #include <charconv>
29 #include <format>
30 #include <iomanip>
31 #include <sstream>
32 
33 //______________________________________________________________________________
34 // Initialize the service.
36  // Initialize DataModelCompatSvc
37  ServiceHandle<IService> dmcsvc("DataModelCompatSvc", this->name());
38  ATH_CHECK(dmcsvc.retrieve());
39  // Retrieve PoolSvc
40  ATH_CHECK(m_poolSvc.retrieve());
41  StringProperty defContainerType("DefaultContainerType", "ROOTTREEINDEX");
42  if(IProperty* propertyServer = dynamic_cast<IProperty*>(m_poolSvc.get())) {
43  propertyServer->getProperty(&defContainerType).ignore();
44  }
45  m_defContainerType = defContainerType.value();
46  // Retrieve ClassIDSvc
47  ATH_CHECK(m_clidSvc.retrieve());
48  // Register this service for 'I/O' events
49  ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
50  ATH_CHECK(iomgr.retrieve());
51  if (!iomgr->io_register(this).isSuccess()) {
52  ATH_MSG_FATAL("Could not register myself with the IoComponentMgr !");
53  return(StatusCode::FAILURE);
54  }
55  // Extracting MaxFileSizes for global default and map by Database name.
56  for (const auto& maxFileSizeSpec : m_maxFileSizes.value()) {
57  if (auto p = maxFileSizeSpec.find('='); p != std::string::npos) {
58  long long maxFileSize = 0;
59  const char* start = maxFileSizeSpec.data() + (p + 1);
60  const char* end = maxFileSizeSpec.data() + maxFileSizeSpec.size();
61  if (auto [ptr, ec] = std::from_chars(start, end, maxFileSize); ec != std::errc{}) {
62  ATH_MSG_WARNING(std::format("Invalid MaxFileSize value: {}", std::string(start, end)));
63  }
64  std::string databaseName = maxFileSizeSpec.substr(0, maxFileSizeSpec.find_first_of(" ="));
65  m_databaseMaxFileSize.emplace(std::move(databaseName), maxFileSize);
66  } else {
67  if (auto [ptr, ec] = std::from_chars(maxFileSizeSpec.data(), maxFileSizeSpec.data() + maxFileSizeSpec.size(), m_domainMaxFileSize); ec != std::errc{}) {
68  ATH_MSG_WARNING(std::format("Invalid MaxFileSize value: {}", maxFileSizeSpec));
69  }
70  }
71  }
72  // Validate provided event data technologies and fill the internal cache
73  for (const auto& [key, value] : m_storageTechProp.value()) {
74  try {
75  const auto dbType = pool::DbType::getType(value);
76  if (dbType == pool::TEST_StorageType) {
77  ATH_MSG_FATAL(std::format("Unknown storage type requested for file {}: {}", key, value));
78  return StatusCode::FAILURE;
79  }
80  m_storageTechMap.emplace(key, dbType.type());
81  } catch (const std::exception& e) {
82  ATH_MSG_FATAL(std::format("Exception while getting storage type for file {}: {}", key, e.what()));
83  return StatusCode::FAILURE;
84  } catch (...) {
85  ATH_MSG_FATAL(std::format("Unknown exception while getting storage type for file {}", key));
86  return StatusCode::FAILURE;
87  }
88  }
89  // Extracting INPUT POOL ItechnologySpecificAttributes for Domain, Database and Container.
91  // Extracting the INPUT POOL ItechnologySpecificAttributes which are to be printed for each event
93  // Setup incident for EndEvent to print out attributes each event
94  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", name());
95  long int pri = 1000;
96  if (!m_inputPoolAttrPerEvent.value().empty()) {
97  // Set to be listener for EndEvent
98  incSvc->addListener(this, "EndEvent", pri);
99  ATH_MSG_DEBUG("Subscribed to EndEvent for printing out input file attributes.");
100  }
101  if (!processPoolAttributes(m_inputAttr, "", IPoolSvc::kInputStream, false, true, true).isSuccess()) {
102  ATH_MSG_DEBUG("setInputAttribute failed setting POOL domain attributes.");
103  }
104 
105  // Load these dictionaries now, so we don't need to try to do so
106  // while multiple threads are running.
107  TClass::GetClass ("TLeafI");
108  TClass::GetClass ("TLeafL");
109  TClass::GetClass ("TLeafD");
110  TClass::GetClass ("TLeafF");
111 
112  return(StatusCode::SUCCESS);
113 }
114 //______________________________________________________________________________
116  ATH_MSG_DEBUG("I/O reinitialization...");
117  m_contextAttr.clear();
118  return(StatusCode::SUCCESS);
119 }
120 //______________________________________________________________________________
122  // Write remaining DataHeaderForms for a given streamName, "*"" means all
123  auto DHCnvListener = dynamic_cast<IIncidentListener*>( converter( ClassID_traits<DataHeader>::ID() ) );
124  FileIncident incident(name(), "WriteDataHeaderForms", streamName);
125  if( DHCnvListener ) DHCnvListener->handle(incident);
126 }
127 //______________________________________________________________________________
129  ATH_MSG_VERBOSE("stop()");
130  // In case of direct writing without an OutputStream, this should be a good time to flush DHForms
132  return StatusCode::SUCCESS;
133 }
134 //______________________________________________________________________________
136  ATH_MSG_VERBOSE("Finalizing...");
137  // Some algorithms write in finalize(), flush DHForms if any are left
139  // Release ClassIDSvc
140  if (!m_clidSvc.release().isSuccess()) {
141  ATH_MSG_WARNING("Cannot release ClassIDSvc.");
142  }
143  // Release PoolSvc
144  if (!m_poolSvc.release().isSuccess()) {
145  ATH_MSG_WARNING("Cannot release PoolSvc.");
146  }
147  // Print Performance Statistics
148  // The pattern AthenaPoolCnvSvc.*PerfStats is ignored in AtlasTest/TestTools/share/post.sh
149  const std::string msgPrefix{"PerfStats "};
150  ATH_MSG_INFO(msgPrefix << std::string(40, '-'));
151  ATH_MSG_INFO(msgPrefix << "Timing Measurements for AthenaPoolCnvSvc");
152  ATH_MSG_INFO(msgPrefix << std::string(40, '-'));
153  for(const auto& [key, value] : m_chronoMap) {
154  ATH_MSG_INFO(msgPrefix << "| " << std::left << std::setw(15) << key << " | "
155  << std::right << std::setw(15) << std::fixed << std::setprecision(0) << value << " ms |");
156  }
157  ATH_MSG_INFO(msgPrefix << std::string(40, '-'));
158 
159  m_cnvs.clear();
160  m_cnvs.shrink_to_fit();
161  return(StatusCode::SUCCESS);
162 }
163 //______________________________________________________________________________
165  ATH_MSG_DEBUG("I/O finalization...");
166  return(StatusCode::SUCCESS);
167 }
168 //______________________________________________________________________________
169 StatusCode AthenaPoolCnvSvc::createObj(IOpaqueAddress* pAddress, DataObject*& refpObject) {
170  assert(pAddress);
171  std::string objName = "ALL";
172  if (m_useDetailChronoStat.value()) {
173  if (m_clidSvc->getTypeNameOfID(pAddress->clID(), objName).isFailure()) {
174  objName = std::to_string(pAddress->clID());
175  }
176  objName += '#';
177  objName += *(pAddress->par() + 1);
178  }
179  // StopWatch listens from here until the end of this current scope
180  PMonUtils::BasicStopWatch stopWatch("cObj_" + objName, m_chronoMap);
181  if (!m_persSvcPerInputType.empty()) { // Use separate PersistencySvc for each input data type
182  TokenAddress* tokAddr = dynamic_cast<TokenAddress*>(pAddress);
183  if (tokAddr != nullptr && tokAddr->getToken() != nullptr && (tokAddr->getToken()->contID().starts_with(m_persSvcPerInputType.value() + "(") || tokAddr->getToken()->contID().starts_with(m_persSvcPerInputType.value() + "_"))) {
184  const unsigned int maxContext = m_poolSvc->getInputContextMap().size();
185  const unsigned int auxContext = m_poolSvc->getInputContext(tokAddr->getToken()->classID().toString() + tokAddr->getToken()->dbID().toString(), 1);
186  char text[32];
187  const std::string contextStr = std::format("[CTXT={:08X}]", auxContext);
188  std::strncpy(text, contextStr.c_str(), sizeof(text) - 1);
189  text[sizeof(text) - 1] = '\0';
190  if (m_poolSvc->getInputContextMap().size() > maxContext) {
191  if (m_poolSvc->setAttribute("TREE_CACHE", "0", pool::DbType(pool::ROOTTREE_StorageType).type(), "FID:" + tokAddr->getToken()->dbID().toString(), m_persSvcPerInputType.value(), auxContext).isSuccess()) {
192  ATH_MSG_DEBUG("setInputAttribute failed to switch off TTreeCache for id = " << auxContext << ".");
193  }
194  }
195  tokAddr->getToken()->setAuxString(text);
196  }
197  }
198  // Forward to base class createObj
199  StatusCode status = ::AthCnvSvc::createObj(pAddress, refpObject);
200  return(status);
201 }
202 //______________________________________________________________________________
203 StatusCode AthenaPoolCnvSvc::createRep(DataObject* pObject, IOpaqueAddress*& refpAddress) {
204  assert(pObject);
205  std::string objName = "ALL";
206  if (m_useDetailChronoStat.value()) {
207  if (m_clidSvc->getTypeNameOfID(pObject->clID(), objName).isFailure()) {
208  objName = std::to_string(pObject->clID());
209  }
210  objName += '#';
211  objName += pObject->registry()->name();
212  }
213  // StopWatch listens from here until the end of this current scope
214  PMonUtils::BasicStopWatch stopWatch("cRep_" + objName, m_chronoMap);
215  StatusCode status = StatusCode::FAILURE;
216  if (pObject->clID() == 1) {
217  // No transient object was found use cnv to write default persistent object
218  SG::DataProxy* proxy = dynamic_cast<SG::DataProxy*>(pObject->registry());
219  if (proxy != nullptr) {
220  IConverter* cnv = converter(proxy->clID());
221  status = cnv->createRep(pObject, refpAddress);
222  }
223  } else {
224  // Forward to base class createRep
225  try {
226  status = ::AthCnvSvc::createRep(pObject, refpAddress);
227  } catch(std::runtime_error& e) {
228  ATH_MSG_FATAL(e.what());
229  }
230  }
231  return(status);
232 }
233 //______________________________________________________________________________
234 StatusCode AthenaPoolCnvSvc::fillRepRefs(IOpaqueAddress* pAddress, DataObject* pObject) {
235  assert(pObject);
236  std::string objName = "ALL";
237  if (m_useDetailChronoStat.value()) {
238  if (m_clidSvc->getTypeNameOfID(pObject->clID(), objName).isFailure()) {
239  objName = std::to_string(pObject->clID());
240  }
241  objName += '#';
242  objName += pObject->registry()->name();
243  }
244  // StopWatch listens from here until the end of this current scope
245  PMonUtils::BasicStopWatch stopWatch("fRep_" + objName, m_chronoMap);
246  StatusCode status = StatusCode::FAILURE;
247  if (pObject->clID() == 1) {
248  // No transient object was found use cnv to write default persistent object
249  SG::DataProxy* proxy = dynamic_cast<SG::DataProxy*>(pObject->registry());
250  if (proxy != nullptr) {
251  IConverter* cnv = converter(proxy->clID());
252  status = cnv->fillRepRefs(pAddress, pObject);
253  }
254  } else {
255  // Forward to base class fillRepRefs
256  try {
257  status = ::AthCnvSvc::fillRepRefs(pAddress, pObject);
258  } catch(std::runtime_error& e) {
259  ATH_MSG_FATAL(e.what());
260  }
261  }
262  return(status);
263 }
264 //______________________________________________________________________________
265 StatusCode AthenaPoolCnvSvc::connectOutput(const std::string& outputConnectionSpec,
266  const std::string& /*openMode*/) {
267  return(connectOutput(outputConnectionSpec));
268 }
269 //______________________________________________________________________________
270 StatusCode AthenaPoolCnvSvc::connectOutput(const std::string& outputConnectionSpec) {
271 // This is called before DataObjects are being converted.
272  std::string outputConnection = outputConnectionSpec.substr(0, outputConnectionSpec.find('['));
273  // Extract the technology
274  int tech{0};
275  if (!decodeOutputSpec(outputConnection, tech).isSuccess()) {
276  ATH_MSG_ERROR("connectOutput FAILED extract file name and technology.");
277  return(StatusCode::FAILURE);
278  }
279  unsigned int contextId = outputContextId(outputConnection);
280  try {
281  if (!m_poolSvc->connect(pool::ITransaction::UPDATE, contextId).isSuccess()) {
282  ATH_MSG_ERROR("connectOutput FAILED to open an UPDATE transaction.");
283  return(StatusCode::FAILURE);
284  }
285  } catch (std::exception& e) {
286  ATH_MSG_ERROR("connectOutput - caught exception: " << e.what());
287  return(StatusCode::FAILURE);
288  }
289 
290  std::unique_lock<std::mutex> lock(m_mutex);
291  if (std::find(m_contextAttr.begin(), m_contextAttr.end(), contextId) == m_contextAttr.end()) {
292  std::size_t merge = outputConnection.find("?pmerge="); // Used to remove trailing TMemFile
293  int flush = m_numberEventsPerWrite.value();
294  m_contextAttr.push_back(contextId);
295  // Setting default 'TREE_MAX_SIZE' for ROOT to 1024 GB to avoid file chains.
296  std::vector<std::string> maxFileSize;
297  maxFileSize.push_back("TREE_MAX_SIZE");
298  maxFileSize.push_back("1099511627776L");
299  m_domainAttr.emplace_back(std::move(maxFileSize));
300  // Extracting OUTPUT POOL ItechnologySpecificAttributes for Domain, Database and Container.
302  //FIXME
303  for (auto& dbAttrEntry : m_databaseAttr) {
304  const std::string& opt = dbAttrEntry[0];
305  std::string& data = dbAttrEntry[1];
306  const std::string& file = dbAttrEntry[2];
307  const std::string& cont = dbAttrEntry[3];
308  std::size_t equal = cont.find('='); // Used to remove leading "TTree="
309  if (equal == std::string::npos) equal = 0;
310  else equal++;
311  const auto& prefix = m_containerPrefixProp.value();
312  std::size_t colon = prefix.find(':');
313  if (colon == std::string::npos) colon = 0; // Used to remove leading technology
314  else colon++;
315  const auto defaultContName = (tech == pool::ROOTRNTUPLE_StorageType.type()) ? APRDefaults::RNTupleNames::EventData : APRDefaults::TTreeNames::EventData;
316  const auto& strProp = (prefix == "Default") ? defaultContName : prefix;
317  if (merge != std::string::npos && opt == "TREE_AUTO_FLUSH" && 0 == outputConnection.compare(0, merge, file) &&cont.compare(equal, std::string::npos, strProp, colon) == 0 && data != "int" && data != "DbLonglong" && data != "double" && data != "string") {
318  flush = atoi(data.c_str());
319  if (flush < 0 && m_numberEventsPerWrite.value() > 0) {
320  flush = m_numberEventsPerWrite.value();
322  } else if (flush > 0 && flush < m_numberEventsPerWrite.value()) {
323  flush = flush * (int(static_cast<float>(m_numberEventsPerWrite.value()) / flush - 0.5) + 1);
324  }
325  }
326  }
327  if (merge != std::string::npos) {
328  ATH_MSG_INFO("connectOutput setting auto write for: " << outputConnection << " to " << flush << " events");
329  m_fileFlushSetting[outputConnection.substr(0, merge)] = flush;
330  }
331  }
332  if (!processPoolAttributes(m_domainAttr, outputConnection, contextId).isSuccess()) {
333  ATH_MSG_DEBUG("connectOutput failed process POOL domain attributes.");
334  }
335  if (!processPoolAttributes(m_databaseAttr, outputConnection, contextId).isSuccess()) {
336  ATH_MSG_DEBUG("connectOutput failed process POOL database attributes.");
337  }
338  return(StatusCode::SUCCESS);
339 }
340 
341 //______________________________________________________________________________
342 StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& outputConnectionSpec, bool doCommit) {
343  // This is called after all DataObjects are converted.
344  std::string outputConnection = outputConnectionSpec.substr(0, outputConnectionSpec.find('['));
345  // StopWatch listens from here until the end of this current scope
346  PMonUtils::BasicStopWatch stopWatch("commitOutput", m_chronoMap);
347  std::unique_lock<std::mutex> lock(m_mutex);
348  // Extract the technology
349  int tech{0};
350  if (!decodeOutputSpec(outputConnection, tech).isSuccess()) {
351  ATH_MSG_ERROR("connectOutput FAILED extract file name and technology.");
352  return(StatusCode::FAILURE);
353  }
354  unsigned int contextId = outputContextId(outputConnection);
355  if (!processPoolAttributes(m_domainAttr, outputConnection, contextId).isSuccess()) {
356  ATH_MSG_DEBUG("commitOutput failed process POOL domain attributes.");
357  }
358  if (!processPoolAttributes(m_databaseAttr, outputConnection, contextId).isSuccess()) {
359  ATH_MSG_DEBUG("commitOutput failed process POOL database attributes.");
360  }
361  if (!processPoolAttributes(m_containerAttr, outputConnection, contextId).isSuccess()) {
362  ATH_MSG_DEBUG("commitOutput failed process POOL container attributes.");
363  }
364  std::size_t merge = outputConnection.find("?pmerge="); // Used to remove trailing TMemFile
365  const std::string baseOutputConnection = outputConnection.substr(0, merge);
366  m_fileCommitCounter[baseOutputConnection]++;
367  if (merge != std::string::npos && m_fileFlushSetting[baseOutputConnection] > 0 && m_fileCommitCounter[baseOutputConnection] % m_fileFlushSetting[baseOutputConnection] == 0) {
368  doCommit = true;
369  ATH_MSG_DEBUG("commitOutput sending data.");
370  }
371 
372  // lock.unlock(); //MN: first need to make commitCache slot-specific
373  try {
374  if (doCommit) {
375  if (!m_poolSvc->commit(contextId).isSuccess()) {
376  ATH_MSG_ERROR("commitOutput FAILED to commit OutputStream.");
377  return(StatusCode::FAILURE);
378  }
379  } else {
380  if (!m_poolSvc->commitAndHold(contextId).isSuccess()) {
381  ATH_MSG_ERROR("commitOutput FAILED to commitAndHold OutputStream.");
382  return(StatusCode::FAILURE);
383  }
384  }
385  } catch (std::exception& e) {
386  ATH_MSG_ERROR("commitOutput - caught exception: " << e.what());
387  return(StatusCode::FAILURE);
388  }
389  if (!this->cleanUp(baseOutputConnection).isSuccess()) {
390  ATH_MSG_ERROR("commitOutput FAILED to cleanup converters.");
391  return(StatusCode::FAILURE);
392  }
393  // Check FileSize
394  long long int currentFileSize = m_poolSvc->getFileSize(outputConnection, tech, contextId);
395  if (m_databaseMaxFileSize.find(outputConnection) != m_databaseMaxFileSize.end()) {
396  if (currentFileSize > m_databaseMaxFileSize[outputConnection]) {
397  ATH_MSG_WARNING(std::format("FileSize {} > {} for {}", currentFileSize, m_databaseMaxFileSize[outputConnection], outputConnection));
398  return(StatusCode::RECOVERABLE);
399  }
400  } else if (currentFileSize > m_domainMaxFileSize) {
401  ATH_MSG_WARNING(std::format("FileSize {} > {} for {}", currentFileSize, m_domainMaxFileSize, outputConnection));
402  return(StatusCode::RECOVERABLE);
403  }
404  return(StatusCode::SUCCESS);
405 }
406 
407 //______________________________________________________________________________
408 StatusCode AthenaPoolCnvSvc::disconnectOutput(const std::string& outputConnectionSpec) {
409  std::string outputConnection = outputConnectionSpec.substr(0, outputConnectionSpec.find('['));
410  unsigned int contextId = outputContextId(outputConnection);
411  StatusCode sc = m_poolSvc->disconnect(contextId);
412  return sc;
413 }
414 
415 //______________________________________________________________________________
416 unsigned int AthenaPoolCnvSvc::outputContextId(const std::string& outputConnection) {
417  return m_persSvcPerOutput?
418  m_poolSvc->getOutputContext(outputConnection) : (unsigned int)IPoolSvc::kOutputStream;
419 }
420 
421 //______________________________________________________________________________
423  return(&*m_poolSvc);
424 }
425 //______________________________________________________________________________
426 Token* AthenaPoolCnvSvc::registerForWrite(Placement* placement, const void* obj, const RootType& classDesc) {
427  // StopWatch listens from here until the end of this current scope
428  PMonUtils::BasicStopWatch stopWatch("cRepR_ALL", m_chronoMap);
429  Token* token = nullptr;
430  if (m_persSvcPerOutput) { // Use separate PersistencySvc for each output stream/file
431  char text[32];
432  const std::string contextStr = std::format("[CTXT={:08X}]", m_poolSvc->getOutputContext(placement->fileName()));
433  std::strncpy(text, contextStr.c_str(), sizeof(text) - 1);
434  text[sizeof(text) - 1] = '\0';
435  placement->setAuxString(text);
436  }
437  token = m_poolSvc->registerForWrite(placement, obj, classDesc);
438  return(token);
439 }
440 //______________________________________________________________________________
441 void AthenaPoolCnvSvc::setObjPtr(void*& obj, const Token* token) {
442  ATH_MSG_VERBOSE("Requesting object for: " << token->toString());
443  // StopWatch listens from here until the end of this current scope
444  PMonUtils::BasicStopWatch stopWatch("cObjR_ALL", m_chronoMap);
445  if (token->dbID() != Guid::null()) {
446  ATH_MSG_VERBOSE("Requesting object for: " << token->toString());
447  m_poolSvc->setObjPtr(obj, token);
448  }
449 }
450 //______________________________________________________________________________
452  return(m_useDetailChronoStat.value());
453 }
454 //______________________________________________________________________________
456  const CLID& clid,
457  const std::string* par,
458  const unsigned long* ip,
459  IOpaqueAddress*& refpAddress) {
460  if( svcType != repSvcType() ) {
461  ATH_MSG_ERROR("createAddress: svcType != POOL_StorageType " << svcType << " " << repSvcType());
462  return(StatusCode::FAILURE);
463  }
464  std::unique_ptr<Token> token;
465  if (par[0].compare(0, 3, "SHM") == 0) {
466  token = std::make_unique<Token>();
467  token->setOid(Token::OID_t(ip[0], ip[1]));
468  token->setAuxString("[PNAME=" + par[2] + "]");
469  RootType classDesc = RootType::ByNameNoQuiet(par[2]);
470  token->setClassID(pool::DbReflex::guid(classDesc));
471  } else {
472  token.reset(m_poolSvc->getToken(par[0], par[1], ip[0]));
473  }
474  if (token == nullptr) {
475  return(StatusCode::RECOVERABLE);
476  }
477  refpAddress = new TokenAddress(repSvcType(), clid, "", par[1], IPoolSvc::kInputStream, std::move(token));
478  return(StatusCode::SUCCESS);
479 }
480 //______________________________________________________________________________
482  const CLID& clid,
483  const std::string& refAddress,
484  IOpaqueAddress*& refpAddress) {
485  if (svcType != repSvcType()) {
486  ATH_MSG_ERROR("createAddress: svcType != POOL_StorageType " << svcType << " " << repSvcType());
487  return(StatusCode::FAILURE);
488  }
489  refpAddress = new GenericAddress(repSvcType(), clid, refAddress);
490  return(StatusCode::SUCCESS);
491 }
492 //______________________________________________________________________________
493 StatusCode AthenaPoolCnvSvc::convertAddress(const IOpaqueAddress* pAddress,
494  std::string& refAddress) {
495  assert(pAddress);
496  const TokenAddress* tokAddr = dynamic_cast<const TokenAddress*>(pAddress);
497  if (tokAddr != nullptr && tokAddr->getToken() != nullptr) {
498  refAddress = tokAddr->getToken()->toString();
499  } else {
500  refAddress = *pAddress->par();
501  }
502  return(StatusCode::SUCCESS);
503 }
504 //__________________________________________________________________________
505 StatusCode AthenaPoolCnvSvc::decodeOutputSpec(std::string& fileSpec, int& outputTech) const {
506  if (fileSpec.starts_with ( "ROOTKEY:")) {
507  outputTech = pool::ROOTKEY_StorageType.type();
508  fileSpec.erase(0, 8);
509  } else if (fileSpec.starts_with ( "ROOTTREE:")) {
510  outputTech = pool::ROOTTREE_StorageType.type();
511  fileSpec.erase(0, 9);
512  } else if (fileSpec.starts_with ( "ROOTTREEINDEX:")) {
513  outputTech = pool::ROOTTREEINDEX_StorageType.type();
514  fileSpec.erase(0, 14);
515  } else if (fileSpec.starts_with ( "ROOTRNTUPLE:")) {
516  outputTech = pool::ROOTRNTUPLE_StorageType.type();
517  fileSpec.erase(0, 12);
518  } else if (outputTech == 0) {
519  // Extract the file name
520  std::string fileName{fileSpec};
521  if (auto pos = fileSpec.find("?pmerge="); pos != std::string::npos) {
522  fileName = fileSpec.substr(0, pos);
523  }
524  // Find the appropriate event data technology for this file
525  // This will be used for event data and its data header
526  // First we look for an exact file name match
527  // If that fails, we look for a wildcard ("*") match
528  // If that also fails, we use the default value from PoolSvc
529  if (auto it = m_storageTechMap.find(fileName); it != m_storageTechMap.end()) {
530  outputTech = it->second;
531  } else if (it = m_storageTechMap.find("*"); it != m_storageTechMap.end()) {
532  outputTech = it->second;
533  } else {
535  }
536  }
537  return StatusCode::SUCCESS;
538 }
539 //______________________________________________________________________________
541  m_cnvs.push_back(cnv);
542  return(StatusCode::SUCCESS);
543 }
544 //______________________________________________________________________________
545 StatusCode AthenaPoolCnvSvc::cleanUp(const std::string& connection) {
546  bool retError = false;
547  std::size_t cpos = connection.find(':');
548  std::size_t bpos = connection.find('[');
549  if (cpos == std::string::npos) {
550  cpos = 0;
551  } else {
552  cpos++;
553  }
554  if (bpos != std::string::npos) bpos = bpos - cpos;
555  const std::string conn = connection.substr(cpos, bpos);
556  ATH_MSG_VERBOSE("Cleanup for Connection='"<< conn <<"'");
557  for (auto converter : m_cnvs) {
558  if (!converter->cleanUp(conn).isSuccess()) {
559  ATH_MSG_WARNING("AthenaPoolConverter cleanUp failed.");
560  retError = true;
561  }
562  }
563  return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
564 }
565 //______________________________________________________________________________
567  // Set attributes for input file
568  m_lastInputFileName = fileName; // Save file name for printing attributes per event
569  if (!processPoolAttributes(m_inputAttr, m_lastInputFileName, IPoolSvc::kInputStream, false, true, false).isSuccess()) {
570  ATH_MSG_DEBUG("setInputAttribute failed setting POOL database/container attributes.");
571  }
573  ATH_MSG_DEBUG("setInputAttribute failed getting POOL database/container attributes.");
574  }
575  if (!m_persSvcPerInputType.empty()) {
576  // Loop over all extra event input contexts and switch off TTreeCache
577  const auto& extraInputContextMap = m_poolSvc->getInputContextMap();
578  for (const auto& [label, id]: extraInputContextMap) {
579  if (m_poolSvc->setAttribute("TREE_CACHE", "0", pool::DbType(pool::ROOTTREE_StorageType).type(), m_lastInputFileName, m_persSvcPerInputType.value(), id).isSuccess()) {
580  ATH_MSG_DEBUG("setInputAttribute failed to switch off TTreeCache for = " << label << ".");
581  }
582  }
583  }
584  return(StatusCode::SUCCESS);
585 }
586 
587 //______________________________________________________________________________
588 void AthenaPoolCnvSvc::handle(const Incident& incident) {
589  if (incident.type() == "EndEvent") {
591  ATH_MSG_DEBUG("handle EndEvent failed process POOL database attributes.");
592  }
593  }
594 }
595 //______________________________________________________________________________
596 AthenaPoolCnvSvc::AthenaPoolCnvSvc(const std::string& name, ISvcLocator* pSvcLocator) :
597  base_class(name, pSvcLocator, pool::POOL_StorageType.type()) {
598 }
599 //__________________________________________________________________________
600 void AthenaPoolCnvSvc::extractPoolAttributes(const StringArrayProperty& property,
601  std::vector<std::vector<std::string> >* contAttr,
602  std::vector<std::vector<std::string> >* dbAttr,
603  std::vector<std::vector<std::string> >* domAttr) const {
604  std::vector<std::string> opt;
605  std::string attributeName, containerName, databaseName, valueString;
606  for (const auto& propertyValue : property.value()) {
607  opt.clear();
608  attributeName.clear();
609  containerName.clear();
610  databaseName.clear();
611  valueString.clear();
612  using Gaudi::Utils::AttribStringParser;
613  for (const AttribStringParser::Attrib& attrib : AttribStringParser (propertyValue)) {
614  const std::string tag = attrib.tag;
615  const std::string val = attrib.value;
616  if (tag == "DatabaseName") {
617  databaseName = std::move(val);
618  } else if (tag == "ContainerName") {
619  if (databaseName.empty()) {
620  databaseName = "*";
621  }
622  containerName = std::move(val);
623  } else {
624  attributeName = std::move(tag);
625  valueString = std::move(val);
626  }
627  }
628  if (!attributeName.empty() && !valueString.empty()) {
629  opt.push_back(attributeName);
630  opt.push_back(valueString);
631  if (!databaseName.empty()) {
632  opt.push_back(databaseName);
633  if (!containerName.empty()) {
634  opt.push_back(containerName);
635  if (containerName.compare(0, 6, "TTree=") == 0) {
636  dbAttr->push_back(opt);
637  } else {
638  contAttr->push_back(opt);
639  }
640  } else {
641  opt.push_back("");
642  dbAttr->push_back(opt);
643  }
644  } else if (domAttr != 0) {
645  domAttr->push_back(opt);
646  } else {
647  opt.push_back("*");
648  opt.push_back("");
649  dbAttr->push_back(opt);
650  }
651  }
652  }
653 }
654 //__________________________________________________________________________
655 StatusCode AthenaPoolCnvSvc::processPoolAttributes(std::vector<std::vector<std::string> >& attr,
656  const std::string& fileName,
657  unsigned long contextId,
658  bool doGet,
659  bool doSet,
660  bool doClear) const {
661  bool retError = false;
662  for (auto& attrEntry : attr) {
663  if (attrEntry.size() == 2) {
664  const std::string& opt = attrEntry[0];
665  std::string data = attrEntry[1];
666  if (data == "int" || data == "DbLonglong" || data == "double" || data == "string") {
667  if (doGet) {
668  if (!m_poolSvc->getAttribute(opt, data, pool::DbType(pool::ROOTTREE_StorageType).type(), contextId).isSuccess()) {
669  ATH_MSG_DEBUG("getAttribute failed for domain attr " << opt);
670  retError = true;
671  }
672  }
673  } else if (doSet) {
674  if (m_poolSvc->setAttribute(opt, data, pool::DbType(pool::ROOTTREE_StorageType).type(), contextId).isSuccess()) {
675  ATH_MSG_DEBUG("setAttribute " << opt << " to " << data);
676  if (doClear) {
677  attrEntry.clear();
678  }
679  } else {
680  ATH_MSG_DEBUG("setAttribute failed for domain attr " << opt << " to " << data);
681  retError = true;
682  }
683  }
684  }
685  if (attrEntry.size() == 4) {
686  const std::string& opt = attrEntry[0];
687  std::string data = attrEntry[1];
688  const std::string& file = attrEntry[2];
689  const std::string& cont = attrEntry[3];
690  if (!fileName.empty() && (0 == fileName.compare(0, fileName.find('?'), file)
691  || (file[0] == '*' && file.find("," + fileName + ",") == std::string::npos))) {
692  if (data == "int" || data == "DbLonglong" || data == "double" || data == "string") {
693  if (doGet) {
694  if (!m_poolSvc->getAttribute(opt, data, pool::DbType(pool::ROOTTREE_StorageType).type(), fileName, cont, contextId).isSuccess()) {
695  ATH_MSG_DEBUG("getAttribute failed for database/container attr " << opt);
696  retError = true;
697  }
698  }
699  } else if (doSet) {
700  if (m_poolSvc->setAttribute(opt, data, pool::DbType(pool::ROOTTREE_StorageType).type(), fileName, cont, contextId).isSuccess()) {
701  ATH_MSG_DEBUG("setAttribute " << opt << " to " << data << " for db: " << fileName << " and cont: " << cont);
702  if (doClear) {
703  if (file[0] == '*' && !m_persSvcPerOutput) {
704  attrEntry[2] += "," + fileName + ",";
705  } else {
706  attrEntry.clear();
707  }
708  }
709  } else {
710  ATH_MSG_DEBUG("setAttribute failed for " << opt << " to " << data << " for db: " << fileName << " and cont: " << cont);
711  retError = true;
712  }
713  }
714  }
715  }
716  }
717  std::erase_if(attr, [](const auto& entry) { return entry.empty(); });
718  return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
719 }
AthenaPoolCnvSvc::m_poolSvc
ServiceHandle< IPoolSvc > m_poolSvc
Definition: AthenaPoolCnvSvc.h:176
AthenaPoolCnvSvc::m_contextAttr
std::vector< unsigned int > m_contextAttr
Definition: AthenaPoolCnvSvc.h:204
AthenaPoolCnvSvc::registerCleanUp
virtual StatusCode registerCleanUp(IAthenaPoolCleanUp *cnv) override
Implement registerCleanUp to register a IAthenaPoolCleanUp to be called during cleanUp.
Definition: AthenaPoolCnvSvc.cxx:540
AthenaPoolCnvSvc::createAddress
StatusCode createAddress(long svcType, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) override
Create a Generic address using explicit arguments to identify a single object.
Definition: AthenaPoolCnvSvc.cxx:455
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
IPoolSvc::kOutputStream
@ kOutputStream
Definition: IPoolSvc.h:39
AthenaPoolCnvSvc::cleanUp
virtual StatusCode cleanUp(const std::string &connection) override
Implement cleanUp to call all registered IAthenaPoolCleanUp cleanUp() function.
Definition: AthenaPoolCnvSvc.cxx:545
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
Amg::compare
std::pair< int, int > compare(const AmgSymMatrix(N) &m1, const AmgSymMatrix(N) &m2, double precision=1e-9, bool relative=false)
compare two matrices, returns the indices of the first element that fails the condition,...
Definition: EventPrimitivesHelpers.h:109
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Placement
This class holds all the necessary information to guide the writing of an object in a physical place.
Definition: Placement.h:19
IPoolSvc
This class provides the interface to the LCG POOL persistency software.
Definition: IPoolSvc.h:35
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
TScopeAdapter::ByNameNoQuiet
static TScopeAdapter ByNameNoQuiet(const std::string &name, Bool_t load=kTRUE)
Definition: RootType.cxx:586
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
AthenaPoolCnvSvc::initialize
virtual StatusCode initialize() override
Required of all Gaudi Services.
Definition: AthenaPoolCnvSvc.cxx:35
DbReflex.h
pool::DbType::getType
static DbType getType(const std::string &name)
Access known storage type object by name.
AthenaPoolCnvSvc::outputContextId
unsigned outputContextId(const std::string &outputConnection)
Definition: AthenaPoolCnvSvc.cxx:416
AthenaPoolCnvSvc::m_defContainerType
std::string m_defContainerType
Default container type (from PoolSvc)
Definition: AthenaPoolCnvSvc.h:221
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:138
AthenaPoolCnvSvc::m_clidSvc
ServiceHandle< IClassIDSvc > m_clidSvc
Definition: AthenaPoolCnvSvc.h:177
FullCPAlgorithmsTest_eljob.flush
flush
Definition: FullCPAlgorithmsTest_eljob.py:194
make_coralServer_rep.opt
opt
Definition: make_coralServer_rep.py:19
Token::contID
const std::string & contID() const
Access container identifier.
Definition: Token.h:69
AthenaPoolCnvSvc::m_numberEventsPerWrite
Gaudi::Property< int > m_numberEventsPerWrite
To use MetadataSvc to merge data placed in a certain container When using TMemFile call Write on numb...
Definition: AthenaPoolCnvSvc.h:236
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:13
AthenaPoolCnvSvc::m_domainMaxFileSize
long long m_domainMaxFileSize
Definition: AthenaPoolCnvSvc.h:217
pool
pool namespace
Definition: libname.h:15
AthenaPoolCnvSvc::m_inputAttrPerEvent
std::vector< std::vector< std::string > > m_inputAttrPerEvent
Definition: AthenaPoolCnvSvc.h:213
pool::ITransaction::UPDATE
@ UPDATE
Definition: ITransaction.h:30
skel.it
it
Definition: skel.GENtoEVGEN.py:407
AthenaPoolCnvSvc::decodeOutputSpec
virtual StatusCode decodeOutputSpec(std::string &connectionSpec, int &outputTech) const override
Extract/deduce the DB technology from the connection string/file specification.
Definition: AthenaPoolCnvSvc.cxx:505
Token::dbID
const Guid & dbID() const
Access database identifier.
Definition: Token.h:64
IAthenaPoolCleanUp
This class provides the interface for the AthenaPoolCleanUp which is used to clean up AthenaPoolConve...
Definition: IAthenaPoolCleanUp.h:19
AthenaPoolCnvSvc::m_databaseAttr
std::vector< std::vector< std::string > > m_databaseAttr
Definition: AthenaPoolCnvSvc.h:202
AthenaPoolCnvSvc::m_chronoMap
PMonUtils::BasicStopWatchResultMap_t m_chronoMap
Map that holds chrono information.
Definition: AthenaPoolCnvSvc.h:181
athena.value
value
Definition: athena.py:124
AthenaPoolCnvSvc::fillRepRefs
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConversionSvc: Resolve the references of the converted object.
Definition: AthenaPoolCnvSvc.cxx:234
AthenaPoolCnvSvc::m_containerPrefixProp
Gaudi::Property< std::string > m_containerPrefixProp
POOL Container name prefix - will be part of or whole TTree/RNTuple name 'Default' takes the prefix f...
Definition: AthenaPoolCnvSvc.h:193
AthenaPoolCnvSvc::useDetailChronoStat
virtual bool useDetailChronoStat() const override
Definition: AthenaPoolCnvSvc.cxx:451
AthenaPoolCnvSvc::m_mutex
std::mutex m_mutex
Definition: AthenaPoolCnvSvc.h:232
AthenaPoolCnvSvc::m_maxFileSizes
Gaudi::Property< std::vector< std::string > > m_maxFileSizes
MaxFileSizes, vector with maximum file sizes for Athena POOL output files.
Definition: AthenaPoolCnvSvc.h:216
python.RatesEmulationExample.lock
lock
Definition: RatesEmulationExample.py:148
Token::classID
const Guid & classID() const
Access database identifier.
Definition: Token.h:73
AthenaPoolCnvSvc::setObjPtr
virtual void setObjPtr(void *&obj, const Token *token) override
Definition: AthenaPoolCnvSvc.cxx:441
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
MuonR4::to_string
std::string to_string(const SectorProjector proj)
Definition: MsTrackSeeder.cxx:66
Placement::setAuxString
Placement & setAuxString(const std::string &auxString)
Set auxiliary string.
Definition: Placement.h:42
AthenaPoolCnvSvc::AthenaPoolCnvSvc
AthenaPoolCnvSvc(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
Definition: AthenaPoolCnvSvc.cxx:596
AthenaPoolCnvSvc::getPoolSvc
virtual IPoolSvc * getPoolSvc() override
Definition: AthenaPoolCnvSvc.cxx:422
AthenaPoolCnvSvc::processPoolAttributes
StatusCode processPoolAttributes(std::vector< std::vector< std::string > > &attr, const std::string &fileName, unsigned long contextId, bool doGet=true, bool doSet=true, bool doClear=true) const
Set/get technology dependent POOL attributes.
Definition: AthenaPoolCnvSvc.cxx:655
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
AthenaPoolCnvSvc::flushDataHeaderForms
void flushDataHeaderForms(const std::string &streamName="*")
Tell DataHeaderCnv to write out all DataHeaderForms for a given streamName (default is all)
Definition: AthenaPoolCnvSvc.cxx:121
AthenaPoolCnvSvc::m_fileFlushSetting
std::map< std::string, int > m_fileFlushSetting
Definition: AthenaPoolCnvSvc.h:206
AthenaPoolCnvSvc::io_reinit
virtual StatusCode io_reinit() override
Definition: AthenaPoolCnvSvc.cxx:115
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
pool::DbType::type
int type() const
Access to full type.
Definition: DbType.h:65
AthenaPoolCnvSvc::m_useDetailChronoStat
Gaudi::Property< bool > m_useDetailChronoStat
UseDetailChronoStat, enable detailed output for time and size statistics for AthenaPOOL: default = fa...
Definition: AthenaPoolCnvSvc.h:186
CxxUtils::fpcompare::equal
bool equal(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:114
PMonUtils::BasicStopWatch
Definition: BasicStopWatch.h:17
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
AthenaPoolCnvSvc::registerForWrite
virtual Token * registerForWrite(Placement *placement, const void *obj, const RootType &classDesc) override
Definition: AthenaPoolCnvSvc.cxx:426
AthenaPoolCnvSvc::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override
Implementation of IConversionSvc: Create the transient representation of an object from persistent st...
Definition: AthenaPoolCnvSvc.cxx:169
TokenAddress
This class provides a Generic Transient Address for POOL tokens.
Definition: TokenAddress.h:23
Token::OID_t
Definition: Token.h:24
APRDefaults::RNTupleNames::EventData
static constexpr const char * EventData
Definition: APRDefaults.h:18
AthenaPoolCnvSvc::handle
virtual void handle(const Incident &incident) override
Implementation of IIncidentListener: Handle for EndEvent incidence.
Definition: AthenaPoolCnvSvc.cxx:588
Token::setClassID
Token & setClassID(const Guid &cl_id)
Access database identifier.
Definition: Token.h:75
IPoolSvc::kInputStream
@ kInputStream
Definition: IPoolSvc.h:39
Guid::toString
constexpr void toString(std::span< char, StrLen > buf, bool uppercase=true) const noexcept
Automatic conversion to string representation.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
APRDefaults.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
pool::DbType
Definition: DbType.h:30
AthenaPoolCnvSvc::setInputAttributes
virtual StatusCode setInputAttributes(const std::string &fileName) override
Set the input file attributes, if any are requested from jobOpts.
Definition: AthenaPoolCnvSvc.cxx:566
AthenaPoolCnvSvc::finalize
virtual StatusCode finalize() override
Required of all Gaudi Services.
Definition: AthenaPoolCnvSvc.cxx:135
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
AthenaPoolCnvSvc::m_persSvcPerOutput
Gaudi::Property< bool > m_persSvcPerOutput
PersSvcPerOutput, boolean property to use multiple persistency services, one per output stream.
Definition: AthenaPoolCnvSvc.h:226
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:37
calibdata.exception
exception
Definition: calibdata.py:495
add-xsec-uncert-quadrature-N.label
label
Definition: add-xsec-uncert-quadrature-N.py:104
AthenaPoolCnvSvc.h
This file contains the class definition for the AthenaPoolCnvSvc class.
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
file
TFile * file
Definition: tile_monitor.h:29
AthenaPoolCnvSvc::m_inputAttr
std::vector< std::vector< std::string > > m_inputAttr
Definition: AthenaPoolCnvSvc.h:209
AthenaPoolCnvSvc::m_databaseMaxFileSize
std::map< std::string, long long > m_databaseMaxFileSize
Definition: AthenaPoolCnvSvc.h:218
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Placement::fileName
const std::string & fileName() const
Access file name.
Definition: Placement.h:28
AthenaPoolCnvSvc::io_finalize
virtual StatusCode io_finalize() override
Definition: AthenaPoolCnvSvc.cxx:164
TokenAddress::getToken
Token * getToken()
Definition: TokenAddress.cxx:15
AthenaPoolCnvSvc::convertAddress
virtual StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress) override
Convert address to string form.
Definition: AthenaPoolCnvSvc.cxx:493
AthenaPoolCnvSvc::m_inputPoolAttrPerEvent
Gaudi::Property< std::vector< std::string > > m_inputPoolAttrPerEvent
Print input PoolAttributes per event, vector with names of technology specific attributes for POOL to...
Definition: AthenaPoolCnvSvc.h:212
AthenaPoolCnvSvc::m_poolAttr
Gaudi::Property< std::vector< std::string > > m_poolAttr
Output PoolAttributes, vector with names and values of technology specific attributes for POOL.
Definition: AthenaPoolCnvSvc.h:200
DataHeader.h
This file contains the class definition for the DataHeader and DataHeaderElement classes.
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
AthenaPoolCnvSvc::disconnectOutput
virtual StatusCode disconnectOutput(const std::string &outputConnectionSpec) override
Disconnect to the output connection.
Definition: AthenaPoolCnvSvc.cxx:408
AthenaPoolCnvSvc::m_containerAttr
std::vector< std::vector< std::string > > m_containerAttr
Definition: AthenaPoolCnvSvc.h:203
AthenaPoolCnvSvc::extractPoolAttributes
void extractPoolAttributes(const Gaudi::Property< std::vector< std::string >> &property, std::vector< std::vector< std::string > > *contAttr, std::vector< std::vector< std::string > > *dbAttr, std::vector< std::vector< std::string > > *domAttr=0) const
Extract POOL ItechnologySpecificAttributes for Domain, Database and Container from property.
Definition: AthenaPoolCnvSvc.cxx:600
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
AthenaPoolCnvSvc::commitOutput
virtual StatusCode commitOutput(const std::string &outputConnectionSpec, bool doCommit) override
Implementation of IConversionSvc: Commit pending output.
Definition: AthenaPoolCnvSvc.cxx:342
WriteHiveWithMetaData.streamName
string streamName
Definition: WriteHiveWithMetaData.py:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:28
AthenaPoolCnvSvc::m_inputPoolAttr
Gaudi::Property< std::vector< std::string > > m_inputPoolAttr
Input PoolAttributes, vector with names and values of technology specific attributes for POOL.
Definition: AthenaPoolCnvSvc.h:208
AthCnvSvc::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override
Implementation of IConverter: Create the transient representation of an object.
Definition: AthCnvSvc.cxx:244
AthenaPoolCnvSvc::createRep
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConversionSvc: Convert the transient object to the requested representation.
Definition: AthenaPoolCnvSvc.cxx:203
Token::toString
virtual const std::string toString() const
Retrieve the string representation of the token.
Definition: Token.cxx:134
Token::setOid
Token & setOid(const OID_t &oid)
Set object identifier.
Definition: Token.h:85
AthenaPoolCnvSvc::m_persSvcPerInputType
Gaudi::Property< std::string > m_persSvcPerInputType
PersSvcPerInputType, string property, tree name to use multiple persistency services,...
Definition: AthenaPoolCnvSvc.h:231
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
AthenaPoolCnvSvc::m_domainAttr
std::vector< std::vector< std::string > > m_domainAttr
Definition: AthenaPoolCnvSvc.h:201
Guid::null
static const Guid & null() noexcept
NULL-Guid: static class method.
Definition: Guid.cxx:14
AthenaPoolCnvSvc::m_fileCommitCounter
std::map< std::string, int > m_fileCommitCounter
Definition: AthenaPoolCnvSvc.h:205
TokenAddress.h
This file contains the class definition for the TokenAddress class.
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
Token::setAuxString
Token & setAuxString(const std::string &auxString)
Set auxiliary string.
Definition: Token.h:93
AthenaPoolCnvSvc::connectOutput
virtual StatusCode connectOutput(const std::string &outputConnectionSpec, const std::string &openMode) override
Implementation of IConversionSvc: Connect to the output connection specification with open mode.
Definition: AthenaPoolCnvSvc.cxx:265
AthCnvSvc::fillRepRefs
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Resolve the references of the converted object.
Definition: AthCnvSvc.cxx:284
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
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
merge.status
status
Definition: merge.py:16
AthenaPoolCnvSvc::stop
virtual StatusCode stop() override
Definition: AthenaPoolCnvSvc.cxx:128
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:23
jobOptions.fileName
fileName
Definition: jobOptions.SuperChic_ALP2.py:39
Placement.h
This file contains the class definition for the Placement class (migrated from POOL).
AthenaPoolCnvSvc::m_storageTechProp
Gaudi::Property< std::map< std::string, std::string > > m_storageTechProp
Default Storage Tech for containers (ROOTTREE, ROOTTREEINDEX, ROOTRNTUPLE)
Definition: AthenaPoolCnvSvc.h:189
APRDefaults::TTreeNames::EventData
static constexpr const char * EventData
Definition: APRDefaults.h:12
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SG::DataProxy
Definition: DataProxy.h:45
Token.h
This file contains the class definition for the Token class (migrated from POOL).
AthenaPoolCnvSvc::m_lastInputFileName
std::string m_lastInputFileName
decoded storage tech requested in "StorageTechnology" property
Definition: AthenaPoolCnvSvc.h:175
AthCnvSvc::createRep
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
Definition: AthCnvSvc.cxx:276
merge
Definition: merge.py:1
AthenaPoolCnvSvc::m_storageTechMap
std::map< std::string, int > m_storageTechMap
Definition: AthenaPoolCnvSvc.h:190
ServiceHandle
Definition: ClusterMakerTool.h:36
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
TScopeAdapter
Definition: RootType.h:119
pool::DbReflex::guid
static Guid guid(const TypeH &id)
Determine Guid (normalized string form) from reflection type.