STIR  6.2.0
info.h
Go to the documentation of this file.
1 //
2 //
3 #ifndef __stir_info_H__
4 #define __stir_info_H__
5 /*
6  Copyright (C) 2006- 2013, Hammersmith Imanet Ltd
7  This file is part of STIR.
8  SPDX-License-Identifier: Apache-2.0
9 
10  See STIR/LICENSE.txt for details
11 */
20 #include "stir/common.h"
21 #include "stir/Verbosity.h"
22 #include <iostream>
23 #include <sstream>
24 
25 #include "TextWriter.h"
26 
27 START_NAMESPACE_STIR
28 
30 
49 template <class STRING>
50 void
51 info(const STRING& string, const int verbosity_level = 1)
52 {
53  if (Verbosity::get() >= verbosity_level)
54  {
55  std::stringstream ss;
56  ss << "\nINFO: " << string << std::endl;
57  writeText(ss.str().c_str(), INFORMATION_CHANNEL);
58  }
59 }
60 
61 END_NAMESPACE_STIR
62 #endif
void info(const STRING &string, const int verbosity_level=1)
Use this function for writing informational messages.
Definition: info.h:51
Declaration of class stir::Verbosity.
const Array< num_dimensions - num_dimensions2, elemT > & get(const Array< num_dimensions, elemT > &a, const BasicCoordinate< num_dimensions2, int > &c)
an alternative for array indexing using BasicCoordinate objects
Definition: array_index_functions.inl:114
basic configuration include file