32 using namespace Geometry;
33 using Conditions::Condition;
37 os <<
"++" << endl <<
"++ " << text << endl <<
"++" << endl;
38 for (LCDD::HandleMap::const_iterator i = cont.begin(); i != cont.end(); ++i)
43 printout(
INFO,
"Printer",
"++ %s Handle:%s %s", prefix.c_str(), val->GetName(), val->GetTitle());
46 printout(
INFO,
"Printer",
"++ %s Handle:%s %s", prefix.c_str(), val->GetName(), val->GetTitle());
50 printout(
INFO,
"Printer",
"++ %s Constant:%s %s", prefix.c_str(), val->GetName(), val.
toString().c_str());
54 printout(
INFO,
"Printer",
"++ %s Material:%s %s", prefix.c_str(), val->GetName(), val.
toString().c_str());
62 printout(
INFO,
"Printer",
"++ %s Readout: %s of type %s", prefix.c_str(), val->GetName(), val->GetTitle());
66 printout(
INFO,
"Printer",
"++ %s Region: %s of type %s", prefix.c_str(), val->GetName(), val->GetTitle());
70 printout(
INFO,
"Printer",
"++ %s ZYXRotation: phi: %7.3 rad theta: %7.3 rad psi: %7.3 rad", prefix.c_str(), val.Phi(),
71 val.Theta(), val.Psi());
75 printout(
INFO,
"Printer",
"++ %s Position: x: %9.3 mm y: %9.3 mm z: %9.3 mm", prefix.c_str(), val.X(), val.Y(), val.Z());
78 int flg = Condition::WITH_IOV|Condition::WITH_ADDRESS;
79 printout(
INFO,
"Printer",
"++ %s %s", prefix.c_str(), val.str(flg).c_str());
83 const set<Limit>& o = val.
limits();
86 for (set<Limit>::const_iterator i = o.begin(); i != o.end(); ++i) {
87 os <<
"++ Limit:" << (*i).
name <<
" " << (*i).particles <<
" [" << (*i).unit <<
"] " << (*i).content <<
" "
88 << (*i).value << endl;
92 template <>
void Printer<DetElement>::operator()(
const DetElement& val)
const {
93 DetElement::Object* obj = val.data<DetElement::Object>();
99 bool env = plc.isValid();
100 bool mat = plc.isValid();
101 ::snprintf(text,
sizeof(text),
"ID:%-3d Combine Hits:%3s Material:%s Envelope:%s VisAttr:%s", sd.id(),
102 yes_no(sd.combineHits()), mat ? plc.material().name() :
yes_no(mat),
103 env ? plc.motherVol()->GetName() :
yes_no(env),
yes_no(vis));
104 os << prefix <<
"+= DetElement: " << val.name() <<
" " << val.type() << endl;
105 os << prefix <<
"| " << text << endl;
108 VisAttr attr = plc.volume().visAttributes();
109 VisAttr::Object*
v = attr.data<VisAttr::Object>();
110 TColor* col = gROOT->GetColor(v->color);
112 ::snprintf(text,
sizeof(text),
" RGB:%-8s [%d] %7.2f Style:%d %d ShowDaughters:%3s Visible:%3s", col->AsHexString(),
113 v->color, col->GetAlpha(), int(v->drawingStyle),
114 int(v->lineStyle),
yes_no(v->showDaughters),
116 os << prefix <<
"| VisAttr: " << setw(32) << left << attr.name() << text << endl;
119 Volume vol = plc.volume();
121 Material
m = vol.material();
122 ::snprintf(text,
sizeof(text),
"Volume:%s Shape:%s Material:%s", vol->GetName(), s.isValid() ? s.name() :
"Unknonw",
123 m.isValid() ? m->GetName() :
"Unknown");
124 os << prefix <<
"+------------- " << text << endl;
126 const DetElement::Children& ch = sd.children();
127 for (DetElement::Children::const_iterator i = ch.begin(); i != ch.end(); ++i)
128 Printer < DetElement > (lcdd, os, prefix +
"| ")((*i).second);
const char * name() const
Access the object name (or "" if not supported by the object)
Handle class describing a material.
bool isValid() const
Check the validity of the object held by the handle.
const std::set< DD4hep::Geometry::Limit > & limits() const
Accessor to limits container.
Helper class template to implement ASCII dumps of named objects maps.
const char * yes_no(bool value)
Helper function to print booleans in format YES/NO.
Helper class template to implement ASCII object dumps.
Handle to the implementation of the readout structure of a subdetector.
DD4hep::Geometry::DetElement DetElement
ROOT::Math::RotationZYX RotationZYX
std::string toString() const
String representation of this object.
std::string toString() const
String representation of this object.
ROOT::Math::XYZVector Position
PlacedVolume placement() const
Access to the physical volume of this detector element.
Solid_type< TGeoShape > Solid
Handle class describing visualization attributes.
Handle class describing a set of limits as they are used for simulation.
Handle class describing a region as used in simulation.
The main interface to the DD4hep detector description package.
std::string toString() const
String representation of this object.
int printout(PrintLevel severity, const char *src, const char *fmt,...)
Calls the display action with a given severity level.
Handle class describing a constant (define) object in lcdd.