#include <IO.h>
Public Member Functions | |
void | Dump (std::ostream &out=std::cout) const |
dumps fAllLines More... | |
template<class T > | |
bool | GetAllOpt (const char *tag, const char *key, std::vector< T > &values) |
reads a vector of T More... | |
template<class T > | |
bool | GetAllOpt (const char *tag, const char *key, T &value) |
reads a T More... | |
std::string | GetLineData (const char *tag, const char *key) const |
std::string | GetNextLineData (const char *tag, const char *key) |
template<class T > | |
bool | GetOpt (const char *tag, const char *key, std::vector< T > &values) const |
reads a vector of T More... | |
template<class T > | |
bool | GetOpt (const char *tag, const char *key, T &value) const |
reads a T More... | |
bool | GetOpt (const char *tag, const char *key, std::string &value) const |
reads a string More... | |
IO (const char *filepattern) | |
builds IO from files matching filepattern More... | |
bool | IsZombie () const |
true if constructor went wrong More... | |
~IO () | |
Static Public Attributes | |
static const unsigned | sLinesize = 1000 |
maximum line size More... | |
Private Member Functions | |
bool | ParseFile (const char *filename) |
parse one file More... | |
Private Attributes | |
std::vector< std::pair < std::string, std::string > > | fAllLines |
all non empty, uncommented lines More... | |
std::string | fCurkey |
current key More... | |
int | fCurline |
counter More... | |
std::string | fCurtag |
current tag More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, IO &io) |
dumps fAllLines More... | |
IO::IO | ( | const char * | filepattern | ) |
builds IO from files matching filepattern
Definition at line 10 of file IO.cc.
References gather_cfg::cout, electronDataDiscovery::files, pftools::Utils::Glob(), i, and ParseFile().
|
inline |
void IO::Dump | ( | std::ostream & | out = std::cout | ) | const |
dumps fAllLines
Definition at line 77 of file IO.cc.
Referenced by operator<<().
bool pftools::IO::GetAllOpt | ( | const char * | tag, |
const char * | key, | ||
std::vector< T > & | values | ||
) |
bool pftools::IO::GetAllOpt | ( | const char * | tag, |
const char * | key, | ||
T & | value | ||
) |
reads a T
this function allows to read several lines with the same tag/key:
Definition at line 138 of file IO.h.
References data, recoMuon::in, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.
string IO::GetLineData | ( | const char * | tag, |
const char * | key | ||
) | const |
Definition at line 90 of file IO.cc.
References data, fAllLines, first, newFWLiteAna::found, i, recoMuon::in, edm::second(), sLinesize, AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::tag.
Referenced by GetOpt().
string IO::GetNextLineData | ( | const char * | tag, |
const char * | key | ||
) |
Definition at line 115 of file IO.cc.
References data, fAllLines, fCurkey, fCurline, fCurtag, first, newFWLiteAna::found, i, recoMuon::in, combine::key, edm::second(), sLinesize, AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::tag.
bool pftools::IO::GetOpt | ( | const char * | tag, |
const char * | key, | ||
std::vector< T > & | values | ||
) | const |
reads a vector of T
Definition at line 108 of file IO.h.
References data, GetLineData(), recoMuon::in, AlCaHLTBitMon_QueryRunRegistry::string, and tmp.
Referenced by pftools::CalibCompare::CalibCompare(), pftools::Exercises3::calibrateCalibratables(), pftools::Exercises3::evaluateCalibrator(), pftools::Exercises3::evaluateSpaceManager(), and pftools::Exercises3::Exercises3().
bool pftools::IO::GetOpt | ( | const char * | tag, |
const char * | key, | ||
T & | value | ||
) | const |
reads a T
Definition at line 123 of file IO.h.
References data, recoMuon::in, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.
bool pftools::IO::GetOpt | ( | const char * | tag, |
const char * | key, | ||
std::string & | value | ||
) | const |
reads a string
|
inline |
|
private |
parse one file
Definition at line 32 of file IO.cc.
References gather_cfg::cout, data, relativeConstraints::empty, fAllLines, recoMuon::in, alignCSCRings::s, sLinesize, and GlobalPosition_Frontier_DevDB_cff::tag.
Referenced by IO().
|
friend |
dumps fAllLines
|
private |
all non empty, uncommented lines
Definition at line 32 of file IO.h.
Referenced by Dump(), GetLineData(), GetNextLineData(), IsZombie(), ParseFile(), and ~IO().
|
private |
|
private |
|
private |
|
static |
maximum line size
Definition at line 49 of file IO.h.
Referenced by GetLineData(), GetNextLineData(), and ParseFile().