File indexing completed on 2024-04-06 11:56:37
0001 #ifndef MILLEPEDEPEDEREADER_H
0002 #define MILLEPEDEPEDEREADER_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <fstream>
0017 #include <vector>
0018
0019 #include <Alignment/MillePedeAlignmentAlgorithm/interface/PedeLabelerBase.h>
0020 #include "Alignment/CommonAlignment/interface/Utilities.h"
0021
0022 class PedeSteerer;
0023 class PedeLabelerBase;
0024 class Alignable;
0025 class AlignmentParameters;
0026 class IntegratedCalibrationBase;
0027
0028 namespace edm {
0029 class ParameterSet;
0030 }
0031
0032
0033
0034 class PedeReader {
0035 public:
0036 typedef PedeLabelerBase::RunNumber RunNumber;
0037 typedef PedeLabelerBase::RunRange RunRange;
0038
0039 PedeReader(const edm::ParameterSet &config,
0040 const PedeSteerer &steerer,
0041 const PedeLabelerBase &labels,
0042 const RunRange &runrange);
0043
0044 ~PedeReader() {}
0045
0046
0047
0048
0049 bool read(align::Alignables &alignables, bool setUserVars);
0050
0051
0052 template <class T>
0053 bool readIfSameLine(std::ifstream &aStream, T &outValue) const;
0054
0055
0056 Alignable *setParameter(unsigned int paramLabel, unsigned int bufLength, const float *buf, bool setUserVars) const;
0057
0058 bool setCalibrationParameter(IntegratedCalibrationBase *calib,
0059 unsigned int paramNum,
0060 unsigned int bufLength,
0061 const float *buf) const;
0062
0063
0064
0065 AlignmentParameters *checkAliParams(Alignable *alignable, bool createUserVars) const;
0066
0067 private:
0068
0069
0070 std::ifstream myPedeResult;
0071 const PedeSteerer &mySteerer;
0072 const PedeLabelerBase &myLabels;
0073 const RunRange myRunRange;
0074
0075 static const unsigned int myMaxNumValPerParam;
0076 };
0077
0078 #endif