BDHornCurrent Class Reference
[BeamDataUtil]

A BDScalar to watch the horn current. More...

#include <BDHornCurrent.h>

Inheritance diagram for BDHornCurrent:
BDScalar BDProcessor

List of all members.

Public Member Functions

 BDHornCurrent (float max_dev=5.0, int nspills=10)

Private Member Functions

double GetScalar (const RawBeamMonHeaderBlock &rbmhb, const RawBeamMonBlock &rbmb)

Detailed Description

A BDScalar to watch the horn current.

Author:
(last to touch it)
Author
bv
Version:
Revision
1.2
Date:
Date
2005/04/15 14:09:58

Contact: bv@bnl.gov

Created on: Fri Apr 15 09:57:05 2005

Id
BDHornCurrent.h,v 1.2 2005/04/15 14:09:58 bv Exp

Definition at line 32 of file BDHornCurrent.h.


Constructor & Destructor Documentation

BDHornCurrent::BDHornCurrent ( float  max_dev = 5.0,
int  nspills = 10 
)

Definition at line 10 of file BDHornCurrent.cxx.

00011     : BDScalar(max_dev,nspills)
00012 {
00013 }


Member Function Documentation

double BDHornCurrent::GetScalar ( const RawBeamMonHeaderBlock rbmhb,
const RawBeamMonBlock rbmb 
) [private, virtual]

Reimplemented from BDScalar.

Definition at line 15 of file BDHornCurrent.cxx.

References RawBeamData::GetData(), RawBeamData::GetDataLength(), Msg::kDebug, Msg::kWarning, 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 }


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1