ATLAS Offline Software
Loading...
Searching...
No Matches
IPCMat.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKALGS_IPCMAT_H
6#define TRKALGS_IPCMAT_H
7
8#include <sys/types.h>
9#include <sys/ipc.h>
10#include <sys/msg.h>
11#include <sys/wait.h>
12#include <errno.h>
13#include <stdint.h>
14#include <unistd.h>
15#include <string>
16
17#define M_ALLOCATE 1
18#define M_INCR_M 2
19#define M_INCR_V 3
20#define M_SCALE_M 4
21#define M_SCALE_V 5
22#define M_WRITE_M 6
23#define M_WRITE_V 7
24#define M_RESIZE 8
25#define M_REMOVE_MOD 9
26#define M_REMOVE_PAR 10
27#define M_SETSCALE 12
28#define M_SETVERSION 13
29#define M_END 255
30
31class StatusCode;
32class IMessageSvc;
33
34namespace Trk {
35
37class IPCMat {
39
40 public:
41 IPCMat(IMessageSvc *msgSvc);
43
44 IPCMat(const IPCMat&) = delete;
45 IPCMat& operator= (const IPCMat&) = delete;
46
47 StatusCode init(void);
48 StatusCode allocate(int);
49 StatusCode write(const std::string&,bool);
50 StatusCode end();
51 StatusCode incMat(uint32_t,uint32_t,double);
52 StatusCode incVec(uint32_t,double);
53 StatusCode scaleMat(int);
54 StatusCode scaleVec(int);
55 StatusCode setScale(int);
56 StatusCode setVersion(float,bool);
57 StatusCode reSize(int);
58 StatusCode removeModule(int);
59 StatusCode removeAlignPar(int);
60
61 void summary();
62
63 private:
64 IPCMat(); // don't allow constructor without MessageSvc
65
66 const std::string &name() const;
67
68 private:
69 IMessageSvc *m_msgSvc{};
70 int m_ncalls{};
71 int m_msgid{};
72 std::string m_name;
73 MsgStream* m_log{};
75
76 struct MsgBuf {
77 long mtype;
78 MsgBuf(): mtype(255), data{} {}
79 union
80 {
81 char fname[100];
82 uint32_t n;
83 double scale;
84 float version;
85 struct
86 {
87 uint32_t i;
88 uint32_t j;
89 double v;
93
94
95};
96
97} // end namespace Trk
98
99#endif // TRKALGS_IPCMAT_H
int32_t pid_t
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
IPCMat(IMessageSvc *msgSvc)
Definition IPCMat.cxx:22
StatusCode removeModule(int)
Definition IPCMat.cxx:141
StatusCode reSize(int)
Definition IPCMat.cxx:122
const std::string & name() const
Definition IPCMat.cxx:32
StatusCode allocate(int)
Definition IPCMat.cxx:238
StatusCode incVec(uint32_t, double)
Definition IPCMat.cxx:58
std::string m_name
Definition IPCMat.h:72
struct Trk::IPCMat::MsgBuf m_ipcmat_msgp
IPCMat(const IPCMat &)=delete
StatusCode incMat(uint32_t, uint32_t, double)
Definition IPCMat.cxx:39
StatusCode setScale(int)
Definition IPCMat.cxx:260
MsgStream * m_log
Definition IPCMat.h:73
StatusCode setVersion(float, bool)
Definition IPCMat.cxx:280
StatusCode scaleVec(int)
Definition IPCMat.cxx:103
StatusCode end()
Definition IPCMat.cxx:324
int m_msgid
Definition IPCMat.h:71
StatusCode removeAlignPar(int)
Definition IPCMat.cxx:159
pid_t m_ipcmat_pid
Definition IPCMat.h:74
void summary()
Definition IPCMat.cxx:342
StatusCode write(const std::string &, bool)
Definition IPCMat.cxx:303
int m_ncalls
Definition IPCMat.h:70
IMessageSvc * m_msgSvc
Definition IPCMat.h:69
StatusCode scaleMat(int)
Definition IPCMat.cxx:83
StatusCode init(void)
Definition IPCMat.cxx:177
IPCMat & operator=(const IPCMat &)=delete
Ensure that the ATLAS eigen extensions are properly loaded.
union Trk::IPCMat::MsgBuf::@152150164234014246203131006240254115021165037330 data
char fname[100]
Definition IPCMat.h:81
struct Trk::IPCMat::MsgBuf::@152150164234014246203131006240254115021165037330::@361344310034076064130012046267226370234323343132 matrix