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 {
14 
15  protected:
16 
17  enum PosType { Abs, Org, Rel };
18 
21 
23  virtual ~AlignableDataIO(){};
24 
26  virtual int open( const char* filename, int iteration, bool writemode ) = 0;
27 
29  virtual int close(void) = 0;
30 
32  int writeAbsPos(Alignable* ali, bool validCheck);
33 
35  int writeAbsPos(const align::Alignables& alivec, bool validCheck);
36 
38  AlignableAbsData readAbsPos(Alignable* ali, int& ierr);
39 
41  AlignablePositions readAbsPos(const align::Alignables& alivec, int& ierr);
42 
43 
45  int writeOrgPos(Alignable* ali, bool validCheck);
46 
48  int writeOrgPos(const align::Alignables& alivec, bool validCheck);
49 
51  AlignableAbsData readOrgPos(Alignable* ali, int& ierr);
52 
54  AlignablePositions readOrgPos(const align::Alignables& alivec, int& ierr);
55 
56 
58  int writeRelPos(Alignable* ali, bool validCheck);
59 
61  int writeRelPos(const align::Alignables& alivec, bool validCheck);
62 
64  AlignableRelData readRelPos(Alignable* ali, int& ierr);
65 
67  AlignableShifts readRelPos(const align::Alignables& alivec, int& ierr);
68 
69  // 'raw' read/write methods
70  // must be provided by concrete derived class
71 
73  virtual int writeAbsRaw(const AlignableAbsData &ad) =0;
75  virtual AlignableAbsData readAbsRaw(Alignable* ali,int& ierr) =0;
77  virtual int writeRelRaw(const AlignableRelData &ad) =0;
79  virtual AlignableRelData readRelRaw(Alignable* ali,int& ierr) =0;
80 
81  // Data members
82  PosType thePosType; // Defines whether absolute/orig/relative pos. are used
83 
84 };
85 
86 #endif
virtual int writeAbsRaw(const AlignableAbsData &ad)=0
Write absolute positions.
AlignableAbsData readAbsPos(Alignable *ali, int &ierr)
Read absolute positions of one Alignable.
AlignableAbsData readOrgPos(Alignable *ali, int &ierr)
Read original positions of one Alignable.
int writeAbsPos(Alignable *ali, bool validCheck)
Write absolute positions of one Alignable.
virtual int open(const char *filename, int iteration, bool writemode)=0
Open IO handle.
std::vector< AlignableRelData > AlignableShifts
Definition: AlignableData.h:52
virtual AlignableAbsData readAbsRaw(Alignable *ali, int &ierr)=0
Read absolute positions.
int writeOrgPos(Alignable *ali, bool validCheck)
Write original positions of one Alignable.
int writeRelPos(Alignable *ali, bool validCheck)
Write relative positions of one Alignable.
virtual AlignableRelData readRelRaw(Alignable *ali, int &ierr)=0
Read relative positions.
AlignableDataIO(PosType p)
Constructor.
AlignableRelData readRelPos(Alignable *ali, int &ierr)
Read relative positions of one Alignable.
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
virtual int close(void)=0
Close IO handle.
virtual int writeRelRaw(const AlignableRelData &ad)=0
Write relative positions.
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:51
virtual ~AlignableDataIO()
Destructor.