QLCConfigReader.hh
Go to the documentation of this file.00001
00002 #ifndef _QLC_CONFIG_READER_HH_
00003 #define _QLC_CONFIG_READER_HH_
00004
00005 #include <map>
00006 #include <set>
00007 #include <list>
00008 #include <string>
00009 #include <vector>
00010 #include <Rtypes.h>
00011 #include "QLCConfigWriter.hh"
00012 #include "QEleChannelConfig.hh"
00013
00014
00015 class QGlobalReader;
00016 class QError;
00017
00024 class QLCConfigReader
00025 {
00026 public:
00028 QLCConfigReader();
00030 QError Open(const std::string& filename, const QLCConfigWriter::Mode mode);
00032 void Close();
00034 virtual ~QLCConfigReader();
00035
00037 QError Get(const unsigned int lg,
00038 const std::string& name,
00039 QEleChannelConfig& conf);
00040
00042 QError Get(const std::string& name,
00043 std::map<unsigned int, QEleChannelConfig>& configMap);
00044
00046 QError GetActiveChannels(std::set<int>& channels) const;
00047
00049 QError GetChannelsWithHeater(std::set<int>& channels) const;
00050
00052 QError GetWrongPolarityChannels(std::set<int>& channels) const;
00053
00055 QError GetExternalBiasValues(std::vector<double>& values) const;
00056
00062 QError GetEleCheckWorkFlow(std::list<std::pair<int, int> >& pairs);
00063
00069 QError GetBoloCheckWorkFlow(std::list<std::pair<Double_t, Bool_t> >& pairs);
00070
00071 private:
00073 QGlobalReader* fReader;
00078 QLCConfigWriter::Mode fMode;
00080 std::string fFilename;
00082 std::map<std::string,std::map<unsigned int,QEleChannelConfig> > fConfigMap;
00088 std::map<unsigned int,QEleChannelConfig> fTempMap;
00090 std::string fTempName;
00091
00093 QError GetSet(std::set<int>& values, const std::string& name) const;
00094 };
00095 #endif