CMS 3D CMS Logo

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

Public Member Functions

 DumpFWRecoGeometry (const edm::ParameterSet &config)
 
 ~DumpFWRecoGeometry (void) override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices 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

int m_level
 
std::string m_outputFileName
 
std::string m_tag
 

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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 14 of file DumpFWRecoGeometry.cc.

Constructor & Destructor Documentation

◆ DumpFWRecoGeometry()

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

Definition at line 29 of file DumpFWRecoGeometry.cc.

30  : m_level(config.getUntrackedParameter<int>("level", 1)),
31  m_tag(config.getUntrackedParameter<std::string>("tagInfo", "unknown")),
32 
33  m_outputFileName(config.getUntrackedParameter<std::string>("outputFileName", "cmsRecoGeo.root")) {}

◆ ~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::EDAnalyzer.

Definition at line 35 of file DumpFWRecoGeometry.cc.

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

References mps_fire::end, FWRecoGeometry::extraDet, FrontierConditions_GlobalTag_cff::file, cms::cuda::for(), edm::EventSetup::get(), get, mps_fire::i, FWRecoGeometry::idToName, m_outputFileName, m_tag, edm::ESTransientHandle< T >::product(), and FWRecoGeometry::trackerTopologyXML.

◆ beginJob()

void DumpFWRecoGeometry::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 86 of file DumpFWRecoGeometry.cc.

86 {}

◆ endJob()

void DumpFWRecoGeometry::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file DumpFWRecoGeometry.cc.

88 {}

Member Data Documentation

◆ 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().

mps_fire.i
i
Definition: mps_fire.py:428
edm::ESTransientHandle::product
T const * product() const
Definition: ESTransientHandle.h:51
FWRecoGeometryRecord
Definition: FWRecoGeometryRecord.h:9
FWRecoGeometry::idToName
FWRecoGeom::InfoMap idToName
Definition: FWRecoGeometry.h:14
edm
HLT enums.
Definition: AlignableModifier.h:19
FWRecoGeometry::trackerTopologyXML
std::string trackerTopologyXML
Definition: FWRecoGeometry.h:16
tree
Definition: tree.py:1
DumpFWRecoGeometry::m_level
int m_level
Definition: DumpFWRecoGeometry.cc:24
config
Definition: config.py:1
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
mps_fire.end
end
Definition: mps_fire.py:242
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
FWRecoGeom::InfoMapItr
std::vector< FWRecoGeom::Info >::const_iterator InfoMapItr
Definition: FWRecoGeom.h:24
get
#define get
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:27
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
DumpFWRecoGeometry::m_outputFileName
std::string m_outputFileName
Definition: DumpFWRecoGeometry.cc:26
DumpFWRecoGeometry::m_tag
std::string m_tag
Definition: DumpFWRecoGeometry.cc:25
FWRecoGeometry::extraDet
TObjArray extraDet
Definition: FWRecoGeometry.h:15