5#include <GaudiKernel/StatusCode.h>
6#include <GaudiKernel/IMessageSvc.h>
7#include <GaudiKernel/MsgStream.h>
26 m_name(
"GlobAlign::IPCMat"),
48 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__ <<
" Error number is " << errno <<
endmsg;
49 return StatusCode::FAILURE;
52 return StatusCode::SUCCESS;
66 if (
m_log->level()>=MSG::DEBUG)
67 *
m_log << MSG::DEBUG <<
"call number " << std::setw(8) <<
m_ncalls
71 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__
72 <<
" Error number is " << errno <<
endmsg;
73 return StatusCode::FAILURE;
77 return StatusCode::SUCCESS;
85 if (
m_log->level()>=MSG::INFO)
86 *
m_log << MSG::INFO <<
"in ipcmat_scaleMat with scale=" << scale <<
endmsg;
92 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__
93 <<
" Error number is " << errno <<
endmsg;
94 return StatusCode::FAILURE;
97 return StatusCode::SUCCESS;
105 if (
m_log->level()>=MSG::INFO)
106 *
m_log << MSG::INFO <<
"in ipcmat_scaleVec with scale=" << scale <<
endmsg;
112 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__ <<
" Error number is " << errno <<
endmsg;
113 return StatusCode::FAILURE;
116 return StatusCode::SUCCESS;
124 if (
m_log->level()>=MSG::INFO)
125 *
m_log << MSG::INFO <<
"in ipcmat_resize" <<
endmsg;
131 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__ <<
" Error number is " << errno <<
endmsg;
132 return StatusCode::FAILURE;
135 return StatusCode::SUCCESS;
148 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__
149 <<
" Error number is " << errno <<
endmsg;
150 return StatusCode::FAILURE;
153 return StatusCode::SUCCESS;
166 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__
167 <<
" Error number is " << errno <<
endmsg;
168 return StatusCode::FAILURE;
171 return StatusCode::SUCCESS;
179 if (
m_log->level()>=MSG::INFO) {
180 *
m_log << MSG::INFO;
m_log->setColor(MSG::BLUE);
186 if ((key = ftok(
"/dev/null", 69)) == -1) {
187 *
m_log << MSG::ERROR <<
"Unable to get key" <<
endmsg;
188 return StatusCode::FAILURE;
191 if (
m_log->level()>=MSG::INFO)
192 *
m_log << MSG::INFO <<
"Got key " << key <<
endmsg;
196 msgctl(
m_msgid, IPC_RMID,
nullptr);
198 m_msgid = msgget(key, IPC_CREAT | 0666);
200 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__ <<
" key: " << key
201 <<
" Error number is " << errno <<
endmsg;
202 return StatusCode::FAILURE;
204 if (
m_log->level()>=MSG::INFO)
210 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__ <<
" key: " << key
211 <<
" Error number is " << errno <<
endmsg;
212 return StatusCode::FAILURE;
214 if (
m_log->level()>=MSG::INFO)
221 if (execlp(
"ipcmatr",
"", NULL) < 0)
223 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__ <<
" key: " << key
224 <<
" Error number is " << errno <<
endmsg;
225 return StatusCode::FAILURE;
232 return StatusCode::SUCCESS;
240 if (
m_log->level()>=MSG::INFO) {
241 *
m_log << MSG::INFO;
m_log->setColor(MSG::BLUE);
249 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__
250 <<
" Error number is " << errno <<
endmsg;
251 return StatusCode::FAILURE;
254 return StatusCode::SUCCESS;
262 if (
m_log->level()>=MSG::INFO)
263 *
m_log << MSG::INFO <<
"setting m_scale to : " << scale <<
endmsg;
269 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__
270 <<
" Error number is " << errno <<
endmsg;
271 return StatusCode::FAILURE;
274 return StatusCode::SUCCESS;
286 std::string mType = isMatrix ?
"MatVersion" :
"VecVersion";
287 if (
m_log->level()>=MSG::INFO)
288 *
m_log << MSG::INFO <<
"setting " << mType <<
" to = " << version <<
endmsg;
292 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__
293 <<
" Error number is " << errno <<
endmsg;
294 return StatusCode::FAILURE;
297 return StatusCode::SUCCESS;
305 if (
m_log->level()>=MSG::INFO)
306 *
m_log << MSG::INFO <<
"Writting ipcmat. Selected name is : " << ipcname
314 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__
315 <<
" Error number is " << errno <<
endmsg;
316 return StatusCode::FAILURE;
318 return StatusCode::SUCCESS;
329 *
m_log << MSG::ERROR <<
"ipcmats: line: " << __LINE__
330 <<
" Error number is " << errno <<
endmsg;
331 return StatusCode::FAILURE;
336 return StatusCode::SUCCESS;
345 if (
m_log->level()>=MSG::INFO) {
346 *
m_log << MSG::INFO <<
"++++++++++++++++++++++++++++++++++++++++" <<
endmsg;
348 *
m_log << MSG::INFO <<
"++++++++++++++++++++++++++++++++++++++++" <<
endmsg;
StatusCode removeModule(int)
const std::string & name() const
StatusCode incVec(uint32_t, double)
struct Trk::IPCMat::MsgBuf m_ipcmat_msgp
StatusCode incMat(uint32_t, uint32_t, double)
StatusCode setVersion(float, bool)
StatusCode removeAlignPar(int)
StatusCode write(const std::string &, bool)
Ensure that the ATLAS eigen extensions are properly loaded.