GCC Code Coverage Report


Directory: ./
File: src/Representation/Representation.cpp
Date: 2026-01-15 15:35:36
Exec Total Coverage
Lines: 481 635 75.7%
Functions: 169 222 76.1%
Branches: 68 170 40.0%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7
8 #include "Representation.h"
9
10 ///Get the name of the class Data for PhoenixTypeStream
11 /** @return name of the class Data for PhoenixTypeStream
12 */
13 template<>
14 1 std::string phoenix_getTypeName<Data >(){
15
1/1
✓ Branch 0 (4→5) taken 1 times.
2 return "Data";
16 }
17
18 ///Check Stream for a Data
19 /** @param fieldDescription : description of the field to be checked
20 * @param data : data to be checked
21 * @param reference : reference of the check
22 * @param out : ostream used to collect feed back in case of error (std::cerr or a logger)
23 * @return true on success, false otherwise
24 */
25 5 bool CheckStream<Data>::check_stream(const std::string & fieldDescription, const Data & data, const Data & reference, std::ostream & out){
26 5 bool b(true);
27
2/2
✓ Branch 0 (4→5) taken 5 times.
✓ Branch 2 (5→6) taken 5 times.
5 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- Data::name", data.getName(), reference.getName(), out);
28
2/2
✓ Branch 0 (9→10) taken 5 times.
✓ Branch 2 (10→11) taken 5 times.
5 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- Data::description", data.getDescription(), reference.getDescription(), out);
29
2/2
✓ Branch 0 (14→15) taken 5 times.
✓ Branch 2 (15→16) taken 5 times.
5 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- Data::type", data.getType(), reference.getType(), out);
30
2/2
✓ Branch 0 (19→20) taken 5 times.
✓ Branch 2 (20→21) taken 5 times.
5 b &= CheckStream<DataStreamMsg>::check_stream(fieldDescription + "\n- Data::value", data.getValue(), reference.getValue(), out);
31 5 return b;
32 }
33
34
35 ///Constructor of class Data
36
2/2
✓ Branch 0 (3→4) taken 418 times.
✓ Branch 2 (4→5) taken 418 times.
418 Data::Data(){
37
1/1
✓ Branch 0 (6→7) taken 418 times.
418 initialisationData();
38 418 }
39
40 ///Destructor of class Data
41 419 Data::~Data(){
42
43 419 }
44
45 ///Copy Constructor of class Data
46 /** @param other : Data we want ot copy
47 */
48
2/2
✓ Branch 0 (3→4) taken 1 times.
✓ Branch 2 (4→5) taken 1 times.
1 Data::Data(const Data & other){
49
1/1
✓ Branch 0 (6→7) taken 1 times.
1 copyData(other);
50 1 }
51
52 ///Operator = of class Data
53 /** @param other : Data we want ot copy
54 * @return copied class Data
55 */
56 37 Data & Data::operator = (const Data & other){
57 37 copyData(other);
58 37 return *this;
59 }
60
61 ///Sets the name of the Data
62 /** @param name : name of the Data
63 */
64 1 void Data::setName(const PString & name){
65 1 p_name = name;
66 1 }
67
68 ///Sets the description of the Data
69 /** @param description : description of the Data
70 */
71 1 void Data::setDescription(const PString & description){
72 1 p_description = description;
73 1 }
74
75 ///Sets the type of the Data
76 /** @param type : type of the Data
77 */
78 26 void Data::setType(const PString & type){
79 26 p_type = type;
80 26 }
81
82 ///Sets the value of the Data
83 /** @param value : value of the Data
84 */
85 void Data::setValue(const DataStreamMsg & value){
86 p_value = value;
87 }
88
89 ///Gets the name of the Data
90 /** @return name of the Data
91 */
92 14 const PString & Data::getName() const{
93 14 return p_name;
94 }
95
96 ///Gets the name of the Data
97 /** @return name of the Data
98 */
99 4 PString & Data::getName(){
100 4 return p_name;
101 }
102
103 ///Gets the description of the Data
104 /** @return description of the Data
105 */
106 14 const PString & Data::getDescription() const{
107 14 return p_description;
108 }
109
110 ///Gets the description of the Data
111 /** @return description of the Data
112 */
113 4 PString & Data::getDescription(){
114 4 return p_description;
115 }
116
117 ///Gets the type of the Data
118 /** @return type of the Data
119 */
120 57 const PString & Data::getType() const{
121 57 return p_type;
122 }
123
124 ///Gets the type of the Data
125 /** @return type of the Data
126 */
127 18 PString & Data::getType(){
128 18 return p_type;
129 }
130
131 ///Gets the value of the Data
132 /** @return value of the Data
133 */
134 29 const DataStreamMsg & Data::getValue() const{
135 29 return p_value;
136 }
137
138 ///Gets the value of the Data
139 /** @return value of the Data
140 */
141 48 DataStreamMsg & Data::getValue(){
142 48 return p_value;
143 }
144
145 ///Copy Function of class Data
146 /** @param other : Data we want ot copy
147 */
148 38 void Data::copyData(const Data & other){
149 38 p_name = other.p_name;
150 38 p_description = other.p_description;
151 38 p_type = other.p_type;
152 38 p_value = other.p_value;
153 38 }
154
155 ///Initialisation Function of class Data
156 418 void Data::initialisationData(){
157 418 p_name = "";
158 418 p_description = "";
159 418 p_type = "";
160 418 }
161
162 ///Get the name of the class Function for PhoenixTypeStream
163 /** @return name of the class Function for PhoenixTypeStream
164 */
165 template<>
166 1 std::string phoenix_getTypeName<Function >(){
167
1/1
✓ Branch 0 (4→5) taken 1 times.
2 return "Function";
168 }
169
170 ///Check Stream for a Function
171 /** @param fieldDescription : description of the field to be checked
172 * @param data : data to be checked
173 * @param reference : reference of the check
174 * @param out : ostream used to collect feed back in case of error (std::cerr or a logger)
175 * @return true on success, false otherwise
176 */
177 bool CheckStream<Function>::check_stream(const std::string & fieldDescription, const Function & data, const Function & reference, std::ostream & out){
178 bool b(true);
179 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- Function::name", data.getName(), reference.getName(), out);
180 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- Function::description", data.getDescription(), reference.getDescription(), out);
181 b &= CheckStream<std::vector<Data>>::check_stream(fieldDescription + "\n- Function::vecParam", data.getVecParam(), reference.getVecParam(), out);
182 b &= CheckStream<Data>::check_stream(fieldDescription + "\n- Function::returnValue", data.getReturnValue(), reference.getReturnValue(), out);
183 return b;
184 }
185
186
187 ///Constructor of class Function
188
2/2
✓ Branch 0 (3→4) taken 2 times.
✓ Branch 2 (5→6) taken 2 times.
2 Function::Function(){
189
1/1
✓ Branch 0 (6→7) taken 2 times.
2 initialisationFunction();
190 2 }
191
192 ///Destructor of class Function
193 3 Function::~Function(){
194
195 3 }
196
197 ///Copy Constructor of class Function
198 /** @param other : Function we want ot copy
199 */
200
2/2
✓ Branch 0 (3→4) taken 1 times.
✓ Branch 2 (5→6) taken 1 times.
1 Function::Function(const Function & other){
201
1/1
✓ Branch 0 (6→7) taken 1 times.
1 copyFunction(other);
202 1 }
203
204 ///Operator = of class Function
205 /** @param other : Function we want ot copy
206 * @return copied class Function
207 */
208 1 Function & Function::operator = (const Function & other){
209 1 copyFunction(other);
210 1 return *this;
211 }
212
213 ///Sets the name of the Function
214 /** @param name : name of the Function
215 */
216 1 void Function::setName(const PString & name){
217 1 p_name = name;
218 1 }
219
220 ///Sets the description of the Function
221 /** @param description : description of the Function
222 */
223 1 void Function::setDescription(const PString & description){
224 1 p_description = description;
225 1 }
226
227 ///Sets the vecParam of the Function
228 /** @param vecParam : vecParam of the Function
229 */
230 void Function::setVecParam(const std::vector<Data> & vecParam){
231 p_vecParam = vecParam;
232 }
233
234 ///Sets the returnValue of the Function
235 /** @param returnValue : returnValue of the Function
236 */
237 void Function::setReturnValue(const Data & returnValue){
238 p_returnValue = returnValue;
239 }
240
241 ///Gets the name of the Function
242 /** @return name of the Function
243 */
244 4 const PString & Function::getName() const{
245 4 return p_name;
246 }
247
248 ///Gets the name of the Function
249 /** @return name of the Function
250 */
251 4 PString & Function::getName(){
252 4 return p_name;
253 }
254
255 ///Gets the description of the Function
256 /** @return description of the Function
257 */
258 4 const PString & Function::getDescription() const{
259 4 return p_description;
260 }
261
262 ///Gets the description of the Function
263 /** @return description of the Function
264 */
265 4 PString & Function::getDescription(){
266 4 return p_description;
267 }
268
269 ///Gets the vecParam of the Function
270 /** @return vecParam of the Function
271 */
272 const std::vector<Data> & Function::getVecParam() const{
273 return p_vecParam;
274 }
275
276 ///Gets the vecParam of the Function
277 /** @return vecParam of the Function
278 */
279 std::vector<Data> & Function::getVecParam(){
280 return p_vecParam;
281 }
282
283 ///Gets the returnValue of the Function
284 /** @return returnValue of the Function
285 */
286 const Data & Function::getReturnValue() const{
287 return p_returnValue;
288 }
289
290 ///Gets the returnValue of the Function
291 /** @return returnValue of the Function
292 */
293 Data & Function::getReturnValue(){
294 return p_returnValue;
295 }
296
297 ///Copy Function of class Function
298 /** @param other : Function we want ot copy
299 */
300 2 void Function::copyFunction(const Function & other){
301 2 p_name = other.p_name;
302 2 p_description = other.p_description;
303 2 p_vecParam = other.p_vecParam;
304 2 p_returnValue = other.p_returnValue;
305 2 }
306
307 ///Initialisation Function of class Function
308 2 void Function::initialisationFunction(){
309 2 p_name = "";
310 2 p_description = "";
311 2 }
312
313 ///Get the name of the class Message for PhoenixTypeStream
314 /** @return name of the class Message for PhoenixTypeStream
315 */
316 template<>
317 2 std::string phoenix_getTypeName<Message >(){
318
1/1
✓ Branch 0 (4→5) taken 2 times.
4 return "Message";
319 }
320
321 ///Check Stream for a Message
322 /** @param fieldDescription : description of the field to be checked
323 * @param data : data to be checked
324 * @param reference : reference of the check
325 * @param out : ostream used to collect feed back in case of error (std::cerr or a logger)
326 * @return true on success, false otherwise
327 */
328 5 bool CheckStream<Message>::check_stream(const std::string & fieldDescription, const Message & data, const Message & reference, std::ostream & out){
329 5 bool b(true);
330
2/2
✓ Branch 0 (4→5) taken 5 times.
✓ Branch 2 (5→6) taken 5 times.
5 b &= CheckStream<time_t>::check_stream(fieldDescription + "\n- Message::sendTime", data.getSendTime(), reference.getSendTime(), out);
331
4/4
✓ Branch 0 (7→8) taken 5 times.
✓ Branch 2 (8→9) taken 5 times.
✓ Branch 4 (9→10) taken 5 times.
✓ Branch 6 (10→11) taken 5 times.
5 b &= CheckStream<size_t>::check_stream(fieldDescription + "\n- Message::id", data.getId(), reference.getId(), out);
332
4/4
✓ Branch 0 (12→13) taken 5 times.
✓ Branch 2 (13→14) taken 5 times.
✓ Branch 4 (14→15) taken 5 times.
✓ Branch 6 (15→16) taken 5 times.
5 b &= CheckStream<bool>::check_stream(fieldDescription + "\n- Message::isConfirmationNeeded", data.getIsConfirmationNeeded(), reference.getIsConfirmationNeeded(), out);
333
2/2
✓ Branch 0 (19→20) taken 5 times.
✓ Branch 2 (20→21) taken 5 times.
5 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- Message::sender", data.getSender(), reference.getSender(), out);
334
2/2
✓ Branch 0 (24→25) taken 5 times.
✓ Branch 2 (25→26) taken 5 times.
5 b &= CheckStream<std::vector<PString>>::check_stream(fieldDescription + "\n- Message::vecRecver", data.getVecRecver(), reference.getVecRecver(), out);
335
2/2
✓ Branch 0 (29→30) taken 5 times.
✓ Branch 2 (30→31) taken 5 times.
5 b &= CheckStream<MessageType::MessageType>::check_stream(fieldDescription + "\n- Message::type", data.getType(), reference.getType(), out);
336
2/2
✓ Branch 0 (34→35) taken 5 times.
✓ Branch 2 (35→36) taken 5 times.
5 b &= CheckStream<Data>::check_stream(fieldDescription + "\n- Message::data", data.getData(), reference.getData(), out);
337 5 return b;
338 }
339
340
341 ///Constructor of class Message
342
1/1
✓ Branch 0 (4→5) taken 383 times.
383 Message::Message(){
343
1/1
✓ Branch 0 (5→6) taken 383 times.
383 initialisationMessage();
344 383 }
345
346 ///Destructor of class Message
347 384 Message::~Message(){
348
349 384 }
350
351 ///Copy Constructor of class Message
352 /** @param other : Message we want ot copy
353 */
354
1/1
✓ Branch 0 (4→5) taken 1 times.
1 Message::Message(const Message & other){
355
1/1
✓ Branch 0 (5→6) taken 1 times.
1 copyMessage(other);
356 1 }
357
358 ///Operator = of class Message
359 /** @param other : Message we want ot copy
360 * @return copied class Message
361 */
362 14 Message & Message::operator = (const Message & other){
363 14 copyMessage(other);
364 14 return *this;
365 }
366
367 ///Sets the sendTime of the Message
368 /** @param sendTime : sendTime of the Message
369 */
370 29 void Message::setSendTime(const time_t & sendTime){
371 29 p_sendTime = sendTime;
372 29 }
373
374 ///Sets the id of the Message
375 /** @param id : id of the Message
376 */
377 39 void Message::setId(size_t id){
378 39 p_id = id;
379 39 }
380
381 ///Sets the isConfirmationNeeded of the Message
382 /** @param isConfirmationNeeded : isConfirmationNeeded of the Message
383 */
384 17 void Message::setIsConfirmationNeeded(bool isConfirmationNeeded){
385 17 p_isConfirmationNeeded = isConfirmationNeeded;
386 17 }
387
388 ///Sets the sender of the Message
389 /** @param sender : sender of the Message
390 */
391 31 void Message::setSender(const PString & sender){
392 31 p_sender = sender;
393 31 }
394
395 ///Sets the vecRecver of the Message
396 /** @param vecRecver : vecRecver of the Message
397 */
398 void Message::setVecRecver(const std::vector<PString> & vecRecver){
399 p_vecRecver = vecRecver;
400 }
401
402 ///Sets the type of the Message
403 /** @param type : type of the Message
404 */
405 36 void Message::setType(const MessageType::MessageType & type){
406 36 p_type = type;
407 36 }
408
409 ///Sets the data of the Message
410 /** @param data : data of the Message
411 */
412 17 void Message::setData(const Data & data){
413 17 p_data = data;
414 17 }
415
416 ///Gets the sendTime of the Message
417 /** @return sendTime of the Message
418 */
419 587 const time_t & Message::getSendTime() const{
420 587 return p_sendTime;
421 }
422
423 ///Gets the sendTime of the Message
424 /** @return sendTime of the Message
425 */
426 10 time_t & Message::getSendTime(){
427 10 return p_sendTime;
428 }
429
430 ///Gets the id of the Message
431 /** @return id of the Message
432 */
433 26 size_t Message::getId() const{
434 26 return p_id;
435 }
436
437 ///Gets the id of the Message
438 /** @return id of the Message
439 */
440 22 size_t & Message::getId(){
441 22 return p_id;
442 }
443
444 ///Gets the isConfirmationNeeded of the Message
445 /** @return isConfirmationNeeded of the Message
446 */
447 34 bool Message::getIsConfirmationNeeded() const{
448 34 return p_isConfirmationNeeded;
449 }
450
451 ///Gets the isConfirmationNeeded of the Message
452 /** @return isConfirmationNeeded of the Message
453 */
454 26 bool & Message::getIsConfirmationNeeded(){
455 26 return p_isConfirmationNeeded;
456 }
457
458 ///Gets the sender of the Message
459 /** @return sender of the Message
460 */
461 14 const PString & Message::getSender() const{
462 14 return p_sender;
463 }
464
465 ///Gets the sender of the Message
466 /** @return sender of the Message
467 */
468 23 PString & Message::getSender(){
469 23 return p_sender;
470 }
471
472 ///Gets the vecRecver of the Message
473 /** @return vecRecver of the Message
474 */
475 1736 const std::vector<PString> & Message::getVecRecver() const{
476 1736 return p_vecRecver;
477 }
478
479 ///Gets the vecRecver of the Message
480 /** @return vecRecver of the Message
481 */
482 29 std::vector<PString> & Message::getVecRecver(){
483 29 return p_vecRecver;
484 }
485
486 ///Gets the type of the Message
487 /** @return type of the Message
488 */
489 10 const MessageType::MessageType & Message::getType() const{
490 10 return p_type;
491 }
492
493 ///Gets the type of the Message
494 /** @return type of the Message
495 */
496 46 MessageType::MessageType & Message::getType(){
497 46 return p_type;
498 }
499
500 ///Gets the data of the Message
501 /** @return data of the Message
502 */
503 18 const Data & Message::getData() const{
504 18 return p_data;
505 }
506
507 ///Gets the data of the Message
508 /** @return data of the Message
509 */
510 32 Data & Message::getData(){
511 32 return p_data;
512 }
513
514 ///Copy Function of class Message
515 /** @param other : Message we want ot copy
516 */
517 15 void Message::copyMessage(const Message & other){
518 15 p_sendTime = other.p_sendTime;
519 15 p_id = other.p_id;
520 15 p_isConfirmationNeeded = other.p_isConfirmationNeeded;
521 15 p_sender = other.p_sender;
522 15 p_vecRecver = other.p_vecRecver;
523 15 p_type = other.p_type;
524 15 p_data = other.p_data;
525 15 }
526
527 ///Initialisation Function of class Message
528 383 void Message::initialisationMessage(){
529 383 p_id = 0lu;
530 383 p_isConfirmationNeeded = false;
531 383 p_sender = "";
532 383 }
533
534 ///Get the name of the class VecStat for PhoenixTypeStream
535 /** @return name of the class VecStat for PhoenixTypeStream
536 */
537 template<>
538 1 std::string phoenix_getTypeName<VecStat >(){
539
1/1
✓ Branch 0 (4→5) taken 1 times.
2 return "VecStat";
540 }
541
542 ///Check Stream for a VecStat
543 /** @param fieldDescription : description of the field to be checked
544 * @param data : data to be checked
545 * @param reference : reference of the check
546 * @param out : ostream used to collect feed back in case of error (std::cerr or a logger)
547 * @return true on success, false otherwise
548 */
549 bool CheckStream<VecStat>::check_stream(const std::string & fieldDescription, const VecStat & data, const VecStat & reference, std::ostream & out){
550 bool b(true);
551 b &= CheckStream<std::vector<size_t>>::check_stream(fieldDescription + "\n- VecStat::nbEvent", data.getNbEvent(), reference.getNbEvent(), out);
552 b &= CheckStream<std::vector<time_t>>::check_stream(fieldDescription + "\n- VecStat::startTimestamp", data.getStartTimestamp(), reference.getStartTimestamp(), out);
553 b &= CheckStream<std::vector<time_t>>::check_stream(fieldDescription + "\n- VecStat::endTimestamp", data.getEndTimestamp(), reference.getEndTimestamp(), out);
554 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::min", data.getMin(), reference.getMin(), out);
555 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::max", data.getMax(), reference.getMax(), out);
556 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::average", data.getAverage(), reference.getAverage(), out);
557 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::rate", data.getRate(), reference.getRate(), out);
558 b &= CheckStream<std::vector<std::vector<float> >>::check_stream(fieldDescription + "\n- VecStat::vecRateQuantile", data.getVecRateQuantile(), reference.getVecRateQuantile(), out);
559 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::rateEventBelowLowerBound", data.getRateEventBelowLowerBound(), reference.getRateEventBelowLowerBound(), out);
560 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::rateEventAboveUpperBound", data.getRateEventAboveUpperBound(), reference.getRateEventAboveUpperBound(), out);
561 return b;
562 }
563
564
565 ///Constructor of class VecStat
566 345 VecStat::VecStat(){
567
1/1
✓ Branch 0 (12→13) taken 345 times.
345 initialisationVecStat();
568 345 }
569
570 ///Destructor of class VecStat
571 353 VecStat::~VecStat(){
572
573 353 }
574
575 ///Copy Constructor of class VecStat
576 /** @param other : VecStat we want ot copy
577 */
578 8 VecStat::VecStat(const VecStat & other){
579
1/1
✓ Branch 0 (12→13) taken 8 times.
8 copyVecStat(other);
580 8 }
581
582 ///Operator = of class VecStat
583 /** @param other : VecStat we want ot copy
584 * @return copied class VecStat
585 */
586 172 VecStat & VecStat::operator = (const VecStat & other){
587 172 copyVecStat(other);
588 172 return *this;
589 }
590
591 ///Sets the nbEvent of the VecStat
592 /** @param nbEvent : nbEvent of the VecStat
593 */
594 void VecStat::setNbEvent(const std::vector<size_t> & nbEvent){
595 p_nbEvent = nbEvent;
596 }
597
598 ///Sets the startTimestamp of the VecStat
599 /** @param startTimestamp : startTimestamp of the VecStat
600 */
601 void VecStat::setStartTimestamp(const std::vector<time_t> & startTimestamp){
602 p_startTimestamp = startTimestamp;
603 }
604
605 ///Sets the endTimestamp of the VecStat
606 /** @param endTimestamp : endTimestamp of the VecStat
607 */
608 void VecStat::setEndTimestamp(const std::vector<time_t> & endTimestamp){
609 p_endTimestamp = endTimestamp;
610 }
611
612 ///Sets the min of the VecStat
613 /** @param min : min of the VecStat
614 */
615 void VecStat::setMin(const std::vector<float> & min){
616 p_min = min;
617 }
618
619 ///Sets the max of the VecStat
620 /** @param max : max of the VecStat
621 */
622 void VecStat::setMax(const std::vector<float> & max){
623 p_max = max;
624 }
625
626 ///Sets the average of the VecStat
627 /** @param average : average of the VecStat
628 */
629 void VecStat::setAverage(const std::vector<float> & average){
630 p_average = average;
631 }
632
633 ///Sets the rate of the VecStat
634 /** @param rate : rate of the VecStat
635 */
636 void VecStat::setRate(const std::vector<float> & rate){
637 p_rate = rate;
638 }
639
640 ///Sets the vecRateQuantile of the VecStat
641 /** @param vecRateQuantile : vecRateQuantile of the VecStat
642 */
643 void VecStat::setVecRateQuantile(const std::vector<std::vector<float> > & vecRateQuantile){
644 p_vecRateQuantile = vecRateQuantile;
645 }
646
647 ///Sets the rateEventBelowLowerBound of the VecStat
648 /** @param rateEventBelowLowerBound : rateEventBelowLowerBound of the VecStat
649 */
650 void VecStat::setRateEventBelowLowerBound(const std::vector<float> & rateEventBelowLowerBound){
651 p_rateEventBelowLowerBound = rateEventBelowLowerBound;
652 }
653
654 ///Sets the rateEventAboveUpperBound of the VecStat
655 /** @param rateEventAboveUpperBound : rateEventAboveUpperBound of the VecStat
656 */
657 void VecStat::setRateEventAboveUpperBound(const std::vector<float> & rateEventAboveUpperBound){
658 p_rateEventAboveUpperBound = rateEventAboveUpperBound;
659 }
660
661 ///Gets the nbEvent of the VecStat
662 /** @return nbEvent of the VecStat
663 */
664 2 const std::vector<size_t> & VecStat::getNbEvent() const{
665 2 return p_nbEvent;
666 }
667
668 ///Gets the nbEvent of the VecStat
669 /** @return nbEvent of the VecStat
670 */
671 172 std::vector<size_t> & VecStat::getNbEvent(){
672 172 return p_nbEvent;
673 }
674
675 ///Gets the startTimestamp of the VecStat
676 /** @return startTimestamp of the VecStat
677 */
678 const std::vector<time_t> & VecStat::getStartTimestamp() const{
679 return p_startTimestamp;
680 }
681
682 ///Gets the startTimestamp of the VecStat
683 /** @return startTimestamp of the VecStat
684 */
685 172 std::vector<time_t> & VecStat::getStartTimestamp(){
686 172 return p_startTimestamp;
687 }
688
689 ///Gets the endTimestamp of the VecStat
690 /** @return endTimestamp of the VecStat
691 */
692 const std::vector<time_t> & VecStat::getEndTimestamp() const{
693 return p_endTimestamp;
694 }
695
696 ///Gets the endTimestamp of the VecStat
697 /** @return endTimestamp of the VecStat
698 */
699 172 std::vector<time_t> & VecStat::getEndTimestamp(){
700 172 return p_endTimestamp;
701 }
702
703 ///Gets the min of the VecStat
704 /** @return min of the VecStat
705 */
706 const std::vector<float> & VecStat::getMin() const{
707 return p_min;
708 }
709
710 ///Gets the min of the VecStat
711 /** @return min of the VecStat
712 */
713 172 std::vector<float> & VecStat::getMin(){
714 172 return p_min;
715 }
716
717 ///Gets the max of the VecStat
718 /** @return max of the VecStat
719 */
720 const std::vector<float> & VecStat::getMax() const{
721 return p_max;
722 }
723
724 ///Gets the max of the VecStat
725 /** @return max of the VecStat
726 */
727 172 std::vector<float> & VecStat::getMax(){
728 172 return p_max;
729 }
730
731 ///Gets the average of the VecStat
732 /** @return average of the VecStat
733 */
734 const std::vector<float> & VecStat::getAverage() const{
735 return p_average;
736 }
737
738 ///Gets the average of the VecStat
739 /** @return average of the VecStat
740 */
741 172 std::vector<float> & VecStat::getAverage(){
742 172 return p_average;
743 }
744
745 ///Gets the rate of the VecStat
746 /** @return rate of the VecStat
747 */
748 const std::vector<float> & VecStat::getRate() const{
749 return p_rate;
750 }
751
752 ///Gets the rate of the VecStat
753 /** @return rate of the VecStat
754 */
755 171 std::vector<float> & VecStat::getRate(){
756 171 return p_rate;
757 }
758
759 ///Gets the vecRateQuantile of the VecStat
760 /** @return vecRateQuantile of the VecStat
761 */
762 const std::vector<std::vector<float> > & VecStat::getVecRateQuantile() const{
763 return p_vecRateQuantile;
764 }
765
766 ///Gets the vecRateQuantile of the VecStat
767 /** @return vecRateQuantile of the VecStat
768 */
769 8416 std::vector<std::vector<float> > & VecStat::getVecRateQuantile(){
770 8416 return p_vecRateQuantile;
771 }
772
773 ///Gets the rateEventBelowLowerBound of the VecStat
774 /** @return rateEventBelowLowerBound of the VecStat
775 */
776 const std::vector<float> & VecStat::getRateEventBelowLowerBound() const{
777 return p_rateEventBelowLowerBound;
778 }
779
780 ///Gets the rateEventBelowLowerBound of the VecStat
781 /** @return rateEventBelowLowerBound of the VecStat
782 */
783 171 std::vector<float> & VecStat::getRateEventBelowLowerBound(){
784 171 return p_rateEventBelowLowerBound;
785 }
786
787 ///Gets the rateEventAboveUpperBound of the VecStat
788 /** @return rateEventAboveUpperBound of the VecStat
789 */
790 const std::vector<float> & VecStat::getRateEventAboveUpperBound() const{
791 return p_rateEventAboveUpperBound;
792 }
793
794 ///Gets the rateEventAboveUpperBound of the VecStat
795 /** @return rateEventAboveUpperBound of the VecStat
796 */
797 171 std::vector<float> & VecStat::getRateEventAboveUpperBound(){
798 171 return p_rateEventAboveUpperBound;
799 }
800
801 ///Copy Function of class VecStat
802 /** @param other : VecStat we want ot copy
803 */
804 180 void VecStat::copyVecStat(const VecStat & other){
805 180 p_nbEvent = other.p_nbEvent;
806 180 p_startTimestamp = other.p_startTimestamp;
807 180 p_endTimestamp = other.p_endTimestamp;
808 180 p_min = other.p_min;
809 180 p_max = other.p_max;
810 180 p_average = other.p_average;
811 180 p_rate = other.p_rate;
812 180 p_vecRateQuantile = other.p_vecRateQuantile;
813 180 p_rateEventBelowLowerBound = other.p_rateEventBelowLowerBound;
814 180 p_rateEventAboveUpperBound = other.p_rateEventAboveUpperBound;
815 180 }
816
817 ///Initialisation Function of class VecStat
818 345 void VecStat::initialisationVecStat(){
819 345 }
820
821 ///Get the name of the class DaemonStat for PhoenixTypeStream
822 /** @return name of the class DaemonStat for PhoenixTypeStream
823 */
824 template<>
825 6 std::string phoenix_getTypeName<DaemonStat >(){
826
1/1
✓ Branch 0 (4→5) taken 6 times.
12 return "DaemonStat";
827 }
828
829 ///Check Stream for a DaemonStat
830 /** @param fieldDescription : description of the field to be checked
831 * @param data : data to be checked
832 * @param reference : reference of the check
833 * @param out : ostream used to collect feed back in case of error (std::cerr or a logger)
834 * @return true on success, false otherwise
835 */
836 bool CheckStream<DaemonStat>::check_stream(const std::string & fieldDescription, const DaemonStat & data, const DaemonStat & reference, std::ostream & out){
837 bool b(true);
838 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- DaemonStat::name", data.getName(), reference.getName(), out);
839 b &= CheckStream<std::map<PString, VecStat >>::check_stream(fieldDescription + "\n- DaemonStat::mapStatComputing", data.getMapStatComputing(), reference.getMapStatComputing(), out);
840 b &= CheckStream<std::map<PString, std::map<PString, VecStat > >>::check_stream(fieldDescription + "\n- DaemonStat::mapStatCommunication", data.getMapStatCommunication(), reference.getMapStatCommunication(), out);
841 return b;
842 }
843
844
845 ///Constructor of class DaemonStat
846 177 DaemonStat::DaemonStat(){
847
1/1
✓ Branch 0 (5→6) taken 177 times.
177 initialisationDaemonStat();
848 177 }
849
850 ///Destructor of class DaemonStat
851 180 DaemonStat::~DaemonStat(){
852
853 180 }
854
855 ///Copy Constructor of class DaemonStat
856 /** @param other : DaemonStat we want ot copy
857 */
858 3 DaemonStat::DaemonStat(const DaemonStat & other){
859
1/1
✓ Branch 0 (5→6) taken 3 times.
3 copyDaemonStat(other);
860 3 }
861
862 ///Operator = of class DaemonStat
863 /** @param other : DaemonStat we want ot copy
864 * @return copied class DaemonStat
865 */
866 3 DaemonStat & DaemonStat::operator = (const DaemonStat & other){
867 3 copyDaemonStat(other);
868 3 return *this;
869 }
870
871 ///Sets the name of the DaemonStat
872 /** @param name : name of the DaemonStat
873 */
874 171 void DaemonStat::setName(const PString & name){
875 171 p_name = name;
876 171 }
877
878 ///Sets the mapStatComputing of the DaemonStat
879 /** @param mapStatComputing : mapStatComputing of the DaemonStat
880 */
881 void DaemonStat::setMapStatComputing(const std::map<PString, VecStat > & mapStatComputing){
882 p_mapStatComputing = mapStatComputing;
883 }
884
885 ///Sets the mapStatCommunication of the DaemonStat
886 /** @param mapStatCommunication : mapStatCommunication of the DaemonStat
887 */
888 void DaemonStat::setMapStatCommunication(const std::map<PString, std::map<PString, VecStat > > & mapStatCommunication){
889 p_mapStatCommunication = mapStatCommunication;
890 }
891
892 ///Gets the name of the DaemonStat
893 /** @return name of the DaemonStat
894 */
895 6 const PString & DaemonStat::getName() const{
896 6 return p_name;
897 }
898
899 ///Gets the name of the DaemonStat
900 /** @return name of the DaemonStat
901 */
902 4 PString & DaemonStat::getName(){
903 4 return p_name;
904 }
905
906 ///Gets the mapStatComputing of the DaemonStat
907 /** @return mapStatComputing of the DaemonStat
908 */
909 const std::map<PString, VecStat > & DaemonStat::getMapStatComputing() const{
910 return p_mapStatComputing;
911 }
912
913 ///Gets the mapStatComputing of the DaemonStat
914 /** @return mapStatComputing of the DaemonStat
915 */
916 172 std::map<PString, VecStat > & DaemonStat::getMapStatComputing(){
917 172 return p_mapStatComputing;
918 }
919
920 ///Gets the mapStatCommunication of the DaemonStat
921 /** @return mapStatCommunication of the DaemonStat
922 */
923 const std::map<PString, std::map<PString, VecStat > > & DaemonStat::getMapStatCommunication() const{
924 return p_mapStatCommunication;
925 }
926
927 ///Gets the mapStatCommunication of the DaemonStat
928 /** @return mapStatCommunication of the DaemonStat
929 */
930 7 std::map<PString, std::map<PString, VecStat > > & DaemonStat::getMapStatCommunication(){
931 7 return p_mapStatCommunication;
932 }
933
934 ///Copy Function of class DaemonStat
935 /** @param other : DaemonStat we want ot copy
936 */
937 6 void DaemonStat::copyDaemonStat(const DaemonStat & other){
938 6 p_name = other.p_name;
939 6 p_mapStatComputing = other.p_mapStatComputing;
940 6 p_mapStatCommunication = other.p_mapStatCommunication;
941 6 }
942
943 ///Initialisation Function of class DaemonStat
944 177 void DaemonStat::initialisationDaemonStat(){
945 177 p_name = "";
946 177 }
947
948 ///Get the name of the class StatAccumulator for PhoenixTypeStream
949 /** @return name of the class StatAccumulator for PhoenixTypeStream
950 */
951 template<>
952 1 std::string phoenix_getTypeName<StatAccumulator >(){
953
1/1
✓ Branch 0 (4→5) taken 1 times.
2 return "StatAccumulator";
954 }
955
956 ///Check Stream for a StatAccumulator
957 /** @param fieldDescription : description of the field to be checked
958 * @param data : data to be checked
959 * @param reference : reference of the check
960 * @param out : ostream used to collect feed back in case of error (std::cerr or a logger)
961 * @return true on success, false otherwise
962 */
963 bool CheckStream<StatAccumulator>::check_stream(const std::string & fieldDescription, const StatAccumulator & data, const StatAccumulator & reference, std::ostream & out){
964 bool b(true);
965 b &= CheckStream<size_t>::check_stream(fieldDescription + "\n- StatAccumulator::nbEvent", data.getNbEvent(), reference.getNbEvent(), out);
966 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::sum", data.getSum(), reference.getSum(), out);
967 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::min", data.getMin(), reference.getMin(), out);
968 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::max", data.getMax(), reference.getMax(), out);
969 b &= CheckStream<std::vector<size_t>>::check_stream(fieldDescription + "\n- StatAccumulator::vecHistogram", data.getVecHistogram(), reference.getVecHistogram(), out);
970 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::histLowerBound", data.getHistLowerBound(), reference.getHistLowerBound(), out);
971 b &= CheckStream<float>::check_stream(fieldDescription + "\n- StatAccumulator::histUpperBound", data.getHistUpperBound(), reference.getHistUpperBound(), out);
972 b &= CheckStream<size_t>::check_stream(fieldDescription + "\n- StatAccumulator::nbEventBelowLowerBound", data.getNbEventBelowLowerBound(), reference.getNbEventBelowLowerBound(), out);
973 b &= CheckStream<size_t>::check_stream(fieldDescription + "\n- StatAccumulator::nbEventAboveUpperBound", data.getNbEventAboveUpperBound(), reference.getNbEventAboveUpperBound(), out);
974 return b;
975 }
976
977
978 ///Constructor of class StatAccumulator
979 37 StatAccumulator::StatAccumulator(){
980
1/1
✓ Branch 0 (3→4) taken 37 times.
37 initialisationStatAccumulator();
981 37 }
982
983 ///Destructor of class StatAccumulator
984 38 StatAccumulator::~StatAccumulator(){
985
986 38 }
987
988 ///Copy Constructor of class StatAccumulator
989 /** @param other : StatAccumulator we want ot copy
990 */
991 1 StatAccumulator::StatAccumulator(const StatAccumulator & other){
992
1/1
✓ Branch 0 (3→4) taken 1 times.
1 copyStatAccumulator(other);
993 1 }
994
995 ///Operator = of class StatAccumulator
996 /** @param other : StatAccumulator we want ot copy
997 * @return copied class StatAccumulator
998 */
999 18 StatAccumulator & StatAccumulator::operator = (const StatAccumulator & other){
1000 18 copyStatAccumulator(other);
1001 18 return *this;
1002 }
1003
1004 ///Sets the nbEvent of the StatAccumulator
1005 /** @param nbEvent : nbEvent of the StatAccumulator
1006 */
1007 203 void StatAccumulator::setNbEvent(size_t nbEvent){
1008 203 p_nbEvent = nbEvent;
1009 203 }
1010
1011 ///Sets the sum of the StatAccumulator
1012 /** @param sum : sum of the StatAccumulator
1013 */
1014 34 void StatAccumulator::setSum(float sum){
1015 34 p_sum = sum;
1016 34 }
1017
1018 ///Sets the min of the StatAccumulator
1019 /** @param min : min of the StatAccumulator
1020 */
1021 30 void StatAccumulator::setMin(float min){
1022 30 p_min = min;
1023 30 }
1024
1025 ///Sets the max of the StatAccumulator
1026 /** @param max : max of the StatAccumulator
1027 */
1028 25 void StatAccumulator::setMax(float max){
1029 25 p_max = max;
1030 25 }
1031
1032 ///Sets the vecHistogram of the StatAccumulator
1033 /** @param vecHistogram : vecHistogram of the StatAccumulator
1034 */
1035 18 void StatAccumulator::setVecHistogram(const std::vector<size_t> & vecHistogram){
1036 18 p_vecHistogram = vecHistogram;
1037 18 }
1038
1039 ///Sets the histLowerBound of the StatAccumulator
1040 /** @param histLowerBound : histLowerBound of the StatAccumulator
1041 */
1042 19 void StatAccumulator::setHistLowerBound(float histLowerBound){
1043 19 p_histLowerBound = histLowerBound;
1044 19 }
1045
1046 ///Sets the histUpperBound of the StatAccumulator
1047 /** @param histUpperBound : histUpperBound of the StatAccumulator
1048 */
1049 19 void StatAccumulator::setHistUpperBound(float histUpperBound){
1050 19 p_histUpperBound = histUpperBound;
1051 19 }
1052
1053 ///Sets the nbEventBelowLowerBound of the StatAccumulator
1054 /** @param nbEventBelowLowerBound : nbEventBelowLowerBound of the StatAccumulator
1055 */
1056 18 void StatAccumulator::setNbEventBelowLowerBound(size_t nbEventBelowLowerBound){
1057 18 p_nbEventBelowLowerBound = nbEventBelowLowerBound;
1058 18 }
1059
1060 ///Sets the nbEventAboveUpperBound of the StatAccumulator
1061 /** @param nbEventAboveUpperBound : nbEventAboveUpperBound of the StatAccumulator
1062 */
1063 25 void StatAccumulator::setNbEventAboveUpperBound(size_t nbEventAboveUpperBound){
1064 25 p_nbEventAboveUpperBound = nbEventAboveUpperBound;
1065 25 }
1066
1067 ///Gets the nbEvent of the StatAccumulator
1068 /** @return nbEvent of the StatAccumulator
1069 */
1070 516 size_t StatAccumulator::getNbEvent() const{
1071 516 return p_nbEvent;
1072 }
1073
1074 ///Gets the nbEvent of the StatAccumulator
1075 /** @return nbEvent of the StatAccumulator
1076 */
1077 59 size_t & StatAccumulator::getNbEvent(){
1078 59 return p_nbEvent;
1079 }
1080
1081 ///Gets the sum of the StatAccumulator
1082 /** @return sum of the StatAccumulator
1083 */
1084 174 float StatAccumulator::getSum() const{
1085 174 return p_sum;
1086 }
1087
1088 ///Gets the sum of the StatAccumulator
1089 /** @return sum of the StatAccumulator
1090 */
1091 17 float & StatAccumulator::getSum(){
1092 17 return p_sum;
1093 }
1094
1095 ///Gets the min of the StatAccumulator
1096 /** @return min of the StatAccumulator
1097 */
1098 174 float StatAccumulator::getMin() const{
1099 174 return p_min;
1100 }
1101
1102 ///Gets the min of the StatAccumulator
1103 /** @return min of the StatAccumulator
1104 */
1105 17 float & StatAccumulator::getMin(){
1106 17 return p_min;
1107 }
1108
1109 ///Gets the max of the StatAccumulator
1110 /** @return max of the StatAccumulator
1111 */
1112 174 float StatAccumulator::getMax() const{
1113 174 return p_max;
1114 }
1115
1116 ///Gets the max of the StatAccumulator
1117 /** @return max of the StatAccumulator
1118 */
1119 17 float & StatAccumulator::getMax(){
1120 17 return p_max;
1121 }
1122
1123 ///Gets the vecHistogram of the StatAccumulator
1124 /** @return vecHistogram of the StatAccumulator
1125 */
1126 16844 const std::vector<size_t> & StatAccumulator::getVecHistogram() const{
1127 16844 return p_vecHistogram;
1128 }
1129
1130 ///Gets the vecHistogram of the StatAccumulator
1131 /** @return vecHistogram of the StatAccumulator
1132 */
1133 389 std::vector<size_t> & StatAccumulator::getVecHistogram(){
1134 389 return p_vecHistogram;
1135 }
1136
1137 ///Gets the histLowerBound of the StatAccumulator
1138 /** @return histLowerBound of the StatAccumulator
1139 */
1140 4 float StatAccumulator::getHistLowerBound() const{
1141 4 return p_histLowerBound;
1142 }
1143
1144 ///Gets the histLowerBound of the StatAccumulator
1145 /** @return histLowerBound of the StatAccumulator
1146 */
1147 55 float & StatAccumulator::getHistLowerBound(){
1148 55 return p_histLowerBound;
1149 }
1150
1151 ///Gets the histUpperBound of the StatAccumulator
1152 /** @return histUpperBound of the StatAccumulator
1153 */
1154 4 float StatAccumulator::getHistUpperBound() const{
1155 4 return p_histUpperBound;
1156 }
1157
1158 ///Gets the histUpperBound of the StatAccumulator
1159 /** @return histUpperBound of the StatAccumulator
1160 */
1161 38 float & StatAccumulator::getHistUpperBound(){
1162 38 return p_histUpperBound;
1163 }
1164
1165 ///Gets the nbEventBelowLowerBound of the StatAccumulator
1166 /** @return nbEventBelowLowerBound of the StatAccumulator
1167 */
1168 174 size_t StatAccumulator::getNbEventBelowLowerBound() const{
1169 174 return p_nbEventBelowLowerBound;
1170 }
1171
1172 ///Gets the nbEventBelowLowerBound of the StatAccumulator
1173 /** @return nbEventBelowLowerBound of the StatAccumulator
1174 */
1175 6 size_t & StatAccumulator::getNbEventBelowLowerBound(){
1176 6 return p_nbEventBelowLowerBound;
1177 }
1178
1179 ///Gets the nbEventAboveUpperBound of the StatAccumulator
1180 /** @return nbEventAboveUpperBound of the StatAccumulator
1181 */
1182 174 size_t StatAccumulator::getNbEventAboveUpperBound() const{
1183 174 return p_nbEventAboveUpperBound;
1184 }
1185
1186 ///Gets the nbEventAboveUpperBound of the StatAccumulator
1187 /** @return nbEventAboveUpperBound of the StatAccumulator
1188 */
1189 13 size_t & StatAccumulator::getNbEventAboveUpperBound(){
1190 13 return p_nbEventAboveUpperBound;
1191 }
1192
1193 ///Copy Function of class StatAccumulator
1194 /** @param other : StatAccumulator we want ot copy
1195 */
1196 19 void StatAccumulator::copyStatAccumulator(const StatAccumulator & other){
1197 19 p_nbEvent = other.p_nbEvent;
1198 19 p_sum = other.p_sum;
1199 19 p_min = other.p_min;
1200 19 p_max = other.p_max;
1201 19 p_vecHistogram = other.p_vecHistogram;
1202 19 p_histLowerBound = other.p_histLowerBound;
1203 19 p_histUpperBound = other.p_histUpperBound;
1204 19 p_nbEventBelowLowerBound = other.p_nbEventBelowLowerBound;
1205 19 p_nbEventAboveUpperBound = other.p_nbEventAboveUpperBound;
1206 19 }
1207
1208 ///Initialisation Function of class StatAccumulator
1209 37 void StatAccumulator::initialisationStatAccumulator(){
1210 37 p_nbEvent = 0lu;
1211 37 p_sum = 0.0f;
1212 37 p_min = 0.0f;
1213 37 p_max = 0.0f;
1214 37 p_histLowerBound = 0.0f;
1215 37 p_histUpperBound = 0.0f;
1216 37 p_nbEventBelowLowerBound = 0lu;
1217 37 p_nbEventAboveUpperBound = 0lu;
1218 37 }
1219
1220 ///Get the name of the class DaemonStatAccumulator for PhoenixTypeStream
1221 /** @return name of the class DaemonStatAccumulator for PhoenixTypeStream
1222 */
1223 template<>
1224 1 std::string phoenix_getTypeName<DaemonStatAccumulator >(){
1225
1/1
✓ Branch 0 (4→5) taken 1 times.
2 return "DaemonStatAccumulator";
1226 }
1227
1228 ///Check Stream for a DaemonStatAccumulator
1229 /** @param fieldDescription : description of the field to be checked
1230 * @param data : data to be checked
1231 * @param reference : reference of the check
1232 * @param out : ostream used to collect feed back in case of error (std::cerr or a logger)
1233 * @return true on success, false otherwise
1234 */
1235 bool CheckStream<DaemonStatAccumulator>::check_stream(const std::string & fieldDescription, const DaemonStatAccumulator & data, const DaemonStatAccumulator & reference, std::ostream & out){
1236 bool b(true);
1237 b &= CheckStream<std::map<PString, StatAccumulator >>::check_stream(fieldDescription + "\n- DaemonStatAccumulator::mapStatComputing", data.getMapStatComputing(), reference.getMapStatComputing(), out);
1238 b &= CheckStream<std::map<PString, std::map<PString, StatAccumulator > >>::check_stream(fieldDescription + "\n- DaemonStatAccumulator::mapStatCommunication", data.getMapStatCommunication(), reference.getMapStatCommunication(), out);
1239 return b;
1240 }
1241
1242
1243 ///Constructor of class DaemonStatAccumulator
1244 116 DaemonStatAccumulator::DaemonStatAccumulator(){
1245
1/1
✓ Branch 0 (4→5) taken 116 times.
116 initialisationDaemonStatAccumulator();
1246 116 }
1247
1248 ///Destructor of class DaemonStatAccumulator
1249 117 DaemonStatAccumulator::~DaemonStatAccumulator(){
1250
1251 117 }
1252
1253 ///Copy Constructor of class DaemonStatAccumulator
1254 /** @param other : DaemonStatAccumulator we want ot copy
1255 */
1256 1 DaemonStatAccumulator::DaemonStatAccumulator(const DaemonStatAccumulator & other){
1257
1/1
✓ Branch 0 (4→5) taken 1 times.
1 copyDaemonStatAccumulator(other);
1258 1 }
1259
1260 ///Operator = of class DaemonStatAccumulator
1261 /** @param other : DaemonStatAccumulator we want ot copy
1262 * @return copied class DaemonStatAccumulator
1263 */
1264 23 DaemonStatAccumulator & DaemonStatAccumulator::operator = (const DaemonStatAccumulator & other){
1265 23 copyDaemonStatAccumulator(other);
1266 23 return *this;
1267 }
1268
1269 ///Sets the mapStatComputing of the DaemonStatAccumulator
1270 /** @param mapStatComputing : mapStatComputing of the DaemonStatAccumulator
1271 */
1272 void DaemonStatAccumulator::setMapStatComputing(const std::map<PString, StatAccumulator > & mapStatComputing){
1273 p_mapStatComputing = mapStatComputing;
1274 }
1275
1276 ///Sets the mapStatCommunication of the DaemonStatAccumulator
1277 /** @param mapStatCommunication : mapStatCommunication of the DaemonStatAccumulator
1278 */
1279 void DaemonStatAccumulator::setMapStatCommunication(const std::map<PString, std::map<PString, StatAccumulator > > & mapStatCommunication){
1280 p_mapStatCommunication = mapStatCommunication;
1281 }
1282
1283 ///Gets the mapStatComputing of the DaemonStatAccumulator
1284 /** @return mapStatComputing of the DaemonStatAccumulator
1285 */
1286 const std::map<PString, StatAccumulator > & DaemonStatAccumulator::getMapStatComputing() const{
1287 return p_mapStatComputing;
1288 }
1289
1290 ///Gets the mapStatComputing of the DaemonStatAccumulator
1291 /** @return mapStatComputing of the DaemonStatAccumulator
1292 */
1293 700 std::map<PString, StatAccumulator > & DaemonStatAccumulator::getMapStatComputing(){
1294 700 return p_mapStatComputing;
1295 }
1296
1297 ///Gets the mapStatCommunication of the DaemonStatAccumulator
1298 /** @return mapStatCommunication of the DaemonStatAccumulator
1299 */
1300 const std::map<PString, std::map<PString, StatAccumulator > > & DaemonStatAccumulator::getMapStatCommunication() const{
1301 return p_mapStatCommunication;
1302 }
1303
1304 ///Gets the mapStatCommunication of the DaemonStatAccumulator
1305 /** @return mapStatCommunication of the DaemonStatAccumulator
1306 */
1307 537 std::map<PString, std::map<PString, StatAccumulator > > & DaemonStatAccumulator::getMapStatCommunication(){
1308 537 return p_mapStatCommunication;
1309 }
1310
1311 ///Copy Function of class DaemonStatAccumulator
1312 /** @param other : DaemonStatAccumulator we want ot copy
1313 */
1314 24 void DaemonStatAccumulator::copyDaemonStatAccumulator(const DaemonStatAccumulator & other){
1315 24 p_mapStatComputing = other.p_mapStatComputing;
1316 24 p_mapStatCommunication = other.p_mapStatCommunication;
1317 24 }
1318
1319 ///Initialisation Function of class DaemonStatAccumulator
1320 116 void DaemonStatAccumulator::initialisationDaemonStatAccumulator(){
1321 116 }
1322
1323 ///Get the name of the class DaemonConfig for PhoenixTypeStream
1324 /** @return name of the class DaemonConfig for PhoenixTypeStream
1325 */
1326 template<>
1327 1 std::string phoenix_getTypeName<DaemonConfig >(){
1328
1/1
✓ Branch 0 (4→5) taken 1 times.
2 return "DaemonConfig";
1329 }
1330
1331 ///Check Stream for a DaemonConfig
1332 /** @param fieldDescription : description of the field to be checked
1333 * @param data : data to be checked
1334 * @param reference : reference of the check
1335 * @param out : ostream used to collect feed back in case of error (std::cerr or a logger)
1336 * @return true on success, false otherwise
1337 */
1338 bool CheckStream<DaemonConfig>::check_stream(const std::string & fieldDescription, const DaemonConfig & data, const DaemonConfig & reference, std::ostream & out){
1339 bool b(true);
1340 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- DaemonConfig::hostName", data.getHostName(), reference.getHostName(), out);
1341 b &= CheckStream<size_t>::check_stream(fieldDescription + "\n- DaemonConfig::receivingPort", data.getReceivingPort(), reference.getReceivingPort(), out);
1342 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- DaemonConfig::name", data.getName(), reference.getName(), out);
1343 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- DaemonConfig::description", data.getDescription(), reference.getDescription(), out);
1344 b &= CheckStream<std::map<PString, time_t>>::check_stream(fieldDescription + "\n- DaemonConfig::mapTimeout", data.getMapTimeout(), reference.getMapTimeout(), out);
1345 b &= CheckStream<size_t>::check_stream(fieldDescription + "\n- DaemonConfig::statNbBin", data.getStatNbBin(), reference.getStatNbBin(), out);
1346 b &= CheckStream<float>::check_stream(fieldDescription + "\n- DaemonConfig::statHistLowerBound", data.getStatHistLowerBound(), reference.getStatHistLowerBound(), out);
1347 b &= CheckStream<float>::check_stream(fieldDescription + "\n- DaemonConfig::statHistUpperBound", data.getStatHistUpperBound(), reference.getStatHistUpperBound(), out);
1348 b &= CheckStream<time_t>::check_stream(fieldDescription + "\n- DaemonConfig::statTimerPeriodMs", data.getStatTimerPeriodMs(), reference.getStatTimerPeriodMs(), out);
1349 b &= CheckStream<DaemonStatAccumulator>::check_stream(fieldDescription + "\n- DaemonConfig::daemonStatAccumulator", data.getDaemonStatAccumulator(), reference.getDaemonStatAccumulator(), out);
1350 b &= CheckStream<PString>::check_stream(fieldDescription + "\n- DaemonConfig::statDaemonName", data.getStatDaemonName(), reference.getStatDaemonName(), out);
1351 return b;
1352 }
1353
1354
1355 ///Constructor of class DaemonConfig
1356
4/4
✓ Branch 0 (3→4) taken 113 times.
✓ Branch 2 (4→5) taken 113 times.
✓ Branch 4 (6→7) taken 113 times.
✓ Branch 6 (7→8) taken 113 times.
113 DaemonConfig::DaemonConfig(){
1357
1/1
✓ Branch 0 (8→9) taken 113 times.
113 initialisationDaemonConfig();
1358 113 }
1359
1360 ///Destructor of class DaemonConfig
1361 114 DaemonConfig::~DaemonConfig(){
1362
1363 114 }
1364
1365 ///Copy Constructor of class DaemonConfig
1366 /** @param other : DaemonConfig we want ot copy
1367 */
1368
4/4
✓ Branch 0 (3→4) taken 1 times.
✓ Branch 2 (4→5) taken 1 times.
✓ Branch 4 (6→7) taken 1 times.
✓ Branch 6 (7→8) taken 1 times.
1 DaemonConfig::DaemonConfig(const DaemonConfig & other){
1369
1/1
✓ Branch 0 (8→9) taken 1 times.
1 copyDaemonConfig(other);
1370 1 }
1371
1372 ///Operator = of class DaemonConfig
1373 /** @param other : DaemonConfig we want ot copy
1374 * @return copied class DaemonConfig
1375 */
1376 21 DaemonConfig & DaemonConfig::operator = (const DaemonConfig & other){
1377 21 copyDaemonConfig(other);
1378 21 return *this;
1379 }
1380
1381 ///Sets the hostName of the DaemonConfig
1382 /** @param hostName : hostName of the DaemonConfig
1383 */
1384 45 void DaemonConfig::setHostName(const PString & hostName){
1385 45 p_hostName = hostName;
1386 45 }
1387
1388 ///Sets the receivingPort of the DaemonConfig
1389 /** @param receivingPort : receivingPort of the DaemonConfig
1390 */
1391 42 void DaemonConfig::setReceivingPort(size_t receivingPort){
1392 42 p_receivingPort = receivingPort;
1393 42 }
1394
1395 ///Sets the name of the DaemonConfig
1396 /** @param name : name of the DaemonConfig
1397 */
1398 86 void DaemonConfig::setName(const PString & name){
1399 86 p_name = name;
1400 86 }
1401
1402 ///Sets the description of the DaemonConfig
1403 /** @param description : description of the DaemonConfig
1404 */
1405 42 void DaemonConfig::setDescription(const PString & description){
1406 42 p_description = description;
1407 42 }
1408
1409 ///Sets the mapTimeout of the DaemonConfig
1410 /** @param mapTimeout : mapTimeout of the DaemonConfig
1411 */
1412 19 void DaemonConfig::setMapTimeout(const std::map<PString, time_t> & mapTimeout){
1413 19 p_mapTimeout = mapTimeout;
1414 19 }
1415
1416 ///Sets the statNbBin of the DaemonConfig
1417 /** @param statNbBin : statNbBin of the DaemonConfig
1418 */
1419 42 void DaemonConfig::setStatNbBin(size_t statNbBin){
1420 42 p_statNbBin = statNbBin;
1421 42 }
1422
1423 ///Sets the statHistLowerBound of the DaemonConfig
1424 /** @param statHistLowerBound : statHistLowerBound of the DaemonConfig
1425 */
1426 42 void DaemonConfig::setStatHistLowerBound(float statHistLowerBound){
1427 42 p_statHistLowerBound = statHistLowerBound;
1428 42 }
1429
1430 ///Sets the statHistUpperBound of the DaemonConfig
1431 /** @param statHistUpperBound : statHistUpperBound of the DaemonConfig
1432 */
1433 42 void DaemonConfig::setStatHistUpperBound(float statHistUpperBound){
1434 42 p_statHistUpperBound = statHistUpperBound;
1435 42 }
1436
1437 ///Sets the statTimerPeriodMs of the DaemonConfig
1438 /** @param statTimerPeriodMs : statTimerPeriodMs of the DaemonConfig
1439 */
1440 41 void DaemonConfig::setStatTimerPeriodMs(const time_t & statTimerPeriodMs){
1441 41 p_statTimerPeriodMs = statTimerPeriodMs;
1442 41 }
1443
1444 ///Sets the daemonStatAccumulator of the DaemonConfig
1445 /** @param daemonStatAccumulator : daemonStatAccumulator of the DaemonConfig
1446 */
1447 void DaemonConfig::setDaemonStatAccumulator(const DaemonStatAccumulator & daemonStatAccumulator){
1448 p_daemonStatAccumulator = daemonStatAccumulator;
1449 }
1450
1451 ///Sets the statDaemonName of the DaemonConfig
1452 /** @param statDaemonName : statDaemonName of the DaemonConfig
1453 */
1454 5 void DaemonConfig::setStatDaemonName(const PString & statDaemonName){
1455 5 p_statDaemonName = statDaemonName;
1456 5 }
1457
1458 ///Gets the hostName of the DaemonConfig
1459 /** @return hostName of the DaemonConfig
1460 */
1461 4 const PString & DaemonConfig::getHostName() const{
1462 4 return p_hostName;
1463 }
1464
1465 ///Gets the hostName of the DaemonConfig
1466 /** @return hostName of the DaemonConfig
1467 */
1468 75 PString & DaemonConfig::getHostName(){
1469 75 return p_hostName;
1470 }
1471
1472 ///Gets the receivingPort of the DaemonConfig
1473 /** @return receivingPort of the DaemonConfig
1474 */
1475 4 size_t DaemonConfig::getReceivingPort() const{
1476 4 return p_receivingPort;
1477 }
1478
1479 ///Gets the receivingPort of the DaemonConfig
1480 /** @return receivingPort of the DaemonConfig
1481 */
1482 108 size_t & DaemonConfig::getReceivingPort(){
1483 108 return p_receivingPort;
1484 }
1485
1486 ///Gets the name of the DaemonConfig
1487 /** @return name of the DaemonConfig
1488 */
1489 5 const PString & DaemonConfig::getName() const{
1490 5 return p_name;
1491 }
1492
1493 ///Gets the name of the DaemonConfig
1494 /** @return name of the DaemonConfig
1495 */
1496 668 PString & DaemonConfig::getName(){
1497 668 return p_name;
1498 }
1499
1500 ///Gets the description of the DaemonConfig
1501 /** @return description of the DaemonConfig
1502 */
1503 4 const PString & DaemonConfig::getDescription() const{
1504 4 return p_description;
1505 }
1506
1507 ///Gets the description of the DaemonConfig
1508 /** @return description of the DaemonConfig
1509 */
1510 7 PString & DaemonConfig::getDescription(){
1511 7 return p_description;
1512 }
1513
1514 ///Gets the mapTimeout of the DaemonConfig
1515 /** @return mapTimeout of the DaemonConfig
1516 */
1517 const std::map<PString, time_t> & DaemonConfig::getMapTimeout() const{
1518 return p_mapTimeout;
1519 }
1520
1521 ///Gets the mapTimeout of the DaemonConfig
1522 /** @return mapTimeout of the DaemonConfig
1523 */
1524 1143 std::map<PString, time_t> & DaemonConfig::getMapTimeout(){
1525 1143 return p_mapTimeout;
1526 }
1527
1528 ///Gets the statNbBin of the DaemonConfig
1529 /** @return statNbBin of the DaemonConfig
1530 */
1531 4 size_t DaemonConfig::getStatNbBin() const{
1532 4 return p_statNbBin;
1533 }
1534
1535 ///Gets the statNbBin of the DaemonConfig
1536 /** @return statNbBin of the DaemonConfig
1537 */
1538 17 size_t & DaemonConfig::getStatNbBin(){
1539 17 return p_statNbBin;
1540 }
1541
1542 ///Gets the statHistLowerBound of the DaemonConfig
1543 /** @return statHistLowerBound of the DaemonConfig
1544 */
1545 4 float DaemonConfig::getStatHistLowerBound() const{
1546 4 return p_statHistLowerBound;
1547 }
1548
1549 ///Gets the statHistLowerBound of the DaemonConfig
1550 /** @return statHistLowerBound of the DaemonConfig
1551 */
1552 17 float & DaemonConfig::getStatHistLowerBound(){
1553 17 return p_statHistLowerBound;
1554 }
1555
1556 ///Gets the statHistUpperBound of the DaemonConfig
1557 /** @return statHistUpperBound of the DaemonConfig
1558 */
1559 4 float DaemonConfig::getStatHistUpperBound() const{
1560 4 return p_statHistUpperBound;
1561 }
1562
1563 ///Gets the statHistUpperBound of the DaemonConfig
1564 /** @return statHistUpperBound of the DaemonConfig
1565 */
1566 17 float & DaemonConfig::getStatHistUpperBound(){
1567 17 return p_statHistUpperBound;
1568 }
1569
1570 ///Gets the statTimerPeriodMs of the DaemonConfig
1571 /** @return statTimerPeriodMs of the DaemonConfig
1572 */
1573 const time_t & DaemonConfig::getStatTimerPeriodMs() const{
1574 return p_statTimerPeriodMs;
1575 }
1576
1577 ///Gets the statTimerPeriodMs of the DaemonConfig
1578 /** @return statTimerPeriodMs of the DaemonConfig
1579 */
1580 9 time_t & DaemonConfig::getStatTimerPeriodMs(){
1581 9 return p_statTimerPeriodMs;
1582 }
1583
1584 ///Gets the daemonStatAccumulator of the DaemonConfig
1585 /** @return daemonStatAccumulator of the DaemonConfig
1586 */
1587 const DaemonStatAccumulator & DaemonConfig::getDaemonStatAccumulator() const{
1588 return p_daemonStatAccumulator;
1589 }
1590
1591 ///Gets the daemonStatAccumulator of the DaemonConfig
1592 /** @return daemonStatAccumulator of the DaemonConfig
1593 */
1594 1237 DaemonStatAccumulator & DaemonConfig::getDaemonStatAccumulator(){
1595 1237 return p_daemonStatAccumulator;
1596 }
1597
1598 ///Gets the statDaemonName of the DaemonConfig
1599 /** @return statDaemonName of the DaemonConfig
1600 */
1601 4 const PString & DaemonConfig::getStatDaemonName() const{
1602 4 return p_statDaemonName;
1603 }
1604
1605 ///Gets the statDaemonName of the DaemonConfig
1606 /** @return statDaemonName of the DaemonConfig
1607 */
1608 383 PString & DaemonConfig::getStatDaemonName(){
1609 383 return p_statDaemonName;
1610 }
1611
1612 ///Copy Function of class DaemonConfig
1613 /** @param other : DaemonConfig we want ot copy
1614 */
1615 22 void DaemonConfig::copyDaemonConfig(const DaemonConfig & other){
1616 22 p_hostName = other.p_hostName;
1617 22 p_receivingPort = other.p_receivingPort;
1618 22 p_name = other.p_name;
1619 22 p_description = other.p_description;
1620 22 p_mapTimeout = other.p_mapTimeout;
1621 22 p_statNbBin = other.p_statNbBin;
1622 22 p_statHistLowerBound = other.p_statHistLowerBound;
1623 22 p_statHistUpperBound = other.p_statHistUpperBound;
1624 22 p_statTimerPeriodMs = other.p_statTimerPeriodMs;
1625 22 p_daemonStatAccumulator = other.p_daemonStatAccumulator;
1626 22 p_statDaemonName = other.p_statDaemonName;
1627 22 }
1628
1629 ///Initialisation Function of class DaemonConfig
1630 113 void DaemonConfig::initialisationDaemonConfig(){
1631 113 p_hostName = "";
1632 113 p_receivingPort = 0lu;
1633 113 p_name = "";
1634 113 p_description = "";
1635 113 p_statNbBin = 0lu;
1636 113 p_statHistLowerBound = 0.0f;
1637 113 p_statHistUpperBound = 0.0f;
1638 113 p_statDaemonName = "";
1639 113 }
1640
1641