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

Public Member Functions | |
| BDHornCurrent (float max_dev=5.0, int nspills=10) | |
Private Member Functions | |
| double | GetScalar (const RawBeamMonHeaderBlock &rbmhb, const RawBeamMonBlock &rbmb) |
Created on: Fri Apr 15 09:57:05 2005
Definition at line 32 of file BDHornCurrent.h.
|
||||||||||||
|
Definition at line 10 of file BDHornCurrent.cxx. 00011 : BDScalar(max_dev,nspills) 00012 { 00013 }
|
|
||||||||||||
|
Reimplemented from BDScalar. Definition at line 15 of file BDHornCurrent.cxx. References RawBeamData::GetData(), RawBeamData::GetDataLength(), and MSG. 00017 {
00018 const char* dev[] = {
00019 "E:NSLINA",
00020 "E:NSLINB",
00021 "E:NSLINC",
00022 "E:NSLIND",
00023 0
00024 };
00025
00026 double value = 0;
00027 for (int ind=0; dev[ind]; ++ind) {
00028 const RawBeamData* hc = rbmb[dev[ind]];
00029 double val = 0;
00030 if (!hc) {
00031 MSG("BD",Msg::kDebug) << "No "<<dev[ind]<<" in the data\n";
00032 }
00033 else if (! hc->GetDataLength()) {
00034 MSG("BD",Msg::kWarning)
00035 << dev[ind]<<" exists but w/out data\n";
00036 }
00037 else if (hc->GetDataLength() != 1) {
00038 MSG("BD",Msg::kWarning)
00039 << dev[ind]<<" exists but is wrong size\n";
00040 }
00041 else val = hc->GetData()[0];
00042 value += val;
00043 }
00044 return value;
00045 }
|
1.3.9.1