CMS 3D CMS Logo

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