Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:08

0001 #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentParametersIORoot_h
0002 #define Alignment_CommonAlignmentAlgorithm_AlignmentParametersIORoot_h
0003 
0004 /// \class AlignmentParametersIORoot
0005 ///
0006 /// Concrete class for ROOT-based I/O of AlignmentParameters
0007 ///
0008 ///  $Date: 2008/09/02 15:31:23 $
0009 ///  $Revision: 1.6 $
0010 /// (last update by $Author: flucke $)
0011 
0012 #include "Alignment/CommonAlignment/interface/StructureType.h"
0013 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORootBase.h"
0014 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentParametersIO.h"
0015 
0016 class AlignmentParametersIORoot : public AlignmentIORootBase, public AlignmentParametersIO {
0017   friend class AlignmentIORoot;
0018 
0019 private:
0020   /// Constructor
0021   AlignmentParametersIORoot();
0022 
0023   /// Write AlignmentParameters of one Alignable
0024   int writeOne(Alignable* ali) override;
0025 
0026   /// Read AlignmentParameters of one Alignable
0027   AlignmentParameters* readOne(Alignable* ali, int& ierr) override;
0028 
0029   /// Open IO
0030   int open(const char* filename, int iteration, bool writemode) override {
0031     return openRoot(filename, iteration, writemode);
0032   };
0033 
0034   /// Close IO
0035   int close(void) override;
0036 
0037   // helper functions
0038 
0039   /// Find entry number corresponding to ID and structure type.
0040   /// Returns -1 on failure.
0041   int findEntry(align::ID, align::StructureType);
0042 
0043   /// Create all branches and give names
0044   void createBranches(void) override;
0045 
0046   /// Set branch adresses
0047   void setBranchAddresses(void) override;
0048 
0049   // Alignment parameter tree
0050   int theCovRang, theCovarRang, theHieraLevel, theParamType;
0051   align::ID theId;
0052   align::StructureType theObjId;
0053 
0054   double thePar[nParMax], theCov[nParMax * (nParMax + 1) / 2];
0055 };
0056 
0057 #endif