#include <AlignmentParametersIO.h>
Protected Member Functions | |
virtual int | close (void)=0 |
close IO | |
virtual int | open (const char *filename, int iteration, bool writemode)=0 |
open IO | |
align::Parameters | read (const align::Alignables &alivec, int &ierr) |
read AlignmentParameters of many Alignables | |
virtual AlignmentParameters * | readOne (Alignable *ali, int &ierr)=0 |
read AlignmentParameters of one Alignable | |
int | write (const align::Alignables &alivec, bool validCheck) |
write AlignmentParameters of many Alignables | |
virtual int | writeOne (Alignable *ali)=0 |
write AlignmentParameters of one Alignable | |
virtual int | writeOneOrigRigidBody (Alignable *ali) |
write original RigidBodyAlignmentParameters (i.e. 3 shifts and 3 rotation) | |
int | writeOrigRigidBody (const align::Alignables &alivec, bool validCheck) |
write original RigidBodyAlignmentParameters of many Alignables | |
virtual | ~AlignmentParametersIO () |
abstract base class for I/O of AlignmentParameters
(last update by
)
Definition at line 14 of file AlignmentParametersIO.h.
virtual AlignmentParametersIO::~AlignmentParametersIO | ( | ) | [inline, protected, virtual] |
Definition at line 19 of file AlignmentParametersIO.h.
{};
virtual int AlignmentParametersIO::close | ( | void | ) | [protected, pure virtual] |
close IO
Implemented in AlignmentParametersIORoot.
virtual int AlignmentParametersIO::open | ( | const char * | filename, |
int | iteration, | ||
bool | writemode | ||
) | [protected, pure virtual] |
open IO
Implemented in AlignmentParametersIORoot.
align::Parameters AlignmentParametersIO::read | ( | const align::Alignables & | alivec, |
int & | ierr | ||
) | [protected] |
read AlignmentParameters of many Alignables
Definition at line 70 of file AlignmentParametersIO.cc.
References readOne().
Referenced by AlignmentIORoot::readAlignmentParameters().
{ align::Parameters retvec; int ierr2; int icount=0; for(align::Alignables::const_iterator it=alivec.begin(); it!=alivec.end(); it++) { AlignmentParameters* ad=readOne(*it, ierr2); if (ad!=0 && ierr2==0) { retvec.push_back(ad); icount++; } } edm::LogInfo("Alignment") << "@SUB-AlignmentParametersIO::write" << "Read " << icount << " out of " << alivec.size() << " parameters"; return retvec; }
virtual AlignmentParameters* AlignmentParametersIO::readOne | ( | Alignable * | ali, |
int & | ierr | ||
) | [protected, pure virtual] |
read AlignmentParameters of one Alignable
Implemented in AlignmentParametersIORoot.
Referenced by read().
int AlignmentParametersIO::write | ( | const align::Alignables & | alivec, |
bool | validCheck | ||
) | [protected] |
write AlignmentParameters of many Alignables
Definition at line 29 of file AlignmentParametersIO.cc.
References writeOne().
Referenced by AlignmentIORoot::writeAlignmentParameters().
{ int icount=0; for(align::Alignables::const_iterator it=alivec.begin(); it!=alivec.end(); it++) { if ((*it)->alignmentParameters()->isValid() || !(validCheck)) { icount++; int iret=writeOne(*it); if (iret!=0) return iret; } } edm::LogInfo("Alignment") << "@SUB=AlignmentParametersIO::write" << "Wrote " << icount << " out of " << alivec.size() << " parameters"; return 0; }
virtual int AlignmentParametersIO::writeOne | ( | Alignable * | ali | ) | [protected, pure virtual] |
write AlignmentParameters of one Alignable
Implemented in AlignmentParametersIORoot.
Referenced by write(), and writeOneOrigRigidBody().
int AlignmentParametersIO::writeOneOrigRigidBody | ( | Alignable * | ali | ) | [protected, virtual] |
write original RigidBodyAlignmentParameters (i.e. 3 shifts and 3 rotation)
Definition at line 11 of file AlignmentParametersIO.cc.
References Alignable::alignmentParameters(), AlignmentParameters::clone(), AlignmentParameters::covariance(), Gflash::par, AlignmentParameters::parameters(), Alignable::setAlignmentParameters(), and writeOne().
Referenced by writeOrigRigidBody().
{ AlignmentParameters *par = ali->alignmentParameters(); AlignmentParameters *parBack = (par ? par->clone(par->parameters(), par->covariance()) : 0); ali->setAlignmentParameters(new RigidBodyAlignmentParameters(ali, true)); int iret = this->writeOne(ali); ali->setAlignmentParameters(parBack); // deletes the above created RigidBodyAlignmentParameters return iret; }
int AlignmentParametersIO::writeOrigRigidBody | ( | const align::Alignables & | alivec, |
bool | validCheck | ||
) | [protected] |
write original RigidBodyAlignmentParameters of many Alignables
Definition at line 50 of file AlignmentParametersIO.cc.
References writeOneOrigRigidBody().
Referenced by AlignmentIORoot::writeOrigRigidBodyAlignmentParameters().
{ int icount = 0; for(align::Alignables::const_iterator it = alivec.begin(); it != alivec.end(); ++it) { if (!validCheck || (*it)->alignmentParameters()->isValid()) { ++icount; int iret = this->writeOneOrigRigidBody(*it); if (iret != 0) return iret; } } edm::LogInfo("Alignment") << "@SUB=AlignmentParametersIO::writeOrigRigidBody" << "Wrote " << icount << " out of " << alivec.size() << " original parameters."; return 0; }