155 {
157
158
160 IProperty* propertyServer =
dynamic_cast<IProperty*
>(
m_cnvSvc.get());
161 if (propertyServer == nullptr) {
162 ATH_MSG_ERROR(
"Unable to cast conversion service to IProperty");
163 return StatusCode::FAILURE;
164 } else {
165 std::string propertyName = "ParallelCompression";
166 bool parallelCompression(false);
167 BooleanProperty parallelCompressionProp(propertyName, parallelCompression);
168 if (propertyServer->getProperty(¶llelCompressionProp).isFailure()) {
169 ATH_MSG_INFO(
"Conversion service does not have ParallelCompression property");
170 } else if (parallelCompressionProp.value()) {
171 int streamPort = 0;
172 propertyName = "StreamPortString";
173 std::string streamPortString("");
174 StringProperty streamPortStringProp(propertyName, streamPortString);
175 if (propertyServer->getProperty(&streamPortStringProp).isFailure()) {
176 ATH_MSG_INFO(
"Conversion service does not have StreamPortString property, using default: " << streamPort);
177 } else {
178 streamPort =
atoi(streamPortStringProp.value().substr(streamPortStringProp.value().find(
':') + 1).c_str());
179 }
180 m_rootServerSocket =
new TServerSocket(streamPort, (streamPort == 0 ?
false :
true), 100, -1, ESocketBindOption::kInaddrLoopback);
182 ATH_MSG_FATAL(
"Could not create ROOT TServerSocket: " << streamPort);
183 return StatusCode::FAILURE;
184 }
186 const std::string newStreamPortString{streamPortStringProp.value().substr(0,streamPortStringProp.value().find(':')+1) + std::to_string(streamPort)};
187 if (propertyServer->setProperty(propertyName,newStreamPortString).isFailure()) {
188 ATH_MSG_FATAL(
"Could not set Conversion Service property " << propertyName <<
" from " << streamPortString <<
" to " << newStreamPortString);
189 return StatusCode::FAILURE;
190 }
193 ATH_MSG_DEBUG(
"Successfully created ROOT TServerSocket and added it to TMonitor: ready to accept connections, " << streamPort);
194 }
195 }
196
197 const IAlgManager* algMgr = Gaudi::svcLocator()->as<IAlgManager>();
198 for (const auto& alg : algMgr->getAlgorithms()) {
199 if (
alg->type() ==
"AthenaOutputStream") {
200 ATH_MSG_DEBUG(
"Counting " <<
alg->name() <<
" as an output stream algorithm");
202 }
203 }
205 ATH_MSG_WARNING(
"No output stream algorithm found, setting the number of streams to 1");
207 } else {
209 }
210
211 return StatusCode::SUCCESS;
212}
#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...