CMS 3D CMS Logo

List of all members | Protected Member Functions
AlignmentUserVariablesIO Class Referenceabstract

#include <AlignmentUserVariablesIO.h>

Inheritance diagram for AlignmentUserVariablesIO:
HIPUserVariablesIORoot MillePedeVariablesIORoot

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 AlignmentUserVariablesreadOne (Alignable *ali, int &ierr)=0
 
int write (const align::Alignables &alivec, bool validCheck)
 
virtual int writeOne (Alignable *ali)=0
 
virtual ~AlignmentUserVariablesIO ()
 

Detailed Description

Abstract base class for I/O of AlignmentUserVariables. Note that it is the caller's responsibility to delete objects created during reading.

Date
2007/01/23 16:07:08
Revision
1.4
Author
fronga

(at least last update...)

Definition at line 17 of file AlignmentUserVariablesIO.h.

Constructor & Destructor Documentation

◆ ~AlignmentUserVariablesIO()

virtual AlignmentUserVariablesIO::~AlignmentUserVariablesIO ( )
inlineprotectedvirtual

Definition at line 19 of file AlignmentUserVariablesIO.h.

19 {}

Member Function Documentation

◆ close()

virtual int AlignmentUserVariablesIO::close ( void  )
protectedpure virtual

◆ open()

virtual int AlignmentUserVariablesIO::open ( const char *  filename,
int  iteration,
bool  writemode 
)
protectedpure virtual

open IO

Implemented in MillePedeVariablesIORoot, and HIPUserVariablesIORoot.

◆ read()

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 37 of file AlignmentUserVariablesIO.cc.

37  {
38  std::vector<AlignmentUserVariables*> retvec;
39  ierr = 0;
40  int ierr2;
41  int icount = 0;
42  int icount2 = 0;
43  for (align::Alignables::const_iterator it = alivec.begin(); it != alivec.end(); ++it) {
44  AlignmentUserVariables* ad = readOne(*it, ierr2); // should create with new!
45  if (ierr2 == 0) {
46  retvec.push_back(ad);
47  icount++;
48  if (ad != nullptr)
49  icount2++;
50  }
51  }
52  edm::LogInfo("Alignment") << "@SUB=AlignmentUserVariablesIO::read"
53  << "Read variables all,read,valid: " << alivec.size() << "," << icount << "," << icount2;
54  return retvec;
55 }

References readOne().

Referenced by edmIntegrityCheck.PublishToFileSystem::get(), HIPUserVariablesIORoot::readHIPUserVariables(), and MillePedeVariablesIORoot::readMillePedeVariables().

◆ readOne()

virtual AlignmentUserVariables* AlignmentUserVariablesIO::readOne ( Alignable ali,
int &  ierr 
)
protectedpure virtual

read AlignmentUserVariables of one Alignable, object should be created and has to be deleted

Implemented in MillePedeVariablesIORoot, and HIPUserVariablesIORoot.

Referenced by read().

◆ write()

int AlignmentUserVariablesIO::write ( const align::Alignables alivec,
bool  validCheck 
)
protected

write AlignmentUserVariables of many Alignables

Definition at line 19 of file AlignmentUserVariablesIO.cc.

19  {
20  int icount = 0;
21  for (align::Alignables::const_iterator it = alivec.begin(); it != alivec.end(); ++it) {
22  if ((*it)->alignmentParameters()->isValid() || !(validCheck)) {
23  icount++;
24  int iret = writeOne(*it);
25  if (iret != 0)
26  return iret;
27  }
28  }
29  edm::LogInfo("Alignment") << "@SUB=AlignmentUserVariablesIO::write"
30  << "Write variables all,written: " << alivec.size() << "," << icount;
31  return 0;
32 }

References writeOne().

Referenced by pkg.AbstractPkg::generate(), querying.connection::write_and_commit(), HIPUserVariablesIORoot::writeHIPUserVariables(), and MillePedeVariablesIORoot::writeMillePedeVariables().

◆ writeOne()

virtual int AlignmentUserVariablesIO::writeOne ( Alignable ali)
protectedpure virtual
AlignmentUserVariables
(Abstract) Base class for alignment algorithm user variables
Definition: AlignmentUserVariables.h:6
edm::LogInfo
Definition: MessageLogger.h:254
AlignmentUserVariablesIO::readOne
virtual AlignmentUserVariables * readOne(Alignable *ali, int &ierr)=0
AlignmentUserVariablesIO::writeOne
virtual int writeOne(Alignable *ali)=0