GCC Code Coverage Report


Directory: ./
File: src/phoenix_debug.cpp
Date: 2025-11-27 16:27:07
Exec Total Coverage
Lines: 10 10 100.0%
Functions: 4 4 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7 #include "PDebugAssistant.h"
8 #include "phoenix_debug.h"
9
10 #ifndef DISABLE_DEBUG_ASSISTANT
11 PDebugAssistant GLOB_DEBUG_ASSISTANT;
12
13 ///Function to dump whatever you want in a text file
14 /** @param fileName : name of the texte file we want to write
15 * @return file to wite
16 *
17 * Usage :
18 * float * tab = new float[2000lu];
19 * ...
20 * for(long unsigned int i(0lu); i < 2000lu; ++i){
21 * pdump("dump.txt") << "i = " << i << ", val = " << tab[i] << endl;
22 * }
23 * ...
24 * delete [] tab;
25 */
26 400 std::ofstream & pdump(const PPath & fileName){
27 400 return GLOB_DEBUG_ASSISTANT.getTxtFile(fileName);
28 }
29
30 ///Function to dump whatever you want in a binary file
31 /** @param fileName : name of the texte file we want to write
32 * @return file to wite
33 *
34 * Usage :
35 * float * tab = new float[2000lu];
36 * ...
37 * for(long unsigned int i(0lu); i < 2000lu; ++i){
38 * pdumpBin("dump.bin") << tab[i];
39 * }
40 * ...
41 * delete [] tab;
42 */
43 200 PStream & pdumpBin(const PPath & fileName){
44 200 return GLOB_DEBUG_ASSISTANT.getBinFile(fileName);
45 }
46
47 #endif
48
49
50 ///Save the currents files and clear the list on files
51 /** Usage :
52 * float * tab = new float[2000lu];
53 * ...
54 * for(long unsigned int i(0lu); i < 2000lu; ++i){
55 * pdump("dump.txt") << "i = " << i << ", val = " << tab[i] << endl;
56 * }
57 * pdumpClear(); //To accelerate the search for the next file to dump
58 * for(long unsigned int i(0lu); i < 2000lu; ++i){
59 * pdump("dump2.txt") << "i = " << i << ", val = " << tab[i] << endl;
60 * }
61 * ...
62 * delete [] tab;
63 */
64 3 void pdumpClear(){
65 #ifndef DISABLE_DEBUG_ASSISTANT
66 3 GLOB_DEBUG_ASSISTANT.clearTxt();
67 #endif
68 3 }
69
70 ///Save the currents files and clear the list on files
71 /** Usage :
72 * float * tab = new float[2000lu];
73 * ...
74 * for(long unsigned int i(0lu); i < 2000lu; ++i){
75 * pdumpBin("dump.bin") << tab[i];
76 * }
77 * pdumpBinClear(); //To accelerate the search for the next file to dump
78 * for(long unsigned int i(0lu); i < 2000lu; ++i){
79 * pdumpBin("dump2.bin") << tab[i] << endl;
80 * }
81 * ...
82 * delete [] tab;
83 */
84 1 void pdumpBinClear(){
85 #ifndef DISABLE_DEBUG_ASSISTANT
86 1 GLOB_DEBUG_ASSISTANT.clearBin();
87 #endif
88 1 }
89
90
91
92