#include <AlignmentUserVariablesIO.h>
Protected Member Functions | |
virtual int | close (void)=0 |
virtual int | open (const char *filename, int iteration, bool writemode)=0 |
std::vector < AlignmentUserVariables * > | read (const align::Alignables &alivec, int &ierr) |
virtual AlignmentUserVariables * | readOne (Alignable *ali, int &ierr)=0 |
int | write (const align::Alignables &alivec, bool validCheck) |
virtual int | writeOne (Alignable *ali)=0 |
virtual | ~AlignmentUserVariablesIO () |
Abstract base class for I/O of AlignmentUserVariables. Note that it is the caller's responsibility to delete objects created during reading.
(at least last update...)
Definition at line 17 of file AlignmentUserVariablesIO.h.
virtual AlignmentUserVariablesIO::~AlignmentUserVariablesIO | ( | ) | [inline, protected, virtual] |
Definition at line 22 of file AlignmentUserVariablesIO.h.
{}
virtual int AlignmentUserVariablesIO::close | ( | void | ) | [protected, pure virtual] |
close IO
Implemented in HIPUserVariablesIORoot, and MillePedeVariablesIORoot.
virtual int AlignmentUserVariablesIO::open | ( | const char * | filename, |
int | iteration, | ||
bool | writemode | ||
) | [protected, pure virtual] |
open IO
Implemented in HIPUserVariablesIORoot, and MillePedeVariablesIORoot.
std::vector< AlignmentUserVariables * > AlignmentUserVariablesIO::read | ( | const align::Alignables & | alivec, |
int & | ierr | ||
) | [protected] |
read AlignmentUserVariables of many Alignables (using readOne, so take care of memory!)
Definition at line 41 of file AlignmentUserVariablesIO.cc.
References readOne().
Referenced by HIPUserVariablesIORoot::readHIPUserVariables().
{ std::vector<AlignmentUserVariables*> retvec; ierr=0; int ierr2; int icount=0; int icount2=0; for(align::Alignables::const_iterator it=alivec.begin(); it!=alivec.end(); it++) { AlignmentUserVariables* ad=readOne(*it, ierr2); // should create with new! if (ierr2==0) { retvec.push_back(ad); icount++; if (ad!=0) icount2++; } } edm::LogInfo("Alignment") << "@SUB=AlignmentUserVariablesIO::read" << "Read variables all,read,valid: " << alivec.size() <<"," << icount <<","<< icount2; return retvec; }
virtual AlignmentUserVariables* AlignmentUserVariablesIO::readOne | ( | Alignable * | ali, |
int & | ierr | ||
) | [protected, pure virtual] |
read AlignmentUserVariables of one Alignable, object should be created and has to be deleted
Implemented in HIPUserVariablesIORoot, and MillePedeVariablesIORoot.
Referenced by read().
int AlignmentUserVariablesIO::write | ( | const align::Alignables & | alivec, |
bool | validCheck | ||
) | [protected] |
write AlignmentUserVariables of many Alignables
Definition at line 20 of file AlignmentUserVariablesIO.cc.
References writeOne().
Referenced by HIPUserVariablesIORoot::writeHIPUserVariables().
{ 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=AlignmentUserVariablesIO::write" << "Write variables all,written: " << alivec.size() <<","<< icount; return 0; }
virtual int AlignmentUserVariablesIO::writeOne | ( | Alignable * | ali | ) | [protected, pure virtual] |
write AlignmentUserVariables of one Alignable
Implemented in HIPUserVariablesIORoot, and MillePedeVariablesIORoot.
Referenced by write().