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

Public Member Functions

 DumpFWRecoGeometry (const edm::ParameterSet &config)
 
virtual ~DumpFWRecoGeometry (void)
 
- 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Private Attributes

int m_level
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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 13 of file DumpFWRecoGeometry.cc.

Constructor & Destructor Documentation

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

Definition at line 27 of file DumpFWRecoGeometry.cc.

28  : m_level( config.getUntrackedParameter<int>( "level", 1 ))
29 {}
T getUntrackedParameter(std::string const &, T const &) const
virtual DumpFWRecoGeometry::~DumpFWRecoGeometry ( void  )
inlinevirtual

Definition at line 17 of file DumpFWRecoGeometry.cc.

17 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 32 of file DumpFWRecoGeometry.cc.

References end, mergeVDriftHistosByStation::file, edm::EventSetup::get(), i, m_level, alignCSCRings::s, and diffTreeTool::tree.

33 {
34  using namespace edm;
35 
37  eventSetup.get<FWRecoGeometryRecord>().get( geoh );
38 
39  std::stringstream s;
40  s << "cmsRecoGeom" << m_level << ".root";
41  TFile file( s.str().c_str(), "RECREATE" );
42 
43  TTree *tree = new TTree( "idToGeo", "Raw detector id association with geometry" );
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(),
60  end = geoh.product()->idToName.end();
61  it != end; ++it )
62  {
63  v_id = it->id;
64  for( unsigned int i = 0; i < 24; ++i )
65  v_vertex[i] = it->points[i];
66  for( unsigned int i = 0; i < 9; ++i )
67  v_params[i] = it->topology[i];
68  for( unsigned int i = 0; i < 5; ++i )
69  v_shape[i] = it->shape[i];
70  for( unsigned int i = 0; i < 3; ++i )
71  v_translation[i] = it->translation[i];
72  for( unsigned int i = 0; i < 9; ++i )
73  v_matrix[i] = it->matrix[i];
74  tree->Fill();
75  }
76  file.WriteTObject( tree );
77  file.Close();
78 }
std::vector< FWRecoGeom::Info >::const_iterator InfoMapItr
Definition: FWRecoGeom.h:28
int i
Definition: DBlmapReader.cc:9
#define end
Definition: vmac.h:37
const T & get() const
Definition: EventSetup.h:55
void DumpFWRecoGeometry::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 81 of file DumpFWRecoGeometry.cc.

82 {}
void DumpFWRecoGeometry::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 85 of file DumpFWRecoGeometry.cc.

86 {}

Member Data Documentation

int DumpFWRecoGeometry::m_level
private

Definition at line 24 of file DumpFWRecoGeometry.cc.

Referenced by analyze().