1 | /* |
2 | * Legal Notice |
3 | * |
4 | * This document and associated source code (the "Work") is a part of a |
5 | * benchmark specification maintained by the TPC. |
6 | * |
7 | * The TPC reserves all right, title, and interest to the Work as provided |
8 | * under U.S. and international laws, including without limitation all patent |
9 | * and trademark rights therein. |
10 | * |
11 | * No Warranty |
12 | * |
13 | * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION |
14 | * CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE |
15 | * AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER |
16 | * WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, |
17 | * INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, |
18 | * DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR |
19 | * PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF |
20 | * WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE. |
21 | * ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, |
22 | * QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT |
23 | * WITH REGARD TO THE WORK. |
24 | * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO |
25 | * ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE |
26 | * COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS |
27 | * OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, |
28 | * INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, |
29 | * OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT |
30 | * RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD |
31 | * ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. |
32 | * |
33 | * Contributors |
34 | * - Matt Emmerton |
35 | */ |
36 | |
37 | /****************************************************************************** |
38 | * Description: This file implements the methods for formatting |
39 | * log entries in TSV or CSV format. |
40 | ******************************************************************************/ |
41 | |
42 | #include "main/EGenLogFormatterTab.h" |
43 | #include "main/DriverTypes.h" |
44 | |
45 | using namespace TPCE; |
46 | |
47 | //////////////////////////////////////////////////////////////// |
48 | // CE Transaction Settings |
49 | //////////////////////////////////////////////////////////////// |
50 | |
51 | string CLogFormatTab::GetLogOutput(CBrokerVolumeSettings &parms) { |
52 | // Compare against defaults |
53 | parms.CheckDefaults(); |
54 | |
55 | // Construct Log String |
56 | logmsg.str(emptyString); |
57 | logmsg << "Broker Volume Parameters: NONE" << endl; |
58 | |
59 | // Send String to Logger |
60 | return (logmsg.str()); |
61 | } |
62 | |
63 | string CLogFormatTab::GetLogOutput(CCustomerPositionSettings &parms) { |
64 | // Compare against defaults |
65 | parms.CheckDefaults(); |
66 | |
67 | // Construct Log String |
68 | logmsg.str(emptyString); |
69 | logmsg << "Customer Position Parameters:" << endl; |
70 | logmsg << left << setw(40) << "Parameter" |
71 | << "Default" |
72 | << "\t" |
73 | << "Current" |
74 | << "\t" |
75 | << "Default?" << endl; |
76 | logmsg << left << setw(40) << "By Cust ID: " << parms.dft.by_cust_id << "\t" << parms.cur.by_cust_id << "\t" |
77 | << (parms.state.by_cust_id ? "YES" : "NO" ) << endl; |
78 | logmsg << left << setw(40) << "By Tax ID: " << parms.dft.by_tax_id << "\t" << parms.cur.by_tax_id << "\t" |
79 | << (parms.state.by_tax_id ? "YES" : "NO" ) << endl; |
80 | logmsg << left << setw(40) << "Get History: " << parms.dft.get_history << "\t" << parms.cur.get_history << "\t" |
81 | << (parms.state.get_history ? "YES" : "NO" ) << endl; |
82 | |
83 | // Send String to Logger |
84 | return (logmsg.str()); |
85 | } |
86 | |
87 | string CLogFormatTab::GetLogOutput(CMarketWatchSettings &parms) { |
88 | // Compare against defaults |
89 | parms.CheckDefaults(); |
90 | |
91 | // Construct Log String |
92 | logmsg.str(emptyString); |
93 | logmsg << "Market Watch Parameters:" << endl; |
94 | logmsg << left << setw(40) << "Parameter" |
95 | << "Default" |
96 | << "\t" |
97 | << "Current" |
98 | << "\t" |
99 | << "Default?" << endl; |
100 | logmsg << left << setw(40) << "By Account ID: " << parms.dft.by_acct_id << "\t" << parms.cur.by_acct_id << "\t" |
101 | << (parms.state.by_acct_id ? "YES" : "NO" ) << endl; |
102 | logmsg << left << setw(40) << "By Industry: " << parms.dft.by_industry << "\t" << parms.cur.by_industry << "\t" |
103 | << (parms.state.by_industry ? "YES" : "NO" ) << endl; |
104 | logmsg << left << setw(40) << "By Watch List: " << parms.dft.by_watch_list << "\t" << parms.cur.by_watch_list |
105 | << "\t" << (parms.state.by_watch_list ? "YES" : "NO" ) << endl; |
106 | |
107 | // Send String to Logger |
108 | return (logmsg.str()); |
109 | } |
110 | |
111 | string CLogFormatTab::GetLogOutput(CSecurityDetailSettings &parms) { |
112 | // Compare against defaults |
113 | parms.CheckDefaults(); |
114 | |
115 | // Construct Log String |
116 | logmsg.str(emptyString); |
117 | logmsg << "Security Detail Parameters:" << endl; |
118 | logmsg << left << setw(40) << "Parameter" |
119 | << "Default" |
120 | << "\t" |
121 | << "Current" |
122 | << "\t" |
123 | << "Default?" << endl; |
124 | logmsg << left << setw(40) << "LOB Access Pct: " << parms.dft.LOBAccessPercentage << "\t" |
125 | << parms.cur.LOBAccessPercentage << "\t" << (parms.state.LOBAccessPercentage ? "YES" : "NO" ) << endl; |
126 | |
127 | // Send String to Logger |
128 | return (logmsg.str()); |
129 | } |
130 | |
131 | string CLogFormatTab::GetLogOutput(CTradeLookupSettings &parms) { |
132 | // Compare against defaults |
133 | parms.CheckDefaults(); |
134 | |
135 | // Construct Log String |
136 | logmsg.str(emptyString); |
137 | logmsg << "Trade Lookup Parameters:" << endl; |
138 | logmsg << left << setw(40) << "Parameter" |
139 | << "Default" |
140 | << "\t" |
141 | << "Current" |
142 | << "\t" |
143 | << "Default?" << endl; |
144 | logmsg << left << setw(40) << "Frame 1 Pct:" << parms.dft.do_frame1 << "\t" << parms.cur.do_frame1 << "\t" |
145 | << (parms.state.do_frame1 ? "YES" : "NO" ) << endl; |
146 | logmsg << left << setw(40) << "Frame 2 Pct:" << parms.dft.do_frame2 << "\t" << parms.cur.do_frame2 << "\t" |
147 | << (parms.state.do_frame2 ? "YES" : "NO" ) << endl; |
148 | logmsg << left << setw(40) << "Frame 3 Pct:" << parms.dft.do_frame3 << "\t" << parms.cur.do_frame3 << "\t" |
149 | << (parms.state.do_frame3 ? "YES" : "NO" ) << endl; |
150 | logmsg << left << setw(40) << "Frame 4 Pct:" << parms.dft.do_frame4 << "\t" << parms.cur.do_frame4 << "\t" |
151 | << (parms.state.do_frame4 ? "YES" : "NO" ) << endl; |
152 | logmsg << left << setw(40) << "Frame 1 MaxRows:" << parms.dft.MaxRowsFrame1 << "\t" << parms.cur.MaxRowsFrame1 |
153 | << "\t" << (parms.state.MaxRowsFrame1 ? "YES" : "NO" ) << endl; |
154 | logmsg << left << setw(40) << "Frame 2 MaxRows:" << parms.dft.MaxRowsFrame2 << "\t" << parms.cur.MaxRowsFrame2 |
155 | << "\t" << (parms.state.MaxRowsFrame2 ? "YES" : "NO" ) << endl; |
156 | logmsg << left << setw(40) << "Frame 3 MaxRows:" << parms.dft.MaxRowsFrame3 << "\t" << parms.cur.MaxRowsFrame3 |
157 | << "\t" << (parms.state.MaxRowsFrame3 ? "YES" : "NO" ) << endl; |
158 | logmsg << left << setw(40) << "Frame 4 MaxRows:" << parms.dft.MaxRowsFrame4 << "\t" << parms.cur.MaxRowsFrame4 |
159 | << "\t" << (parms.state.MaxRowsFrame4 ? "YES" : "NO" ) << endl; |
160 | logmsg << left << setw(40) << "BackOffFromEndTimeFrame2:" << parms.dft.BackOffFromEndTimeFrame2 << "\t" |
161 | << parms.cur.BackOffFromEndTimeFrame2 << "\t" << (parms.state.BackOffFromEndTimeFrame2 ? "YES" : "NO" ) |
162 | << endl; |
163 | logmsg << left << setw(40) << "BackOffFromEndTimeFrame3:" << parms.dft.BackOffFromEndTimeFrame3 << "\t" |
164 | << parms.cur.BackOffFromEndTimeFrame3 << "\t" << (parms.state.BackOffFromEndTimeFrame3 ? "YES" : "NO" ) |
165 | << endl; |
166 | logmsg << left << setw(40) << "BackOffFromEndTimeFrame4:" << parms.dft.BackOffFromEndTimeFrame4 << "\t" |
167 | << parms.cur.BackOffFromEndTimeFrame4 << "\t" << (parms.state.BackOffFromEndTimeFrame4 ? "YES" : "NO" ) |
168 | << endl; |
169 | |
170 | // Send String to Logger |
171 | return (logmsg.str()); |
172 | } |
173 | |
174 | string CLogFormatTab::GetLogOutput(CTradeOrderSettings &parms) { |
175 | // Compare against defaults |
176 | parms.CheckDefaults(); |
177 | |
178 | // Construct Log String |
179 | logmsg.str(emptyString); |
180 | logmsg << "Trade Order Parameters:" << endl; |
181 | logmsg << left << setw(40) << "Parameter" |
182 | << "Default" |
183 | << "\t" |
184 | << "Current" |
185 | << "\t" |
186 | << "Default?" << endl; |
187 | logmsg << left << setw(40) << "Market Trade Pct:" << parms.dft.market << "\t" << parms.cur.market << "\t" |
188 | << (parms.state.market ? "YES" : "NO" ) << endl; |
189 | logmsg << left << setw(40) << "Limit Trade Pct:" << parms.dft.limit << "\t" << parms.cur.limit << "\t" |
190 | << (parms.state.limit ? "YES" : "NO" ) << endl; |
191 | logmsg << left << setw(40) << "Stop Loss Pct:" << parms.dft.stop_loss << "\t" << parms.cur.stop_loss << "\t" |
192 | << (parms.state.stop_loss ? "YES" : "NO" ) << endl; |
193 | logmsg << left << setw(40) << "Security by Name Pct:" << parms.dft.security_by_name << "\t" |
194 | << parms.cur.security_by_name << "\t" << (parms.state.security_by_name ? "YES" : "NO" ) << endl; |
195 | logmsg << left << setw(40) << "Security by Symbol Pct:" << parms.dft.security_by_symbol << "\t" |
196 | << parms.cur.security_by_symbol << "\t" << (parms.state.security_by_symbol ? "YES" : "NO" ) << endl; |
197 | logmsg << left << setw(40) << "Buy Order Pct:" << parms.dft.buy_orders << "\t" << parms.cur.buy_orders << "\t" |
198 | << (parms.state.buy_orders ? "YES" : "NO" ) << endl; |
199 | logmsg << left << setw(40) << "Sell Order Pct:" << parms.dft.sell_orders << "\t" << parms.cur.sell_orders << "\t" |
200 | << (parms.state.sell_orders ? "YES" : "NO" ) << endl; |
201 | logmsg << left << setw(40) << "LIFO Pct:" << parms.dft.lifo << "\t" << parms.cur.lifo << "\t" |
202 | << (parms.state.lifo ? "YES" : "NO" ) << endl; |
203 | logmsg << left << setw(40) << "Margin Trade Pct:" << parms.dft.type_is_margin << "\t" << parms.cur.type_is_margin |
204 | << "\t" << (parms.state.type_is_margin ? "YES" : "NO" ) << endl; |
205 | logmsg << left << setw(40) << "Executor as Owner Pct:" << parms.dft.exec_is_owner << "\t" << parms.cur.exec_is_owner |
206 | << "\t" << (parms.state.exec_is_owner ? "YES" : "NO" ) << endl; |
207 | logmsg << left << setw(40) << "Rollback Pct:" << parms.dft.rollback << "\t" << parms.cur.rollback << "\t" |
208 | << (parms.state.rollback ? "YES" : "NO" ) << endl; |
209 | |
210 | // Send String to Logger |
211 | return (logmsg.str()); |
212 | } |
213 | |
214 | string CLogFormatTab::GetLogOutput(CTradeUpdateSettings &parms) { |
215 | // Compare against defaults |
216 | parms.CheckDefaults(); |
217 | |
218 | // Construct Log String |
219 | logmsg.str(emptyString); |
220 | logmsg << "Trade Update Parameters:" << endl; |
221 | logmsg << left << setw(40) << "Parameter" |
222 | << "Default" |
223 | << "\t" |
224 | << "Current" |
225 | << "\t" |
226 | << "Default?" << endl; |
227 | logmsg << left << setw(40) << "Frame 1 Pct:" << parms.dft.do_frame1 << "\t" << parms.cur.do_frame1 << "\t" |
228 | << (parms.state.do_frame1 ? "YES" : "NO" ) << endl; |
229 | logmsg << left << setw(40) << "Frame 2 Pct:" << parms.dft.do_frame2 << "\t" << parms.cur.do_frame2 << "\t" |
230 | << (parms.state.do_frame2 ? "YES" : "NO" ) << endl; |
231 | logmsg << left << setw(40) << "Frame 3 Pct:" << parms.dft.do_frame3 << "\t" << parms.cur.do_frame3 << "\t" |
232 | << (parms.state.do_frame3 ? "YES" : "NO" ) << endl; |
233 | logmsg << left << setw(40) << "Frame 1 MaxRows:" << parms.dft.MaxRowsFrame1 << "\t" << parms.cur.MaxRowsFrame1 |
234 | << "\t" << (parms.state.MaxRowsFrame1 ? "YES" : "NO" ) << endl; |
235 | logmsg << left << setw(40) << "Frame 2 MaxRows:" << parms.dft.MaxRowsFrame2 << "\t" << parms.cur.MaxRowsFrame2 |
236 | << "\t" << (parms.state.MaxRowsFrame2 ? "YES" : "NO" ) << endl; |
237 | logmsg << left << setw(40) << "Frame 3 MaxRows:" << parms.dft.MaxRowsFrame3 << "\t" << parms.cur.MaxRowsFrame3 |
238 | << "\t" << (parms.state.MaxRowsFrame3 ? "YES" : "NO" ) << endl; |
239 | logmsg << left << setw(40) << "Frame 1 MaxRowsToUpdate:" << parms.dft.MaxRowsToUpdateFrame1 << "\t" |
240 | << parms.cur.MaxRowsToUpdateFrame1 << "\t" << (parms.state.MaxRowsToUpdateFrame1 ? "YES" : "NO" ) << endl; |
241 | logmsg << left << setw(40) << "Frame 2 MaxRowsToUpdate:" << parms.dft.MaxRowsToUpdateFrame2 << "\t" |
242 | << parms.cur.MaxRowsToUpdateFrame2 << "\t" << (parms.state.MaxRowsToUpdateFrame2 ? "YES" : "NO" ) << endl; |
243 | logmsg << left << setw(40) << "Frame 3 MaxRowsToUpdate:" << parms.dft.MaxRowsToUpdateFrame3 << "\t" |
244 | << parms.cur.MaxRowsToUpdateFrame3 << "\t" << (parms.state.MaxRowsToUpdateFrame3 ? "YES" : "NO" ) << endl; |
245 | logmsg << left << setw(40) << "BackOffFromEndTimeFrame2:" << parms.dft.BackOffFromEndTimeFrame2 << "\t" |
246 | << parms.cur.BackOffFromEndTimeFrame2 << "\t" << (parms.state.BackOffFromEndTimeFrame2 ? "YES" : "NO" ) |
247 | << endl; |
248 | logmsg << left << setw(40) << "BackOffFromEndTimeFrame3:" << parms.dft.BackOffFromEndTimeFrame3 << "\t" |
249 | << parms.cur.BackOffFromEndTimeFrame3 << "\t" << (parms.state.BackOffFromEndTimeFrame3 ? "YES" : "NO" ) |
250 | << endl; |
251 | |
252 | // Send String to Logger |
253 | return (logmsg.str()); |
254 | } |
255 | |
256 | //////////////////////////////////////////////////////////////// |
257 | // CE Transaction Mix Settings |
258 | //////////////////////////////////////////////////////////////// |
259 | |
260 | string CLogFormatTab::GetLogOutput(CTxnMixGeneratorSettings &parms) { |
261 | // Compare against defaults |
262 | parms.CheckDefaults(); |
263 | |
264 | // Construct Log String |
265 | logmsg.str(emptyString); |
266 | logmsg << "Transaction Mixes:" << endl; |
267 | logmsg << left << setw(40) << "Parameter" |
268 | << "Default" |
269 | << "\t" |
270 | << "Current" |
271 | << "\t" |
272 | << "Default?" << endl; |
273 | logmsg << left << setw(40) << "Broker Volume: " << parms.dft.BrokerVolumeMixLevel << "\t" |
274 | << parms.cur.BrokerVolumeMixLevel << "\t" << (parms.state.BrokerVolumeMixLevel ? "YES" : "NO" ) << endl; |
275 | logmsg << left << setw(40) << "Customer Position: " << parms.dft.CustomerPositionMixLevel << "\t" |
276 | << parms.cur.CustomerPositionMixLevel << "\t" << (parms.state.CustomerPositionMixLevel ? "YES" : "NO" ) |
277 | << endl; |
278 | logmsg << left << setw(40) << "Market Watch: " << parms.dft.MarketWatchMixLevel << "\t" |
279 | << parms.cur.MarketWatchMixLevel << "\t" << (parms.state.MarketWatchMixLevel ? "YES" : "NO" ) << endl; |
280 | logmsg << left << setw(40) << "Security Detail: " << parms.dft.SecurityDetailMixLevel << "\t" |
281 | << parms.cur.SecurityDetailMixLevel << "\t" << (parms.state.SecurityDetailMixLevel ? "YES" : "NO" ) << endl; |
282 | logmsg << left << setw(40) << "Trade Lookup: " << parms.dft.TradeLookupMixLevel << "\t" |
283 | << parms.cur.TradeLookupMixLevel << "\t" << (parms.state.TradeLookupMixLevel ? "YES" : "NO" ) << endl; |
284 | logmsg << left << setw(40) << "Trade Order: " << parms.dft.TradeOrderMixLevel << "\t" |
285 | << parms.cur.TradeOrderMixLevel << "\t" << (parms.state.TradeOrderMixLevel ? "YES" : "NO" ) << endl; |
286 | logmsg << left << setw(40) << "Trade Status: " << parms.dft.TradeStatusMixLevel << "\t" |
287 | << parms.cur.TradeStatusMixLevel << "\t" << (parms.state.TradeStatusMixLevel ? "YES" : "NO" ) << endl; |
288 | logmsg << left << setw(40) << "Trade Update: " << parms.dft.TradeUpdateMixLevel << "\t" |
289 | << parms.cur.TradeUpdateMixLevel << "\t" << (parms.state.TradeUpdateMixLevel ? "YES" : "NO" ) << endl; |
290 | |
291 | // Send String to Logger |
292 | return (logmsg.str()); |
293 | } |
294 | |
295 | //////////////////////////////////////////////////////////////// |
296 | // Loader Settings |
297 | //////////////////////////////////////////////////////////////// |
298 | |
299 | string CLogFormatTab::GetLogOutput(CLoaderSettings &parms) { |
300 | // Compare against defaults |
301 | parms.CheckDefaults(); |
302 | |
303 | // Construct Log String |
304 | logmsg.str(emptyString); |
305 | logmsg << "Loader Settings:" << endl; |
306 | logmsg << left << setw(40) << "Parameter" |
307 | << "Default" |
308 | << "\t" |
309 | << "Current" |
310 | << "\t" |
311 | << "Default?" << endl; |
312 | logmsg << left << setw(40) << "Configured Customers:" << parms.dft.iConfiguredCustomerCount << "\t" |
313 | << parms.cur.iConfiguredCustomerCount << endl; |
314 | if (parms.cur.iConfiguredCustomerCount != parms.cur.iActiveCustomerCount) { |
315 | logmsg << left << setw(40) << "Active Customers:" << parms.dft.iActiveCustomerCount << "\t" |
316 | << parms.cur.iActiveCustomerCount << endl; |
317 | } |
318 | logmsg << left << setw(40) << "Starting Customer:" << parms.dft.iStartingCustomer << "\t" |
319 | << parms.cur.iStartingCustomer << endl; |
320 | logmsg << left << setw(40) << "Customer Count:" << parms.dft.iCustomerCount << "\t" << parms.cur.iCustomerCount |
321 | << endl; |
322 | logmsg << left << setw(40) << "Scale Factor:" << parms.dft.iScaleFactor << "\t" << parms.cur.iScaleFactor << "\t" |
323 | << (parms.state.iScaleFactor ? "YES" : "NO" ) << endl; |
324 | logmsg << left << setw(40) << "Days of Initial Trades:" << parms.dft.iDaysOfInitialTrades << "\t" |
325 | << parms.cur.iDaysOfInitialTrades << "\t" << (parms.state.iDaysOfInitialTrades ? "YES" : "NO" ) << endl; |
326 | |
327 | return (logmsg.str()); |
328 | } |
329 | |
330 | //////////////////////////////////////////////////////////////// |
331 | // Driver Settings |
332 | //////////////////////////////////////////////////////////////// |
333 | |
334 | string CLogFormatTab::GetLogOutput(CDriverGlobalSettings &parms) { |
335 | // Compare against defaults |
336 | parms.CheckDefaults(); |
337 | |
338 | // Construct Log String |
339 | logmsg.str(emptyString); |
340 | logmsg << "Driver Global Settings:" << endl; |
341 | logmsg << left << setw(40) << "Parameter" |
342 | << "Default" |
343 | << "\t" |
344 | << "Current" |
345 | << "\t" |
346 | << "Default?" << endl; |
347 | logmsg << left << setw(40) << "Configured Customers:" << parms.dft.iConfiguredCustomerCount << "\t" |
348 | << parms.cur.iConfiguredCustomerCount << endl; |
349 | logmsg << left << setw(40) << "Active Customers:" << parms.dft.iActiveCustomerCount << "\t" |
350 | << parms.cur.iActiveCustomerCount << endl; |
351 | logmsg << left << setw(40) << "Scale Factor:" << parms.dft.iScaleFactor << "\t" << parms.cur.iScaleFactor << "\t" |
352 | << (parms.state.iScaleFactor ? "YES" : "NO" ) << endl; |
353 | logmsg << left << setw(40) << "Days of Initial Trades:" << parms.dft.iDaysOfInitialTrades << "\t" |
354 | << parms.cur.iDaysOfInitialTrades << "\t" << (parms.state.iDaysOfInitialTrades ? "YES" : "NO" ) << endl; |
355 | |
356 | return (logmsg.str()); |
357 | } |
358 | |
359 | string CLogFormatTab::GetLogOutput(CDriverCESettings &parms) { |
360 | // Construct Log String |
361 | logmsg.str(emptyString); |
362 | logmsg << "Driver CE Settings:" << endl; |
363 | logmsg << left << setw(40) << "Parameter" |
364 | << "Value" << endl; |
365 | logmsg << left << setw(40) << "Unique ID:" << parms.cur.UniqueId << endl; |
366 | logmsg << left << setw(40) << "Txn Mix RNGSeed:" << parms.cur.TxnMixRNGSeed << endl; |
367 | logmsg << left << setw(40) << "Txn Input RNGSeed:" << parms.cur.TxnInputRNGSeed << endl; |
368 | |
369 | // Send String to Logger |
370 | return (logmsg.str()); |
371 | } |
372 | |
373 | string CLogFormatTab::GetLogOutput(CDriverCEPartitionSettings &parms) { |
374 | // Compare against defaults |
375 | parms.CheckDefaults(); |
376 | |
377 | // Construct Log String |
378 | logmsg.str(emptyString); |
379 | logmsg << "Driver CE Partition Settings:" << endl; |
380 | logmsg << left << setw(40) << "Parameter" |
381 | << "Default" |
382 | << "\t" |
383 | << "Current" |
384 | << "\t" |
385 | << "Default?" << endl; |
386 | logmsg << left << setw(40) << "Partition Starting Customer ID:" << parms.dft.iMyStartingCustomerId << "\t" |
387 | << parms.cur.iMyStartingCustomerId << endl; |
388 | logmsg << left << setw(40) << "Partition Customer Count:" << parms.dft.iMyCustomerCount << "\t" |
389 | << parms.cur.iMyCustomerCount << endl; |
390 | logmsg << left << setw(40) << "Partition Percent:" << parms.dft.iPartitionPercent << "\t" |
391 | << parms.cur.iPartitionPercent << "\t" << (parms.state.iPartitionPercent ? "YES" : "NO" ) << endl; |
392 | |
393 | // Send String to Logger |
394 | return (logmsg.str()); |
395 | } |
396 | |
397 | string CLogFormatTab::GetLogOutput(CDriverMEESettings &parms) { |
398 | // Construct Log String |
399 | logmsg.str(emptyString); |
400 | logmsg << "Driver MEE Settings:" << endl; |
401 | logmsg << left << setw(40) << "Parameter" |
402 | << "Value" << endl; |
403 | logmsg << left << setw(40) << "Unique ID:" << parms.cur.UniqueId << endl; |
404 | logmsg << left << setw(40) << "Ticker Tape RNGSeed:" << parms.cur.TickerTapeRNGSeed << endl; |
405 | logmsg << left << setw(40) << "Trading Floor RNGSeed:" << parms.cur.TradingFloorRNGSeed << endl; |
406 | |
407 | // Send String to Logger |
408 | return (logmsg.str()); |
409 | } |
410 | |
411 | string CLogFormatTab::GetLogOutput(CDriverDMSettings &parms) { |
412 | // Construct Log String |
413 | logmsg.str(emptyString); |
414 | logmsg << "Driver DM Settings:" << endl; |
415 | logmsg << left << setw(40) << "Parameter" |
416 | << "Value" << endl; |
417 | logmsg << left << setw(40) << "Unique ID:" << parms.cur.UniqueId << endl; |
418 | logmsg << left << setw(40) << "RNGSeed:" << parms.cur.RNGSeed << endl; |
419 | |
420 | // Send String to Logger |
421 | return (logmsg.str()); |
422 | } |
423 | |