CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
DumpFWRecoGeometry Class Reference
Inheritance diagram for DumpFWRecoGeometry:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 DumpFWRecoGeometry (const edm::ParameterSet &config)
 
 ~DumpFWRecoGeometry (void) override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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

Private Attributes

const edm::ESGetToken< FWRecoGeometry, FWRecoGeometryRecordm_geomToken
 
int m_level
 
std::string m_outputFileName
 
std::string m_tag
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 14 of file DumpFWRecoGeometry.cc.

Constructor & Destructor Documentation

◆ DumpFWRecoGeometry()

DumpFWRecoGeometry::DumpFWRecoGeometry ( const edm::ParameterSet config)
explicit

Definition at line 30 of file DumpFWRecoGeometry.cc.

31  : m_level(config.getUntrackedParameter<int>("level", 1)),
32  m_tag(config.getUntrackedParameter<std::string>("tagInfo", "unknown")),
33 
34  m_outputFileName(config.getUntrackedParameter<std::string>("outputFileName", "cmsRecoGeo.root")),
Definition: config.py:1
std::string m_outputFileName
const edm::ESGetToken< FWRecoGeometry, FWRecoGeometryRecord > m_geomToken

◆ ~DumpFWRecoGeometry()

DumpFWRecoGeometry::~DumpFWRecoGeometry ( void  )
inlineoverride

Definition at line 17 of file DumpFWRecoGeometry.cc.

17 {}

Member Function Documentation

◆ analyze()

void DumpFWRecoGeometry::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 37 of file DumpFWRecoGeometry.cc.

References mps_fire::end, options_cfi::eventSetup, FWRecoGeometry::extraDet, geometryDiff::file, cms::cuda::for(), mps_fire::i, FWRecoGeometry::idToName, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, m_geomToken, m_outputFileName, m_tag, edm::ESTransientHandle< T >::product(), and FWRecoGeometry::trackerTopologyXML.

37  {
38  using namespace edm;
39 
40  ESTransientHandle<FWRecoGeometry> geoh = eventSetup.getTransientHandle(m_geomToken);
41  TFile file(m_outputFileName.c_str(), "RECREATE");
42 
43  TTree* tree = new TTree("idToGeo", "raw detector id association with geometry ANT");
44 
45  UInt_t v_id;
46  Float_t v_vertex[24];
47  Float_t v_params[9];
48  Float_t v_shape[5];
49  Float_t v_translation[3];
50  Float_t v_matrix[9];
51 
52  tree->SetBranchStyle(0);
53  tree->Branch("id", &v_id, "id/i");
54  tree->Branch("points", &v_vertex, "points[24]/F");
55  tree->Branch("topology", &v_params, "topology[9]/F");
56  tree->Branch("shape", &v_shape, "shape[5]/F");
57  tree->Branch("translation", &v_translation, "translation[3]/F");
58  tree->Branch("matrix", &v_matrix, "matrix[9]/F");
59 
60  for (FWRecoGeom::InfoMapItr it = geoh.product()->idToName.begin(), end = geoh.product()->idToName.end(); it != end;
61  ++it) {
62  v_id = it->id;
63  for (unsigned int i = 0; i < 24; ++i)
64  v_vertex[i] = it->points[i];
65  for (unsigned int i = 0; i < 9; ++i)
66  v_params[i] = it->topology[i];
67  for (unsigned int i = 0; i < 5; ++i)
68  v_shape[i] = it->shape[i];
69  for (unsigned int i = 0; i < 3; ++i)
70  v_translation[i] = it->translation[i];
71  for (unsigned int i = 0; i < 9; ++i)
72  v_matrix[i] = it->matrix[i];
73  tree->Fill();
74  }
75  file.WriteTObject(tree);
76 
77  file.WriteTObject(new TNamed("CMSSW_VERSION", gSystem->Getenv("CMSSW_VERSION")));
78  file.WriteTObject(new TNamed("tag", m_tag.c_str()));
79  file.WriteTObject(&geoh.product()->extraDet, "ExtraDetectors");
80  file.WriteTObject(new TNamed("PRODUCER_VERSION", "1")); // version 2 changes pixel parameters
81 
82  file.WriteTObject(new TNamed("TrackerTopology", geoh.product()->trackerTopologyXML));
83 
84  file.Close();
85 }
std::vector< FWRecoGeom::Info >::const_iterator InfoMapItr
Definition: FWRecoGeom.h:24
std::string trackerTopologyXML
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
FWRecoGeom::InfoMap idToName
std::string m_outputFileName
const edm::ESGetToken< FWRecoGeometry, FWRecoGeometryRecord > m_geomToken
T const * product() const
TObjArray extraDet
HLT enums.
Definition: tree.py:1

◆ beginJob()

void DumpFWRecoGeometry::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 87 of file DumpFWRecoGeometry.cc.

87 {}

◆ endJob()

void DumpFWRecoGeometry::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 89 of file DumpFWRecoGeometry.cc.

89 {}

Member Data Documentation

◆ m_geomToken

const edm::ESGetToken<FWRecoGeometry, FWRecoGeometryRecord> DumpFWRecoGeometry::m_geomToken
private

Definition at line 27 of file DumpFWRecoGeometry.cc.

Referenced by analyze().

◆ m_level

int DumpFWRecoGeometry::m_level
private

Definition at line 24 of file DumpFWRecoGeometry.cc.

◆ m_outputFileName

std::string DumpFWRecoGeometry::m_outputFileName
private

Definition at line 26 of file DumpFWRecoGeometry.cc.

Referenced by analyze().

◆ m_tag

std::string DumpFWRecoGeometry::m_tag
private

Definition at line 25 of file DumpFWRecoGeometry.cc.

Referenced by analyze().