CMS 3D CMS Logo

MillePedeVariablesIORoot.h
Go to the documentation of this file.
1 #ifndef MILLEPEDEVARIABLESIOROOT_H
2 #define MILLEPEDEVARIABLESIOROOT_H
3 
13 
14 
17 
18 #include <string>
19 #include <vector>
20 
21 // ROOT types:
22 #include "Rtypes.h"
23 
24 class Alignable;
26 
27 
28 //__________________________________________________________________________________________________
29 
31 {
32  public:
35 
37  void writeMillePedeVariables(const std::vector<Alignable*> &alivec, const char *filename,
38  int iter, bool validCheck, int &ierr);
39 
41  std::vector<AlignmentUserVariables*> readMillePedeVariables
42  (const std::vector<Alignable*> &alivec, const char *filename, int iter, int &ierr);
43 
44  protected:
45 
47  virtual int writeOne(Alignable *ali); // inherited from AlignmentUserVariablesIO
48 
50  virtual AlignmentUserVariables* readOne(Alignable *ali, int &ierr);
51  // previous inherited from AlignmentUserVariablesIO
52  // inherited from AlignmentUserVariablesIO
54  virtual int open(const char *filename, int iteration, bool writemode)
55  { return this->openRoot(filename, iteration, writemode);}
56 
58  virtual int close() {return this->closeRoot();} // inherited from AlignmentUserVariablesIO
59 
61  virtual void createBranches(); // inherited from AlignmentIORootBase
63  virtual void setBranchAddresses(); // inherited from AlignmentIORootBase
64 
65  private:
66  // variables for ROOT tree
67  enum {kMaxNumPar = 20}; // slighly above 'two bowed surfaces' limit
68 
69  unsigned int myId;
70  int myObjId;
71 
72  unsigned int myNumPar;
78  Float_t mySigma[kMaxNumPar];
79  UInt_t myHitsX;
80  UInt_t myHitsY;
81  UInt_t myLabel;
83  std::string* myNamePtr; // needed for ROOT IO
84 };
85 
86 #endif
std::vector< AlignmentUserVariables * > readMillePedeVariables(const std::vector< Alignable * > &alivec, const char *filename, int iter, int &ierr)
virtual AlignmentUserVariables * readOne(Alignable *ali, int &ierr)
Base class for ROOT-based I/O of Alignment parameters etc.
virtual int open(const char *filename, int iteration, bool writemode)
(Abstract) Base class for alignment algorithm user variables
void writeMillePedeVariables(const std::vector< Alignable * > &alivec, const char *filename, int iter, bool validCheck, int &ierr)
virtual void setBranchAddresses()
set root branche addresses
int closeRoot(void)
close IO
int openRoot(const char *filename, int iteration, bool writemode)
open IO
virtual void createBranches()
create root branches
virtual int writeOne(Alignable *ali)