CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
ato< bool > Struct Template Reference

#include <ioutils.h>

Public Member Functions

bool operator() (const std::string &c) const
 

Detailed Description

template<>
struct ato< bool >

Definition at line 27 of file ioutils.h.

Member Function Documentation

bool ato< bool >::operator() ( const std::string &  c) const

Definition at line 8 of file ioutils.cc.

References trackerHits::c, recoMuon::in, run_regression::ret, and create_public_pileup_plots::transform.

8  {
9  bool ret;
10  std::string loc = c;
11  std::transform(loc.begin(),loc.end(),loc.begin(),::tolower);
12  std::stringstream in(loc.c_str());
13  in >> ret;;
14  if (in.fail()) {
15  in.clear();
16  in >> std::setiosflags(std::ios::boolalpha) >> ret;
17  }
18  return ret;
19 }