5 #include "GeoModelKernel/GeoPrintGraphAction.h" 7 GeoPrintGraphAction::GeoPrintGraphAction (std::ostream &o)
9 , m_serialDenominator(nullptr)
11 , m_transformState(true)
13 , m_nametagState(true)
14 , m_serialDenominatorState(true)
15 , m_serialTransformerState(true)
16 , m_identifierState(true)
22 GeoPrintGraphAction::~GeoPrintGraphAction()
26 void GeoPrintGraphAction::handleTransform (
const GeoTransform *xform)
28 m_pendingTransformList.push_back(xform);
29 if (m_transformState) {
35 void GeoPrintGraphAction::handlePhysVol (
const GeoPhysVol *vol)
39 m_o <<
"VOLUME(" << vol->
getLogVol()->getName() <<
")" << std::endl;
41 m_pendingTransformList.erase(m_pendingTransformList.begin(),m_pendingTransformList.end());
45 void GeoPrintGraphAction::handleFullPhysVol (
const GeoFullPhysVol *vol)
49 m_o <<
"VOLUME(" << vol->
getLogVol()->getName() <<
")" << std::endl;
51 m_pendingTransformList.erase(m_pendingTransformList.begin(),m_pendingTransformList.end());
55 void GeoPrintGraphAction::handleNameTag (
const GeoNameTag *nameTag)
59 m_o <<
"NAMETAG: " << nameTag->getName() <<
"+";
67 m_o <<
"SERIAL DENOMINATOR:: " << sD->getBaseName() <<
"+";
75 m_o << sT->getNCopies() <<
" PARAMETERIZED VOLUMES(" << sT->getVolume()->
getLogVol()->getName() <<
")" << std::endl;
77 m_pendingTransformList.erase(m_pendingTransformList.begin(),m_pendingTransformList.end());
81 void GeoPrintGraphAction::handleIdentifierTag (
const GeoIdentifierTag *idTag)
83 if (m_identifierState) {
85 m_o <<
"NAME: " << idTag->getIdentifier() <<
"+";
89 void GeoPrintGraphAction::setNotification (Type type,
bool state)
91 if (type==TRANSFORM) {
92 m_transformState=state;
94 else if (type==VOLUME) {
97 else if (type==NAMETAG) {
100 else if (type==IDENTIFIERTAG) {
101 m_identifierState=state;
105 void GeoPrintGraphAction::indent ()
109 for (
size_t i=0;i<getPath()->getLength(); i++) {
This class generates a name for all physical volumes following it. The name is a prefix string follow...
This class represent a physical volume whose absolute default and aligned positions are known and hel...
This class gives an integral identifer to the following physical volume.
const GeoLogVol * getLogVol() const
Returns the logical volume.
A GeoPhysVol is a physical volume for normal recursive access only. This means, normally, that it represents a piece of detector that nobody cares about except for tracing engines like GEANT. More specifically: