CMS 3D CMS Logo

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
AlignmentIORootBase::closeRoot
int closeRoot(void)
close IO
Definition: AlignmentIORootBase.cc:92
MillePedeVariablesIORoot::myId
unsigned int myId
Definition: MillePedeVariablesIORoot.h:69
MillePedeVariablesIORoot::myObjId
int myObjId
Definition: MillePedeVariablesIORoot.h:70
MillePedeVariablesIORoot::close
int close() override
Definition: MillePedeVariablesIORoot.h:58
MillePedeVariablesIORoot::myIsValid
Byte_t myIsValid[kMaxNumPar]
Definition: MillePedeVariablesIORoot.h:73
AlignmentUserVariables
(Abstract) Base class for alignment algorithm user variables
Definition: AlignmentUserVariables.h:6
MillePedeVariablesIORoot::myGlobalCor
Float_t myGlobalCor[kMaxNumPar]
Definition: MillePedeVariablesIORoot.h:75
MillePedeVariablesIORoot::kMaxNumPar
Definition: MillePedeVariablesIORoot.h:67
MillePedeVariablesIORoot::myName
std::string myName
Definition: MillePedeVariablesIORoot.h:82
Alignable
Definition: Alignable.h:27
MillePedeVariablesIORoot::myParameter
Float_t myParameter[kMaxNumPar]
Definition: MillePedeVariablesIORoot.h:77
AlignmentUserVariablesIO.h
MillePedeVariablesIORoot::createBranches
void createBranches() override
create root branches
Definition: MillePedeVariablesIORoot.cc:149
MillePedeVariablesIORoot::myLabel
UInt_t myLabel
Definition: MillePedeVariablesIORoot.h:81
MillePedeVariablesIORoot::myDiffBefore
Float_t myDiffBefore[kMaxNumPar]
Definition: MillePedeVariablesIORoot.h:74
AlignmentIORootBase.h
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MillePedeVariablesIORoot::~MillePedeVariablesIORoot
~MillePedeVariablesIORoot() override
Definition: MillePedeVariablesIORoot.h:32
Utilities.h
MillePedeVariablesIORoot::readMillePedeVariables
std::vector< AlignmentUserVariables * > readMillePedeVariables(const align::Alignables &alivec, const char *filename, int iter, int &ierr)
Definition: MillePedeVariablesIORoot.cc:59
AlignmentIORootBase
Base class for ROOT-based I/O of Alignment parameters etc.
Definition: AlignmentIORootBase.h:11
MillePedeVariablesIORoot
Definition: MillePedeVariablesIORoot.h:29
MillePedeVariablesIORoot::setBranchAddresses
void setBranchAddresses() override
set root branche addresses
Definition: MillePedeVariablesIORoot.cc:166
MillePedeVariablesIORoot::open
int open(const char *filename, int iteration, bool writemode) override
Definition: MillePedeVariablesIORoot.h:53
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
MillePedeVariablesIORoot::myPreSigma
Float_t myPreSigma[kMaxNumPar]
Definition: MillePedeVariablesIORoot.h:76
MillePedeVariablesIORoot::myHitsX
UInt_t myHitsX
Definition: MillePedeVariablesIORoot.h:79
MillePedeVariablesIORoot::myNamePtr
std::string * myNamePtr
Definition: MillePedeVariablesIORoot.h:83
MillePedeVariablesIORoot::writeMillePedeVariables
void writeMillePedeVariables(const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
Definition: MillePedeVariablesIORoot.cc:35
AlignmentIORootBase::openRoot
int openRoot(const char *filename, int iteration, bool writemode)
open IO
Definition: AlignmentIORootBase.cc:16
MillePedeVariablesIORoot::myHitsY
UInt_t myHitsY
Definition: MillePedeVariablesIORoot.h:80
MillePedeVariablesIORoot::writeOne
int writeOne(Alignable *ali) override
Definition: MillePedeVariablesIORoot.cc:84
MillePedeVariablesIORoot::readOne
AlignmentUserVariables * readOne(Alignable *ali, int &ierr) override
Definition: MillePedeVariablesIORoot.cc:122
MillePedeVariablesIORoot::mySigma
Float_t mySigma[kMaxNumPar]
Definition: MillePedeVariablesIORoot.h:78
AlignmentUserVariablesIO
Definition: AlignmentUserVariablesIO.h:17
MillePedeVariablesIORoot::MillePedeVariablesIORoot
MillePedeVariablesIORoot()
Definition: MillePedeVariablesIORoot.cc:20
align_cfg.iteration
iteration
Definition: align_cfg.py:5
MillePedeVariablesIORoot::myNumPar
unsigned int myNumPar
Definition: MillePedeVariablesIORoot.h:72