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 00026 namespace edm { 00027 class ParameterSet; 00028 } 00029 00030 /*************************************** 00031 ****************************************/ 00032 class PedeReader 00033 { 00034 public: 00035 00036 typedef PedeLabelerBase::RunNumber RunNumber; 00037 typedef PedeLabelerBase::RunRange RunRange; 00038 00039 PedeReader(const edm::ParameterSet &config, const PedeSteerer &steerer, 00040 const PedeLabelerBase &labels, const RunRange &runrange); 00042 ~PedeReader() {} 00045 bool read(std::vector<Alignable*> &alignables, bool setUserVars); 00048 template<class T> 00049 bool readIfSameLine(std::ifstream &aStream, T &outValue) const; 00052 Alignable* setParameter(unsigned int paramLabel, unsigned int bufLength, float *buf, 00053 bool setUserVars) const; 00056 AlignmentParameters* checkAliParams(Alignable *alignable, bool createUserVars) const; 00057 private: 00058 // PedeReader() {} // no default ctr. 00059 00060 std::ifstream myPedeResult; 00061 const PedeSteerer &mySteerer; 00062 const PedeLabelerBase &myLabels; 00063 const RunRange myRunRange; 00064 00065 static const unsigned int myMaxNumValPerParam; 00066 }; 00067 00068 #endif