Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:08

0001 #ifndef AlignmentUserVariablesIO_H
0002 #define AlignmentUserVariablesIO_H
0003 
0004 #include "Alignment/CommonAlignment/interface/Utilities.h"
0005 
0006 /// \class AlignmentUserVariablesIO
0007 ///
0008 /// Abstract base class for I/O of AlignmentUserVariables.
0009 /// Note that it is the caller's responsibility to delete objects created during reading.
0010 ///
0011 ///  $Date: 2007/01/23 16:07:08 $
0012 ///  $Revision: 1.4 $
0013 ///  $Author: fronga $ (at least last update...)
0014 
0015 class AlignmentUserVariables;
0016 
0017 class AlignmentUserVariablesIO {
0018 protected:
0019   virtual ~AlignmentUserVariablesIO() {}
0020 
0021   /** open IO */
0022   virtual int open(const char* filename, int iteration, bool writemode) = 0;
0023 
0024   /** close IO */
0025   virtual int close(void) = 0;
0026 
0027   /** write AlignmentUserVariables of one Alignable */
0028   virtual int writeOne(Alignable* ali) = 0;
0029 
0030   /** read AlignmentUserVariables of one Alignable,
0031       object should be created and has to be deleted */
0032   virtual AlignmentUserVariables* readOne(Alignable* ali, int& ierr) = 0;
0033 
0034   /** write AlignmentUserVariables of many Alignables */
0035   int write(const align::Alignables& alivec, bool validCheck);
0036 
0037   /** read AlignmentUserVariables of many Alignables (using readOne, so take care of memory!) */
0038   std::vector<AlignmentUserVariables*> read(const align::Alignables& alivec, int& ierr);
0039 };
0040 
0041 #endif