CMS 3D CMS Logo

AlignmentIORoot Class Reference

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

#include <Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORoot.h>

Inheritance diagram for AlignmentIORoot:

AlignmentIO

List of all members.

Public Member Functions

AlignablePositions readAlignableAbsolutePositions (const align::Alignables &alivec, const char *filename, int iter, int &ierr)
 read Alignable current absolute positions
AlignablePositions readAlignableOriginalPositions (const align::Alignables &alivec, const char *filename, int iter, int &ierr)
 read Alignable original (before misalignment) absolute positions
AlignableShifts readAlignableRelativePositions (const align::Alignables &alivec, const char *filename, int iter, int &ierr)
 read Alignable relative positions (shift,rotation)
align::Parameters readAlignmentParameters (const align::Alignables &alivec, const char *filename, int iter, int &ierr)
 read AlignmentParameters
align::Correlations readCorrelations (const align::Alignables &alivec, const char *filename, int iter, int &ierr)
 read Correlations
void writeAlignableAbsolutePositions (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
 write Alignable current absolute positions
void writeAlignableOriginalPositions (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
 write Alignable original (before misalignment) absolute positions
void writeAlignableRelativePositions (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
 write Alignable relative positions (shift,rotation)
void writeAlignmentParameters (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
 write AlignmentParameters
void writeCorrelations (const align::Correlations &cormap, const char *filename, int iter, bool validCheck, int &ierr)
 write Correlations
void writeOrigRigidBodyAlignmentParameters (const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
 write RigidBodyAlignmentParameters as applied on top of original positions


Detailed Description

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

Derived from AlignmentIO

Date
2007/10/08 14:38:15
Revision
1.4
(last update by
Author
cklae
)

Definition at line 16 of file AlignmentIORoot.h.


Member Function Documentation

AlignablePositions AlignmentIORoot::readAlignableAbsolutePositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
int ierr 
) [virtual]

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 HLT_VtxMuL3::result.

Referenced by HIPAlignmentAlgorithm::startNewLoop().

00130 {
00131   AlignablePositions result;
00132 
00133   AlignableDataIORoot theIO(AlignableDataIORoot::Abs);
00134   ierr=0;
00135   int iret;
00136   iret = theIO.open(filename,iter,false);
00137   if (iret!=0) { ierr=-1; return result;}
00138   result = theIO.readAbsPos(alivec,iret);
00139   if (iret!=0) { ierr=-2; return result;}
00140   iret = theIO.close();
00141   if (iret!=0) { ierr=-3; return result;}
00142 
00143   return result;
00144 }

AlignablePositions AlignmentIORoot::readAlignableOriginalPositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
int ierr 
) [virtual]

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 HLT_VtxMuL3::result.

00170 {
00171   AlignablePositions result;
00172 
00173   AlignableDataIORoot theIO(AlignableDataIORoot::Org);
00174   ierr=0;
00175   int iret;
00176   iret = theIO.open(filename,iter,false);
00177   if (iret!=0) { ierr=-1; return result;}
00178   result = theIO.readOrgPos(alivec,iret);
00179   if (iret!=0) { ierr=-2; return result;}
00180   iret = theIO.close();
00181   if (iret!=0) { ierr=-3; return result;}
00182 
00183   return result;
00184 }

AlignableShifts AlignmentIORoot::readAlignableRelativePositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
int ierr 
) [virtual]

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 HLT_VtxMuL3::result.

00210 {
00211   AlignableShifts result;
00212 
00213   AlignableDataIORoot theIO(AlignableDataIORoot::Rel);
00214   ierr=0;
00215   int iret;
00216   iret = theIO.open(filename,iter,false);
00217   if (iret!=0) { ierr=-1; return result;}
00218   result = theIO.readRelPos(alivec,iret);
00219   if (iret!=0) { ierr=-2; return result;}
00220   iret = theIO.close();
00221   if (iret!=0) { ierr=-3; return result;}
00222 
00223   return result;
00224 }

align::Parameters AlignmentIORoot::readAlignmentParameters ( const align::Alignables alivec,
const char *  filename,
int  iter,
int ierr 
) [virtual]

read AlignmentParameters

Implements AlignmentIO.

Definition at line 30 of file AlignmentIORoot.cc.

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

Referenced by KalmanAlignmentAlgorithm::initializeAlignmentParameters().

00032 {
00033   align::Parameters result;
00034 
00035   AlignmentParametersIORoot theIO;
00036   ierr=0;
00037   int iret;
00038   iret = theIO.open(filename,iter,false);
00039   if (iret!=0) { ierr=-1; return result;}
00040   result = theIO.read(alivec,iret);
00041   if (iret!=0) { ierr=-2; return result;}
00042   iret = theIO.close();
00043   if (iret!=0) { ierr=-3; return result;}
00044 
00045   return result;
00046 }

align::Correlations AlignmentIORoot::readCorrelations ( const align::Alignables alivec,
const char *  filename,
int  iter,
int ierr 
) [virtual]

read Correlations

Implements AlignmentIO.

Definition at line 87 of file AlignmentIORoot.cc.

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

00089 {   
00090   align::Correlations result;
00091 
00092   AlignmentCorrelationsIORoot theIO;
00093   ierr=0;
00094   int iret;
00095   iret = theIO.open(filename,iter,false);
00096   if (iret!=0) { ierr=-1; return result;}
00097   result = theIO.read(alivec,iret);
00098   if (iret!=0) { ierr=-2; return result;}
00099   iret = theIO.close();
00100   if (iret!=0) { ierr=-3; return result;}
00101 
00102   return result;
00103 }

void AlignmentIORoot::writeAlignableAbsolutePositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int ierr 
) [virtual]

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(), HIPAlignmentAlgorithm::startNewLoop(), and HIPAlignmentAlgorithm::terminate().

00112 {
00113   AlignableDataIORoot theIO(AlignableDataIORoot::Abs);
00114   ierr=0;
00115   int iret;
00116   iret = theIO.open(filename,iter,true);
00117   if (iret!=0) { ierr=-1; return;}
00118   iret = theIO.writeAbsPos(alivec,validCheck);
00119   if (iret!=0) { ierr=-2; return;}
00120   iret = theIO.close();
00121   if (iret!=0) { ierr=-3; return;}
00122 }

void AlignmentIORoot::writeAlignableOriginalPositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int ierr 
) [virtual]

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(), and HIPAlignmentAlgorithm::startNewLoop().

00152 {
00153   AlignableDataIORoot theIO(AlignableDataIORoot::Org);
00154   ierr=0;
00155   int iret;
00156   iret = theIO.open(filename,iter,true);
00157   if (iret!=0) { ierr=-1; return;}
00158   iret = theIO.writeOrgPos(alivec,validCheck);
00159   if (iret!=0) { ierr=-2; return;}
00160   iret = theIO.close();
00161   if (iret!=0) { ierr=-3; return;}
00162 }

void AlignmentIORoot::writeAlignableRelativePositions ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int ierr 
) [virtual]

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

Referenced by MillePedeAlignmentAlgorithm::doIO().

00192 {
00193   AlignableDataIORoot theIO(AlignableDataIORoot::Rel);
00194   ierr=0;
00195   int iret;
00196   iret = theIO.open(filename,iter,true);
00197   if (iret!=0) { ierr=-1; return;}
00198   iret = theIO.writeRelPos(alivec,validCheck);
00199   if (iret!=0) { ierr=-2; return;}
00200   iret = theIO.close();
00201   if (iret!=0) { ierr=-3; return;}
00202 }

void AlignmentIORoot::writeAlignmentParameters ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int ierr 
) [virtual]

write AlignmentParameters

Implements AlignmentIO.

Definition at line 12 of file AlignmentIORoot.cc.

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

Referenced by KalmanAlignmentAlgorithm::terminate(), and HIPAlignmentAlgorithm::terminate().

00015 {
00016   AlignmentParametersIORoot theIO;
00017   ierr=0;
00018   int iret;
00019   iret = theIO.open(filename,iter,true);
00020   if (iret!=0) { ierr=-1; return;}
00021   iret = theIO.write(alivec,validCheck);
00022   if (iret!=0) { ierr=-2; return;}
00023   iret = theIO.close();
00024   if (iret!=0) { ierr=-3; return;}
00025 }

void AlignmentIORoot::writeCorrelations ( const align::Correlations cormap,
const char *  filename,
int  iter,
bool  validCheck,
int ierr 
) [virtual]

write Correlations

Implements AlignmentIO.

Definition at line 69 of file AlignmentIORoot.cc.

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

00071 {
00072   AlignmentCorrelationsIORoot theIO;
00073   ierr=0;
00074   int iret;
00075   iret = theIO.open(filename,iter,true);
00076   if (iret!=0) { ierr=-1; return;}
00077   iret = theIO.write(cormap,validCheck);
00078   if (iret!=0) { ierr=-2; return;}
00079   iret = theIO.close();
00080   if (iret!=0) { ierr=-3; return;}
00081 }

void AlignmentIORoot::writeOrigRigidBodyAlignmentParameters ( const align::Alignables alivec,
const char *  filename,
int  iter,
bool  validCheck,
int ierr 
) [virtual]

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

00053 {
00054   AlignmentParametersIORoot theIO;
00055   ierr = 0;
00056   int iret = theIO.open(filename, iter, true);
00057   if (iret != 0) { ierr = -1; return;}
00058   iret = theIO.writeOrigRigidBody(alivec, validCheck);
00059   if (iret != 0) { ierr = -2; return;}
00060   iret = theIO.close();
00061   if (iret != 0) { ierr = -3; return;}
00062 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:14:28 2009 for CMSSW by  doxygen 1.5.4