CMS 3D CMS Logo

Public Member Functions

ato< bool > Struct Template Reference

#include <ioutils.h>

List of all members.

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, and runTheMatrix::ret.

                                                      {
  bool ret;
  std::string loc = c;
  std::transform(loc.begin(),loc.end(),loc.begin(),::tolower);
  std::stringstream in(loc.c_str());
  in >> ret;;
  if (in.fail()) {
    in.clear();
    in >> std::setiosflags(std::ios::boolalpha) >> ret;
  }
  return ret;
}