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 16 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 128 of file AlignmentIORoot.cc.

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

Referenced by HIPAlignmentAlgorithm::startNewLoop().

130 {
132 
134  ierr=0;
135  int iret;
136  iret = theIO.open(filename,iter,false);
137  if (iret!=0) { ierr=-1; return result;}
138  result = theIO.readAbsPos(alivec,iret);
139  if (iret!=0) { ierr=-2; return result;}
140  iret = theIO.close();
141  if (iret!=0) { ierr=-3; return result;}
142 
143  return result;
144 }
concrete class for ROOT based IO of Alignable positions
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:51
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 168 of file AlignmentIORoot.cc.

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

170 {
172 
174  ierr=0;
175  int iret;
176  iret = theIO.open(filename,iter,false);
177  if (iret!=0) { ierr=-1; return result;}
178  result = theIO.readOrgPos(alivec,iret);
179  if (iret!=0) { ierr=-2; return result;}
180  iret = theIO.close();
181  if (iret!=0) { ierr=-3; return result;}
182 
183  return result;
184 }
concrete class for ROOT based IO of Alignable positions
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:51
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 208 of file AlignmentIORoot.cc.

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

210 {
212 
214  ierr=0;
215  int iret;
216  iret = theIO.open(filename,iter,false);
217  if (iret!=0) { ierr=-1; return result;}
218  result = theIO.readRelPos(alivec,iret);
219  if (iret!=0) { ierr=-2; return result;}
220  iret = theIO.close();
221  if (iret!=0) { ierr=-3; return result;}
222 
223  return result;
224 }
std::vector< AlignableRelData > AlignableShifts
Definition: AlignableData.h:52
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 30 of file AlignmentIORoot.cc.

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

32 {
34 
36  ierr=0;
37  int iret;
38  iret = theIO.open(filename,iter,false);
39  if (iret!=0) { ierr=-1; return result;}
40  result = theIO.read(alivec,iret);
41  if (iret!=0) { ierr=-2; return result;}
42  iret = theIO.close();
43  if (iret!=0) { ierr=-3; return result;}
44 
45  return result;
46 }
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:33
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 87 of file AlignmentIORoot.cc.

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

89 {
91 
93  ierr=0;
94  int iret;
95  iret = theIO.open(filename,iter,false);
96  if (iret!=0) { ierr=-1; return result;}
97  result = theIO.read(alivec,iret);
98  if (iret!=0) { ierr=-2; return result;}
99  iret = theIO.close();
100  if (iret!=0) { ierr=-3; return result;}
101 
102  return result;
103 }
std::map< std::pair< Alignable *, Alignable * >, AlgebraicMatrix > Correlations
Definition: Utilities.h:36
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 109 of file AlignmentIORoot.cc.

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

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

112 {
114  ierr=0;
115  int iret;
116  iret = theIO.open(filename,iter,true);
117  if (iret!=0) { ierr=-1; return;}
118  iret = theIO.writeAbsPos(alivec,validCheck);
119  if (iret!=0) { ierr=-2; return;}
120  iret = theIO.close();
121  if (iret!=0) { ierr=-3; return;}
122 }
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 149 of file AlignmentIORoot.cc.

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

Referenced by MillePedeAlignmentAlgorithm::doIO().

152 {
154  ierr=0;
155  int iret;
156  iret = theIO.open(filename,iter,true);
157  if (iret!=0) { ierr=-1; return;}
158  iret = theIO.writeOrgPos(alivec,validCheck);
159  if (iret!=0) { ierr=-2; return;}
160  iret = theIO.close();
161  if (iret!=0) { ierr=-3; return;}
162 }
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 189 of file AlignmentIORoot.cc.

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

192 {
194  ierr=0;
195  int iret;
196  iret = theIO.open(filename,iter,true);
197  if (iret!=0) { ierr=-1; return;}
198  iret = theIO.writeRelPos(alivec,validCheck);
199  if (iret!=0) { ierr=-2; return;}
200  iret = theIO.close();
201  if (iret!=0) { ierr=-3; return;}
202 }
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 12 of file AlignmentIORoot.cc.

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

15 {
17  ierr=0;
18  int iret;
19  iret = theIO.open(filename,iter,true);
20  if (iret!=0) { ierr=-1; return;}
21  iret = theIO.write(alivec,validCheck);
22  if (iret!=0) { ierr=-2; return;}
23  iret = theIO.close();
24  if (iret!=0) { ierr=-3; return;}
25 }
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 69 of file AlignmentIORoot.cc.

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

71 {
73  ierr=0;
74  int iret;
75  iret = theIO.open(filename,iter,true);
76  if (iret!=0) { ierr=-1; return;}
77  iret = theIO.write(cormap,validCheck);
78  if (iret!=0) { ierr=-2; return;}
79  iret = theIO.close();
80  if (iret!=0) { ierr=-3; return;}
81 }
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 52 of file AlignmentIORoot.cc.

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

Referenced by MillePedeAlignmentAlgorithm::doIO(), and readAlignmentParameters().

53 {
55  ierr = 0;
56  int iret = theIO.open(filename, iter, true);
57  if (iret != 0) { ierr = -1; return;}
58  iret = theIO.writeOrigRigidBody(alivec, validCheck);
59  if (iret != 0) { ierr = -2; return;}
60  iret = theIO.close();
61  if (iret != 0) { ierr = -3; return;}
62 }
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.