#include <TopoASCIIReader.h>
Definition at line 27 of file TopoASCIIReader.h.
◆ TopoASCIIReader()
TCS::TopoASCIIReader::TopoASCIIReader |
( |
int |
verbose = 0 | ) |
|
◆ ~TopoASCIIReader()
TCS::TopoASCIIReader::~TopoASCIIReader |
( |
| ) |
|
◆ getNextEvent()
bool TCS::TopoASCIIReader::getNextEvent |
( |
| ) |
|
Definition at line 42 of file TopoASCIIReader.cxx.
45 string type =
"default";
50 while((currentLine !=
"<end_file>") && (currentLine !=
"</file>")) {
53 std::getline(
m_fs, currentLine);
55 cout << currentLine << endl;
59 if(currentLine ==
"<end_file>" || currentLine ==
"</file>")
return false;
60 if(currentLine ==
"<end_event>" || currentLine ==
"</event>")
break;
61 if(currentLine ==
"<cluster>" || currentLine ==
"<eEm>" || currentLine ==
"<eTau>" || currentLine ==
"<jet>" || currentLine ==
"<jTau>" || currentLine ==
"<jEm>" || currentLine ==
"<jLJet>" || currentLine ==
"<gLJet>" || currentLine ==
"<jJet>" || currentLine ==
"<gJet>" || currentLine ==
"<muon>" || currentLine ==
"<lateMuon>" || currentLine ==
"<muonNextBC>" || currentLine ==
"<tau>" || currentLine ==
"<met>" || currentLine ==
"<info>")
type = currentLine;
62 if(currentLine ==
"</cluster>" || currentLine ==
"</eEm>" || currentLine ==
"</eTau>" || currentLine ==
"</jet>" || currentLine ==
"</jTau>" || currentLine ==
"</jEm>" || currentLine ==
"</jLJet>" || currentLine ==
"</gLJet>" || currentLine ==
"</jJet>" || currentLine ==
"</gJet>" || currentLine ==
"</muon>" || currentLine ==
"</lateMuon>" || currentLine ==
"</muonNextBC>" || currentLine ==
"</tau>" || currentLine ==
"</met>" || currentLine ==
"</info>") {
type =
"";
continue; }
63 if(currentLine ==
"<begin_file>" || currentLine ==
"<file>" || currentLine ==
"<begin_event>" || currentLine ==
"<event>" || currentLine ==
"<cluster>" || currentLine ==
"<eEm>" || currentLine ==
"<eTau>" || currentLine ==
"<jet>" || currentLine ==
"<jTau>" || currentLine ==
"<jEm>" || currentLine ==
"<jLJet>" || currentLine ==
"<gLJet>" || currentLine ==
"<jJet>" || currentLine ==
"<gJet>" || currentLine ==
"<muon>" || currentLine ==
"<lateMuon>" || currentLine ==
"<muonNextBC>" || currentLine ==
"<tau>" || currentLine ==
"<met>" || currentLine ==
"<info>")
continue;
66 std::stringstream
ss(currentLine);
67 std::istream_iterator<std::string>
it(
ss);
68 std::istream_iterator<std::string>
end;
73 if(
results.size() == 0)
continue;
76 if(
type ==
"<cluster>") {
83 }
else if(
type ==
"<eEm>") {
93 }
else if(
type ==
"<eTau>") {
102 }
else if(
type ==
"<tau>") {
109 }
else if(
type ==
"<jet>") {
116 }
else if(
type ==
"<jTau>") {
123 }
else if(
type ==
"<jEm>") {
130 }
else if(
type ==
"<jLJet>") {
137 }
else if(
type ==
"<gLJet>") {
144 }
else if(
type ==
"<jJet>") {
151 }
else if(
type ==
"<gJet>") {
158 }
else if(
type ==
"<muon>") {
168 }
else if(
type ==
"<lateMuon>") {
174 latemuon.setEtaDouble(
atof(
results.at(3).c_str()) );
175 latemuon.setPhiDouble(
atof(
results.at(4).c_str()) );
178 }
else if(
type ==
"<muonNextBC>") {
184 nextbcmuon.setEtaDouble(
atof(
results.at(3).c_str()) );
185 nextbcmuon.setPhiDouble(
atof(
results.at(4).c_str()) );
188 }
else if(
type ==
"<met>") {
194 }
else if(
type ==
"<info>") {
201 TCS_EXCEPTION(
"TOB for this event is of unknown type " <<
type<<
": '"<<currentLine<<
"'");
◆ loadInput()
void TCS::TopoASCIIReader::loadInput |
( |
const std::string & |
input | ) |
|
◆ printEvent()
void TCS::TopoASCIIReader::printEvent |
( |
| ) |
|
◆ printFileSummary()
void TCS::TopoASCIIReader::printFileSummary |
( |
| ) |
|
◆ reset()
void TCS::TopoASCIIReader::reset |
( |
| ) |
|
◆ setInputEvent()
◆ setVerbosity()
void TCS::TopoASCIIReader::setVerbosity |
( |
int |
verbosity | ) |
|
|
inline |
◆ validateInput()
void TCS::TopoASCIIReader::validateInput |
( |
| ) |
|
◆ m_event
◆ m_fs
std::ifstream TCS::TopoASCIIReader::m_fs |
|
private |
◆ m_inputFile
std::string TCS::TopoASCIIReader::m_inputFile { "" } |
|
private |
◆ m_nEvents
int TCS::TopoASCIIReader::m_nEvents { 0 } |
|
private |
◆ m_verbosity
int TCS::TopoASCIIReader::m_verbosity { 0 } |
|
private |
The documentation for this class was generated from the following files: