00001 #ifndef ots_ROCToFEConfiguration_h
00002 #define ots_ROCToFEConfiguration_h
00003
00004 #include "otsdaq-core/ConfigurationDataFormats/ConfigurationBase.h"
00005
00006 #include <string>
00007 #include <vector>
00008
00009 namespace ots
00010 {
00011
00012 class ROCToFEConfiguration : public ConfigurationBase
00013 {
00014
00015 public:
00016
00017 ROCToFEConfiguration(void);
00018 virtual ~ROCToFEConfiguration(void);
00019
00020
00021 void init(ConfigurationManager *configManager);
00022
00023
00024 std::vector<std::string> getFEWROCsList (std::string fECNumber) const;
00025 std::vector<std::string> getFERROCsList (std::string fEDNumber) const;
00026 std::vector<std::string> getFEWCards (unsigned int supervisorInstance) const;
00027 unsigned int getFEWChannel (const std::string& rOCName) const;
00028 unsigned int getFEWROCAddress(const std::string& rOCName) const;
00029 unsigned int getFERChannel (const std::string& rOCName) const;
00030
00031
00032
00033 private:
00034 enum{DetectorID,
00035 FEWName,
00036 FEWChannel,
00037 FEWROCAddress,
00038 FERName,
00039 FERChannel,
00040 FERROCAddress};
00041 struct ROCInfo
00042 {
00043 std::string theFEWName_;
00044 unsigned int theFEWChannel_;
00045 unsigned int theFEWROCAddress_;
00046 std::string theFERName_;
00047 unsigned int theFERChannel_;
00048 unsigned int theFERROCAddress_;
00049 };
00050 std::map<std::string, ROCInfo> nameToInfoMap_;
00051 };
00052 }
00053 #endif