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
ListIds Class Reference
Inheritance diagram for ListIds:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 ListIds (const edm::ParameterSet &)
 
virtual ~ListIds ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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::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 68 of file ListIds.cc.

Constructor & Destructor Documentation

ListIds::ListIds ( const edm::ParameterSet )

Definition at line 80 of file ListIds.cc.

80  {
81 }
ListIds::~ListIds ( )
virtual

Definition at line 83 of file ListIds.cc.

83  {
84 }

Member Function Documentation

void ListIds::analyze ( const edm::Event evt,
const edm::EventSetup setup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 87 of file ListIds.cc.

References DDFilteredView::addFilter(), GeomDet::components(), gather_cfg::cout, dddGetString(), DetId::det(), alcazmumu_cfi::filter, DDFilteredView::firstChild(), GeomDet::geographicalId(), DDFilteredView::geoHistory(), edm::EventSetup::get(), h, i, j, DDFilteredView::logicalPart(), DDLogicalPart::material(), DDBase< N, C >::name(), DDFilteredView::next(), not_equals, AlCaHLTBitMon_ParallelJobs::p, contentValuesFiles::parts, GeomDet::position(), position, DetId::rawId(), DDSpecificsFilter::setCriteria(), AlCaHLTBitMon_QueryRunRegistry::string, GeomDet::subDetector(), DetId::subdetId(), GeometricDet::Tracker, DDFilteredView::translation(), CmsTrackerStringToEnum::type(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

87  {
88  std::cout << "______________________________ DDD ______________________________" << std::endl;
90  setup.get<IdealGeometryRecord>().get( hDdd );
91 
92  std::string attribute = "TkDDDStructure";
93  CmsTrackerStringToEnum theCmsTrackerStringToEnum;
95  filter.setCriteria(DDValue(attribute, "any", 0), DDCompOp::not_equals);
96  DDFilteredView fv(*hDdd);
97  fv.addFilter(filter);
98  if (theCmsTrackerStringToEnum.type(dddGetString(attribute, fv)) != GeometricDet::Tracker) {
99  fv.firstChild();
100  if (theCmsTrackerStringToEnum.type(dddGetString(attribute, fv)) != GeometricDet::Tracker)
101  throw cms::Exception("Configuration") << "The first child of the DDFilteredView is not what is expected \n"
102  << dddGetString(attribute, fv);
103  }
104 
105  std::cout << std::fixed << std::setprecision(3);
106  do {
107  // print the full hierarchy of all Silicon items
108  if (fv.logicalPart().material().name() == "materials:Silicon") {
109 
110  // start from 2 to skip the leading /OCMS[0]/CMSE[1] part
111  const DDGeoHistory & history = fv.geoHistory();
112  std::cout << '/';
113  for (unsigned int h = 2; h < history.size(); ++h) {
114  std::cout << '/' << history[h].logicalPart().name().name() << '[' << history[h].copyno() << ']';
115  }
116 
117  // DD3Vector and DDTranslation are the same type as math::XYZVector
118  math::XYZVector position = fv.translation() / 10.; // mm -> cm
119  std::cout << "\t" << position << std::endl;
120  }
121  } while (fv.next());
122  std::cout << std::endl;
123 
124  std::cout << "______________________________ std::vector<GeomDet*> from TrackerGeometry::dets() ______________________________" << std::endl;
126  setup.get<TrackerDigiGeometryRecord>().get( hGeo );
127 
128  std::cout << std::fixed << std::setprecision(3);
129  auto const & dets = hGeo->dets();
130  for (unsigned int i = 0; i < dets.size(); ++i) {
131  const GeomDet & det = *dets[i];
132 
133  // Surface::PositionType is a typedef for Point3DBase<float,GlobalTag> a.k.a. GlobalPoint
134  const Surface::PositionType & p = det.position();
135  math::XYZVector position(p.x(), p.y(), p.z());
136 
137  std::cout << det.subDetector() << '\t'
138  << det.geographicalId().det() << '\t'
139  << det.geographicalId().subdetId() << '\t'
140  << det.geographicalId().rawId() << "\t"
141  << position;
142  const std::vector<const GeomDet*> & parts = det.components();
143  if (parts.size()) {
144  std::cout << "\t[" << parts[0]->geographicalId().rawId();
145  for (unsigned int j = 1; j < parts.size(); ++j)
146  std::cout << '\t' << parts[j]->geographicalId().rawId();
147  std::cout << ']';
148  }
149  std::cout << std::endl;
150  }
151 
152 }
int i
Definition: DBlmapReader.cc:9
T y() const
Definition: PV3DBase.h:63
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:46
T z() const
Definition: PV3DBase.h:64
int j
Definition: DBlmapReader.cc:9
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static std::string dddGetString(const std::string &s, const DDFilteredView &view)
Definition: ListIds.cc:55
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
std::vector< DDExpandedNode > DDGeoHistory
Geometrical &#39;path&#39; of the current node up to the root-node.
virtual std::vector< const GeomDet * > components() const
Returns direct components, if any.
Definition: GeomDet.h:86
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
const T & get() const
Definition: EventSetup.h:55
static int position[264][3]
Definition: ReadPGInfo.cc:509
tuple cout
Definition: gather_cfg.py:121
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
virtual SubDetector subDetector() const
Which subdetector.
Definition: GeomDet.cc:49
T x() const
Definition: PV3DBase.h:62
void setCriteria(const DDValue &nameVal, DDCompOp, DDLogOp l=DDLogOp::AND, bool asString=true, bool merged=true)
Definition: DDFilter.cc:245
GeometricDet::GeometricEnumType type(std::string const &) const
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.
Definition: DDFilter.h:32
void ListIds::beginJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 76 of file ListIds.cc.

76 {}
void ListIds::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 155 of file ListIds.cc.

155  {
156 }