![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
26 TCS_EXCEPTION(
"Specify the location of the ascii input file");
29 cout <<
"TopoASCIIReader: Opening file " <<
input << endl;
30 m_fs.open(
input.c_str());
38 cout <<
"File " << m_inputFile <<
" loaded and ready to parse." << endl;
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>") {
82 m_event->addCluster(
cl);
83 }
else if(
type ==
"<eEm>") {
93 }
else if(
type ==
"<eTau>") {
101 m_event->addeTau(eTau);
102 }
else if(
type ==
"<tau>") {
108 m_event->addTau(tau);
109 }
else if(
type ==
"<jet>") {
115 m_event->addJet(
jet );
116 }
else if(
type ==
"<jTau>") {
122 m_event->addjTau( tau );
123 }
else if(
type ==
"<jEm>") {
129 m_event->addjEm( jEm );
130 }
else if(
type ==
"<jLJet>") {
136 m_event->addjLJet(
jet );
137 }
else if(
type ==
"<gLJet>") {
143 m_event->addgLJet(
jet );
144 }
else if(
type ==
"<jJet>") {
150 m_event->addjJet(
jet );
151 }
else if(
type ==
"<gJet>") {
157 m_event->addgJet(
jet );
158 }
else if(
type ==
"<muon>") {
167 m_event->addMuon(
muon );
168 }
else if(
type ==
"<lateMuon>") {
177 m_event->addLateMuon( latemuon );
178 }
else if(
type ==
"<muonNextBC>") {
187 m_event->addMuonNextBC( nextbcmuon );
188 }
else if(
type ==
"<met>") {
193 m_event->setMET(
met );
194 }
else if(
type ==
"<info>") {
199 m_event->setEventInfo(runNo, evtNo, lumiB,
BCID);
201 TCS_EXCEPTION(
"TOB for this event is of unknown type " <<
type<<
": '"<<currentLine<<
"'");
212 cout <<
"Print Event" << endl;
213 if(m_event != NULL) {
214 cout << *m_event << endl;
216 TCS_EXCEPTION(
"event returns NULL value(s) wehn trying to print!" );
221 cout <<
"File summary for" << m_inputFile << endl;
222 cout <<
"Number of Events: " << m_nEvents << endl;
226 cout <<
"TopoASCIIReader reset" << endl;
Extra patterns decribing particle interation process.
void setEtaDouble(double eta)
void setEtaDouble(double eta)
Scalar phi() const
phi method
void setEtaDouble(double eta)
void setPhiDouble(double phi)
Scalar eta() const
pseudorapidity method
void setRhad(unsigned int th)
void loadInput(const std::string &input)
void setPhiDouble(double phi)
TopoASCIIReader(int verbose=0)
void setWstot(unsigned int th)
void setPhiDouble(double phi)
void setEtaDouble(double eta)
void setRCore(unsigned int th)
#define TCS_EXCEPTION(MSG)
double atof(std::string_view str)
Converts a string into a double / float.
void setReta(unsigned int th)
void setPhiDouble(double phi)
void setPhiDouble(double phi)
void setEtaDouble(double eta)
void setEtaDouble(double eta)
void setRHad(unsigned int th)
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
void setPhiDouble(double phi)
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
void setPhiDouble(double phi)
void setEtaDouble(double eta)