Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
This class provides the interface between Athena and PoolSvc.
More...
#include <AthenaPoolCnvSvc.h>
|
virtual StatusCode | initialize () override |
| Required of all Gaudi Services. More...
|
|
virtual StatusCode | io_reinit () override |
|
virtual StatusCode | finalize () override |
| Required of all Gaudi Services. More...
|
|
virtual StatusCode | io_finalize () override |
|
virtual StatusCode | stop () override final |
|
virtual StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) override |
| Implementation of IConversionSvc: Create the transient representation of an object from persistent state. More...
|
|
virtual StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) override |
| Implementation of IConversionSvc: Convert the transient object to the requested representation. More...
|
|
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) override |
| Implementation of IConversionSvc: Resolve the references of the converted object. More...
|
|
virtual StatusCode | connectOutput (const std::string &outputConnectionSpec, const std::string &openMode) override |
| Implementation of IConversionSvc: Connect to the output connection specification with open mode. More...
|
|
virtual StatusCode | connectOutput (const std::string &outputConnectionSpec) override |
| Implementation of IConversionSvc: Connect to the output connection specification with open mode. More...
|
|
virtual StatusCode | commitOutput (const std::string &outputConnectionSpec, bool doCommit) override |
| Implementation of IConversionSvc: Commit pending output. More...
|
|
virtual StatusCode | disconnectOutput (const std::string &outputConnectionSpec) override |
| Disconnect to the output connection. More...
|
|
virtual IPoolSvc * | getPoolSvc () override |
|
virtual Token * | registerForWrite (Placement *placement, const void *obj, const RootType &classDesc) override |
|
virtual void | setObjPtr (void *&obj, const Token *token) override |
|
virtual bool | useDetailChronoStat () const override |
|
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. More...
|
|
virtual StatusCode | createAddress (long svcType, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress) override |
| Create address from string form. More...
|
|
virtual StatusCode | convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress) override |
| Convert address to string form. More...
|
|
virtual StatusCode | decodeOutputSpec (std::string &connectionSpec, int &outputTech) const override |
| Extract/deduce the DB technology from the connection string/file specification. More...
|
|
virtual StatusCode | registerCleanUp (IAthenaPoolCleanUp *cnv) override |
| Implement registerCleanUp to register a IAthenaPoolCleanUp to be called during cleanUp. More...
|
|
virtual StatusCode | cleanUp (const std::string &connection) override |
| Implement cleanUp to call all registered IAthenaPoolCleanUp cleanUp() function. More...
|
|
virtual StatusCode | setInputAttributes (const std::string &fileName) override |
| Set the input file attributes, if any are requested from jobOpts. More...
|
|
virtual StatusCode | makeServer (int num) override |
| Make this a server. More...
|
|
virtual StatusCode | makeClient (int num) override |
| Make this a client. More...
|
|
virtual StatusCode | readData () override |
| Read the next data object. More...
|
|
virtual StatusCode | commitCatalog () override |
| Commit Catalog. More...
|
|
StatusCode | abortSharedWrClients (int client_n) |
| Send abort to SharedWriter clients if the server quits on error. More...
|
|
virtual void | handle (const Incident &incident) override |
| Implementation of IIncidentListener: Handle for EndEvent incidence. More...
|
|
void | flushDataHeaderForms (const std::string &streamName="*") |
| Tell DataHeaderCnv to write out all DataHeaderForms for a given streamName (default is all) More...
|
|
| AthenaPoolCnvSvc (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Service Constructor. More...
|
|
virtual | ~AthenaPoolCnvSvc ()=default |
| Destructor. More...
|
|
|
void | extractPoolAttributes (const StringArrayProperty &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. More...
|
|
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. More...
|
|
unsigned | outputContextId (const std::string &outputConnection) |
|
|
pool::DbType | m_dbType |
| decoded storage tech requested in "StorageTechnology" property More...
|
|
std::string | m_lastInputFileName |
|
ServiceHandle< IPoolSvc > | m_poolSvc {this,"PoolSvc","PoolSvc"} |
|
ServiceHandle< IClassIDSvc > | m_clidSvc {this,"ClassIDSvc","ClassIDSvc"} |
|
ServiceHandle< IAthenaSerializeSvc > | m_serializeSvc {this,"AthenaRootSerializeSvc","AthenaRootSerializeSvc"} |
|
ToolHandle< IAthenaIPCTool > | m_inputStreamingTool {this,"InputStreamingTool",{}} |
|
ToolHandle< IAthenaIPCTool > | m_outputStreamingTool {this,"OutputStreamingTool",{}} |
|
bool | m_streamServerActive =false |
|
int | m_metadataClient =0 |
|
PMonUtils::BasicStopWatchResultMap_t | m_chronoMap {} |
| Map that holds chrono information. More...
|
|
BooleanProperty | m_useDetailChronoStat {this,"UseDetailChronoStat",false} |
| UseDetailChronoStat, enable detailed output for time and size statistics for AthenaPOOL: default = false. More...
|
|
StringProperty | m_storageTechProp {this,"StorageTechnology", "ROOTTREEINDEX"} |
| Default Storage Tech for containers (ROOTTREE, ROOTTREEINDEX, ROOTRNTUPLE) More...
|
|
StringProperty | m_containerPrefixProp {this,"PoolContainerPrefix","Default"} |
| POOL Container name prefix - will be part of or whole TTree/RNTuple name 'Default' takes the prefix from APRDefaults according to StorageTech. More...
|
|
StringProperty | m_containerNameHintProp {this,"TopLevelContainerName",""} |
| TopLevelContainerName, naming hint policy for top level POOL container: default = "<type>". More...
|
|
StringProperty | m_branchNameHintProp {this,"SubLevelBranchName", "<type>/<key>"} |
| SubLevelBranchName, naming hint policy for POOL branching: ("" = no branching) More...
|
|
StringArrayProperty | m_poolAttr {this,"PoolAttributes",{},"Pool Attributes","OrderedSet<std::string>"} |
| Output PoolAttributes, vector with names and values of technology specific attributes for POOL. More...
|
|
std::vector< std::vector< std::string > > | m_domainAttr |
|
std::vector< std::vector< std::string > > | m_databaseAttr |
|
std::vector< std::vector< std::string > > | m_containerAttr |
|
std::vector< unsigned int > | m_contextAttr |
|
std::map< std::string, int > | m_fileCommitCounter |
|
std::map< std::string, int > | m_fileFlushSetting |
|
StringArrayProperty | m_inputPoolAttr {this,"InputPoolAttributes",{}} |
| Input PoolAttributes, vector with names and values of technology specific attributes for POOL. More...
|
|
std::vector< std::vector< std::string > > | m_inputAttr |
|
StringArrayProperty | m_inputPoolAttrPerEvent {this,"PrintInputAttrPerEvt",{}} |
| Print input PoolAttributes per event, vector with names of technology specific attributes for POOL to be printed each event. More...
|
|
std::vector< std::vector< std::string > > | m_inputAttrPerEvent |
|
StringArrayProperty | m_maxFileSizes {this,"MaxFileSizes",{}} |
| MaxFileSizes, vector with maximum file sizes for Athena POOL output files. More...
|
|
long long | m_domainMaxFileSize =std::numeric_limits<long long>::max() |
|
std::map< std::string, long long > | m_databaseMaxFileSize |
|
BooleanProperty | m_persSvcPerOutput {this,"PersSvcPerOutput",true} |
| PersSvcPerOutput, boolean property to use multiple persistency services, one per output stream. More...
|
|
StringProperty | m_persSvcPerInputType {this,"PersSvcPerInputType",""} |
| PersSvcPerInputType, string property, tree name to use multiple persistency services, one per input type. More...
|
|
std::mutex | m_mutex |
|
StringProperty | m_metadataContainerProp {this,"OutputMetadataContainer","MetaData"} |
| For SharedWriter: To use MetadataSvc to merge data placed in a certain container. More...
|
|
StringArrayProperty | m_metadataContainersAug {this, "OutputMetadataContainers", {}, "Metadata containers used for augmentations"} |
|
IntegerProperty | m_makeStreamingToolClient {this,"MakeStreamingToolClient",0} |
| Make this instance a Streaming Client during first connect/write automatically. More...
|
|
IntegerProperty | m_streamingTechnology {this,"StreamingTechnology",-1} |
| Use Streaming for selected technologies only. More...
|
|
BooleanProperty | m_parallelCompression {this,"ParallelCompression",true} |
| Use Athena Object sharing for metadata only, event data is collected and send via ROOT TMemFile. More...
|
|
StringProperty | m_streamPortString {this,"StreamPortString","?pmerge=localhost:0"} |
| Extension to use ROOT TMemFile for event data, "?pmerge=<host>:<port>". More...
|
|
IntegerProperty | m_numberEventsPerWrite {this,"NumberEventsPerWrite",-1} |
| When using TMemFile call Write on number of Events, respecting CollectionTree auto_flush. More...
|
|
BooleanProperty | m_oneDataHeaderForm { this, "OneDataHeaderForm", false } |
| If true, use only one DataHeaderForm per Stream. More...
|
|
IntegerProperty | m_DHFormCacheSize { this, "maxDHFormCacheSize", 100 } |
| Property for DataHeaderCnv input DHForm cache size. More...
|
|
BooleanProperty | m_DHFilterAliases { this, "doFilterDHAliases", true } |
| Flag to control SG alias filtering when writing out DataHeader (see DataHeaderCnv_p6) More...
|
|
This class provides the interface between Athena and PoolSvc.
Definition at line 41 of file AthenaPoolCnvSvc.h.
◆ AthenaPoolCnvSvc()
AthenaPoolCnvSvc::AthenaPoolCnvSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~AthenaPoolCnvSvc()
virtual AthenaPoolCnvSvc::~AthenaPoolCnvSvc |
( |
| ) |
|
|
virtualdefault |
◆ abortSharedWrClients()
StatusCode AthenaPoolCnvSvc::abortSharedWrClients |
( |
int |
client_n | ) |
|
Send abort to SharedWriter clients if the server quits on error.
- Parameters
-
client_n | [IN] number of the current client, -1 if no current |
Definition at line 1223 of file AthenaPoolCnvSvc.cxx.
1229 while (
sc.isSuccess()) {
1230 if (client_n >= 0) {
1235 while (
sc.isRecoverable()) {
1239 return StatusCode::FAILURE;
◆ cleanUp()
StatusCode AthenaPoolCnvSvc::cleanUp |
( |
const std::string & |
connection | ) |
|
|
overridevirtual |
Implement cleanUp to call all registered IAthenaPoolCleanUp cleanUp() function.
Definition at line 1055 of file AthenaPoolCnvSvc.cxx.
1056 bool retError =
false;
1057 std::size_t cpos = connection.find(
':');
1058 std::size_t bpos = connection.find(
'[');
1059 if (cpos == std::string::npos) {
1064 if (bpos != std::string::npos) bpos = bpos - cpos;
1065 const std::string
conn = connection.substr(cpos, bpos);
1067 for (
auto converter : m_cnvs) {
1068 if (!converter->cleanUp(
conn).isSuccess()) {
1073 return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
◆ commitCatalog()
StatusCode AthenaPoolCnvSvc::commitCatalog |
( |
| ) |
|
|
overridevirtual |
◆ commitOutput()
StatusCode AthenaPoolCnvSvc::commitOutput |
( |
const std::string & |
outputConnectionSpec, |
|
|
bool |
doCommit |
|
) |
| |
|
overridevirtual |
Implementation of IConversionSvc: Commit pending output.
- Parameters
-
doCommit | [IN] boolean to force full commit |
Definition at line 399 of file AthenaPoolCnvSvc.cxx.
401 std::string outputConnection = outputConnectionSpec.substr(0, outputConnectionSpec.find(
'['));
405 if (!this->
cleanUp(outputConnection).isSuccess()) {
407 return(StatusCode::FAILURE);
409 return(StatusCode::SUCCESS);
412 ATH_MSG_DEBUG(
"commitOutput SKIPPED for uninitialized server.");
413 return(StatusCode::SUCCESS);
415 std::map<void*, RootType> commitCache;
419 const char* placementStr =
nullptr;
422 if (
sc.isSuccess() && placementStr !=
nullptr && strlen(placementStr) > 6 &&
num > 0) {
423 const char * matchedChars = strstr(placementStr,
"[FILE=");
424 if (not matchedChars){
435 bool dataHeaderSeen =
false;
436 std::string dataHeaderID;
438 std::string objName =
"ALL";
440 std::string objName(placementStr);
445 std::string tokenStr = placementStr;
446 std::string contName = strstr(placementStr,
"[CONT=");
447 tokenStr.erase(tokenStr.find(
"[CONT="));
448 tokenStr.append(contName, contName.find(
']') + 1);
449 contName = contName.substr(6, contName.find(
']') - 6);
450 std::string
className = strstr(placementStr,
"[PNAME=");
454 std::ostringstream oss2;
455 oss2 << std::dec <<
num;
457 bool foundContainer =
false;
458 std::size_t pPos = contName.find(
'(');
460 foundContainer =
true;
464 if (contName.compare(0, pPos,
item) == 0){
465 foundContainer =
true;
471 if (len > 0 && foundContainer && contName[len] ==
'(' ) {
476 std::ostringstream oss1;
478 std::string memName =
"SHM[NUM=" + oss1.str() +
"]";
479 FileIncident beginInputIncident(
name(),
"BeginInputFile", memName);
480 incSvc->fireIncident(beginInputIncident);
481 FileIncident endInputIncident(
name(),
"EndInputFile", memName);
482 incSvc->fireIncident(endInputIncident);
489 sc = metadataSvc->shmProxy(std::string(placementStr) +
"[NUM=" + oss2.str() +
"]");
490 if (
sc.isRecoverable()) {
492 }
else if (
sc.isFailure()) {
504 auto placementWithSwn = [&] {
return std::format(
"{}[SWN={}]", placementStr,
num); };
508 "", placementWithSwn());
509 DHcnv->updateRepRefs(&
address,
static_cast<DataObject*
>(
obj)).ignore();
515 if (token ==
nullptr) {
519 tokenStr = token->toString();
524 tokenStr, placementWithSwn());
525 if (!DHcnv->updateRep(&
address,
static_cast<DataObject*
>(
obj)).isSuccess()) {
531 commitCache.insert(std::pair<void*, RootType>(
obj, classDesc));
533 placementStr =
nullptr;
538 placement.
fromString(placementStr); placementStr =
nullptr;
540 if (token ==
nullptr) {
544 tokenStr = token->toString();
550 if (!DHcnv->updateRep(&
address,
static_cast<DataObject*
>(
obj)).isSuccess()) {
554 dataHeaderSeen =
true;
561 dataHeaderID =
std::format(
"{}/{}/{}", token->contID(), oss2.str(), token->dbID().toString());
562 }
else if (dataHeaderSeen) {
563 dataHeaderSeen =
false;
569 tokenStr, dataHeaderID);
570 if (!DHcnv->updateRepRefs(&
address,
static_cast<DataObject*
>(
obj)).isSuccess()) {
571 ATH_MSG_ERROR(
"Failed updateRepRefs for obj = " << tokenStr);
576 GenericAddress
address(0, 0,
"", dataHeaderID);
577 if (!DHcnv->updateRepRefs(&
address,
nullptr).isSuccess()) {
584 commitCache.insert(std::pair<void*, RootType>(
obj, classDesc));
591 while (
sc.isRecoverable()) {
594 if (!
sc.isSuccess()) {
600 while (
sc.isRecoverable()) {
603 if (
sc.isFailure()) {
608 if (dataHeaderSeen) {
610 GenericAddress
address(0, 0,
"", dataHeaderID);
611 if (!DHcnv->updateRepRefs(&
address,
nullptr).isSuccess()) {
616 placementStr =
nullptr;
617 }
else if (
sc.isSuccess() && placementStr !=
nullptr && strncmp(placementStr,
"stop", 4) == 0) {
618 return(StatusCode::RECOVERABLE);
619 }
else if (
sc.isRecoverable() ||
num == -1) {
620 return(StatusCode::RECOVERABLE);
624 std::ostringstream oss1;
626 std::string memName =
"SHM[NUM=" + oss1.str() +
"]";
627 FileIncident beginInputIncident(
name(),
"BeginInputFile", memName);
628 incSvc->fireIncident(beginInputIncident);
629 FileIncident endInputIncident(
name(),
"EndInputFile", memName);
630 incSvc->fireIncident(endInputIncident);
631 if (
sc.isFailure()) {
632 ATH_MSG_INFO(
"All SharedWriter clients stopped - exiting");
636 return(StatusCode::FAILURE);
640 ATH_MSG_DEBUG(
"commitOutput SKIPPED for metadata-only server: " << outputConnectionSpec);
641 return(StatusCode::SUCCESS);
645 std::unique_lock<std::mutex> lock(
m_mutex);
646 if (outputConnection.empty()) {
652 ATH_MSG_ERROR(
"connectOutput FAILED extract file name and technology.");
653 return(StatusCode::FAILURE);
655 const std::string oldOutputConnection = outputConnection;
666 ATH_MSG_DEBUG(
"commitOutput failed process POOL domain attributes.");
669 ATH_MSG_DEBUG(
"commitOutput failed process POOL database attributes.");
672 ATH_MSG_DEBUG(
"commitOutput failed process POOL container attributes.");
677 if (!
m_poolSvc->commit(contextId).isSuccess()) {
678 ATH_MSG_ERROR(
"commitOutput FAILED to commit OutputStream.");
679 return(StatusCode::FAILURE);
682 if (!
m_poolSvc->commitAndHold(contextId).isSuccess()) {
683 ATH_MSG_ERROR(
"commitOutput FAILED to commitAndHold OutputStream.");
684 return(StatusCode::FAILURE);
689 return(StatusCode::FAILURE);
691 if (!this->
cleanUp(oldOutputConnection).isSuccess()) {
693 return(StatusCode::FAILURE);
696 iter->second.Destruct(iter->first);
699 long long int currentFileSize =
m_poolSvc->getFileSize(outputConnection,
m_dbType.
type(), contextId);
703 return(StatusCode::RECOVERABLE);
707 return(StatusCode::RECOVERABLE);
709 return(StatusCode::SUCCESS);
◆ connectOutput() [1/2]
StatusCode AthenaPoolCnvSvc::connectOutput |
( |
const std::string & |
outputConnectionSpec | ) |
|
|
overridevirtual |
Implementation of IConversionSvc: Connect to the output connection specification with open mode.
- Parameters
-
outputConnectionSpec | [IN] the name of the output connection specification as string. |
Definition at line 303 of file AthenaPoolCnvSvc.cxx.
305 std::string outputConnection = outputConnectionSpec.substr(0, outputConnectionSpec.find(
'['));
309 ATH_MSG_ERROR(
"connectOutput FAILED extract file name and technology.");
310 return(StatusCode::FAILURE);
314 ATH_MSG_ERROR(
"Could not make AthenaPoolCnvSvc a Share Client");
315 return(StatusCode::FAILURE);
320 return(StatusCode::SUCCESS);
324 ATH_MSG_DEBUG(
"connectOutput SKIPPED for metadata-only server: " << outputConnectionSpec);
325 return(StatusCode::SUCCESS);
329 return(StatusCode::SUCCESS);
339 ATH_MSG_ERROR(
"connectOutput FAILED to open an UPDATE transaction.");
340 return(StatusCode::FAILURE);
344 return(StatusCode::FAILURE);
347 std::unique_lock<std::mutex> lock(
m_mutex);
353 std::vector<std::string> maxFileSize;
354 maxFileSize.push_back(
"TREE_MAX_SIZE");
355 maxFileSize.push_back(
"1099511627776L");
360 iter != last; ++iter) {
361 const std::string&
opt = (*iter)[0];
362 std::string&
data = (*iter)[1];
363 const std::string&
file = (*iter)[2];
364 const std::string& cont = (*iter)[3];
365 std::size_t
equal = cont.find(
'=');
369 if (colon == std::string::npos) colon = 0;
372 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") {
376 std::ostringstream eventAutoFlush;
377 eventAutoFlush <<
flush;
378 data = eventAutoFlush.str();
384 if (
merge != std::string::npos) {
385 ATH_MSG_INFO(
"connectOutput setting auto write for: " << outputConnection <<
" to " <<
flush <<
" events");
390 ATH_MSG_DEBUG(
"connectOutput failed process POOL domain attributes.");
393 ATH_MSG_DEBUG(
"connectOutput failed process POOL database attributes.");
395 return(StatusCode::SUCCESS);
◆ connectOutput() [2/2]
StatusCode AthenaPoolCnvSvc::connectOutput |
( |
const std::string & |
outputConnectionSpec, |
|
|
const std::string & |
openMode |
|
) |
| |
|
overridevirtual |
Implementation of IConversionSvc: Connect to the output connection specification with open mode.
- Parameters
-
outputConnectionSpec | [IN] the name of the output connection specification as string. |
openMode | [IN] the open mode of the file as string. |
Definition at line 298 of file AthenaPoolCnvSvc.cxx.
◆ convertAddress()
StatusCode AthenaPoolCnvSvc::convertAddress |
( |
const IOpaqueAddress * |
pAddress, |
|
|
std::string & |
refAddress |
|
) |
| |
|
overridevirtual |
Convert address to string form.
- Parameters
-
pAddress | [IN] address to be converted. |
refAddress | [OUT] converted string form. |
Definition at line 1015 of file AthenaPoolCnvSvc.cxx.
1019 if (tokAddr !=
nullptr && tokAddr->
getToken() !=
nullptr) {
1022 refAddress = *pAddress->par();
1024 return(StatusCode::SUCCESS);
◆ createAddress() [1/2]
StatusCode AthenaPoolCnvSvc::createAddress |
( |
long |
svcType, |
|
|
const CLID & |
clid, |
|
|
const std::string & |
refAddress, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
|
overridevirtual |
Create address from string form.
- Parameters
-
svcType | [IN] service type of the address. |
clid | [IN] class id for the address. |
refAddress | [IN] string form to be converted. |
refpAddress | [OUT] converted address. |
Definition at line 1003 of file AthenaPoolCnvSvc.cxx.
1007 if (svcType != POOL_StorageType) {
1008 ATH_MSG_ERROR(
"createAddress: svcType != POOL_StorageType " << svcType <<
" " << POOL_StorageType);
1009 return(StatusCode::FAILURE);
1011 refpAddress =
new GenericAddress(POOL_StorageType, clid, refAddress);
1012 return(StatusCode::SUCCESS);
◆ createAddress() [2/2]
StatusCode AthenaPoolCnvSvc::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.
- Parameters
-
svcType | [IN] service type of the address. |
clid | [IN] class id for the address. |
par | [IN] string containing the database name. |
ip | [IN] object identifier. |
refpAddress | [OUT] converted address. |
Definition at line 945 of file AthenaPoolCnvSvc.cxx.
950 if (svcType != POOL_StorageType) {
951 ATH_MSG_ERROR(
"createAddress: svcType != POOL_StorageType " << svcType <<
" " << POOL_StorageType);
952 return(StatusCode::FAILURE);
956 ATH_MSG_ERROR(
"Could not make AthenaPoolCnvSvc a Share Client");
957 return(StatusCode::FAILURE);
960 std::unique_ptr<Token> token;
962 token = std::make_unique<Token>();
969 addressToken.
setDb(
par[0].substr(4));
974 return(StatusCode::FAILURE);
977 std::size_t nbytes = 0;
979 while (
sc.isRecoverable()) {
983 if (!
sc.isSuccess()) {
985 return(StatusCode::FAILURE);
987 token = std::make_unique<Token>();
996 if (token ==
nullptr) {
997 return(StatusCode::RECOVERABLE);
1000 return(StatusCode::SUCCESS);
◆ createObj()
StatusCode AthenaPoolCnvSvc::createObj |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject *& |
refpObject |
|
) |
| |
|
overridevirtual |
Implementation of IConversionSvc: Create the transient representation of an object from persistent state.
- Parameters
-
pAddress | [IN] pointer to IOpaqueAddress of the representation. |
refpObject | [OUT] pointer to DataObject to be created. |
Definition at line 198 of file AthenaPoolCnvSvc.cxx.
200 std::string objName =
"ALL";
202 if (
m_clidSvc->getTypeNameOfID(pAddress->clID(), objName).isFailure()) {
203 std::ostringstream oss;
204 oss << std::dec << pAddress->clID();
208 objName += *(pAddress->par() + 1);
215 const unsigned int maxContext =
m_poolSvc->getInputContextMap().size();
218 ::sprintf(
text,
"[CTXT=%08X]", auxContext);
219 if (
m_poolSvc->getInputContextMap().size() > maxContext) {
221 ATH_MSG_DEBUG(
"setInputAttribute failed to switch off TTreeCache for id = " << auxContext <<
".");
◆ createRep()
StatusCode AthenaPoolCnvSvc::createRep |
( |
DataObject * |
pObject, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
|
overridevirtual |
Implementation of IConversionSvc: Convert the transient object to the requested representation.
- Parameters
-
pObject | [IN] pointer to DataObject. |
refpAddress | [OUT] pointer to IOpaqueAddress of the representation to be created. |
Definition at line 232 of file AthenaPoolCnvSvc.cxx.
234 std::string objName =
"ALL";
236 if (
m_clidSvc->getTypeNameOfID(pObject->clID(), objName).isFailure()) {
237 std::ostringstream oss;
238 oss << std::dec << pObject->clID();
242 objName += pObject->registry()->name();
247 if (pObject->clID() == 1) {
250 if (
proxy !=
nullptr) {
251 IConverter* cnv = converter(
proxy->clID());
252 status = cnv->createRep(pObject, refpAddress);
258 }
catch(std::runtime_error&
e) {
◆ decodeOutputSpec()
StatusCode AthenaPoolCnvSvc::decodeOutputSpec |
( |
std::string & |
connectionSpec, |
|
|
int & |
outputTech |
|
) |
| const |
|
overridevirtual |
Extract/deduce the DB technology from the connection string/file specification.
Definition at line 1028 of file AthenaPoolCnvSvc.cxx.
1030 if (fileSpec.starts_with (
"oracle") || fileSpec.starts_with (
"mysql")) {
1031 outputTech = pool::POOL_RDBMS_StorageType.
type();
1032 }
else if (fileSpec.starts_with (
"ROOTKEY:")) {
1033 outputTech = pool::ROOTKEY_StorageType.
type();
1034 fileSpec.erase(0, 8);
1035 }
else if (fileSpec.starts_with (
"ROOTTREE:")) {
1036 outputTech = pool::ROOTTREE_StorageType.
type();
1037 fileSpec.erase(0, 9);
1038 }
else if (fileSpec.starts_with (
"ROOTTREEINDEX:")) {
1039 outputTech = pool::ROOTTREEINDEX_StorageType.
type();
1040 fileSpec.erase(0, 14);
1041 }
else if (fileSpec.starts_with (
"ROOTRNTUPLE:")) {
1042 outputTech = pool::ROOTRNTUPLE_StorageType.
type();
1043 fileSpec.erase(0, 12);
1044 }
else if (outputTech == 0) {
1047 return(StatusCode::SUCCESS);
◆ disconnectOutput()
StatusCode AthenaPoolCnvSvc::disconnectOutput |
( |
const std::string & |
outputConnectionSpec | ) |
|
|
overridevirtual |
Disconnect to the output connection.
Definition at line 713 of file AthenaPoolCnvSvc.cxx.
714 std::string outputConnection = outputConnectionSpec.substr(0, outputConnectionSpec.find(
'['));
717 return(StatusCode::SUCCESS);
723 return(StatusCode::SUCCESS);
◆ extractPoolAttributes()
void AthenaPoolCnvSvc::extractPoolAttributes |
( |
const StringArrayProperty & |
property, |
|
|
std::vector< std::vector< std::string > > * |
contAttr, |
|
|
std::vector< std::vector< std::string > > * |
dbAttr, |
|
|
std::vector< std::vector< std::string > > * |
domAttr = 0 |
|
) |
| const |
|
private |
Extract POOL ItechnologySpecificAttributes for Domain, Database and Container from property.
Definition at line 1259 of file AthenaPoolCnvSvc.cxx.
1263 std::vector<std::string>
opt;
1264 std::string attributeName, containerName, databaseName, valueString;
1265 for (std::vector<std::string>::const_iterator iter = property.value().begin(),
1266 last = property.value().end(); iter != last; ++iter) {
1268 attributeName.clear();
1269 containerName.clear();
1270 databaseName.clear();
1271 valueString.clear();
1272 using Gaudi::Utils::AttribStringParser;
1273 for (
const AttribStringParser::Attrib& attrib : AttribStringParser (*iter)) {
1274 const std::string
tag = attrib.tag;
1275 const std::string
val = attrib.value;
1276 if (
tag ==
"DatabaseName") {
1278 }
else if (
tag ==
"ContainerName") {
1279 if (databaseName.empty()) {
1282 containerName =
val;
1284 attributeName =
tag;
1288 if (!attributeName.empty() && !valueString.empty()) {
1289 opt.push_back(attributeName);
1290 opt.push_back(valueString);
1291 if (!databaseName.empty()) {
1292 opt.push_back(databaseName);
1293 if (!containerName.empty()) {
1294 opt.push_back(containerName);
1295 if (containerName.compare(0, 6,
"TTree=") == 0) {
1296 dbAttr->push_back(
opt);
1298 contAttr->push_back(
opt);
1302 dbAttr->push_back(
opt);
1304 }
else if (domAttr != 0) {
1305 domAttr->push_back(
opt);
1309 dbAttr->push_back(
opt);
◆ fillRepRefs()
StatusCode AthenaPoolCnvSvc::fillRepRefs |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
pObject |
|
) |
| |
|
overridevirtual |
Implementation of IConversionSvc: Resolve the references of the converted object.
- Parameters
-
pAddress | [IN] pointer to IOpaqueAddress of the representation to be resolved. |
pObject | [IN] pointer to DataObject to be created. |
Definition at line 265 of file AthenaPoolCnvSvc.cxx.
267 std::string objName =
"ALL";
269 if (
m_clidSvc->getTypeNameOfID(pObject->clID(), objName).isFailure()) {
270 std::ostringstream oss;
271 oss << std::dec << pObject->clID();
275 objName += pObject->registry()->name();
280 if (pObject->clID() == 1) {
283 if (
proxy !=
nullptr) {
284 IConverter* cnv = converter(
proxy->clID());
285 status = cnv->fillRepRefs(pAddress, pObject);
291 }
catch(std::runtime_error&
e) {
◆ finalize()
StatusCode AthenaPoolCnvSvc::finalize |
( |
| ) |
|
|
overridevirtual |
Required of all Gaudi Services.
Definition at line 146 of file AthenaPoolCnvSvc.cxx.
178 const std::string msgPrefix{
"PerfStats "};
180 ATH_MSG_INFO(msgPrefix <<
"Timing Measurements for AthenaPoolCnvSvc");
183 ATH_MSG_INFO(msgPrefix <<
"| " << std::left << std::setw(15) <<
key <<
" | "
184 << std::right << std::setw(15) << std::fixed << std::setprecision(0) <<
value <<
" ms |");
189 m_cnvs.shrink_to_fit();
190 return(StatusCode::SUCCESS);
◆ flushDataHeaderForms()
void AthenaPoolCnvSvc::flushDataHeaderForms |
( |
const std::string & |
streamName = "*" | ) |
|
Tell DataHeaderCnv to write out all DataHeaderForms for a given streamName (default is all)
Definition at line 132 of file AthenaPoolCnvSvc.cxx.
135 FileIncident incident(
name(),
"WriteDataHeaderForms",
streamName);
136 if( DHCnvListener ) DHCnvListener->handle(incident);
◆ getPoolSvc()
IPoolSvc * AthenaPoolCnvSvc::getPoolSvc |
( |
| ) |
|
|
overridevirtual |
◆ handle()
void AthenaPoolCnvSvc::handle |
( |
const Incident & |
incident | ) |
|
|
overridevirtual |
◆ initialize()
StatusCode AthenaPoolCnvSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Required of all Gaudi Services.
Definition at line 39 of file AthenaPoolCnvSvc.cxx.
69 if (!iomgr->io_register(
this).isSuccess()) {
70 ATH_MSG_FATAL(
"Could not register myself with the IoComponentMgr !");
71 return(StatusCode::FAILURE);
74 for (std::vector<std::string>::const_iterator iter =
m_maxFileSizes.value().begin(),
76 if (
auto p = iter->find(
'=');
p != std::string::npos) {
77 long long maxFileSize = atoll(iter->data() + (
p + 1));
78 std::string databaseName = iter->substr(0, iter->find_first_of(
" ="));
88 return StatusCode::FAILURE;
105 incSvc->addListener(
this,
"EndEvent", pri);
106 ATH_MSG_DEBUG(
"Subscribed to EndEvent for printing out input file attributes.");
109 ATH_MSG_DEBUG(
"setInputAttribute failed setting POOL domain attributes.");
113 incSvc->addListener(
this,
"StoreCleared", pri);
118 TClass::GetClass (
"TLeafI");
119 TClass::GetClass (
"TLeafL");
120 TClass::GetClass (
"TLeafD");
121 TClass::GetClass (
"TLeafF");
123 return(StatusCode::SUCCESS);
◆ io_finalize()
StatusCode AthenaPoolCnvSvc::io_finalize |
( |
| ) |
|
|
overridevirtual |
◆ io_reinit()
StatusCode AthenaPoolCnvSvc::io_reinit |
( |
| ) |
|
|
overridevirtual |
◆ makeClient()
StatusCode AthenaPoolCnvSvc::makeClient |
( |
int |
num | ) |
|
|
overridevirtual |
Make this a client.
Definition at line 1123 of file AthenaPoolCnvSvc.cxx.
1126 std::string streamPortSuffix;
1129 return(StatusCode::FAILURE);
1132 ATH_MSG_DEBUG(
"makeClient: Setting conversion service port suffix to " << streamPortSuffix);
1137 return(StatusCode::SUCCESS);
1140 std::string dummyStr;
◆ makeServer()
StatusCode AthenaPoolCnvSvc::makeServer |
( |
int |
num | ) |
|
|
overridevirtual |
Make this a server.
Definition at line 1097 of file AthenaPoolCnvSvc.cxx.
1108 return(StatusCode::FAILURE);
1112 return(StatusCode::SUCCESS);
1114 return(StatusCode::RECOVERABLE);
1117 return(StatusCode::RECOVERABLE);
◆ outputContextId()
unsigned int AthenaPoolCnvSvc::outputContextId |
( |
const std::string & |
outputConnection | ) |
|
|
private |
◆ processPoolAttributes()
StatusCode AthenaPoolCnvSvc::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 |
|
private |
Set/get technology dependent POOL attributes.
Definition at line 1315 of file AthenaPoolCnvSvc.cxx.
1321 bool retError =
false;
1323 for (std::vector<std::vector<std::string> >::
iterator iter = attr.begin(), last = attr.end();
1324 iter != last; ++iter) {
1325 if (iter->size() == 2) {
1326 const std::string&
opt = (*iter)[0];
1327 std::string
data = (*iter)[1];
1328 if (
data ==
"int" ||
data ==
"DbLonglong" ||
data ==
"double" ||
data ==
"string") {
1347 if (iter->size() == 4) {
1348 const std::string&
opt = (*iter)[0];
1349 std::string
data = (*iter)[1];
1350 const std::string&
file = (*iter)[2];
1351 const std::string& cont = (*iter)[3];
1353 || (
file[0] ==
'*' &&
file.find(
"," +
fileName +
",") == std::string::npos))) {
1354 if (
data ==
"int" ||
data ==
"DbLonglong" ||
data ==
"double" ||
data ==
"string") {
1366 (*iter)[2] +=
"," +
fileName +
",";
1379 for (std::vector<std::vector<std::string> >::
iterator iter = attr.begin(); iter != attr.end(); ) {
1380 if (iter->empty()) {
1381 iter = attr.erase(iter);
1386 return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
◆ readData()
StatusCode AthenaPoolCnvSvc::readData |
( |
| ) |
|
|
overridevirtual |
Read the next data object.
Definition at line 1144 of file AthenaPoolCnvSvc.cxx.
1146 return(StatusCode::FAILURE);
1148 const char* tokenStr =
nullptr;
1151 if (
sc.isSuccess() && tokenStr !=
nullptr && strlen(tokenStr) > 0 &&
num > 0) {
1159 token.
fromString(tokenStr); tokenStr =
nullptr;
1161 std::string objName =
"ALL";
1171 std::size_t nbytes = 0;
1174 while (
sc.isRecoverable()) {
1177 delete []
static_cast<char*
>(
buffer);
buffer =
nullptr;
1178 if (!
sc.isSuccess()) {
1180 return(StatusCode::FAILURE);
1185 return(StatusCode::FAILURE);
1190 return(StatusCode::FAILURE);
1193 std::string returnToken;
1195 if (metadataToken !=
nullptr) {
1196 returnToken = metadataToken->
toString();
1200 delete metadataToken; metadataToken =
nullptr;
1205 return(StatusCode::FAILURE);
1208 return(StatusCode::RECOVERABLE);
1210 return(StatusCode::SUCCESS);
◆ registerCleanUp()
◆ registerForWrite()
- Returns
- a string token to a Data Object written to Pool
- Parameters
-
placement | [IN] pointer to the placement hint |
obj | [IN] pointer to the Data Object to be written to Pool |
classDesc | [IN] pointer to the Seal class description for the Data Object. |
Definition at line 748 of file AthenaPoolCnvSvc.cxx.
753 ATH_MSG_ERROR(
"Could not make AthenaPoolCnvSvc a Share Client");
757 Token* token =
nullptr;
761 std::string placementStr = placement->
toString();
762 placementStr +=
"[PNAME=";
763 placementStr += classDesc.
Name();
767 while (
sc.isRecoverable()) {
771 if (!
sc.isSuccess()) {
776 const void*
buffer =
nullptr;
777 std::size_t nbytes = 0;
779 if (classDesc.
Name() ==
"Token") {
780 nbytes = strlen(
static_cast<const char*
>(
obj)) + 1;
784 nbytes = classDesc.
SizeOf();
792 while (
sc.isRecoverable()) {
796 if (own) {
delete []
static_cast<const char*
>(
buffer); }
798 if (!
sc.isSuccess()) {
799 ATH_MSG_ERROR(
"Could not share object for: " << placementStr);
805 ATH_MSG_ERROR(
"Could not share dynamic aux store for: " << placementStr);
814 const char* tokenStr =
nullptr;
817 while (
sc.isRecoverable()) {
821 if (!
sc.isSuccess()) {
825 if (!strcmp(tokenStr,
"ABORT")) {
832 tempToken->
fromString(tokenStr); tokenStr =
nullptr;
834 token = tempToken; tempToken =
nullptr;
838 ATH_MSG_DEBUG(
"registerForWrite SKIPPED for uninitialized server, Placement = " << placement->
toString());
841 token = tempToken; tempToken =
nullptr;
844 token =
m_poolSvc->registerForWrite(placement,
obj, classDesc);
854 token =
m_poolSvc->registerForWrite(placement,
obj, classDesc);
◆ setInputAttributes()
StatusCode AthenaPoolCnvSvc::setInputAttributes |
( |
const std::string & |
fileName | ) |
|
|
overridevirtual |
Set the input file attributes, if any are requested from jobOpts.
- Parameters
-
fileName | [IN] name of the input file |
Definition at line 1076 of file AthenaPoolCnvSvc.cxx.
1080 ATH_MSG_DEBUG(
"setInputAttribute failed setting POOL database/container attributes.");
1083 ATH_MSG_DEBUG(
"setInputAttribute failed getting POOL database/container attributes.");
1087 const auto& extraInputContextMap =
m_poolSvc->getInputContextMap();
1088 for (
const auto& [
label,
id]: extraInputContextMap) {
1090 ATH_MSG_DEBUG(
"setInputAttribute failed to switch off TTreeCache for = " <<
label <<
".");
1094 return(StatusCode::SUCCESS);
◆ setObjPtr()
void AthenaPoolCnvSvc::setObjPtr |
( |
void *& |
obj, |
|
|
const Token * |
token |
|
) |
| |
|
overridevirtual |
- Parameters
-
obj | [OUT] pointer to the Data Object. |
token | [IN] string token of the Data Object for which a Pool Ref is filled. |
Definition at line 860 of file AthenaPoolCnvSvc.cxx.
866 ATH_MSG_ERROR(
"Could not make AthenaPoolCnvSvc a Share Client");
871 int num = token->
oid().first;
874 std::size_t nbytes = 0;
876 while (
sc.isRecoverable()) {
880 if (!
sc.isSuccess()) {
912 std::size_t nbytes = 0;
918 while (
sc.isRecoverable()) {
923 if (!
sc.isSuccess()) {
◆ stop()
StatusCode AthenaPoolCnvSvc::stop |
( |
| ) |
|
|
finaloverridevirtual |
◆ useDetailChronoStat()
bool AthenaPoolCnvSvc::useDetailChronoStat |
( |
| ) |
const |
|
overridevirtual |
◆ SvcFactory< AthenaPoolCnvSvc >
◆ m_branchNameHintProp
StringProperty AthenaPoolCnvSvc::m_branchNameHintProp {this,"SubLevelBranchName", "<type>/<key>"} |
|
private |
SubLevelBranchName, naming hint policy for POOL branching: ("" = no branching)
Definition at line 218 of file AthenaPoolCnvSvc.h.
◆ m_chronoMap
◆ m_clidSvc
◆ m_containerAttr
std::vector<std::vector<std::string> > AthenaPoolCnvSvc::m_containerAttr |
|
private |
◆ m_containerNameHintProp
StringProperty AthenaPoolCnvSvc::m_containerNameHintProp {this,"TopLevelContainerName",""} |
|
private |
TopLevelContainerName, naming hint policy for top level POOL container: default = "<type>".
Definition at line 216 of file AthenaPoolCnvSvc.h.
◆ m_containerPrefixProp
StringProperty AthenaPoolCnvSvc::m_containerPrefixProp {this,"PoolContainerPrefix","Default"} |
|
private |
◆ m_contextAttr
std::vector<unsigned int> AthenaPoolCnvSvc::m_contextAttr |
|
private |
◆ m_databaseAttr
std::vector<std::vector<std::string> > AthenaPoolCnvSvc::m_databaseAttr |
|
private |
◆ m_databaseMaxFileSize
std::map<std::string, long long> AthenaPoolCnvSvc::m_databaseMaxFileSize |
|
private |
◆ m_dbType
decoded storage tech requested in "StorageTechnology" property
Definition at line 192 of file AthenaPoolCnvSvc.h.
◆ m_DHFilterAliases
BooleanProperty AthenaPoolCnvSvc::m_DHFilterAliases { this, "doFilterDHAliases", true } |
|
private |
◆ m_DHFormCacheSize
IntegerProperty AthenaPoolCnvSvc::m_DHFormCacheSize { this, "maxDHFormCacheSize", 100 } |
|
private |
◆ m_domainAttr
std::vector<std::vector<std::string> > AthenaPoolCnvSvc::m_domainAttr |
|
private |
◆ m_domainMaxFileSize
long long AthenaPoolCnvSvc::m_domainMaxFileSize =std::numeric_limits<long long>::max() |
|
private |
◆ m_fileCommitCounter
std::map<std::string, int> AthenaPoolCnvSvc::m_fileCommitCounter |
|
private |
◆ m_fileFlushSetting
std::map<std::string, int> AthenaPoolCnvSvc::m_fileFlushSetting |
|
private |
◆ m_inputAttr
std::vector<std::vector<std::string> > AthenaPoolCnvSvc::m_inputAttr |
|
private |
◆ m_inputAttrPerEvent
std::vector<std::vector<std::string> > AthenaPoolCnvSvc::m_inputAttrPerEvent |
|
private |
◆ m_inputPoolAttr
StringArrayProperty AthenaPoolCnvSvc::m_inputPoolAttr {this,"InputPoolAttributes",{}} |
|
private |
Input PoolAttributes, vector with names and values of technology specific attributes for POOL.
Definition at line 229 of file AthenaPoolCnvSvc.h.
◆ m_inputPoolAttrPerEvent
StringArrayProperty AthenaPoolCnvSvc::m_inputPoolAttrPerEvent {this,"PrintInputAttrPerEvt",{}} |
|
private |
Print input PoolAttributes per event, vector with names of technology specific attributes for POOL to be printed each event.
Definition at line 233 of file AthenaPoolCnvSvc.h.
◆ m_inputStreamingTool
ToolHandle<IAthenaIPCTool> AthenaPoolCnvSvc::m_inputStreamingTool {this,"InputStreamingTool",{}} |
|
private |
◆ m_lastInputFileName
std::string AthenaPoolCnvSvc::m_lastInputFileName |
|
private |
◆ m_makeStreamingToolClient
IntegerProperty AthenaPoolCnvSvc::m_makeStreamingToolClient {this,"MakeStreamingToolClient",0} |
|
private |
Make this instance a Streaming Client during first connect/write automatically.
Definition at line 257 of file AthenaPoolCnvSvc.h.
◆ m_maxFileSizes
StringArrayProperty AthenaPoolCnvSvc::m_maxFileSizes {this,"MaxFileSizes",{}} |
|
private |
◆ m_metadataClient
int AthenaPoolCnvSvc::m_metadataClient =0 |
|
private |
◆ m_metadataContainerProp
StringProperty AthenaPoolCnvSvc::m_metadataContainerProp {this,"OutputMetadataContainer","MetaData"} |
|
private |
For SharedWriter: To use MetadataSvc to merge data placed in a certain container.
Definition at line 253 of file AthenaPoolCnvSvc.h.
◆ m_metadataContainersAug
StringArrayProperty AthenaPoolCnvSvc::m_metadataContainersAug {this, "OutputMetadataContainers", {}, "Metadata containers used for augmentations"} |
|
private |
◆ m_mutex
std::mutex AthenaPoolCnvSvc::m_mutex |
|
private |
◆ m_numberEventsPerWrite
IntegerProperty AthenaPoolCnvSvc::m_numberEventsPerWrite {this,"NumberEventsPerWrite",-1} |
|
private |
When using TMemFile call Write on number of Events, respecting CollectionTree auto_flush.
Definition at line 265 of file AthenaPoolCnvSvc.h.
◆ m_oneDataHeaderForm
BooleanProperty AthenaPoolCnvSvc::m_oneDataHeaderForm { this, "OneDataHeaderForm", false } |
|
private |
◆ m_outputStreamingTool
ToolHandle<IAthenaIPCTool> AthenaPoolCnvSvc::m_outputStreamingTool {this,"OutputStreamingTool",{}} |
|
private |
◆ m_parallelCompression
BooleanProperty AthenaPoolCnvSvc::m_parallelCompression {this,"ParallelCompression",true} |
|
private |
◆ m_persSvcPerInputType
StringProperty AthenaPoolCnvSvc::m_persSvcPerInputType {this,"PersSvcPerInputType",""} |
|
private |
PersSvcPerInputType, string property, tree name to use multiple persistency services, one per input type.
default = "", no tree name results in a single persistency service.
Definition at line 248 of file AthenaPoolCnvSvc.h.
◆ m_persSvcPerOutput
BooleanProperty AthenaPoolCnvSvc::m_persSvcPerOutput {this,"PersSvcPerOutput",true} |
|
private |
PersSvcPerOutput, boolean property to use multiple persistency services, one per output stream.
default = true.
Definition at line 243 of file AthenaPoolCnvSvc.h.
◆ m_poolAttr
StringArrayProperty AthenaPoolCnvSvc::m_poolAttr {this,"PoolAttributes",{},"Pool Attributes","OrderedSet<std::string>"} |
|
private |
Output PoolAttributes, vector with names and values of technology specific attributes for POOL.
Definition at line 221 of file AthenaPoolCnvSvc.h.
◆ m_poolSvc
◆ m_serializeSvc
◆ m_storageTechProp
StringProperty AthenaPoolCnvSvc::m_storageTechProp {this,"StorageTechnology", "ROOTTREEINDEX"} |
|
private |
◆ m_streamingTechnology
IntegerProperty AthenaPoolCnvSvc::m_streamingTechnology {this,"StreamingTechnology",-1} |
|
private |
◆ m_streamPortString
StringProperty AthenaPoolCnvSvc::m_streamPortString {this,"StreamPortString","?pmerge=localhost:0"} |
|
private |
◆ m_streamServerActive
bool AthenaPoolCnvSvc::m_streamServerActive =false |
|
private |
◆ m_useDetailChronoStat
BooleanProperty AthenaPoolCnvSvc::m_useDetailChronoStat {this,"UseDetailChronoStat",false} |
|
private |
UseDetailChronoStat, enable detailed output for time and size statistics for AthenaPOOL: default = false.
Definition at line 208 of file AthenaPoolCnvSvc.h.
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
ServiceHandle< IPoolSvc > m_poolSvc
std::vector< unsigned int > m_contextAttr
virtual StatusCode cleanUp(const std::string &connection) override
Implement cleanUp to call all registered IAthenaPoolCleanUp cleanUp() function.
char data[hepevt_bytes_allocation_ATLAS]
static const Guid & null()
NULL-Guid: static class method.
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,...
This class holds all the necessary information to guide the writing of an object in a physical place.
StringProperty m_metadataContainerProp
For SharedWriter: To use MetadataSvc to merge data placed in a certain container.
static TScopeAdapter ByNameNoQuiet(const std::string &name, Bool_t load=kTRUE)
static DbType getType(const std::string &name)
Access known storage type object by name.
unsigned outputContextId(const std::string &outputConnection)
const std::string & containerName() const
Access container name.
std::string find(const std::string &s)
return a remapped string
ServiceHandle< IClassIDSvc > m_clidSvc
ToolHandle< IAthenaIPCTool > m_inputStreamingTool
const std::string & contID() const
Access container identifier.
IntegerProperty m_streamingTechnology
Use Streaming for selected technologies only.
BooleanProperty m_useDetailChronoStat
UseDetailChronoStat, enable detailed output for time and size statistics for AthenaPOOL: default = fa...
long long m_domainMaxFileSize
const std::string & auxString() const
Access auxiliary string.
std::vector< std::vector< std::string > > m_inputAttrPerEvent
virtual StatusCode decodeOutputSpec(std::string &connectionSpec, int &outputTech) const override
Extract/deduce the DB technology from the connection string/file specification.
const Guid & dbID() const
Access database identifier.
std::vector< std::vector< std::string > > m_databaseAttr
PMonUtils::BasicStopWatchResultMap_t m_chronoMap
Map that holds chrono information.
StatusCode sendStore(const IAthenaSerializeSvc *serSvc, IAthenaIPCTool *ipcTool, const void *obj, const Guid &classId, const std::string &contName, int num=0)
Send dynamic aux store variables to streaming tool.
const std::string toString() const
Automatic conversion to string representation.
pool::DbType m_dbType
decoded storage tech requested in "StorageTechnology" property
void commit()
Save catalog to file.
const Guid & classID() const
Access database identifier.
virtual void setObjPtr(void *&obj, const Token *token) override
#define ATH_MSG_VERBOSE(x)
static const TypeH forGuid(const Guid &info)
Access classes by Guid.
Placement & setAuxString(const std::string &auxString)
Set auxiliary string.
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.
virtual StatusCode makeClient(int num) override
Make this a client.
void flushDataHeaderForms(const std::string &streamName="*")
Tell DataHeaderCnv to write out all DataHeaderForms for a given streamName (default is all)
std::map< std::string, int > m_fileFlushSetting
BooleanProperty m_oneDataHeaderForm
If true, use only one DataHeaderForm per Stream.
int type() const
Access to full type.
bool equal(double a, double b)
Compare two FP numbers, working around x87 precision issues.
This class provides a token that identifies in a unique way objects on the persistent storage.
virtual Token * registerForWrite(Placement *placement, const void *obj, const RootType &classDesc) override
StringProperty m_persSvcPerInputType
PersSvcPerInputType, string property, tree name to use multiple persistency services,...
StringProperty m_storageTechProp
Default Storage Tech for containers (ROOTTREE, ROOTTREEINDEX, ROOTRNTUPLE)
void extractPoolAttributes(const StringArrayProperty &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.
This class provides a Generic Transient Address for POOL tokens.
Token & fromString(const std::string &from)
Build from the string representation of a token.
static constexpr const char * EventData
Token & setClassID(const Guid &cl_id)
Access database identifier.
int technology() const
Access technology type.
StringArrayProperty m_metadataContainersAug
StatusCode receiveStore(const IAthenaSerializeSvc *serSvc, IAthenaIPCTool *ipcTool, void *obj, int num=0)
Receive dynamic aux store variables from streaming tool.
StringArrayProperty m_maxFileSizes
MaxFileSizes, vector with maximum file sizes for Athena POOL output files.
::StatusCode StatusCode
StatusCode definition for legacy code.
IntegerProperty m_makeStreamingToolClient
Make this instance a Streaming Client during first connect/write automatically.
Default, invalid implementation of ClassID_traits.
std::vector< std::vector< std::string > > m_inputAttr
std::map< std::string, long long > m_databaseMaxFileSize
Token & setDb(const Guid &db)
Set database name.
const std::string & fileName() const
Access file name.
IntegerProperty m_numberEventsPerWrite
When using TMemFile call Write on number of Events, respecting CollectionTree auto_flush.
Placement & setFileName(const std::string &fileName)
Set file name.
const std::string & auxString() const
Access auxiliary string.
std::string Name(unsigned int mod=Reflex::SCOPED) const
std::vector< std::vector< std::string > > m_containerAttr
bool m_streamServerActive
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override
Implementation of IConverter: Create the transient representation of an object.
BooleanProperty m_persSvcPerOutput
PersSvcPerOutput, boolean property to use multiple persistency services, one per output stream.
virtual const std::string toString() const
Retrieve the string representation of the token.
StringArrayProperty m_inputPoolAttr
Input PoolAttributes, vector with names and values of technology specific attributes for POOL.
Token & setOid(const OID_t &oid)
Set object identifier.
StringProperty m_streamPortString
Extension to use ROOT TMemFile for event data, "?pmerge=<host>:<port>".
const std::string toString() const
Retrieve the string representation of the placement.
std::vector< std::vector< std::string > > m_domainAttr
std::map< std::string, int > m_fileCommitCounter
Bool_t IsFundamental() const
bool exactMatch(const DbType &typ) const
StatusCode abortSharedWrClients(int client_n)
Send abort to SharedWriter clients if the server quits on error.
#define ATH_MSG_WARNING(x)
ToolHandle< IAthenaIPCTool > m_outputStreamingTool
const OID_t & oid() const
Access object identifier.
Token & setAuxString(const std::string &auxString)
Set auxiliary string.
virtual StatusCode connectOutput(const std::string &outputConnectionSpec, const std::string &openMode) override
Implementation of IConversionSvc: Connect to the output connection specification with open mode.
StringArrayProperty m_poolAttr
Output PoolAttributes, vector with names and values of technology specific attributes for POOL.
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Resolve the references of the converted object.
Token & setCont(const std::string &cnt)
Set container name.
StringArrayProperty m_inputPoolAttrPerEvent
Print input PoolAttributes per event, vector with names of technology specific attributes for POOL to...
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
#define ATLAS_THREAD_SAFE
StringProperty m_containerPrefixProp
POOL Container name prefix - will be part of or whole TTree/RNTuple name 'Default' takes the prefix f...
static constexpr const char * EventData
BooleanProperty m_parallelCompression
Use Athena Object sharing for metadata only, event data is collected and send via ROOT TMemFile.
std::string m_lastInputFileName
ServiceHandle< IAthenaSerializeSvc > m_serializeSvc
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
Placement & fromString(const std::string &from)
Build from the string representation of a placement.
This class provides the interface between AthenaPoolCnvSvc and AuxStore classes.
static Guid guid(const TypeH &id)
Determine Guid (normalized string form) from reflection type.