CMS 3D CMS Logo

VisCMSMagField Class Reference

#include <VisReco/VisMagneticField/interface/VisCMSMagField.h>

Inheritance diagram for VisCMSMagField:

IgSbField

List of all members.

Public Member Functions

virtual void evaluate (const double point[3], double field[]) const
 Determine field value at point, returning the value in field.
virtual void setField (const edm::EventSetup &eventSetup)
bool valid (void)
 VisCMSMagField (void)

Private Attributes

edm::ESHandle< MagneticFieldm_pSetup
bool m_valid


Detailed Description

Definition at line 18 of file VisCMSMagField.h.


Constructor & Destructor Documentation

VisCMSMagField::VisCMSMagField ( void   ) 

Definition at line 19 of file VisCMSMagField.cc.

00020     : m_valid (false)
00021 {
00022 }


Member Function Documentation

virtual void VisCMSMagField::evaluate ( const double  point[3],
double  field[] 
) const [virtual]

Determine field value at point, returning the value in field.

The caller must ensure that field has enough space for all the components that the field will return (normally 3).

Implements IgSbField.

void VisCMSMagField::setField ( const edm::EventSetup eventSetup  )  [virtual]

Definition at line 25 of file VisCMSMagField.cc.

References edm::EventSetup::get(), edm::ESHandle< T >::isValid(), m_pSetup, and m_valid.

Referenced by VisCMSMagFieldTwig::onNewEvent().

00026 { 
00027     try 
00028     {
00029         eventSetup.get<IdealMagneticFieldRecord> ().get (m_pSetup);
00030     }
00031     catch (...) 
00032     {
00033     }
00034     m_pSetup.isValid () ? m_valid = true : m_valid = false;
00035 }

bool VisCMSMagField::valid ( void   ) 

Definition at line 49 of file VisCMSMagField.cc.

References m_valid.

Referenced by VisCMSMagFieldTwig::fieldProxy().

00050 {
00051     return m_valid;
00052 }


Member Data Documentation

edm::ESHandle<MagneticField> VisCMSMagField::m_pSetup [private]

Definition at line 31 of file VisCMSMagField.h.

Referenced by setField().

bool VisCMSMagField::m_valid [private]

Definition at line 32 of file VisCMSMagField.h.

Referenced by setField(), and valid().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:35:09 2009 for CMSSW by  doxygen 1.5.4