This class provides an example for writing event data objects to Pool.  
 More...
#include <AthenaRootSharedWriterSvc.h>
This class provides an example for writing event data objects to Pool. 
Definition at line 25 of file AthenaRootSharedWriterSvc.h.
◆ AthenaRootSharedWriterSvc()
      
        
          | AthenaRootSharedWriterSvc::AthenaRootSharedWriterSvc | ( | const std::string & | name, | 
        
          |  |  | ISvcLocator * | pSvcLocator | 
        
          |  | ) |  |  | 
      
 
 
◆ ~AthenaRootSharedWriterSvc()
  
  | 
        
          | virtual AthenaRootSharedWriterSvc::~AthenaRootSharedWriterSvc | ( |  | ) |  |  | virtualdefault | 
 
 
◆ finalize()
  
  | 
        
          | StatusCode AthenaRootSharedWriterSvc::finalize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ initialize()
  
  | 
        
          | StatusCode AthenaRootSharedWriterSvc::initialize | ( |  | ) |  |  | overridevirtual | 
 
Gaudi Service Interface method implementations: 
Definition at line 162 of file AthenaRootSharedWriterSvc.cxx.
  167    IProperty* propertyServer = 
dynamic_cast<IProperty*
>(
m_cnvSvc.get());
 
  168    if (propertyServer == 
nullptr) {
 
  169       ATH_MSG_ERROR(
"Unable to cast conversion service to IProperty");
 
  170       return StatusCode::FAILURE;
 
  172       std::string propertyName = 
"ParallelCompression";
 
  173       bool parallelCompression(
false);
 
  174       BooleanProperty parallelCompressionProp(propertyName, parallelCompression);
 
  175       if (propertyServer->getProperty(¶llelCompressionProp).isFailure()) {
 
  176          ATH_MSG_INFO(
"Conversion service does not have ParallelCompression property");
 
  177       } 
else if (parallelCompressionProp.value()) {
 
  179          propertyName = 
"StreamPortString";
 
  180          std::string streamPortString(
"");
 
  181          StringProperty streamPortStringProp(propertyName, streamPortString);
 
  182          if (propertyServer->getProperty(&streamPortStringProp).isFailure()) {
 
  183             ATH_MSG_INFO(
"Conversion service does not have StreamPortString property, using default: " << streamPort);
 
  185             streamPort = 
atoi(streamPortStringProp.value().substr(streamPortStringProp.value().find(
':') + 1).c_str());
 
  187          m_rootServerSocket = 
new TServerSocket(streamPort, (streamPort == 0 ? 
false : 
true), 100, -1, ESocketBindOption::kInaddrLoopback);
 
  189             ATH_MSG_FATAL(
"Could not create ROOT TServerSocket: " << streamPort);
 
  190             return StatusCode::FAILURE;
 
  193          const std::string newStreamPortString{streamPortStringProp.value().substr(0,streamPortStringProp.value().find(
':')+1) + 
std::to_string(streamPort)};
 
  194          if (propertyServer->setProperty(propertyName,newStreamPortString).isFailure()) {
 
  195             ATH_MSG_FATAL(
"Could not set Conversion Service property " << propertyName << 
" from " << streamPortString << 
" to " << newStreamPortString);
 
  196             return StatusCode::FAILURE;
 
  200          ATH_MSG_DEBUG(
"Successfully created ROOT TServerSocket and added it to TMonitor: ready to accept connections, " << streamPort);
 
  204    const IAlgManager* algMgr = Gaudi::svcLocator()->as<IAlgManager>();
 
  205    for (
const auto& 
alg : algMgr->getAlgorithms()) {
 
  206       if (
alg->type() == 
"AthenaOutputStream") {
 
  207          ATH_MSG_DEBUG(
"Counting " << 
alg->name() << 
" as an output stream algorithm");
 
  212       ATH_MSG_WARNING(
"No output stream algorithm found, setting the number of streams to 1");
 
  218    return StatusCode::SUCCESS;
 
 
 
 
◆ share()
  
  | 
        
          | StatusCode AthenaRootSharedWriterSvc::share | ( | int | numClients = 0, |  
          |  |  | bool | motherClient = false |  
          |  | ) |  |  |  | overridevirtual | 
 
Definition at line 221 of file AthenaRootSharedWriterSvc.cxx.
  228    while (
sc.isSuccess() || 
sc.isRecoverable() || anyActiveClients) {
 
  229       if (
sc.isSuccess()) {
 
  233          if (socket != 
nullptr && socket != (TSocket*)-1) {
 
  235             if (socket->IsA() == TServerSocket::Class()) {
 
  236                TSocket* 
client = (
static_cast<TServerSocket*
>(socket))->Accept();
 
  253                   ATH_MSG_ERROR(
"ROOT Monitor got an error while receiving the message from the socket: " << 
result);
 
  254                   return StatusCode::FAILURE;
 
  257                   ATH_MSG_WARNING(
"ROOT Monitor got no message from socket: " << socket);
 
  258                } 
else if (
message->What() == kMESS_STRING) {
 
  263                   ATH_MSG_DEBUG(
"ROOT Monitor client: " << socket << 
", " << socket->GetBytesRecv() << 
", " << socket->GetBytesSent());
 
  268                         anyActiveClients = 
false;
 
  269                         ATH_MSG_INFO(
"ROOT Monitor: No more active clients...");
 
  271                         motherClient = 
false;
 
  272                         ATH_MSG_INFO(
"ROOT Monitor: Mother process is done...");
 
  273                         if (!
m_cnvSvc->commitCatalog().isSuccess()) {
 
  275                            return StatusCode::FAILURE;
 
  279                } 
else if (
message->What() == kMESS_ANY) {
 
  295                   info->MergeTrees(
transient.
get());
 
  304       if (
sc.isSuccess() || 
sc.isRecoverable()) {
 
  306          if (
sc.isFailure() && !
sc.isRecoverable()) {
 
  309               ATH_MSG_INFO(
"ROOT Monitor: No clients, terminating the loop...");
 
  310               anyActiveClients = 
false;
 
  316    return StatusCode::SUCCESS;
 
 
 
 
◆ stop()
  
  | 
        
          | StatusCode AthenaRootSharedWriterSvc::stop | ( |  | ) |  |  | overridevirtual | 
 
 
◆ SvcFactory< AthenaRootSharedWriterSvc >
◆ m_cnvSvc
◆ m_numberOfStreams
  
  | 
        
          | int AthenaRootSharedWriterSvc::m_numberOfStreams |  | private | 
 
 
◆ m_rootClientCount
  
  | 
        
          | int AthenaRootSharedWriterSvc::m_rootClientCount |  | private | 
 
 
◆ m_rootClientIndex
  
  | 
        
          | int AthenaRootSharedWriterSvc::m_rootClientIndex |  | private | 
 
 
◆ m_rootMergers
  
  | 
        
          | THashTable AthenaRootSharedWriterSvc::m_rootMergers |  | private | 
 
 
◆ m_rootMonitor
  
  | 
        
          | TMonitor* AthenaRootSharedWriterSvc::m_rootMonitor |  | private | 
 
 
◆ m_rootServerSocket
  
  | 
        
          | TServerSocket* AthenaRootSharedWriterSvc::m_rootServerSocket |  | private | 
 
 
The documentation for this class was generated from the following files: