![]() |
ATLAS Offline Software
|
#include <LArBadChannelParser2.h>
Classes | |
| struct | ISLine |
Public Member Functions | |
| LArBadChannelParser2 (const std::string &filename, MsgStream *const messager) | |
| A parser object must be initialized with the filename that it is to parse. | |
| ~LArBadChannelParser2 () | |
| std::vector< ISLine > | parseISfile (int nint, int minString, int firstWildcard=-1) |
| parse the file using the format "nint consecutive integers and then at least minString strings" and return the result as a vector of all successfully parsed lines. | |
| bool | fileStatusGood () const |
| You can use this function to check whether the file was successfully opened for reading. | |
Private Member Functions | |
| bool | parseLine (std::string &readLine, ISLine &parsedLine, int nint, int minString, int firstWildcard) |
| bool | interpretLine (const std::vector< std::string > &command, ISLine &parsedLine, int nint, int minString, int firstWildcard) |
| bool | stringToInt (int &theInt, const std::string &theStr) const |
Private Attributes | |
| std::ifstream | m_fin |
| unsigned int | m_linenumber |
| const std::string | m_filename |
| MsgStream *const | m_log |
Definition at line 15 of file LArBadChannelParser2.h.
| LArBadChannelParser2::LArBadChannelParser2 | ( | const std::string & | filename, |
| MsgStream *const | messager ) |
A parser object must be initialized with the filename that it is to parse.
It must also be given a MsgStream pointer for logging messages.
Definition at line 10 of file LArBadChannelParser2.cxx.
| LArBadChannelParser2::~LArBadChannelParser2 | ( | ) |
Definition at line 19 of file LArBadChannelParser2.cxx.
| bool LArBadChannelParser2::fileStatusGood | ( | ) | const |
You can use this function to check whether the file was successfully opened for reading.
Definition at line 24 of file LArBadChannelParser2.cxx.
|
private |
Definition at line 76 of file LArBadChannelParser2.cxx.
| std::vector< LArBadChannelParser2::ISLine > LArBadChannelParser2::parseISfile | ( | int | nint, |
| int | minString, | ||
| int | firstWildcard = -1 ) |
parse the file using the format "nint consecutive integers and then at least minString strings" and return the result as a vector of all successfully parsed lines.
The int part of a line may contain wildcards, starting from position firstWildcard; firstWildcard=-1 means "no wildcards". The wildcard character in the input file is "*", it is replaced by -1 in the parsed output. Lines that failed to parse are skipped, with diagnostic messages sent to the message stream.
Definition at line 30 of file LArBadChannelParser2.cxx.
|
private |
Definition at line 53 of file LArBadChannelParser2.cxx.
|
inlineprivate |
Definition at line 65 of file LArBadChannelParser2.h.
|
private |
Definition at line 52 of file LArBadChannelParser2.h.
|
private |
Definition at line 50 of file LArBadChannelParser2.h.
|
private |
Definition at line 51 of file LArBadChannelParser2.h.
|
private |
Definition at line 53 of file LArBadChannelParser2.h.