ATLAS Offline Software
Loading...
Searching...
No Matches
IPCMatrixTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// IPCMatrixTool.cxx
6
7// AlgTool for creating big matrix and vector, manipulation of entries, and
8// solving for alignment parameters
9// Robert Harrington, started 1/5/08 based on SiGlobalChi2Align
10
11#include "GaudiKernel/StatusCode.h"
12#include "GaudiKernel/MsgStream.h"
13#include "GaudiKernel/AlgTool.h"
14
16
18
19#include <string>
20
21namespace Trk {
22
23 //_______________________________________________________________________
24 IPCMatrixTool::IPCMatrixTool(const std::string& type, const std::string& name,
25 const IInterface* parent)
26 : AthAlgTool(type,name,parent)
27 {
28 declareInterface<IMatrixTool>(this);
29
30 m_logStream = nullptr;
31 }
32
33 //_______________________________________________________________________
35 {
36 if (nullptr!=m_ipcmat) delete m_ipcmat;
37 m_ipcmat = nullptr;
38
39 }
40
41 //_______________________________________________________________________
43 {
44 msg(MSG::DEBUG) << "initialize() of IPCMatrixTool" << endmsg;
45
46 return StatusCode::SUCCESS;
47 }
48
49 //_______________________________________________________________________
51 {
52 msg(MSG::DEBUG) << "finalize() of IPCMatrixTool" << endmsg;
53
54 return StatusCode::SUCCESS;
55 }
56
57 //_______________________________________________________________________
58 StatusCode IPCMatrixTool::allocateMatrix(int nDoF)
59 {
60
61 if (nullptr!=m_ipcmat) ATH_MSG_ERROR("IPCMat already exists!");
62 m_ipcmat = new IPCMat(msgSvc());
63
64 if (m_ipcmat->init()!=StatusCode::SUCCESS) {
65 ATH_MSG_ERROR("Failed to initialize ipcmat ");
66 return StatusCode::FAILURE;
67 } else
68 ATH_MSG_INFO("Success allocating ipcmatrix");
69
70 if (m_ipcmat->allocate(nDoF)!=StatusCode::SUCCESS) {
71 ATH_MSG_ERROR("Failed to allocate matrix of size " << nDoF);
72 return StatusCode::FAILURE;
73 } else
74 ATH_MSG_INFO("Success allocating ipcvector");
75
76 return StatusCode::SUCCESS;
77 }
78
79 //_______________________________________________________________________
81 {
82
83 }
84
85 //_______________________________________________________________________
87 {
88
89 return false;
90 }
91
92 //_______________________________________________________________________
94 {
95
96 return -1;
97 }
98
99 //_______________________________________________________________________
103
104 //________________________________________________________________________
108
109 //________________________________________________________________________
110 void IPCMatrixTool::addFirstDerivatives(std::list<int,double>& )
111 {
112 }
113
114 //________________________________________________________________________
115 void IPCMatrixTool::addSecondDerivatives(std::list<std::pair<int,int>,double> & )
116 {
117 }
118
119} // end of namespace
#define endmsg
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
MsgStream & msg() const
contains the base implementation for handling symmertic matrices
std::ostream * m_logStream
logfile output stream
Definition IMatrixTool.h:98
void addSecondDerivatives(AlSymMatBase *matrix)
adds second derivatives to matrix
StatusCode initialize()
initialize
IPCMatrixTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
void addFirstDerivatives(AlVec *vector)
adds first derivative to vector
bool accumulateFromFiles()
accumulates from files
void prepareBinaryFiles(int solveOption)
reads/writes matrix entries from/to binary files as necessary
virtual ~IPCMatrixTool()
Virtual destructor.
int solve()
solves for alignment parameters
IPCMat * m_ipcmat
Pointer to IPCMat, used for parallel processing.
StatusCode allocateMatrix(int nDoF)
allocates memory for IPC matrix and vector
StatusCode finalize()
initialize
Ensure that the ATLAS eigen extensions are properly loaded.