Public Member Functions | |
ListGroups (const edm::ParameterSet &) | |
virtual | ~ListGroups () |
Private Member Functions | |
void | analyze (const edm::Event &, const edm::EventSetup &) |
void | beginJob () |
void | endJob () |
Definition at line 65 of file ListGroups.cc.
ListGroups::ListGroups | ( | const edm::ParameterSet & | ) |
Definition at line 77 of file ListGroups.cc.
{ }
ListGroups::~ListGroups | ( | ) | [virtual] |
Definition at line 80 of file ListGroups.cc.
{ }
void ListGroups::analyze | ( | const edm::Event & | evt, |
const edm::EventSetup & | setup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 84 of file ListGroups.cc.
References DDFilteredView::addFilter(), gather_cfg::cout, dddGetString(), align_tpl::filter, DDFilteredView::geoHistory(), edm::EventSetup::get(), h, DDFilteredView::next(), DDSpecificsFilter::not_equals, position, DDSpecificsFilter::setCriteria(), and DDFilteredView::translation().
{ edm::ESTransientHandle<DDCompactView> hDdd; setup.get<IdealGeometryRecord>().get( hDdd ); DDFilteredView fv(*hDdd); DDSpecificsFilter filter; filter.setCriteria(DDValue("TrackingMaterialGroup", ""), DDSpecificsFilter::not_equals); fv.addFilter(filter); while (fv.next()) { // print the group name and full hierarchy of all items std::cout << dddGetString("TrackingMaterialGroup", fv) << '\t'; // start from 2 to skip the leading /OCMS[0]/CMSE[1] part const DDGeoHistory & history = fv.geoHistory(); std::cout << '/'; for (unsigned int h = 2; h < history.size(); ++h) std::cout << '/' << history[h].logicalPart().name().name() << '[' << history[h].copyno() << ']'; // DD3Vector and DDTranslation are the same type as math::XYZVector math::XYZVector position = fv.translation() / 10.; // mm -> cm std::cout << "\t" << position << std::endl; }; std::cout << std::endl; }
void ListGroups::beginJob | ( | void | ) | [inline, private, virtual] |
void ListGroups::endJob | ( | void | ) | [private, virtual] |