162 {
164
165
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;
171 } else {
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()) {
178 int streamPort = 0;
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);
184 } else {
185 streamPort =
atoi(streamPortStringProp.value().substr(streamPortStringProp.value().find(
':') + 1).c_str());
186 }
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;
191 }
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;
197 }
200 ATH_MSG_DEBUG(
"Successfully created ROOT TServerSocket and added it to TMonitor: ready to accept connections, " << streamPort);
201 }
202 }
203
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");
209 }
210 }
212 ATH_MSG_WARNING(
"No output stream algorithm found, setting the number of streams to 1");
214 } else {
216 }
217
218 return StatusCode::SUCCESS;
219}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
ServiceHandle< AthenaPoolSharedIOCnvSvc > m_cnvSvc
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...