|
ATLAS Offline Software
|
This class provides the interface between Athena and PoolSvc.
More...
#include <AthenaPoolCnvSvc.h>
|
StatusCode | initialize () |
| Required of all Gaudi Services. More...
|
|
StatusCode | io_reinit () |
|
StatusCode | finalize () |
| Required of all Gaudi Services. More...
|
|
StatusCode | io_finalize () |
|
StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
| Required of all Gaudi services: see Gaudi documentation for details. More...
|
|
StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) |
| Implementation of IConversionSvc: Create the transient representation of an object from persistent state. More...
|
|
StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) |
| Implementation of IConversionSvc: Convert the transient object to the requested representation. More...
|
|
StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
| Implementation of IConversionSvc: Resolve the references of the converted object. More...
|
|
StatusCode | connectOutput (const std::string &outputConnectionSpec, const std::string &openMode) |
| Implementation of IConversionSvc: Connect to the output connection specification with open mode. More...
|
|
StatusCode | connectOutput (const std::string &outputConnectionSpec) |
| Implementation of IConversionSvc: Connect to the output connection specification with open mode. More...
|
|
StatusCode | commitOutput (const std::string &outputConnectionSpec, bool doCommit) |
| Implementation of IConversionSvc: Commit pending output. More...
|
|
StatusCode | disconnectOutput (const std::string &outputConnectionSpec) |
| Disconnect to the output connection. More...
|
|
IPoolSvc * | getPoolSvc () |
|
Token * | registerForWrite (Placement *placement, const void *obj, const RootType &classDesc) |
|
void | setObjPtr (void *&obj, const Token *token) |
|
bool | useDetailChronoStat () const |
|
StatusCode | createAddress (long svcType, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) |
| Create a Generic address using explicit arguments to identify a single object. More...
|
|
StatusCode | createAddress (long svcType, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress) |
| Create address from string form. More...
|
|
StatusCode | convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress) |
| Convert address to string form. More...
|
|
StatusCode | decodeOutputSpec (std::string &connectionSpec, int &outputTech) const |
| Extract/deduce the DB technology from the connection string/file specification. More...
|
|
StatusCode | registerCleanUp (IAthenaPoolCleanUp *cnv) |
| Implement registerCleanUp to register a IAthenaPoolCleanUp to be called during cleanUp. More...
|
|
StatusCode | cleanUp (const std::string &connection) |
| Implement cleanUp to call all registered IAthenaPoolCleanUp cleanUp() function. More...
|
|
StatusCode | setInputAttributes (const std::string &fileName) |
| Set the input file attributes, if any are requested from jobOpts. More...
|
|
virtual StatusCode | makeServer (int num) |
| Make this a server. More...
|
|
virtual StatusCode | makeClient (int num) |
| Make this a client. More...
|
|
virtual StatusCode | readData () |
| Read the next data object. More...
|
|
virtual StatusCode | commitCatalog () |
| Commit Catalog. More...
|
|
StatusCode | abortSharedWrClients (int client_n) |
| Send abort to SharedWriter clients if the server quits on error. More...
|
|
void | handle (const Incident &incident) |
| Implementation of IIncidentListener: Handle for EndEvent incidence. More...
|
|
| AthenaPoolCnvSvc (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Service Constructor. More...
|
|
virtual | ~AthenaPoolCnvSvc ()=default |
| Destructor. More...
|
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
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...
|
|
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...
|
|
|
virtual StatusCode | updateServiceState (IOpaqueAddress *pAddress) |
| Update state of the service. More...
|
|
typedef std::recursive_mutex | CallMutex |
| Mutex to protect Converter creation. More...
|
|
SmartIF< IDataProviderSvc > | m_dataSvc |
| Pointer to data provider service. More...
|
|
SmartIF< IAddressCreator > | m_addressCreator |
| Pointer to the address creation service interface. More...
|
|
SmartIF< IConversionSvc > | m_cnvSvc |
| Pointer to the IConversionSvc interface of this. More...
|
|
long | m_type |
| Conversion service type. More...
|
|
Workers | m_workers |
| List of conversion workers. More...
|
|
CallMutex | m_conv_mut |
|
virtual SmartIF< IAddressCreator > & | addressCreator () |
| Retrieve address creation interface. More...
|
|
virtual IConverter * | createConverter (long typ, const CLID &clid, const ICnvFactory *fac) |
| Create new Converter using factory. More...
|
|
virtual StatusCode | configureConverter (long typ, const CLID &clid, IConverter *cnv) |
| Configure the new converter before initialize is called. More...
|
|
virtual StatusCode | initializeConverter (long typ, const CLID &clid, IConverter *cnv) |
| Initialize the new converter. More...
|
|
virtual StatusCode | activateConverter (long typ, const CLID &clid, IConverter *cnv) |
| Activate the new converter after initialization. More...
|
|
virtual void | loadConverter (DataObject *pObject) |
| Load converter or dictionary needed by the converter. More...
|
|
StatusCode | makeCall (int typ, bool ignore_add, bool ignore_obj, bool update, IOpaqueAddress *&pAddress, DataObject *&pObject) |
|
This class provides the interface between Athena and PoolSvc.
Definition at line 41 of file AthenaPoolCnvSvc.h.
◆ CallMutex
◆ Workers
◆ 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 1184 of file AthenaPoolCnvSvc.cxx.
1190 while (
sc.isSuccess()) {
1191 if (client_n >= 0) {
1196 while (
sc.isRecoverable()) {
1200 return StatusCode::FAILURE;
◆ activateConverter()
StatusCode AthCnvSvc::activateConverter |
( |
long |
typ, |
|
|
const CLID & |
clid, |
|
|
IConverter * |
cnv |
|
) |
| |
|
protectedvirtualinherited |
Activate the new converter after initialization.
Definition at line 536 of file AthCnvSvc.cxx.
540 return StatusCode::SUCCESS;
542 return Status::NO_CONVERTER;
◆ addConverter() [1/2]
StatusCode AthCnvSvc::addConverter |
( |
const CLID & |
clid | ) |
|
|
virtualinherited |
Add converter object to conversion service.
Definition at line 336 of file AthCnvSvc.cxx.
341 if ( 0 != pConverter ) {
343 if (
status.isSuccess() ) {
345 if (
status.isSuccess() ) {
347 if (
status.isSuccess() ) {
348 long conv_typ = pConverter->repSvcType();
349 const CLID& conv_clid = pConverter->objType();
350 typ = (typ<0xFF) ? typ : typ&0xFFFFFF00;
351 conv_typ = (conv_typ<0xFF) ? conv_typ : conv_typ&0xFFFFFF00;
352 if ( conv_typ == typ && conv_clid == clid ) {
358 pConverter->release();
360 return Status::NO_CONVERTER;
◆ addConverter() [2/2]
StatusCode AthCnvSvc::addConverter |
( |
IConverter * |
pConverter | ) |
|
|
virtualinherited |
Add converter object to conversion service.
Definition at line 365 of file AthCnvSvc.cxx.
367 if ( 0 != pConverter ) {
368 const CLID& clid = pConverter->objType();
370 m_workers.insert (std::make_pair(clid,WorkerEntry(clid, pConverter)));
371 pConverter->addRef();
372 return StatusCode::SUCCESS;
374 return Status::NO_CONVERTER;
◆ addressCreator() [1/2]
virtual SmartIF<IAddressCreator>& AthCnvSvc::addressCreator |
( |
| ) |
|
|
inlineprotectedvirtualinherited |
Retrieve address creation interface.
Definition at line 300 of file AthCnvSvc.h.
◆ addressCreator() [2/2]
SmartIF< IAddressCreator > & AthCnvSvc::addressCreator |
( |
| ) |
const |
|
virtualinherited |
Retrieve address creator facility.
Definition at line 261 of file AthCnvSvc.cxx.
◆ cleanUp()
StatusCode AthenaPoolCnvSvc::cleanUp |
( |
const std::string & |
connection | ) |
|
|
virtual |
Implement cleanUp to call all registered IAthenaPoolCleanUp cleanUp() function.
Implements IAthenaPoolCnvSvc.
Definition at line 1016 of file AthenaPoolCnvSvc.cxx.
1017 bool retError =
false;
1018 std::size_t cpos = connection.find(
':');
1019 std::size_t bpos = connection.find(
'[');
1020 if (cpos == std::string::npos) {
1025 if (bpos != std::string::npos) bpos = bpos - cpos;
1026 const std::string
conn = connection.substr(cpos, bpos);
1034 return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
◆ commitCatalog()
StatusCode AthenaPoolCnvSvc::commitCatalog |
( |
| ) |
|
|
virtual |
◆ commitOutput()
StatusCode AthenaPoolCnvSvc::commitOutput |
( |
const std::string & |
outputConnectionSpec, |
|
|
bool |
doCommit |
|
) |
| |
|
virtual |
Implementation of IConversionSvc: Commit pending output.
- Parameters
-
doCommit | [IN] boolean to force full commit |
Reimplemented from AthCnvSvc.
Definition at line 392 of file AthenaPoolCnvSvc.cxx.
394 std::string outputConnection = outputConnectionSpec.substr(0, outputConnectionSpec.find(
'['));
398 if (!this->
cleanUp(outputConnection).isSuccess()) {
400 return(StatusCode::FAILURE);
402 return(StatusCode::SUCCESS);
405 ATH_MSG_DEBUG(
"commitOutput SKIPPED for uninitialized server.");
406 return(StatusCode::SUCCESS);
408 std::map<void*, RootType> commitCache;
412 const char* placementStr =
nullptr;
415 if (
sc.isSuccess() && placementStr !=
nullptr && strlen(placementStr) > 6 &&
num > 0) {
416 const char * matchedChars = strstr(placementStr,
"[FILE=");
417 if (not matchedChars){
428 bool dataHeaderSeen =
false;
429 std::string dataHeaderID;
431 std::string objName =
"ALL";
433 std::string objName(placementStr);
438 std::string tokenStr = placementStr;
439 std::string contName = strstr(placementStr,
"[CONT=");
440 tokenStr.erase(tokenStr.find(
"[CONT="));
441 tokenStr.append(contName, contName.find(
']') + 1);
442 contName = contName.substr(6, contName.find(
']') - 6);
443 std::string
className = strstr(placementStr,
"[PNAME=");
447 std::ostringstream oss2;
448 oss2 << std::dec <<
num;
450 bool foundContainer =
false;
451 std::size_t pPos = contName.find(
'(');
453 foundContainer =
true;
457 if (contName.compare(0, pPos,
item) == 0){
458 foundContainer =
true;
464 if (len > 0 && foundContainer && contName[len] ==
'(' ) {
469 std::ostringstream oss1;
471 std::string memName =
"SHM[NUM=" + oss1.str() +
"]";
472 FileIncident beginInputIncident(
name(),
"BeginInputFile", memName);
473 incSvc->fireIncident(beginInputIncident);
474 FileIncident endInputIncident(
name(),
"EndInputFile", memName);
475 incSvc->fireIncident(endInputIncident);
482 sc = metadataSvc->shmProxy(std::string(placementStr) +
"[NUM=" + oss2.str() +
"]");
483 if (
sc.isRecoverable()) {
485 }
else if (
sc.isFailure()) {
497 placement.
fromString(placementStr); placementStr =
nullptr;
499 if (token ==
nullptr) {
503 tokenStr = token->toString();
509 if (!DHcnv->updateRep(&
address,
static_cast<DataObject*
>(
obj)).isSuccess()) {
513 dataHeaderSeen =
true;
520 dataHeaderID = token->contID();
522 dataHeaderID += oss2.str();
524 dataHeaderID += token->dbID().toString();
525 }
else if (dataHeaderSeen) {
526 dataHeaderSeen =
false;
532 tokenStr, dataHeaderID);
533 if (!DHcnv->updateRepRefs(&
address,
static_cast<DataObject*
>(
obj)).isSuccess()) {
534 ATH_MSG_ERROR(
"Failed updateRepRefs for obj = " << tokenStr);
539 GenericAddress
address(0, 0,
"", dataHeaderID);
540 if (!DHcnv->updateRepRefs(&
address,
nullptr).isSuccess()) {
547 commitCache.insert(std::pair<void*, RootType>(
obj, classDesc));
553 while (
sc.isRecoverable()) {
556 if (!
sc.isSuccess()) {
562 while (
sc.isRecoverable()) {
565 if (
sc.isFailure()) {
570 if (dataHeaderSeen) {
572 GenericAddress
address(0, 0,
"", dataHeaderID);
573 if (!DHcnv->updateRepRefs(&
address,
nullptr).isSuccess()) {
578 placementStr =
nullptr;
579 }
else if (
sc.isSuccess() && placementStr !=
nullptr && strncmp(placementStr,
"stop", 4) == 0) {
580 return(StatusCode::RECOVERABLE);
581 }
else if (
sc.isRecoverable() ||
num == -1) {
582 return(StatusCode::RECOVERABLE);
586 std::ostringstream oss1;
588 std::string memName =
"SHM[NUM=" + oss1.str() +
"]";
589 FileIncident beginInputIncident(
name(),
"BeginInputFile", memName);
590 incSvc->fireIncident(beginInputIncident);
591 FileIncident endInputIncident(
name(),
"EndInputFile", memName);
592 incSvc->fireIncident(endInputIncident);
593 if (
sc.isFailure()) {
594 ATH_MSG_INFO(
"All SharedWriter clients stopped - exiting");
598 return(StatusCode::FAILURE);
602 ATH_MSG_DEBUG(
"commitOutput SKIPPED for metadata-only server: " << outputConnectionSpec);
603 return(StatusCode::SUCCESS);
607 std::unique_lock<std::mutex> lock(
m_mutex);
608 if (outputConnection.empty()) {
614 ATH_MSG_ERROR(
"connectOutput FAILED extract file name and technology.");
615 return(StatusCode::FAILURE);
617 const std::string oldOutputConnection = outputConnection;
628 ATH_MSG_DEBUG(
"commitOutput failed process POOL domain attributes.");
631 ATH_MSG_DEBUG(
"commitOutput failed process POOL database attributes.");
634 ATH_MSG_DEBUG(
"commitOutput failed process POOL container attributes.");
639 if (!
m_poolSvc->commit(contextId).isSuccess()) {
640 ATH_MSG_ERROR(
"commitOutput FAILED to commit OutputStream.");
641 return(StatusCode::FAILURE);
644 if (!
m_poolSvc->commitAndHold(contextId).isSuccess()) {
645 ATH_MSG_ERROR(
"commitOutput FAILED to commitAndHold OutputStream.");
646 return(StatusCode::FAILURE);
651 return(StatusCode::FAILURE);
653 if (!this->
cleanUp(oldOutputConnection).isSuccess()) {
655 return(StatusCode::FAILURE);
658 iter->second.Destruct(iter->first);
661 long long int currentFileSize =
m_poolSvc->getFileSize(outputConnection,
m_dbType.
type(), contextId);
665 return(StatusCode::RECOVERABLE);
669 return(StatusCode::RECOVERABLE);
671 return(StatusCode::SUCCESS);
◆ configureConverter()
StatusCode AthCnvSvc::configureConverter |
( |
long |
typ, |
|
|
const CLID & |
clid, |
|
|
IConverter * |
cnv |
|
) |
| |
|
protectedvirtualinherited |
Configure the new converter before initialize is called.
Definition at line 510 of file AthCnvSvc.cxx.
514 cnv->setConversionSvc(
this).ignore();
516 cnv->setDataProvider(
m_dataSvc).ignore();
517 return StatusCode::SUCCESS;
519 return Status::NO_CONVERTER;
◆ connectOutput() [1/2]
StatusCode AthenaPoolCnvSvc::connectOutput |
( |
const std::string & |
outputConnectionSpec | ) |
|
|
virtual |
Implementation of IConversionSvc: Connect to the output connection specification with open mode.
- Parameters
-
outputConnectionSpec | [IN] the name of the output connection specification as string. |
Reimplemented from AthCnvSvc.
Definition at line 297 of file AthenaPoolCnvSvc.cxx.
299 std::string outputConnection = outputConnectionSpec.substr(0, outputConnectionSpec.find(
'['));
303 ATH_MSG_ERROR(
"connectOutput FAILED extract file name and technology.");
304 return(StatusCode::FAILURE);
308 ATH_MSG_ERROR(
"Could not make AthenaPoolCnvSvc a Share Client");
309 return(StatusCode::FAILURE);
314 return(StatusCode::SUCCESS);
318 ATH_MSG_DEBUG(
"connectOutput SKIPPED for metadata-only server: " << outputConnectionSpec);
319 return(StatusCode::SUCCESS);
323 return(StatusCode::SUCCESS);
333 ATH_MSG_ERROR(
"connectOutput FAILED to open an UPDATE transaction.");
334 return(StatusCode::FAILURE);
338 return(StatusCode::FAILURE);
341 std::unique_lock<std::mutex> lock(
m_mutex);
347 std::vector<std::string> maxFileSize;
348 maxFileSize.push_back(
"TREE_MAX_SIZE");
349 maxFileSize.push_back(
"1099511627776L");
354 iter != last; ++iter) {
355 const std::string&
opt = (*iter)[0];
356 std::string&
data = (*iter)[1];
357 const std::string&
file = (*iter)[2];
358 const std::string& cont = (*iter)[3];
359 std::size_t
equal = cont.find(
'=');
363 if (colon == std::string::npos) colon = 0;
366 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") {
370 std::ostringstream eventAutoFlush;
371 eventAutoFlush <<
flush;
372 data = eventAutoFlush.str();
378 if (
merge != std::string::npos) {
379 ATH_MSG_INFO(
"connectOutput setting auto write for: " << outputConnection <<
" to " <<
flush <<
" events");
384 ATH_MSG_DEBUG(
"connectOutput failed process POOL domain attributes.");
387 ATH_MSG_DEBUG(
"connectOutput failed process POOL database attributes.");
389 return(StatusCode::SUCCESS);
◆ connectOutput() [2/2]
StatusCode AthenaPoolCnvSvc::connectOutput |
( |
const std::string & |
outputConnectionSpec, |
|
|
const std::string & |
openMode |
|
) |
| |
|
virtual |
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. |
Reimplemented from AthCnvSvc.
Definition at line 292 of file AthenaPoolCnvSvc.cxx.
◆ conversionSvc()
SmartIF< IConversionSvc > & AthCnvSvc::conversionSvc |
( |
| ) |
const |
|
virtualinherited |
◆ convertAddress()
StatusCode AthenaPoolCnvSvc::convertAddress |
( |
const IOpaqueAddress * |
pAddress, |
|
|
std::string & |
refAddress |
|
) |
| |
|
virtual |
Convert address to string form.
- Parameters
-
pAddress | [IN] address to be converted. |
refAddress | [OUT] converted string form. |
Reimplemented from AthCnvSvc.
Definition at line 976 of file AthenaPoolCnvSvc.cxx.
980 if (tokAddr !=
nullptr && tokAddr->
getToken() !=
nullptr) {
983 refAddress = *pAddress->par();
985 return(StatusCode::SUCCESS);
◆ converter()
IConverter * AthCnvSvc::converter |
( |
const CLID & |
wanted | ) |
|
|
virtualinherited |
Retrieve converter from list.
Definition at line 394 of file AthCnvSvc.cxx.
399 return worker->second.converter();
404 return worker->second.converter();
407 ATH_MSG_INFO(
"problem adding converter for CLID [" << clid <<
"]");
◆ createAddress() [1/2]
StatusCode AthenaPoolCnvSvc::createAddress |
( |
long |
svcType, |
|
|
const CLID & |
clid, |
|
|
const std::string & |
refAddress, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
|
virtual |
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. |
Reimplemented from AthCnvSvc.
Definition at line 964 of file AthenaPoolCnvSvc.cxx.
968 if (svcType != POOL_StorageType) {
969 ATH_MSG_ERROR(
"createAddress: svcType != POOL_StorageType " << svcType <<
" " << POOL_StorageType);
970 return(StatusCode::FAILURE);
972 refpAddress =
new GenericAddress(POOL_StorageType, clid, refAddress);
973 return(StatusCode::SUCCESS);
◆ createAddress() [2/2]
StatusCode AthenaPoolCnvSvc::createAddress |
( |
long |
svcType, |
|
|
const CLID & |
clid, |
|
|
const std::string * |
par, |
|
|
const unsigned long * |
ip, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
|
virtual |
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. |
Reimplemented from AthCnvSvc.
Definition at line 906 of file AthenaPoolCnvSvc.cxx.
911 if (svcType != POOL_StorageType) {
912 ATH_MSG_ERROR(
"createAddress: svcType != POOL_StorageType " << svcType <<
" " << POOL_StorageType);
913 return(StatusCode::FAILURE);
917 ATH_MSG_ERROR(
"Could not make AthenaPoolCnvSvc a Share Client");
918 return(StatusCode::FAILURE);
921 Token* token =
nullptr;
930 addressToken.
setDb(
par[0].substr(4));
935 return(StatusCode::FAILURE);
938 std::size_t nbytes = 0;
940 while (
sc.isRecoverable()) {
944 if (!
sc.isSuccess()) {
946 return(StatusCode::FAILURE);
951 delete token; token =
nullptr;
957 if (token ==
nullptr) {
958 return(StatusCode::RECOVERABLE);
961 return(StatusCode::SUCCESS);
◆ createConverter()
IConverter * AthCnvSvc::createConverter |
( |
long |
typ, |
|
|
const CLID & |
clid, |
|
|
const ICnvFactory * |
fac |
|
) |
| |
|
protectedvirtualinherited |
Create new Converter using factory.
Reimplemented in Athena::NtupleCnvSvc, Athena::xAODCnvSvc, and Athena::RootCnvSvc.
Definition at line 491 of file AthCnvSvc.cxx.
496 std::unique_ptr<IConverter> cnv{Converter::Factory::create
497 (ConverterID(typ,clid), serviceLocator().
get() )};
500 typ = (typ<0xFF) ? typ : typ&0xFFFFFF00;
501 cnv = Converter::Factory::create
502 (ConverterID(typ,clid), serviceLocator().
get() );
504 return cnv.release();
◆ createObj()
StatusCode AthenaPoolCnvSvc::createObj |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject *& |
refpObject |
|
) |
| |
|
virtual |
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. |
Reimplemented from AthCnvSvc.
Definition at line 192 of file AthenaPoolCnvSvc.cxx.
194 std::string objName =
"ALL";
196 if (
m_clidSvc->getTypeNameOfID(pAddress->clID(), objName).isFailure()) {
197 std::ostringstream oss;
198 oss << std::dec << pAddress->clID();
202 objName += *(pAddress->par() + 1);
209 const unsigned int maxContext =
m_poolSvc->getInputContextMap().size();
212 ::sprintf(
text,
"[CTXT=%08X]", auxContext);
213 if (
m_poolSvc->getInputContextMap().size() > maxContext) {
215 ATH_MSG_DEBUG(
"setInputAttribute failed to switch off TTreeCache for id = " << auxContext <<
".");
◆ createRep()
StatusCode AthenaPoolCnvSvc::createRep |
( |
DataObject * |
pObject, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
|
virtual |
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. |
Reimplemented from AthCnvSvc.
Definition at line 226 of file AthenaPoolCnvSvc.cxx.
228 std::string objName =
"ALL";
230 if (
m_clidSvc->getTypeNameOfID(pObject->clID(), objName).isFailure()) {
231 std::ostringstream oss;
232 oss << std::dec << pObject->clID();
236 objName += pObject->registry()->name();
241 if (pObject->clID() == 1) {
244 if (
proxy !=
nullptr) {
246 status = cnv->createRep(pObject, refpAddress);
252 }
catch(std::runtime_error&
e) {
◆ dataProvider()
SmartIF< IDataProviderSvc > & AthCnvSvc::dataProvider |
( |
| ) |
const |
|
virtualinherited |
Implementation of IConverter: Get Data provider service.
- Returns
- Pointer to data provider service
Definition at line 212 of file AthCnvSvc.cxx.
217 const_cast<SmartIF<IDataProviderSvc>&
>(
m_dataSvc);
◆ decodeOutputSpec()
StatusCode AthenaPoolCnvSvc::decodeOutputSpec |
( |
std::string & |
connectionSpec, |
|
|
int & |
outputTech |
|
) |
| const |
|
virtual |
Extract/deduce the DB technology from the connection string/file specification.
Implements IAthenaPoolCnvSvc.
Definition at line 989 of file AthenaPoolCnvSvc.cxx.
991 if (fileSpec.starts_with (
"oracle") || fileSpec.starts_with (
"mysql")) {
992 outputTech = pool::POOL_RDBMS_StorageType.
type();
993 }
else if (fileSpec.starts_with (
"ROOTKEY:")) {
994 outputTech = pool::ROOTKEY_StorageType.
type();
995 fileSpec.erase(0, 8);
996 }
else if (fileSpec.starts_with (
"ROOTTREE:")) {
997 outputTech = pool::ROOTTREE_StorageType.
type();
998 fileSpec.erase(0, 9);
999 }
else if (fileSpec.starts_with (
"ROOTTREEINDEX:")) {
1000 outputTech = pool::ROOTTREEINDEX_StorageType.
type();
1001 fileSpec.erase(0, 14);
1002 }
else if (fileSpec.starts_with (
"ROOTRNTUPLE:")) {
1003 outputTech = pool::ROOTRNTUPLE_StorageType.
type();
1004 fileSpec.erase(0, 12);
1005 }
else if (outputTech == 0) {
1008 return(StatusCode::SUCCESS);
◆ disconnectOutput()
StatusCode AthenaPoolCnvSvc::disconnectOutput |
( |
const std::string & |
outputConnectionSpec | ) |
|
|
virtual |
Disconnect to the output connection.
Reimplemented from AthCnvSvc.
Definition at line 675 of file AthenaPoolCnvSvc.cxx.
676 std::string outputConnection = outputConnectionSpec.substr(0, outputConnectionSpec.find(
'['));
679 return(StatusCode::SUCCESS);
685 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 1222 of file AthenaPoolCnvSvc.cxx.
1226 std::vector<std::string>
opt;
1227 std::string attributeName, containerName, databaseName, valueString;
1228 for (std::vector<std::string>::const_iterator iter = property.value().begin(),
1229 last = property.value().end(); iter != last; ++iter) {
1231 attributeName.clear();
1232 containerName.clear();
1233 databaseName.clear();
1234 valueString.clear();
1235 using Gaudi::Utils::AttribStringParser;
1236 for (
const AttribStringParser::Attrib& attrib : AttribStringParser (*iter)) {
1237 const std::string
tag = attrib.tag;
1238 const std::string
val = attrib.value;
1239 if (
tag ==
"DatabaseName") {
1241 }
else if (
tag ==
"ContainerName") {
1242 if (databaseName.empty()) {
1245 containerName =
val;
1247 attributeName =
tag;
1251 if (!attributeName.empty() && !valueString.empty()) {
1252 opt.push_back(attributeName);
1253 opt.push_back(valueString);
1254 if (!databaseName.empty()) {
1255 opt.push_back(databaseName);
1256 if (!containerName.empty()) {
1257 opt.push_back(containerName);
1258 if (containerName.compare(0, 6,
"TTree=") == 0) {
1259 dbAttr->push_back(
opt);
1261 contAttr->push_back(
opt);
1265 dbAttr->push_back(
opt);
1267 }
else if (domAttr != 0) {
1268 domAttr->push_back(
opt);
1272 dbAttr->push_back(
opt);
◆ fillObjRefs()
StatusCode AthCnvSvc::fillObjRefs |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
pObject |
|
) |
| |
|
virtualinherited |
◆ fillRepRefs()
StatusCode AthenaPoolCnvSvc::fillRepRefs |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
pObject |
|
) |
| |
|
virtual |
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. |
Reimplemented from AthCnvSvc.
Definition at line 259 of file AthenaPoolCnvSvc.cxx.
261 std::string objName =
"ALL";
263 if (
m_clidSvc->getTypeNameOfID(pObject->clID(), objName).isFailure()) {
264 std::ostringstream oss;
265 oss << std::dec << pObject->clID();
269 objName += pObject->registry()->name();
274 if (pObject->clID() == 1) {
277 if (
proxy !=
nullptr) {
279 status = cnv->fillRepRefs(pAddress, pObject);
285 }
catch(std::runtime_error&
e) {
◆ finalize()
StatusCode AthenaPoolCnvSvc::finalize |
( |
| ) |
|
|
virtual |
Required of all Gaudi Services.
Reimplemented from AthCnvSvc.
Definition at line 132 of file AthenaPoolCnvSvc.cxx.
161 const std::string msgPrefix{
"PerfStats "};
163 ATH_MSG_INFO(msgPrefix <<
"Timing Measurements for AthenaPoolCnvSvc");
166 ATH_MSG_INFO(msgPrefix <<
"| " << std::left << std::setw(15) <<
key <<
" | "
167 << std::right << std::setw(15) << std::fixed << std::setprecision(0) <<
value <<
" ms |");
173 return(StatusCode::SUCCESS);
◆ getPoolSvc()
IPoolSvc * AthenaPoolCnvSvc::getPoolSvc |
( |
| ) |
|
|
virtual |
◆ handle()
void AthenaPoolCnvSvc::handle |
( |
const Incident & |
incident | ) |
|
◆ initialize()
StatusCode AthenaPoolCnvSvc::initialize |
( |
| ) |
|
|
virtual |
Required of all Gaudi Services.
Reimplemented from AthCnvSvc.
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);
◆ initializeConverter()
StatusCode AthCnvSvc::initializeConverter |
( |
long |
typ, |
|
|
const CLID & |
clid, |
|
|
IConverter * |
cnv |
|
) |
| |
|
protectedvirtualinherited |
Initialize the new converter.
Definition at line 525 of file AthCnvSvc.cxx.
529 return cnv->initialize();
531 return Status::NO_CONVERTER;
◆ interfaceID()
static const InterfaceID& IAthenaPoolCnvSvc::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Retrieve interface ID.
Definition at line 39 of file IAthenaPoolCnvSvc.h.
39 {
return(IID_IAthenaPoolCnvSvc); }
◆ io_finalize()
StatusCode AthenaPoolCnvSvc::io_finalize |
( |
| ) |
|
◆ io_reinit()
StatusCode AthenaPoolCnvSvc::io_reinit |
( |
| ) |
|
◆ loadConverter()
void AthCnvSvc::loadConverter |
( |
DataObject * |
pObject | ) |
|
|
protectedvirtualinherited |
Load converter or dictionary needed by the converter.
Definition at line 547 of file AthCnvSvc.cxx.
◆ makeCall()
StatusCode AthCnvSvc::makeCall |
( |
int |
typ, |
|
|
bool |
ignore_add, |
|
|
bool |
ignore_obj, |
|
|
bool |
update, |
|
|
IOpaqueAddress *& |
pAddress, |
|
|
DataObject *& |
pObject |
|
) |
| |
|
protectedinherited |
Definition at line 553 of file AthCnvSvc.cxx.
560 if ( 0 != pAddress || ignore_add ) {
561 if ( 0 != pObject || ignore_obj ) {
562 const CLID& obj_class =
563 (0 != pObject && !ignore_obj) ? pObject->clID()
564 : (0 != pAddress && !ignore_add)
568 if ( !cnv && pObject ) {
578 status = cnv->createObj(pAddress, pObject);
581 status = cnv->fillObjRefs(pAddress, pObject);
584 status = cnv->updateObj(pAddress, pObject);
587 status = cnv->updateObjRefs(pAddress, pObject);
590 status = cnv->createRep(pObject, pAddress);
593 status = cnv->fillRepRefs(pAddress, pObject);
596 status = cnv->updateRep(pAddress, pObject);
599 status = cnv->updateRepRefs(pAddress, pObject);
602 status = StatusCode::FAILURE;
611 msg(MSG::INFO) <<
"No converter for object ";
612 if ( pObject != 0 ) {
613 msg(MSG::INFO) << System::typeinfoName(
typeid(*pObject));
615 msg(MSG::INFO) <<
" CLID= " << obj_class <<
endmsg;
616 return Status::NO_CONVERTER;
618 return Status::INVALID_OBJECT;
620 return Status::INVALID_ADDRESS;
◆ makeClient()
StatusCode AthenaPoolCnvSvc::makeClient |
( |
int |
num | ) |
|
|
virtual |
Make this a client.
Implements IDataShare.
Definition at line 1084 of file AthenaPoolCnvSvc.cxx.
1087 std::string streamPortSuffix;
1090 return(StatusCode::FAILURE);
1093 ATH_MSG_DEBUG(
"makeClient: Setting conversion service port suffix to " << streamPortSuffix);
1098 return(StatusCode::SUCCESS);
1101 std::string dummyStr;
◆ makeServer()
StatusCode AthenaPoolCnvSvc::makeServer |
( |
int |
num | ) |
|
|
virtual |
Make this a server.
Implements IDataShare.
Definition at line 1058 of file AthenaPoolCnvSvc.cxx.
1069 return(StatusCode::FAILURE);
1073 return(StatusCode::SUCCESS);
1075 return(StatusCode::RECOVERABLE);
1078 return(StatusCode::RECOVERABLE);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ objType()
◆ 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 1278 of file AthenaPoolCnvSvc.cxx.
1284 bool retError =
false;
1286 for (std::vector<std::vector<std::string> >::
iterator iter = attr.begin(), last = attr.end();
1287 iter != last; ++iter) {
1288 if (iter->size() == 2) {
1289 const std::string&
opt = (*iter)[0];
1290 std::string
data = (*iter)[1];
1291 if (
data ==
"int" ||
data ==
"DbLonglong" ||
data ==
"double" ||
data ==
"string") {
1310 if (iter->size() == 4) {
1311 const std::string&
opt = (*iter)[0];
1312 std::string
data = (*iter)[1];
1313 const std::string&
file = (*iter)[2];
1314 const std::string& cont = (*iter)[3];
1316 || (
file[0] ==
'*' &&
file.find(
"," +
fileName +
",") == std::string::npos))) {
1317 if (
data ==
"int" ||
data ==
"DbLonglong" ||
data ==
"double" ||
data ==
"string") {
1329 (*iter)[2] +=
"," +
fileName +
",";
1342 for (std::vector<std::vector<std::string> >::
iterator iter = attr.begin(); iter != attr.end(); ) {
1343 if (iter->empty()) {
1344 iter = attr.erase(iter);
1349 return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
◆ queryInterface()
StatusCode AthenaPoolCnvSvc::queryInterface |
( |
const InterfaceID & |
riid, |
|
|
void ** |
ppvInterface |
|
) |
| |
|
virtual |
◆ readData()
StatusCode AthenaPoolCnvSvc::readData |
( |
| ) |
|
|
virtual |
Read the next data object.
Implements IDataShare.
Definition at line 1105 of file AthenaPoolCnvSvc.cxx.
1107 return(StatusCode::FAILURE);
1109 const char* tokenStr =
nullptr;
1112 if (
sc.isSuccess() && tokenStr !=
nullptr && strlen(tokenStr) > 0 &&
num > 0) {
1120 token.
fromString(tokenStr); tokenStr =
nullptr;
1122 std::string objName =
"ALL";
1132 std::size_t nbytes = 0;
1135 while (
sc.isRecoverable()) {
1138 delete []
static_cast<char*
>(
buffer);
buffer =
nullptr;
1139 if (!
sc.isSuccess()) {
1141 return(StatusCode::FAILURE);
1146 return(StatusCode::FAILURE);
1151 return(StatusCode::FAILURE);
1154 std::string returnToken;
1156 if (metadataToken !=
nullptr) {
1157 returnToken = metadataToken->
toString();
1161 delete metadataToken; metadataToken =
nullptr;
1166 return(StatusCode::FAILURE);
1169 return(StatusCode::RECOVERABLE);
1171 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. |
Implements IAthenaPoolCnvSvc.
Definition at line 710 of file AthenaPoolCnvSvc.cxx.
715 ATH_MSG_ERROR(
"Could not make AthenaPoolCnvSvc a Share Client");
719 Token* token =
nullptr;
723 std::string placementStr = placement->
toString();
724 placementStr +=
"[PNAME=";
725 placementStr += classDesc.
Name();
729 while (
sc.isRecoverable()) {
733 if (!
sc.isSuccess()) {
738 const void*
buffer =
nullptr;
739 std::size_t nbytes = 0;
741 if (classDesc.
Name() ==
"Token") {
742 nbytes = strlen(
static_cast<const char*
>(
obj)) + 1;
746 nbytes = classDesc.
SizeOf();
754 while (
sc.isRecoverable()) {
758 if (own) {
delete []
static_cast<const char*
>(
buffer); }
760 if (!
sc.isSuccess()) {
761 ATH_MSG_ERROR(
"Could not share object for: " << placementStr);
767 ATH_MSG_ERROR(
"Could not share dynamic aux store for: " << placementStr);
776 const char* tokenStr =
nullptr;
779 while (
sc.isRecoverable()) {
783 if (!
sc.isSuccess()) {
787 if (!strcmp(tokenStr,
"ABORT")) {
794 tempToken->
fromString(tokenStr); tokenStr =
nullptr;
796 token = tempToken; tempToken =
nullptr;
800 ATH_MSG_DEBUG(
"registerForWrite SKIPPED for uninitialized server, Placement = " << placement->
toString());
803 token = tempToken; tempToken =
nullptr;
806 token =
m_poolSvc->registerForWrite(placement,
obj, classDesc);
816 token =
m_poolSvc->registerForWrite(placement,
obj, classDesc);
◆ removeConverter()
StatusCode AthCnvSvc::removeConverter |
( |
const CLID & |
clid | ) |
|
|
virtualinherited |
Remove converter object from conversion service (if present).
Definition at line 379 of file AthCnvSvc.cxx.
383 worker->second.converter()->finalize().ignore();
384 worker->second.converter()->release();
387 return StatusCode::SUCCESS;
389 return Status::NO_CONVERTER;
◆ repSvcType()
long AthCnvSvc::repSvcType |
( |
| ) |
const |
|
virtualinherited |
Retrieve the class type of the data store the converter uses.
Definition at line 172 of file AthCnvSvc.cxx.
◆ setAddressCreator()
StatusCode AthCnvSvc::setAddressCreator |
( |
IAddressCreator * |
creator | ) |
|
|
virtualinherited |
Set address creator facility.
Definition at line 243 of file AthCnvSvc.cxx.
249 IConverter* cnv =
i->second.converter();
256 return StatusCode::SUCCESS;
◆ setConversionSvc()
StatusCode AthCnvSvc::setConversionSvc |
( |
IConversionSvc * |
svc | ) |
|
|
virtualinherited |
Implementation of IConverter: Set conversion service the converter is connected to.
Definition at line 224 of file AthCnvSvc.cxx.
226 return StatusCode::FAILURE;
◆ setDataProvider()
StatusCode AthCnvSvc::setDataProvider |
( |
IDataProviderSvc * |
pDataSvc | ) |
|
|
virtualinherited |
Implementation of IConverter: Set Data provider service.
- Returns
- Status code indicating success or failure
- Parameters
-
pService | Pointer to data provider service |
Definition at line 189 of file AthCnvSvc.cxx.
191 if ( !pDataSvc )
return StatusCode::SUCCESS;
198 IConverter* cnv =
i->second.converter();
200 if (cnv->setDataProvider(
m_dataSvc).isFailure()) {
205 return StatusCode::SUCCESS;
◆ setInputAttributes()
StatusCode AthenaPoolCnvSvc::setInputAttributes |
( |
const std::string & |
fileName | ) |
|
|
virtual |
Set the input file attributes, if any are requested from jobOpts.
- Parameters
-
fileName | [IN] name of the input file |
Implements IAthenaPoolCnvSvc.
Definition at line 1037 of file AthenaPoolCnvSvc.cxx.
1041 ATH_MSG_DEBUG(
"setInputAttribute failed setting POOL database/container attributes.");
1044 ATH_MSG_DEBUG(
"setInputAttribute failed getting POOL database/container attributes.");
1048 const auto& extraInputContextMap =
m_poolSvc->getInputContextMap();
1049 for (
const auto& [
label,
id]: extraInputContextMap) {
1051 ATH_MSG_DEBUG(
"setInputAttribute failed to switch off TTreeCache for = " <<
label <<
".");
1055 return(StatusCode::SUCCESS);
◆ setObjPtr()
void AthenaPoolCnvSvc::setObjPtr |
( |
void *& |
obj, |
|
|
const Token * |
token |
|
) |
| |
|
virtual |
- Parameters
-
obj | [OUT] pointer to the Data Object. |
token | [IN] string token of the Data Object for which a Pool Ref is filled. |
Implements IAthenaPoolCnvSvc.
Definition at line 822 of file AthenaPoolCnvSvc.cxx.
828 ATH_MSG_ERROR(
"Could not make AthenaPoolCnvSvc a Share Client");
833 int num = token->
oid().first;
836 std::size_t nbytes = 0;
838 while (
sc.isRecoverable()) {
842 if (!
sc.isSuccess()) {
873 std::size_t nbytes = 0;
879 while (
sc.isRecoverable()) {
884 if (!
sc.isSuccess()) {
◆ updateObj()
StatusCode AthCnvSvc::updateObj |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
refpObject |
|
) |
| |
|
virtualinherited |
◆ updateObjRefs()
StatusCode AthCnvSvc::updateObjRefs |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
pObject |
|
) |
| |
|
virtualinherited |
◆ updateRep()
StatusCode AthCnvSvc::updateRep |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
pObject |
|
) |
| |
|
virtualinherited |
◆ updateRepRefs()
StatusCode AthCnvSvc::updateRepRefs |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
pObject |
|
) |
| |
|
virtualinherited |
◆ updateServiceState()
StatusCode AthCnvSvc::updateServiceState |
( |
IOpaqueAddress * |
pAddress | ) |
|
|
virtualinherited |
◆ useDetailChronoStat()
bool AthenaPoolCnvSvc::useDetailChronoStat |
( |
| ) |
const |
|
virtual |
◆ SvcFactory< AthenaPoolCnvSvc >
◆ m_addressCreator
SmartIF<IAddressCreator> AthCnvSvc::m_addressCreator |
|
protectedinherited |
Pointer to the address creation service interface.
Definition at line 315 of file AthCnvSvc.h.
◆ m_branchNameHintProp
StringProperty AthenaPoolCnvSvc::m_branchNameHintProp {this,"SubLevelBranchName", "<type>/<key>"} |
|
private |
SubLevelBranchName, naming hint policy for POOL branching: ("" = no branching)
Definition at line 216 of file AthenaPoolCnvSvc.h.
◆ m_chronoMap
◆ m_clidSvc
◆ m_cnvs
◆ m_cnvSvc
SmartIF<IConversionSvc> AthCnvSvc::m_cnvSvc |
|
protectedinherited |
Pointer to the IConversionSvc interface of this.
Definition at line 317 of file AthCnvSvc.h.
◆ 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 214 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_conv_mut
◆ 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_dataSvc
SmartIF<IDataProviderSvc> AthCnvSvc::m_dataSvc |
|
protectedinherited |
Pointer to data provider service.
Definition at line 313 of file AthCnvSvc.h.
◆ m_dbType
decoded storage tech requested in "StorageTechnology" property
Definition at line 190 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 227 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 231 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 255 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 251 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 263 of file AthenaPoolCnvSvc.h.
◆ 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 246 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 241 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 219 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_type
◆ 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 206 of file AthenaPoolCnvSvc.h.
◆ m_workers
List of conversion workers.
Definition at line 321 of file AthCnvSvc.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
StatusCode makeCall(int typ, bool ignore_add, bool ignore_obj, bool update, IOpaqueAddress *&pAddress, DataObject *&pObject)
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.
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
virtual StatusCode removeConverter(const CLID &clid)
Remove converter object from conversion service (if present).
Token * registerForWrite(Placement *placement, const void *obj, const RootType &classDesc)
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...
virtual StatusCode activateConverter(long typ, const CLID &clid, IConverter *cnv)
Activate the new converter after initialization.
virtual StatusCode updateServiceState(IOpaqueAddress *pAddress)
Update state of the service.
long long m_domainMaxFileSize
const std::string & auxString() const
Access auxiliary string.
std::vector< std::vector< std::string > > m_inputAttrPerEvent
const Guid & dbID() const
Access database identifier.
SmartIF< IAddressCreator > m_addressCreator
Pointer to the address creation service interface.
std::vector< std::vector< std::string > > m_databaseAttr
PMonUtils::BasicStopWatchResultMap_t m_chronoMap
Map that holds chrono information.
StatusCode decodeOutputSpec(std::string &connectionSpec, int &outputTech) const
Extract/deduce the DB technology from the connection string/file specification.
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.
AthCnvSvc()
Default constructor:
const Guid & classID() const
Access database identifier.
#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.
std::map< std::string, int > m_fileFlushSetting
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.
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.
virtual StatusCode configureConverter(long typ, const CLID &clid, IConverter *cnv)
Configure the new converter before initialize is called.
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 connectOutput(const std::string &outputConnectionSpec, const std::string &openMode)
Implementation of IConversionSvc: Connect to the output connection specification with open mode.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Implementation of IConverter: Convert the transient object to the requested representation.
IntegerProperty m_makeStreamingToolClient
Make this instance a Streaming Client during first connect/write automatically.
Default, invalid implementation of ClassID_traits.
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject)
Implementation of IConverter: Create the transient representation of an object.
std::vector< std::vector< std::string > > m_inputAttr
std::map< std::string, long long > m_databaseMaxFileSize
SmartIF< IConversionSvc > m_cnvSvc
Pointer to the IConversionSvc interface of this.
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.
static const InterfaceID & interfaceID()
Retrieve interface ID.
AthROOTErrorHandlerSvc * svc
uint32_t CLID
The Class ID type.
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
Workers m_workers
List of conversion workers.
virtual StatusCode initializeConverter(long typ, const CLID &clid, IConverter *cnv)
Initialize the new converter.
bool m_streamServerActive
virtual StatusCode addConverter(const CLID &clid)
Add converter object to conversion service.
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)
Implementation of IConverter: Resolve the references of the converted 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.
StatusCode cleanUp(const std::string &connection)
Implement cleanUp to call all registered IAthenaPoolCleanUp cleanUp() function.
StringProperty m_streamPortString
Extension to use ROOT TMemFile for event data, "?pmerge=<host>:<port>".
virtual IConverter * createConverter(long typ, const CLID &clid, const ICnvFactory *fac)
Create new Converter using factory.
const std::string toString() const
Retrieve the string representation of the placement.
std::vector< std::vector< std::string > > m_domainAttr
void setObjPtr(void *&obj, const Token *token)
virtual IConverter * converter(const CLID &wanted)
Retrieve converter from list.
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.
StringArrayProperty m_poolAttr
Output PoolAttributes, vector with names and values of technology specific attributes for POOL.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
virtual void loadConverter(DataObject *pObject)
Load converter or dictionary needed by the converter.
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...
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to data provider service.
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
std::vector< IAthenaPoolCleanUp * > m_cnvs
BooleanProperty m_parallelCompression
Use Athena Object sharing for metadata only, event data is collected and send via ROOT TMemFile.
virtual long repSvcType() const
Retrieve the class type of the data store the converter uses.
std::string m_lastInputFileName
ServiceHandle< IAthenaSerializeSvc > m_serializeSvc
Placement & fromString(const std::string &from)
Build from the string representation of a placement.
This class provides the interface between AthenaPoolCnvSvc and AuxStore classes.
virtual StatusCode makeClient(int num)
Make this a client.
long m_type
Conversion service type.
static Guid guid(const TypeH &id)
Determine Guid (normalized string form) from reflection type.
This class provides the interface between Athena and PoolSvc.