CMS 3D CMS Logo

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 ( )
overridedefault

Member Function Documentation

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.

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

Referenced by HIPAlignmentAlgorithm::startNewLoop().

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 }
concrete class for ROOT based IO of Alignable positions
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:47
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.

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

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 }
concrete class for ROOT based IO of Alignable positions
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:47
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.

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

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 }
std::vector< AlignableRelData > AlignableShifts
Definition: AlignableData.h:48
concrete class for ROOT based IO of Alignable positions
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.

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

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 }
int open(const char *filename, int iteration, bool writemode) override
Open IO.
align::Parameters read(const align::Alignables &alivec, int &ierr)
read AlignmentParameters of many Alignables
std::vector< AlignmentParameters * > Parameters
Definition: Utilities.h:32
int close(void) override
Close IO.
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.

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

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 }
std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrix > Correlations
Definition: Utilities.h:35
int close(void) override
close IO
align::Correlations read(const align::Alignables &alivec, int &ierr) override
read correlations
Concrete class for ROOT based IO of Correlations.
int open(const char *filename, int iteration, bool writemode) override
open IO
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.

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

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

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 }
concrete class for ROOT based IO of Alignable positions
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.

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

Referenced by MillePedeAlignmentAlgorithm::doIO().

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 }
concrete class for ROOT based IO of Alignable positions
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.

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

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 }
concrete class for ROOT based IO of Alignable positions
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.

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

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 }
int open(const char *filename, int iteration, bool writemode) override
Open IO.
int write(const align::Alignables &alivec, bool validCheck)
write AlignmentParameters of many Alignables
int close(void) override
Close IO.
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.

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

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 }
int write(const align::Correlations &cor, bool validCheck) override
write correlations
int close(void) override
close IO
Concrete class for ROOT based IO of Correlations.
int open(const char *filename, int iteration, bool writemode) override
open IO
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.

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

Referenced by MillePedeAlignmentAlgorithm::doIO().

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 }
int open(const char *filename, int iteration, bool writemode) override
Open IO.
int writeOrigRigidBody(const align::Alignables &alivec, bool validCheck)
write original RigidBodyAlignmentParameters of many Alignables
int close(void) override
Close IO.