2 #include <onlmon/OnlMonServer.h>
13 std::pair<unsigned int, unsigned int> pktlimits;
14 pktlimits.first = 17000;
15 pktlimits.second = 17999;
16 granulepacketlimits[
"ACC"] = pktlimits;
18 pktlimits.first = 1000;
19 pktlimits.second = 1999;
20 granulepacketlimits[
"BBC"] = pktlimits;
22 pktlimits.first = 3000;
23 pktlimits.second = 3999;
24 granulepacketlimits[
"DCH"] = pktlimits;
26 pktlimits.first = 8000;
27 pktlimits.second = 8999;
28 granulepacketlimits[
"EMC"] = pktlimits;
30 pktlimits.first = 14200;
31 pktlimits.second = 14201;
32 granulepacketlimits[
"ERT"] = pktlimits;
38 pktlimits.first = 25000;
39 pktlimits.second = 25999;
40 granulepacketlimits[
"FVTX"] = pktlimits;
42 pktlimits.first = 14000;
43 pktlimits.second = 14024;
44 granulepacketlimits[
"GL1"] = pktlimits;
46 pktlimits.first = 14050;
47 pktlimits.second = 14199;
48 granulepacketlimits[
"LVL2"] = pktlimits;
50 pktlimits.first = 14777;
51 pktlimits.second = 14777;
52 granulepacketlimits[
"LVL1"] = pktlimits;
54 pktlimits.first = 21100;
55 pktlimits.second = 21110;
56 granulepacketlimits[
"MPC"] = pktlimits;
58 pktlimits.first = 12000;
59 pktlimits.second = 12999;
60 granulepacketlimits[
"MUID"] = pktlimits;
62 pktlimits.first = 11000;
63 pktlimits.second = 11999;
64 granulepacketlimits[
"MUTR"] = pktlimits;
71 pktlimits.first = 4000;
72 pktlimits.second = 4999;
73 granulepacketlimits[
"PAD"] = pktlimits;
75 pktlimits.first = 6000;
76 pktlimits.second = 6999;
77 granulepacketlimits[
"RICH"] = pktlimits;
79 pktlimits.first = 19000;
80 pktlimits.second = 19999;
81 granulepacketlimits[
"RPC"] = pktlimits;
83 pktlimits.first = 7000;
84 pktlimits.second = 7099;
85 granulepacketlimits[
"TOFE"] = pktlimits;
87 pktlimits.first = 7100;
88 pktlimits.second = 7999;
89 granulepacketlimits[
"TOFW"] = pktlimits;
91 pktlimits.first = 21300;
92 pktlimits.second = 21360;
93 granulepacketlimits[
"MPCEX"] = pktlimits;
95 pktlimits.first = 24000;
96 pktlimits.second = 24099;
97 granulepacketlimits[
"VTXP"] = pktlimits;
99 pktlimits.first = 24100;
100 pktlimits.second = 24199;
101 granulepacketlimits[
"VTXS"] = pktlimits;
103 pktlimits.first = 13000;
104 pktlimits.second = 13999;
105 granulepacketlimits[
"ZDC"] = pktlimits;
113 std::set<std::string> pcffiles;
115 std::set<std::string>::const_iterator
piter;
116 for (piter = pcffiles.begin(); piter != pcffiles.end(); ++
piter)
118 std::ostringstream filenam;
119 if (getenv(
"ONLINE_CONFIGURATION"))
121 filenam << getenv(
"ONLINE_CONFIGURATION") <<
"/rc/hw/";
128 if (filenam.str().find(
"gl1test.pcf") != std::string::npos)
130 std::cout <<
" Could not open " << filenam.str() << std::endl;
135 getline(infile, FullLine);
136 std::string::size_type pos1;
137 std::string::size_type pos2;
139 while (!infile.eof())
142 if (FullLine.find(
"//") == std::string::npos)
144 if ((pos1 = FullLine.find(
"DCMGROUP")) != std::string::npos && FullLine.find(
"level1dd") != std::string::npos)
146 FullLine.erase(0, pos1);
147 pos2 = FullLine.find(
',');
148 dcmgrp = FullLine.substr(0, pos2);
151 if ((pos1 = FullLine.find(
"packetid")) != std::string::npos)
153 FullLine.erase(0, pos1);
154 while ((pos1 = FullLine.find(
':')) != std::string::npos)
156 pos2 = FullLine.find(
',');
158 std::string packetidstr = FullLine.substr(pos1 + 1, pos2 - (pos1 + 1));
159 std::istringstream
line;
160 line.str(packetidstr);
165 if (dcmgrp !=
"NONE")
171 std::cout <<
"error assigning packet " << packetid <<
" to dcm group" << std::endl;
175 FullLine.erase(0, pos2 + 1);
179 getline(infile, FullLine);
189 std::set<std::string> pcffiles;
191 std::set<std::string>::const_iterator
piter;
192 for (piter = pcffiles.begin(); piter != pcffiles.end(); ++
piter)
194 std::ostringstream filenam;
195 if (getenv(
"ONLINE_CONFIGURATION"))
197 filenam << getenv(
"ONLINE_CONFIGURATION") <<
"/rc/hw/";
204 std::cout <<
" Could not open " << filenam.str() << std::endl;
208 getline(infile, FullLine);
209 std::string::size_type pos1;
210 std::string::size_type pos2;
213 while (!infile.eof())
215 if (FullLine.find(
"//") == std::string::npos)
217 if ((pos1 = FullLine.find(
"DCMGROUP")) != std::string::npos && FullLine.find(
"level1dd") != std::string::npos)
219 FullLine.erase(0, pos1);
220 pos2 = FullLine.find(
',');
221 dcmgrp = FullLine.substr(0, pos2);
224 if ((pos1 = FullLine.find(
"unit")) != std::string::npos)
226 FullLine.erase(0, pos1);
227 pos1 = FullLine.find(
':');
228 FullLine.erase(0, pos1 + 1);
229 pos2 = FullLine.find(
',');
230 unitgrp = FullLine.substr(0, pos2);
233 if ((pos1 = FullLine.find(
"packetid")) != std::string::npos)
235 FullLine.erase(0, pos1);
236 while ((pos1 = FullLine.find(
':')) != std::string::npos)
238 pos2 = FullLine.find(
',');
240 std::string packetidstr = FullLine.substr(pos1 + 1, pos2 - (pos1 + 1));
241 std::istringstream
line;
242 line.str(packetidstr);
247 if (dcmgrp !=
"NONE" && unitgrp !=
"NONE")
254 std::cout <<
"error assigning packet " << packetid <<
" to fiber group" << std::endl;
258 FullLine.erase(0, pos2 + 1);
262 getline(infile, FullLine);