CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions
AlignmentIORoot Class Reference

#include <AlignmentIORoot.h>

Inheritance diagram for AlignmentIORoot:
AlignmentIO

Public Member Functions

AlignablePositions readAlignableAbsolutePositions (const align::Alignables &alivec, const char *filename, int iter, int &ierr) override
 read Alignable current absolute positions More...
 
AlignablePositions readAlignableOriginalPositions (const align::Alignables &alivec, const char *filename, int iter, int &ierr) override
 read Alignable original (before misalignment) absolute positions More...
 
AlignableShifts readAlignableRelativePositions (const align::Alignables &alivec, const char *filename, int iter, int &ierr) override
 read Alignable relative positions (shift,rotation) More...
 
align::Parameters readAlignmentParameters (const align::Alignables &alivec, const char *filename, int iter, int &ierr) override
 read AlignmentParameters More...
 
align::Correlations readCorrelations (const align::Alignables &alivec, const char *filename, int iter, int &ierr) override
 read Correlations More...
 
void writeAlignableAbsolutePositions (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr) override
 write Alignable current absolute positions More...
 
void writeAlignableOriginalPositions (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr) override
 write Alignable original (before misalignment) absolute positions More...
 
void writeAlignableRelativePositions (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr) override
 write Alignable relative positions (shift,rotation) More...
 
void writeAlignmentParameters (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr) override
 write AlignmentParameters More...
 
void writeCorrelations (const align::Correlations &cormap, const char *filename, int iter, bool validCheck, int &ierr) override
 write Correlations More...
 
void writeOrigRigidBodyAlignmentParameters (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr) override
 write RigidBodyAlignmentParameters as applied on top of original positions More...
 
 ~AlignmentIORoot () override=default
 
- Public Member Functions inherited from AlignmentIO
virtual ~AlignmentIO ()=default
 

Detailed Description

concrete class for ROOT-based I/O of Alignment parameters, correlations and Alignable positions. Derived from AlignmentIO

Date
2006/11/30 09:56:03
Revision
1.3

(last update by

Author
flucke

)

Definition at line 15 of file AlignmentIORoot.h.

Constructor & Destructor Documentation

◆ ~AlignmentIORoot()

AlignmentIORoot::~AlignmentIORoot ( )
overridedefault

Member Function Documentation

◆ readAlignableAbsolutePositions()

AlignablePositions AlignmentIORoot::readAlignableAbsolutePositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
int &  ierr 
)
overridevirtual

read Alignable current absolute positions

Implements AlignmentIO.

Definition at line 170 of file AlignmentIORoot.cc.

173  {
175 
177  ierr = 0;
178  int iret;
179  iret = theIO.open(filename, iter, false);
180  if (iret != 0) {
181  ierr = -1;
182  return result;
183  }
184  result = theIO.readAbsPos(alivec, iret);
185  if (iret != 0) {
186  ierr = -2;
187  return result;
188  }
189  iret = theIO.close();
190  if (iret != 0) {
191  ierr = -3;
192  return result;
193  }
194 
195  return result;
196 }

References AlignableDataIO::Abs, AlignableDataIORoot::close(), corrVsCorr::filename, AlignableDataIORoot::open(), AlignableDataIO::readAbsPos(), and mps_fire::result.

Referenced by HIPAlignmentAlgorithm::startNewLoop().

◆ readAlignableOriginalPositions()

AlignablePositions AlignmentIORoot::readAlignableOriginalPositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
int &  ierr 
)
overridevirtual

read Alignable original (before misalignment) absolute positions

Implements AlignmentIO.

Definition at line 226 of file AlignmentIORoot.cc.

229  {
231 
233  ierr = 0;
234  int iret;
235  iret = theIO.open(filename, iter, false);
236  if (iret != 0) {
237  ierr = -1;
238  return result;
239  }
240  result = theIO.readOrgPos(alivec, iret);
241  if (iret != 0) {
242  ierr = -2;
243  return result;
244  }
245  iret = theIO.close();
246  if (iret != 0) {
247  ierr = -3;
248  return result;
249  }
250 
251  return result;
252 }

References AlignableDataIORoot::close(), corrVsCorr::filename, AlignableDataIORoot::open(), AlignableDataIO::Org, AlignableDataIO::readOrgPos(), and mps_fire::result.

◆ readAlignableRelativePositions()

AlignableShifts AlignmentIORoot::readAlignableRelativePositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
int &  ierr 
)
overridevirtual

read Alignable relative positions (shift,rotation)

Implements AlignmentIO.

Definition at line 282 of file AlignmentIORoot.cc.

285  {
287 
289  ierr = 0;
290  int iret;
291  iret = theIO.open(filename, iter, false);
292  if (iret != 0) {
293  ierr = -1;
294  return result;
295  }
296  result = theIO.readRelPos(alivec, iret);
297  if (iret != 0) {
298  ierr = -2;
299  return result;
300  }
301  iret = theIO.close();
302  if (iret != 0) {
303  ierr = -3;
304  return result;
305  }
306 
307  return result;
308 }

References AlignableDataIORoot::close(), corrVsCorr::filename, AlignableDataIORoot::open(), AlignableDataIO::readRelPos(), AlignableDataIO::Rel, and mps_fire::result.

◆ readAlignmentParameters()

align::Parameters AlignmentIORoot::readAlignmentParameters ( const align::Alignables alivec,
const char *  filename,
int  iter,
int &  ierr 
)
overridevirtual

read AlignmentParameters

Implements AlignmentIO.

Definition at line 35 of file AlignmentIORoot.cc.

38  {
40 
42  ierr = 0;
43  int iret;
44  iret = theIO.open(filename, iter, false);
45  if (iret != 0) {
46  ierr = -1;
47  return result;
48  }
49  result = theIO.read(alivec, iret);
50  if (iret != 0) {
51  ierr = -2;
52  return result;
53  }
54  iret = theIO.close();
55  if (iret != 0) {
56  ierr = -3;
57  return result;
58  }
59 
60  return result;
61 }

References AlignmentParametersIORoot::close(), corrVsCorr::filename, AlignmentParametersIORoot::open(), AlignmentParametersIO::read(), and mps_fire::result.

◆ readCorrelations()

align::Correlations AlignmentIORoot::readCorrelations ( const align::Alignables alivec,
const char *  filename,
int  iter,
int &  ierr 
)
overridevirtual

read Correlations

Implements AlignmentIO.

Definition at line 114 of file AlignmentIORoot.cc.

117  {
119 
121  ierr = 0;
122  int iret;
123  iret = theIO.open(filename, iter, false);
124  if (iret != 0) {
125  ierr = -1;
126  return result;
127  }
128  result = theIO.read(alivec, iret);
129  if (iret != 0) {
130  ierr = -2;
131  return result;
132  }
133  iret = theIO.close();
134  if (iret != 0) {
135  ierr = -3;
136  return result;
137  }
138 
139  return result;
140 }

References AlignmentCorrelationsIORoot::close(), corrVsCorr::filename, AlignmentCorrelationsIORoot::open(), AlignmentCorrelationsIORoot::read(), and mps_fire::result.

◆ writeAlignableAbsolutePositions()

void AlignmentIORoot::writeAlignableAbsolutePositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int &  ierr 
)
overridevirtual

write Alignable current absolute positions

Implements AlignmentIO.

Definition at line 145 of file AlignmentIORoot.cc.

146  {
148  ierr = 0;
149  int iret;
150  iret = theIO.open(filename, iter, true);
151  if (iret != 0) {
152  ierr = -1;
153  return;
154  }
155  iret = theIO.writeAbsPos(alivec, validCheck);
156  if (iret != 0) {
157  ierr = -2;
158  return;
159  }
160  iret = theIO.close();
161  if (iret != 0) {
162  ierr = -3;
163  return;
164  }
165 }

References AlignableDataIO::Abs, AlignableDataIORoot::close(), corrVsCorr::filename, AlignableDataIORoot::open(), and AlignableDataIO::writeAbsPos().

Referenced by MillePedeAlignmentAlgorithm::doIO(), and HIPAlignmentAlgorithm::terminate().

◆ writeAlignableOriginalPositions()

void AlignmentIORoot::writeAlignableOriginalPositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int &  ierr 
)
overridevirtual

write Alignable original (before misalignment) absolute positions

Implements AlignmentIO.

Definition at line 201 of file AlignmentIORoot.cc.

202  {
204  ierr = 0;
205  int iret;
206  iret = theIO.open(filename, iter, true);
207  if (iret != 0) {
208  ierr = -1;
209  return;
210  }
211  iret = theIO.writeOrgPos(alivec, validCheck);
212  if (iret != 0) {
213  ierr = -2;
214  return;
215  }
216  iret = theIO.close();
217  if (iret != 0) {
218  ierr = -3;
219  return;
220  }
221 }

References AlignableDataIORoot::close(), corrVsCorr::filename, AlignableDataIORoot::open(), AlignableDataIO::Org, and AlignableDataIO::writeOrgPos().

Referenced by MillePedeAlignmentAlgorithm::doIO().

◆ writeAlignableRelativePositions()

void AlignmentIORoot::writeAlignableRelativePositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int &  ierr 
)
overridevirtual

write Alignable relative positions (shift,rotation)

Implements AlignmentIO.

Definition at line 257 of file AlignmentIORoot.cc.

258  {
260  ierr = 0;
261  int iret;
262  iret = theIO.open(filename, iter, true);
263  if (iret != 0) {
264  ierr = -1;
265  return;
266  }
267  iret = theIO.writeRelPos(alivec, validCheck);
268  if (iret != 0) {
269  ierr = -2;
270  return;
271  }
272  iret = theIO.close();
273  if (iret != 0) {
274  ierr = -3;
275  return;
276  }
277 }

References AlignableDataIORoot::close(), corrVsCorr::filename, AlignableDataIORoot::open(), AlignableDataIO::Rel, and AlignableDataIO::writeRelPos().

◆ writeAlignmentParameters()

void AlignmentIORoot::writeAlignmentParameters ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int &  ierr 
)
overridevirtual

write AlignmentParameters

Implements AlignmentIO.

Definition at line 11 of file AlignmentIORoot.cc.

12  {
14  ierr = 0;
15  int iret;
16  iret = theIO.open(filename, iter, true);
17  if (iret != 0) {
18  ierr = -1;
19  return;
20  }
21  iret = theIO.write(alivec, validCheck);
22  if (iret != 0) {
23  ierr = -2;
24  return;
25  }
26  iret = theIO.close();
27  if (iret != 0) {
28  ierr = -3;
29  return;
30  }
31 }

References AlignmentParametersIORoot::close(), corrVsCorr::filename, AlignmentParametersIORoot::open(), and AlignmentParametersIO::write().

◆ writeCorrelations()

void AlignmentIORoot::writeCorrelations ( const align::Correlations cormap,
const char *  filename,
int  iter,
bool  validCheck,
int &  ierr 
)
overridevirtual

write Correlations

Implements AlignmentIO.

Definition at line 89 of file AlignmentIORoot.cc.

90  {
92  ierr = 0;
93  int iret;
94  iret = theIO.open(filename, iter, true);
95  if (iret != 0) {
96  ierr = -1;
97  return;
98  }
99  iret = theIO.write(cormap, validCheck);
100  if (iret != 0) {
101  ierr = -2;
102  return;
103  }
104  iret = theIO.close();
105  if (iret != 0) {
106  ierr = -3;
107  return;
108  }
109 }

References AlignmentCorrelationsIORoot::close(), corrVsCorr::filename, AlignmentCorrelationsIORoot::open(), and AlignmentCorrelationsIORoot::write().

◆ writeOrigRigidBodyAlignmentParameters()

void AlignmentIORoot::writeOrigRigidBodyAlignmentParameters ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int &  ierr 
)
overridevirtual

write RigidBodyAlignmentParameters as applied on top of original positions

Implements AlignmentIO.

Definition at line 65 of file AlignmentIORoot.cc.

66  {
68  ierr = 0;
69  int iret = theIO.open(filename, iter, true);
70  if (iret != 0) {
71  ierr = -1;
72  return;
73  }
74  iret = theIO.writeOrigRigidBody(alivec, validCheck);
75  if (iret != 0) {
76  ierr = -2;
77  return;
78  }
79  iret = theIO.close();
80  if (iret != 0) {
81  ierr = -3;
82  return;
83  }
84 }

References AlignmentParametersIORoot::close(), corrVsCorr::filename, AlignmentParametersIORoot::open(), and AlignmentParametersIO::writeOrigRigidBody().

Referenced by MillePedeAlignmentAlgorithm::doIO().

AlignmentParametersIORoot::close
int close(void) override
Close IO.
Definition: AlignmentParametersIORoot.cc:109
AlignmentParametersIO::read
align::Parameters read(const align::Alignables &alivec, int &ierr)
read AlignmentParameters of many Alignables
Definition: AlignmentParametersIO.cc:60
AlignmentCorrelationsIORoot::write
int write(const align::Correlations &cor, bool validCheck) override
write correlations
Definition: AlignmentCorrelationsIORoot.cc:42
AlignableDataIO::Org
Definition: AlignableDataIO.h:14
AlignmentParametersIO::writeOrigRigidBody
int writeOrigRigidBody(const align::Alignables &alivec, bool validCheck)
write original RigidBodyAlignmentParameters of many Alignables
Definition: AlignmentParametersIO.cc:42
AlignableDataIO::Abs
Definition: AlignableDataIO.h:14
AlignableShifts
std::vector< AlignableRelData > AlignableShifts
Definition: AlignableData.h:48
AlignmentCorrelationsIORoot::open
int open(const char *filename, int iteration, bool writemode) override
open IO
Definition: AlignmentCorrelationsIORoot.h:18
AlignableDataIO::Rel
Definition: AlignableDataIO.h:14
AlignmentCorrelationsIORoot::close
int close(void) override
close IO
Definition: AlignmentCorrelationsIORoot.h:23
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
AlignmentParametersIO::write
int write(const align::Alignables &alivec, bool validCheck)
write AlignmentParameters of many Alignables
Definition: AlignmentParametersIO.cc:25
align::Correlations
std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrix > Correlations
Definition: Utilities.h:35
AlignmentParametersIORoot::open
int open(const char *filename, int iteration, bool writemode) override
Open IO.
Definition: AlignmentParametersIORoot.h:30
align::Parameters
std::vector< AlignmentParameters * > Parameters
Definition: Utilities.h:32
AlignableDataIORoot
concrete class for ROOT based IO of Alignable positions
Definition: AlignableDataIORoot.h:14
AlignmentCorrelationsIORoot::read
align::Correlations read(const align::Alignables &alivec, int &ierr) override
read correlations
Definition: AlignmentCorrelationsIORoot.cc:71
AlignmentCorrelationsIORoot
Concrete class for ROOT based IO of Correlations.
Definition: AlignmentCorrelationsIORoot.h:10
mps_fire.result
result
Definition: mps_fire.py:311
AlignablePositions
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:47
AlignmentParametersIORoot
Definition: AlignmentParametersIORoot.h:16