Public Member Functions | |
DumpFWRecoGeometry (const edm::ParameterSet &config) | |
virtual | ~DumpFWRecoGeometry (void) |
Private Member Functions | |
virtual void | analyze (const edm::Event &event, const edm::EventSetup &eventSetup) |
virtual void | beginJob (void) |
virtual void | endJob (void) |
Private Attributes | |
int | m_level |
Definition at line 13 of file DumpFWRecoGeometry.cc.
DumpFWRecoGeometry::DumpFWRecoGeometry | ( | const edm::ParameterSet & | config | ) | [explicit] |
Definition at line 27 of file DumpFWRecoGeometry.cc.
: m_level( config.getUntrackedParameter<int>( "level", 1 )) {}
virtual DumpFWRecoGeometry::~DumpFWRecoGeometry | ( | void | ) | [inline, virtual] |
Definition at line 17 of file DumpFWRecoGeometry.cc.
{}
void DumpFWRecoGeometry::analyze | ( | const edm::Event & | event, |
const edm::EventSetup & | eventSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 32 of file DumpFWRecoGeometry.cc.
References end, mergeVDriftHistosByStation::file, edm::EventSetup::get(), i, m_level, asciidump::s, and diffTreeTool::tree.
{ using namespace edm; ESTransientHandle<FWRecoGeometry> geoh; eventSetup.get<FWRecoGeometryRecord>().get( geoh ); std::stringstream s; s << "cmsRecoGeom" << m_level << ".root"; TFile file( s.str().c_str(), "RECREATE" ); TTree *tree = new TTree( "idToGeo", "Raw detector id association with geometry" ); UInt_t v_id; Float_t v_vertex[24]; Float_t v_params[9]; Float_t v_shape[5]; Float_t v_translation[3]; Float_t v_matrix[9]; tree->SetBranchStyle( 0 ); tree->Branch( "id", &v_id, "id/i" ); tree->Branch( "points", &v_vertex, "points[24]/F" ); tree->Branch( "topology", &v_params, "topology[9]/F" ); tree->Branch( "shape", &v_shape, "shape[5]/F" ); tree->Branch( "translation", &v_translation, "translation[3]/F" ); tree->Branch( "matrix", &v_matrix, "matrix[9]/F" ); for( FWRecoGeom::InfoMapItr it = geoh.product()->idToName.begin(), end = geoh.product()->idToName.end(); it != end; ++it ) { v_id = it->id; for( unsigned int i = 0; i < 24; ++i ) v_vertex[i] = it->points[i]; for( unsigned int i = 0; i < 9; ++i ) v_params[i] = it->topology[i]; for( unsigned int i = 0; i < 5; ++i ) v_shape[i] = it->shape[i]; for( unsigned int i = 0; i < 3; ++i ) v_translation[i] = it->translation[i]; for( unsigned int i = 0; i < 9; ++i ) v_matrix[i] = it->matrix[i]; tree->Fill(); } file.WriteTObject( tree ); file.Close(); }
void DumpFWRecoGeometry::beginJob | ( | void | ) | [private, virtual] |
void DumpFWRecoGeometry::endJob | ( | void | ) | [private, virtual] |
int DumpFWRecoGeometry::m_level [private] |
Definition at line 24 of file DumpFWRecoGeometry.cc.
Referenced by analyze().