| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
PipeReader Class Reference
Collaboration diagram for PipeReader:
[legend]

## Public Member Functions
| PipeReader (const char *cmd)
| ~PipeReader (void)
std::istringstream & | output (void)

## Private Attributes
FILE * | pipe
std::istringstream * | iss

## Detailed Description

Definition at line 89 of file pfm_gen_analysis.cpp.

## Constructor & Destructor Documentation

PipeReader::PipeReader | ( | const char * | cmd | ) |
| inline

Definition at line 92 of file pfm_gen_analysis.cpp.

93 {
94 pipe = popen(cmd, "r");
95 if(!pipe)
96 {
97 printf("Cannot open pipe. Exiting...\n");
98 exit(1);
99 }
100 char buffer[PIPE_BUFFER_LENGTH];
101 bzero(buffer, PIPE_BUFFER_LENGTH);
102 std::string result = "";
103 while(!feof(pipe))
104 {
105 if(fgets(buffer, PIPE_BUFFER_LENGTH, pipe)!=NULL)
106 {
107 result += buffer;
108 }
109 bzero(buffer, PIPE_BUFFER_LENGTH);
110 }
111 iss = new std::istringstream(result, std::istringstream::in);
112 }
PipeReader::iss
std::istringstream * iss
Definition: pfm_gen_analysis.cpp:126
std::istringstream
STL class.
std::fgets
T fgets(T...args)
PipeReader::pipe
FILE * pipe
Definition: pfm_gen_analysis.cpp:125
std::string
STL class.
std::exit
T exit(T...args)
PIPE_BUFFER_LENGTH
#define PIPE_BUFFER_LENGTH
Definition: pfm_gen_analysis.cpp:87
std::feof
T feof(T...args)
std::printf
T printf(T...args)

PipeReader::~PipeReader | ( | void |  | ) |
| inline

Definition at line 114 of file pfm_gen_analysis.cpp.

115 {
116 pclose(pipe);
117 delete iss;
118 }
PipeReader::iss
std::istringstream * iss
Definition: pfm_gen_analysis.cpp:126
PipeReader::pipe
FILE * pipe
Definition: pfm_gen_analysis.cpp:125

## Member Function Documentation

std::istringstream& PipeReader::output | ( | void |  | ) |
| inline

Definition at line 120 of file pfm_gen_analysis.cpp.

121 {
122 return *iss;
123 }
PipeReader::iss
std::istringstream * iss
Definition: pfm_gen_analysis.cpp:126

## Member Data Documentation

std::istringstream* PipeReader::iss
| private

Definition at line 126 of file pfm_gen_analysis.cpp.

FILE* PipeReader::pipe
| private

Definition at line 125 of file pfm_gen_analysis.cpp.

The documentation for this class was generated from the following file:

- GaudiProfiling/src/app/pfm_gen_analysis.cpp