Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DQM
TrackerCommon
src
MessageDispatcher.cc
Go to the documentation of this file.
1
#include "
DQM/TrackerCommon/interface/MessageDispatcher.h
"
2
#include <iostream>
3
4
std::string
Message::getType
()
5
{
6
if
(
type
==
info
) {
return
"INFO"
; }
7
else
if
(
type
==
warning
) {
return
"WARNING"
; }
8
else
{
return
"ERROR"
; }
9
}
10
11
void
MessageDispatcher::dispatchMessages
(
xgi::Output
*
out
)
12
{
13
out->getHTTPResponseHeader().addHeader(
"Content-Type"
,
"text/xml"
);
14
15
*out <<
"<?xml version=\"1.0\" ?>"
<< std::endl;
16
17
*out <<
"<Messages>"
<< std::endl;
18
19
int
i
= 1;
20
std::vector<Message *>::iterator it;
21
for
(it =
undispatched
.begin(); it !=
undispatched
.end(); it++)
22
{
23
*out <<
"<Message"
<< i <<
">"
<< std::endl;
24
25
*out <<
"<Type>"
<< (*it)->getType() <<
"</Type>"
<< std::endl;
26
*out <<
"<Title>"
<< (*it)->getTitle() <<
"</Title>"
<< std::endl;
27
*out <<
"<Text>"
<< (*it)->getText() <<
"</Text>"
<< std::endl;
28
29
*out <<
"</Message"
<< i <<
">"
<< std::endl;
30
31
i++;
32
}
33
34
*out <<
"</Messages>"
<< std::endl;
35
36
undispatched
.clear();
37
}
MessageDispatcher::undispatched
std::vector< Message * > undispatched
Definition:
MessageDispatcher.h:43
type
type
Definition:
HCALResponse.h:22
warning
Definition:
MessageDispatcher.h:11
i
int i
Definition:
DBlmapReader.cc:9
Message::getType
std::string getType()
Definition:
MessageDispatcher.cc:4
info
Definition:
MessageDispatcher.h:11
MessageDispatcher::dispatchMessages
void dispatchMessages(xgi::Output *out)
Definition:
MessageDispatcher.cc:11
dbtoconf.out
tuple out
Definition:
dbtoconf.py:99
MessageDispatcher.h
Output
#define Output(cl)
Definition:
vmac.h:193
Generated for CMSSW Reference Manual by
1.8.5