ATLAS Offline Software
Loading...
Searching...
No Matches
MaterialEffectsOnTrack.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "GaudiKernel/MsgStream.h"
7#include <cassert>
8#include <ostream>
9#include <string>
10
11// Overload of << operator for MsgStream for debug output
12MsgStream&
14{
15 sl << "MaterialEffectsOnTrack based on" << endmsg;
17 sl << "MaterialEffects, Scatterer? : " << (scatteringAngles() ? "yes:" : "none")
18 << endmsg;
19 if (scatteringAngles()) {
20 sl << *scatteringAngles() << endmsg;
21 }
22 sl << "MaterialEffects, E-loss ? : " << (energyLoss() ? "yes:" : "none")
23 << endmsg;
24 if (energyLoss()) {
25 sl << *energyLoss() << endmsg;
26 }
27 return sl;
28}
29// Overload of << operator for std::ostream for debug output
30std::ostream&
31Trk::MaterialEffectsOnTrack::dump(std::ostream& sl) const
32{
33 sl << "MaterialEffectsOnTrack based on" << std::endl;
35 sl << "MaterialEffects, Scatterer? : " << (scatteringAngles() ? "yes:" : "none")
36 << std::endl;
37 if (scatteringAngles()) {
38 sl << *scatteringAngles() << std::endl;
39 }
40 sl << "MaterialEffects, E-loss ? : " << (energyLoss() ? "yes:" : "none")
41 << std::endl;
42 if (energyLoss()) {
43 sl << *energyLoss() << std::endl;
44 }
45 return sl;
46}
47
#define endmsg
virtual MsgStream & dump(MsgStream &sl) const
Interface method for output, can be overloaded by child classes.
const EnergyLoss * energyLoss() const
returns the energy loss object.
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
virtual MsgStream & dump(MsgStream &sl) const override final
Interface method for output.