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  int writeOne(Alignable *ali) override; // inherited from AlignmentUserVariablesIO
48 
50  AlignmentUserVariables* readOne(Alignable *ali, int &ierr) override;
51  // previous inherited from AlignmentUserVariablesIO
52  // inherited from AlignmentUserVariablesIO
54  int open(const char *filename, int iteration, bool writemode) override
55  { return this->openRoot(filename, iteration, writemode);}
56 
58  int close() override {return this->closeRoot();} // inherited from AlignmentUserVariablesIO
59 
61  void createBranches() override; // inherited from AlignmentIORootBase
63  void setBranchAddresses() override; // 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)
void setBranchAddresses() override
set root branche addresses
Base class for ROOT-based I/O of Alignment parameters etc.
AlignmentUserVariables * readOne(Alignable *ali, int &ierr) override
(Abstract) Base class for alignment algorithm user variables
void writeMillePedeVariables(const std::vector< Alignable * > &alivec, const char *filename, int iter, bool validCheck, int &ierr)
int closeRoot(void)
close IO
int openRoot(const char *filename, int iteration, bool writemode)
open IO
int open(const char *filename, int iteration, bool writemode) override
void createBranches() override
create root branches
int writeOne(Alignable *ali) override