CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/Alignment/MillePedeAlignmentAlgorithm/src/PedeReader.h

Go to the documentation of this file.
00001 #ifndef MILLEPEDEPEDEREADER_H
00002 #define MILLEPEDEPEDEREADER_H
00003 
00016 #include <fstream>
00017 #include <vector>
00018 
00019 #include <Alignment/MillePedeAlignmentAlgorithm/interface/PedeLabelerBase.h>
00020 
00021 class PedeSteerer;
00022 class PedeLabelerBase;
00023 class Alignable;
00024 class AlignmentParameters;
00025 class IntegratedCalibrationBase;
00026 
00027 namespace edm {
00028   class ParameterSet;
00029 }
00030 
00031 /***************************************
00032 ****************************************/
00033 class PedeReader
00034 {
00035  public:
00036 
00037   typedef PedeLabelerBase::RunNumber  RunNumber;
00038   typedef PedeLabelerBase::RunRange   RunRange;
00039 
00040   PedeReader(const edm::ParameterSet &config, const PedeSteerer &steerer,
00041              const PedeLabelerBase &labels, const RunRange &runrange);
00043   ~PedeReader() {}
00048   bool read(std::vector<Alignable*> &alignables, bool setUserVars);
00051   template<class T>
00052     bool readIfSameLine(std::ifstream &aStream, T &outValue) const;
00055   Alignable* setParameter(unsigned int paramLabel, unsigned int bufLength, const float *buf,
00056                           bool setUserVars) const;
00058   bool setCalibrationParameter(IntegratedCalibrationBase* calib, unsigned int paramNum,
00059                                unsigned int bufLength, const float *buf) const;
00060 
00063   AlignmentParameters* checkAliParams(Alignable *alignable, bool createUserVars) const;
00064  private:
00065   //  PedeReader() {} // no default ctr.
00066 
00067   std::ifstream          myPedeResult;
00068   const PedeSteerer      &mySteerer;
00069   const PedeLabelerBase  &myLabels;
00070   const RunRange          myRunRange;
00071 
00072   static const unsigned int myMaxNumValPerParam;
00073 };
00074 
00075 #endif