27 #include <Math/RotationZYX.h>
34 #define USE_TREE_OUTPUT true
61 stack<Node *> nodeStack;
63 while (!nodeStack.empty()) {
64 Node *node = nodeStack.top();
70 int childIndent = node->
indent + 1;
72 for (
int i = 0;
i < childCount; ++
i) {
74 bool childIsLast = (
i == 0) ?
true :
false;
92 useTreeOutput(useTreeOutput) {
111 static vector<char> indentChars;
112 while ((
int) indentChars.size() <=
indent) {
113 indentChars.push_back(
' ');
118 printf(
"%c ", indentChars[
i]);
123 indentChars[indent-1] =
' ';
127 indentChars[indent-1] =
'|';
138 ROOT::Math::RotationZYX
rot;
139 rot = desc->rotation();
140 double rotComponents[3] = {0.,};
141 rot.GetComponents(rotComponents);
143 cout << desc->name().name() <<
" at " << desc->translation() <<
" rotated (ZYX) by (";
144 for (
int i = 0;
i < 3; ++
i) {
145 printf(
"%.2f%c", (rotComponents[
i] * 180 / 3.14159), ((
i < 2) ?
' ' :
')'));
#define DEFINE_FWK_MODULE(type)
GeometryTree(const edm::ParameterSet &)
virtual void beginJob() override
Node(DetGeomDesc *desc, int indent, bool isLast, bool useTreeOutput=true)
virtual void analyze(const edm::Event &, const edm::EventSetup &iSetup) override
Event setup record containing the Measured (measured) geometry information.
virtual ConstContainer components() const
access to the tree structure
Geometrical description of a detector.
T const * product() const
edm::TrieNode< PDet > Node
virtual void endJob() override