CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MillePedeVariablesIORoot.h
Go to the documentation of this file.
1 #ifndef MILLEPEDEVARIABLESIOROOT_H
2 #define MILLEPEDEVARIABLESIOROOT_H
3 
13 
17 
18 #include <string>
19 #include <vector>
20 
21 // ROOT types:
22 #include "Rtypes.h"
23 
24 class Alignable;
26 
27 //__________________________________________________________________________________________________
28 
30 public:
33 
36  const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr);
37 
39  std::vector<AlignmentUserVariables *> readMillePedeVariables(const align::Alignables &alivec,
40  const char *filename,
41  int iter,
42  int &ierr);
43 
44 protected:
46  int writeOne(Alignable *ali) override; // inherited from AlignmentUserVariablesIO
47 
49  AlignmentUserVariables *readOne(Alignable *ali, int &ierr) override;
50  // previous inherited from AlignmentUserVariablesIO
51  // inherited from AlignmentUserVariablesIO
53  int open(const char *filename, int iteration, bool writemode) override {
54  return this->openRoot(filename, iteration, writemode);
55  }
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
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
tuple iteration
Definition: align_cfg.py:5
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:31
tuple filename
Definition: lut2db_cfg.py:20
int open(const char *filename, int iteration, bool writemode) override
void createBranches() override
create root branches
int writeOne(Alignable *ali) override