#include <VisReco/VisMagneticField/interface/VisCMSMagField.h>
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< MagneticField > | m_pSetup |
bool | m_valid |
Definition at line 18 of file VisCMSMagField.h.
VisCMSMagField::VisCMSMagField | ( | void | ) |
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 }
Definition at line 49 of file VisCMSMagField.cc.
References m_valid.
Referenced by VisCMSMagFieldTwig::fieldProxy().
00050 { 00051 return m_valid; 00052 }
edm::ESHandle<MagneticField> VisCMSMagField::m_pSetup [private] |
bool VisCMSMagField::m_valid [private] |