23.05.2014 Views

Athena Developer Guide

Athena Developer Guide

Athena Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Athena</strong><br />

Chapter 13 Framework services Version/Issue: 2.0.0<br />

An example use of the MsgStream class is shown below.<br />

Listing 13.1 Use of a MsgStream object.<br />

1: #include “GaudiKernel/MgsStream.h”<br />

2:<br />

3: StatusCode myAlgo::finalize() {<br />

4: StatusCode status = Algorithm::finalise();<br />

5: MsgStream log(msgSvc(), name());<br />

6: if ( status.isFailure() ) {<br />

7: // Print a two line message in case of failure.<br />

8: log

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!