CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignableDataIO.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignmentAlgorithm_AlignableDataIO_H
2 #define Alignment_CommonAlignmentAlgorithm_AlignableDataIO_H
3 
5 
8 
10 {
11 
12  protected:
13 
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 
40 
42  int writeOrgPos(Alignable* ali, bool validCheck);
43 
45  int writeOrgPos(const align::Alignables& alivec, bool validCheck);
46 
48  AlignableAbsData readOrgPos(Alignable* ali, int& ierr);
49 
51  AlignablePositions readOrgPos(const align::Alignables& alivec, int& ierr);
52 
53 
55  int writeRelPos(Alignable* ali, bool validCheck);
56 
58  int writeRelPos(const align::Alignables& alivec, bool validCheck);
59 
61  AlignableRelData readRelPos(Alignable* ali, int& ierr);
62 
64  AlignableShifts readRelPos(const align::Alignables& alivec, int& ierr);
65 
66  // 'raw' read/write methods
67  // must be provided by concrete derived class
68 
70  virtual int writeAbsRaw(const AlignableAbsData &ad) =0;
72  virtual AlignableAbsData readAbsRaw(Alignable* ali,int& ierr) =0;
74  virtual int writeRelRaw(const AlignableRelData &ad) =0;
76  virtual AlignableRelData readRelRaw(Alignable* ali,int& ierr) =0;
77 
78  // Data members
79  PosType thePosType; // Defines whether absolute/orig/relative pos. are used
80 
81 };
82 
83 #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.
tuple iteration
Definition: align_cfg.py:5
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:28
virtual int close(void)=0
Close IO handle.
tuple filename
Definition: lut2db_cfg.py:20
virtual int writeRelRaw(const AlignableRelData &ad)=0
Write relative positions.
std::vector< AlignableAbsData > AlignablePositions
Definition: AlignableData.h:51
virtual ~AlignableDataIO()
Destructor.