CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariablesIORoot.h

Go to the documentation of this file.
00001 #ifndef MILLEPEDEVARIABLESIOROOT_H
00002 #define MILLEPEDEVARIABLESIOROOT_H
00003 
00013 
00014 
00015 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORootBase.h"
00016 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentUserVariablesIO.h"
00017 
00018 #include <vector>
00019 
00020 // ROOT types:
00021 #include "Rtypes.h"
00022 
00023 class Alignable;
00024 class AlignmentUserVariables;
00025 
00026 
00027 //__________________________________________________________________________________________________
00028 
00029 class MillePedeVariablesIORoot : public AlignmentIORootBase, public AlignmentUserVariablesIO
00030 {
00031   public:
00032   MillePedeVariablesIORoot();
00033   virtual ~MillePedeVariablesIORoot() {}
00034 
00036   void writeMillePedeVariables(const std::vector<Alignable*> &alivec, const char *filename,
00037                                int iter, bool validCheck, int &ierr);
00038 
00040   std::vector<AlignmentUserVariables*> readMillePedeVariables
00041     (const std::vector<Alignable*> &alivec, const char *filename, int iter, int &ierr);
00042 
00043  protected:
00044 
00046   virtual int writeOne(Alignable *ali); // inherited from AlignmentUserVariablesIO
00047 
00049   virtual AlignmentUserVariables* readOne(Alignable *ali, int &ierr);
00050   // previous inherited from AlignmentUserVariablesIO
00051   // inherited from AlignmentUserVariablesIO
00053   virtual int open(const char *filename, int iteration, bool writemode) 
00054     { return this->openRoot(filename, iteration, writemode);}
00055 
00057   virtual int close() {return this->closeRoot();} // inherited from AlignmentUserVariablesIO
00058 
00060   virtual void createBranches();      // inherited from AlignmentIORootBase
00062   virtual void setBranchAddresses();  // inherited from AlignmentIORootBase
00063 
00064  private:
00065   // variables for ROOT tree
00066   enum {kMaxNumPar = 20}; // slighly above 'two bowed surfaces' limit
00067 
00068   unsigned int myId;
00069   int          myObjId;
00070 
00071   unsigned int myNumPar;
00072   Byte_t       myIsValid[kMaxNumPar];
00073   Float_t      myDiffBefore[kMaxNumPar];
00074   Float_t      myGlobalCor[kMaxNumPar];
00075   Float_t      myPreSigma[kMaxNumPar];
00076   Float_t      myParameter[kMaxNumPar];
00077   Float_t      mySigma[kMaxNumPar];
00078   UInt_t       myHitsX;
00079   UInt_t       myHitsY;
00080   UInt_t       myLabel;
00081 };
00082 
00083 #endif