stringstream.cc
Go to the documentation of this file.
1 #include "stringstream.h"
3 
5 
6 #include <sstream>
7 #include <string>
8 
9 std::map<std::string, cet::ostream_handle> mf::priv::streams{};
10 
11 using namespace std;
12 using mf::priv::streams;
13 
14 ostringstream&
15 mf::getStringStream(string const& psetName)
16 {
17  auto const I = streams.find(psetName);
18  if (I != streams.end()) {
19  return dynamic_cast<ostringstream&>(static_cast<ostream&>(I->second));
20  }
21  throw Exception(errors::Configuration, "mf::getStringStream:")
22  << "Unable to find specified messagefacility logging stream \"" << psetName
23  << ":\" please ensure it has been configured as a destination.";
24 }
STL namespace.
std::ostringstream & getStringStream(std::string const &psetName)
Definition: stringstream.cc:15
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::map< std::string, cet::ostream_handle > streams
Definition: stringstream.cc:9