#include <MPDMgr.h>
Inheritance diagram for MPDMgr:


Public Member Functions | |
| MPDMgr (CalCalibShared &ccsShared) | |
| const CalibData::CalMevPerDac * | getMPD (const CalUtil::XtalIdx xtalIdx) |
| get MeVPerDac ratios for given xtal | |
Private Member Functions | |
| StatusCode | loadIdealVals () |
| load ideal calibration values from local data store (bypass calib db) | |
| StatusCode | genLocalStore () |
| populate all internal calibration data | |
Static Private Member Functions | |
| bool | validateRangeBase (CalibData::CalMevPerDac const *const mpd) |
| validate single crystal calibration data. | |
Private Attributes | |
| std::auto_ptr< CalibData::CalMevPerDac > | m_idealMPD |
| ideal data is not available till after construction & I will be responsible for memory, hence use of auto_ptr<> | |
Definition at line 23 of file MPDMgr.h.
|
|
Definition at line 25 of file MPDMgr.h.
00025 : 00026 CalibItemMgr(ICalibPathSvc::Calib_CAL_MevPerDac, 00027 ccsShared, 00028 CalUtil::XtalIdx::N_VALS 00029 ) {} |
|
|
populate all internal calibration data
Implements CalibItemMgr. Definition at line 46 of file MPDMgr.cxx. References CalibItemMgr::getRangeBase(), CalibItemMgr::m_idealMode, m_idealMPD, CalibItemMgr::m_rngBases, and validateRangeBase().
00046 {
00047 for (XtalIdx xtalIdx; xtalIdx.isValid(); xtalIdx++) {
00048 if (!m_idealMode) {
00049 CalibData::CalMevPerDac const*const mpd = (CalMevPerDac*)getRangeBase(xtalIdx.getCalXtalId());
00050 if (!mpd) continue;
00051 if (!validateRangeBase(mpd)) continue;
00052
00053 m_rngBases[xtalIdx] = mpd;
00054 } else m_rngBases[xtalIdx] = m_idealMPD.get();
00055 }
00056
00057
00058 return StatusCode::SUCCESS;
00059 }
|
|
|
get MeVPerDac ratios for given xtal
Definition at line 21 of file MPDMgr.cxx. References CalibItemMgr::m_rngBases, and CalibItemMgr::updateCalib(). Referenced by CalCalibSvc::getMPD().
00021 {
00022 // make sure we have valid calib data for this event.
00023 StatusCode sc;
00024 sc = updateCalib();
00025 if (sc.isFailure()) return NULL;
00026
00027 // Get generic pointer to rng specific data
00028 return (CalMevPerDac*)m_rngBases[xtalIdx];
00029 }
|
|
|
load ideal calibration values from local data store (bypass calib db)
Implements CalibItemMgr. Definition at line 31 of file MPDMgr.cxx. References CalibItemMgr::m_ccsShared, CalCalibShared::m_idealCalib, m_idealMPD, IdealCalCalib::mpdLrg, IdealCalCalib::mpdSigPct, and IdealCalCalib::mpdSm.
00031 {
00032 const ValSig mpdLrg(m_ccsShared.m_idealCalib.mpdLrg,
00033 m_ccsShared.m_idealCalib.mpdLrg *
00034 m_ccsShared.m_idealCalib.mpdSigPct);
00035
00036 const ValSig mpdSm(m_ccsShared.m_idealCalib.mpdSm,
00037 m_ccsShared.m_idealCalib.mpdSm *
00038 m_ccsShared.m_idealCalib.mpdSigPct);
00039
00040 m_idealMPD.reset(new CalMevPerDac(&mpdLrg, &mpdSm));
00041
00042 return StatusCode::SUCCESS;
00043 }
|
|
|
validate single crystal calibration data.
Referenced by genLocalStore(). |
|
|
ideal data is not available till after construction & I will be responsible for memory, hence use of auto_ptr<>
Definition at line 46 of file MPDMgr.h. Referenced by genLocalStore(), and loadIdealVals(). |
1.3.3