File indexing completed on 2023-03-17 10:47:46
0001 #ifndef DTCompactMapWriter_H
0002 #define DTCompactMapWriter_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 class DTROBCardId;
0022 class DTROBCardCompare;
0023 class DTTDCChannelId;
0024 class DTTDCChannelCompare;
0025 class DTPhysicalWireId;
0026 class DTPhysicalWireCompare;
0027 class DTROSChannelId;
0028 class DTROSChannelCompare;
0029
0030
0031
0032
0033 #include <string>
0034 #include <vector>
0035 #include <map>
0036 #include <algorithm>
0037 #include <iostream>
0038 #include <fstream>
0039
0040 class DTCompactMapWriter {
0041 public:
0042 static void buildSteering(std::istream& jobDesc);
0043
0044 private:
0045 static void fillTDCMap(const std::string& map_file,
0046 int wheel,
0047 int sector,
0048 std::map<DTROBCardId, int, DTROBCardCompare>& tdc_idm,
0049 int stationId,
0050 int map_count,
0051 bool& write);
0052 static void fillROSMap(const std::string& map_file,
0053 int ddu,
0054 int ros,
0055 int whdef,
0056 int secdef,
0057 std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ddu_map,
0058 std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_map,
0059 int map_count,
0060 bool& write);
0061 static void cloneROS(std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_m,
0062 std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_a,
0063 int ddu_o,
0064 int ros_o,
0065 int ddu_f,
0066 int ros_f);
0067 static void appendROS(std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_m,
0068 std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_a);
0069 static void fillReadOutMap(int ros_count,
0070 std::map<DTROBCardId, int, DTROBCardCompare>& tdc_idm,
0071 std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ddu_map,
0072 std::map<DTROSChannelId, DTROBCardId, DTROSChannelCompare>& ros_map);
0073 };
0074
0075 #endif