CMS 3D CMS Logo

AlignableDataIO.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignmentAlgorithm_AlignableDataIO_H
2 #define Alignment_CommonAlignmentAlgorithm_AlignableDataIO_H
3 
6 
7 class Alignable;
8 
11 
13 protected:
14  enum PosType { Abs, Org, Rel };
15 
18 
20  virtual ~AlignableDataIO(){};
21 
23  virtual int open(const char* filename, int iteration, bool writemode) = 0;
24 
26  virtual int close(void) = 0;
27 
29  int writeAbsPos(Alignable* ali, bool validCheck);
30 
32  int writeAbsPos(const align::Alignables& alivec, bool validCheck);
33 
35  AlignableAbsData readAbsPos(Alignable* ali, int& ierr);
36 
38  AlignablePositions readAbsPos(const align::Alignables& alivec, int& ierr);
39 
41  int writeOrgPos(Alignable* ali, bool validCheck);
42 
44  int writeOrgPos(const align::Alignables& alivec, bool validCheck);
45 
47  AlignableAbsData readOrgPos(Alignable* ali, int& ierr);
48 
50  AlignablePositions readOrgPos(const align::Alignables& alivec, int& ierr);
51 
53  int writeRelPos(Alignable* ali, bool validCheck);
54 
56  int writeRelPos(const align::Alignables& alivec, bool validCheck);
57 
59  AlignableRelData readRelPos(Alignable* ali, int& ierr);
60 
62  AlignableShifts readRelPos(const align::Alignables& alivec, int& ierr);
63 
64  // 'raw' read/write methods
65  // must be provided by concrete derived class
66 
68  virtual int writeAbsRaw(const AlignableAbsData& ad) = 0;
70  virtual AlignableAbsData readAbsRaw(Alignable* ali, int& ierr) = 0;
72  virtual int writeRelRaw(const AlignableRelData& ad) = 0;
74  virtual AlignableRelData readRelRaw(Alignable* ali, int& ierr) = 0;
75 
76  // Data members
77  PosType thePosType; // Defines whether absolute/orig/relative pos. are used
78 };
79 
80 #endif
AlignableDataIO::AlignableDataIO
AlignableDataIO(PosType p)
Constructor.
Definition: AlignableDataIO.h:17
AlignableDataIO::readOrgPos
AlignableAbsData readOrgPos(Alignable *ali, int &ierr)
Read original positions of one Alignable.
Definition: AlignableDataIO.cc:13
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Alignable
Definition: Alignable.h:27
AlignableDataIO::open
virtual int open(const char *filename, int iteration, bool writemode)=0
Open IO handle.
AlignableDataIO::Org
Definition: AlignableDataIO.h:14
AlignableDataIO::writeRelRaw
virtual int writeRelRaw(const AlignableRelData &ad)=0
Write relative positions.
AlignableDataIO::writeOrgPos
int writeOrgPos(Alignable *ali, bool validCheck)
Write original positions of one Alignable.
Definition: AlignableDataIO.cc:58
AlignableDataIO::writeAbsPos
int writeAbsPos(Alignable *ali, bool validCheck)
Write absolute positions of one Alignable.
Definition: AlignableDataIO.cc:19
AlignableDataIO::Abs
Definition: AlignableDataIO.h:14
AlignableShifts
std::vector< AlignableRelData > AlignableShifts
Definition: AlignableData.h:48
AlignableDataIO::writeAbsRaw
virtual int writeAbsRaw(const AlignableAbsData &ad)=0
Write absolute positions.
AlignableDataIO::readAbsRaw
virtual AlignableAbsData readAbsRaw(Alignable *ali, int &ierr)=0
Read absolute positions.
AlignableDataIO::Rel
Definition: AlignableDataIO.h:14
AlignableData.h
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
AlignableDataIO::readRelRaw
virtual AlignableRelData readRelRaw(Alignable *ali, int &ierr)=0
Read relative positions.
AlignableDataIO::readAbsPos
AlignableAbsData readAbsPos(Alignable *ali, int &ierr)
Read absolute positions of one Alignable.
Definition: AlignableDataIO.cc:10
AlignableDataIO::~AlignableDataIO
virtual ~AlignableDataIO()
Destructor.
Definition: AlignableDataIO.h:20
AlignableDataIO::writeRelPos
int writeRelPos(Alignable *ali, bool validCheck)
Write relative positions of one Alignable.
Definition: AlignableDataIO.cc:42
Utilities.h
AlignableData
Definition: AlignableData.h:14
AlignableDataIO::close
virtual int close(void)=0
Close IO handle.
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
AlignableDataIO::thePosType
PosType thePosType
Definition: AlignableDataIO.h:77
AlignableDataIO::readRelPos
AlignableRelData readRelPos(Alignable *ali, int &ierr)
Read relative positions of one Alignable.
Definition: AlignableDataIO.cc:16
AlignablePositions
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:47
align_cfg.iteration
iteration
Definition: align_cfg.py:5
AlignableDataIO::PosType
PosType
Definition: AlignableDataIO.h:14
AlignableDataIO
Definition: AlignableDataIO.h:12