Skip to content
Snippets Groups Projects
Commit 61a9f408 authored by Sergei Zharko's avatar Sergei Zharko
Browse files

L1Algo: refactoring of small classes + introduction of ToString methods

parent 1e9a6e4b
No related branches found
No related tags found
1 merge request!796L1Algo interface and tools: updates
......@@ -130,7 +130,7 @@ void L1Algo::Init(const L1Vector<fscal>& geo, const bool UseHitErrors, const Tra
double f_sigma = geo[ind++];
double b_phi = geo[ind++];
double b_sigma = geo[ind++];
double dt = geo[ind++];
double dt = geo[ind++]; //TODO: Add this field to L1BaseStationInfo and to ToString fcn (S.Zharko)
double c_f = cos(f_phi);
double s_f = sin(f_phi);
double c_b = cos(b_phi);
......
......@@ -439,3 +439,28 @@ std::string L1BaseStationInfo::ToString(int verbosityLevel, int indentLevel) con
}
return aStream.str();
}
//----------------------------------------------------------------------------------------------------------------------//
//
std::string L1BaseStationInfo::ToString(int verbosityLevel, int indentLevel) const
{
std::stringstream aStream {};
constexpr char indentChar = '\t';
std::string indent(indentLevel, indentChar);
if (verbosityLevel == 0) {
aStream << indent << "L1BaseStationInfo object: {stationID, detectorID, address} = {" << fStationID << ", "
<< static_cast<int>(fDetectorID) << ", " << this << '}';
}
else if (verbosityLevel > 0) {
aStream << indent << "L1BaseStationInfo object: at " << this << '\n';
aStream << indent << indentChar << "Station ID: " << fStationID << '\n';
aStream << indent << indentChar << "Detector ID: " << static_cast<int>(fDetectorID) << '\n';
aStream << indent << indentChar << "L1Station object:" << '\n';
aStream << fL1Station.ToString(verbosityLevel - 1, indentLevel + 1) << '\n';
aStream << indent << indentChar << "Additional fields:\n";
aStream << indent << indentChar << indentChar << "Xmax: " << fXmax << '\n';
aStream << indent << indentChar << indentChar << "Ymax: " << fYmax << '\n';
}
return aStream.str();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment