CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
ListGroups Class Reference
Inheritance diagram for ListGroups:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 ListGroups (const edm::ParameterSet &)
 
virtual ~ListGroups ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void beginJob ()
 
void endJob ()
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 65 of file ListGroups.cc.

Constructor & Destructor Documentation

ListGroups::ListGroups ( const edm::ParameterSet )

Definition at line 77 of file ListGroups.cc.

77  {
78 }
ListGroups::~ListGroups ( )
virtual

Definition at line 80 of file ListGroups.cc.

80  {
81 }

Member Function Documentation

void ListGroups::analyze ( const edm::Event evt,
const edm::EventSetup setup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 84 of file ListGroups.cc.

References DDFilteredView::addFilter(), gather_cfg::cout, dddGetString(), alcazmumu_cfi::filter, DDFilteredView::geoHistory(), edm::EventSetup::get(), h, DDFilteredView::next(), DDSpecificsFilter::not_equals, position, DDSpecificsFilter::setCriteria(), and DDFilteredView::translation().

84  {
86  setup.get<IdealGeometryRecord>().get( hDdd );
87  DDFilteredView fv(*hDdd);
88 
90  filter.setCriteria(DDValue("TrackingMaterialGroup", ""), DDSpecificsFilter::not_equals);
91  fv.addFilter(filter);
92 
93  while (fv.next()) {
94  // print the group name and full hierarchy of all items
95  std::cout << dddGetString("TrackingMaterialGroup", fv) << '\t';
96 
97  // start from 2 to skip the leading /OCMS[0]/CMSE[1] part
98  const DDGeoHistory & history = fv.geoHistory();
99  std::cout << '/';
100  for (unsigned int h = 2; h < history.size(); ++h)
101  std::cout << '/' << history[h].logicalPart().name().name() << '[' << history[h].copyno() << ']';
102 
103  // DD3Vector and DDTranslation are the same type as math::XYZVector
104  math::XYZVector position = fv.translation() / 10.; // mm -> cm
105  std::cout << "\t" << position << std::endl;
106  };
107  std::cout << std::endl;
108 }
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
std::vector< DDExpandedNode > DDGeoHistory
Geometrical &#39;path&#39; of the current node up to the root-node.
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
const T & get() const
Definition: EventSetup.h:55
void setCriteria(const DDValue &nameVal, comp_op, log_op l=AND, bool asString=true, bool merged=true)
Definition: DDFilter.cc:285
tuple cout
Definition: gather_cfg.py:121
static std::string dddGetString(const std::string &s, DDFilteredView const &view)
Definition: ListGroups.cc:51
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.
Definition: DDFilter.h:37
void ListGroups::beginJob ( void  )
inlineprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 73 of file ListGroups.cc.

73 {}
void ListGroups::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 111 of file ListGroups.cc.

111  {
112 }