File indexing completed on 2024-09-07 04:34:27
0001 #ifndef Alignment_CommonAlignmentAlgorithm_AlignableDataIO_H
0002 #define Alignment_CommonAlignmentAlgorithm_AlignableDataIO_H
0003
0004 #include "Alignment/CommonAlignment/interface/Utilities.h"
0005 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignableData.h"
0006
0007 class Alignable;
0008
0009
0010
0011
0012 class AlignableDataIO {
0013 protected:
0014 enum PosType { Abs, Org, Rel };
0015
0016
0017 AlignableDataIO(PosType p) : thePosType(p) {}
0018
0019
0020 virtual ~AlignableDataIO() {}
0021
0022
0023 virtual int open(const char* filename, int iteration, bool writemode) = 0;
0024
0025
0026 virtual int close(void) = 0;
0027
0028
0029 int writeAbsPos(Alignable* ali, bool validCheck);
0030
0031
0032 int writeAbsPos(const align::Alignables& alivec, bool validCheck);
0033
0034
0035 AlignableAbsData readAbsPos(Alignable* ali, int& ierr);
0036
0037
0038 AlignablePositions readAbsPos(const align::Alignables& alivec, int& ierr);
0039
0040
0041 int writeOrgPos(Alignable* ali, bool validCheck);
0042
0043
0044 int writeOrgPos(const align::Alignables& alivec, bool validCheck);
0045
0046
0047 AlignableAbsData readOrgPos(Alignable* ali, int& ierr);
0048
0049
0050 AlignablePositions readOrgPos(const align::Alignables& alivec, int& ierr);
0051
0052
0053 int writeRelPos(Alignable* ali, bool validCheck);
0054
0055
0056 int writeRelPos(const align::Alignables& alivec, bool validCheck);
0057
0058
0059 AlignableRelData readRelPos(Alignable* ali, int& ierr);
0060
0061
0062 AlignableShifts readRelPos(const align::Alignables& alivec, int& ierr);
0063
0064
0065
0066
0067
0068 virtual int writeAbsRaw(const AlignableAbsData& ad) = 0;
0069
0070 virtual AlignableAbsData readAbsRaw(Alignable* ali, int& ierr) = 0;
0071
0072 virtual int writeRelRaw(const AlignableRelData& ad) = 0;
0073
0074 virtual AlignableRelData readRelRaw(Alignable* ali, int& ierr) = 0;
0075
0076
0077 PosType thePosType;
0078 };
0079
0080 #endif