BMSpillFiller.cxx File Reference

#include "BMSpillFiller.h"
#include <BeamDataUtil/BeamMonSpill.h>
#include <BeamDataUtil/BDEarliest.h>
#include <BeamDataUtil/BDHornCurrent.h>
#include <BeamDataUtil/BDScalar.h>
#include <BeamDataUtil/BDHadMuMon.h>
#include <BeamDataUtil/BDDevices.h>
#include <BeamDataUtil/BDTarget.h>
#include <BeamDataUtil/BDSwicPeds.h>
#include <RawData/RawBeamMonBlock.h>
#include <MessageService/MsgService.h>
#include <DatabaseInterface/DbiWriter.h>
#include <DatabaseInterface/DbiWriter.tpl>
#include <string>
#include <vector>
#include <cmath>

Go to the source code of this file.

Functions

 CVSID ("$Id: BMSpillFiller.cxx,v 1.24 2006/05/27 07:26:38 rhatcher Exp $")
static const RawBeamDataget_dev (const RawBeamMonBlock &rbmb, const char *devname)
static bool is_pm_there (const RawBeamMonBlock &rbmb, const char *dev)

Variables

const double min_horn_current = 150

Function Documentation

CVSID ( "$Id: BMSpillFiller.  cxx,
v 1.24 2006/05/27 07:26:38 rhatcher Exp $"   
)
static const RawBeamData* get_dev ( const RawBeamMonBlock rbmb,
const char *  devname 
) [static]

Definition at line 60 of file BMSpillFiller.cxx.

References RawBeamData::GetDataLength().

Referenced by is_pm_there().

00062 {
00063     const RawBeamData* rbd = rbmb[devname];
00064     if (!rbd) return 0;
00065     if (!rbd->GetDataLength()) return 0;
00066     return rbd;
00067 }

static bool is_pm_there ( const RawBeamMonBlock rbmb,
const char *  dev 
) [static]

Definition at line 70 of file BMSpillFiller.cxx.

References Form(), get_dev(), RawBeamData::GetData(), RawBeamData::GetDataLength(), Msg::kDebug, Msg::kVerbose, and MSG.

Referenced by BMSpillFiller::Spill().

00071 {
00072     // If the PM data isn't there, don't care if it's inserted or not,
00073     // it is still dead to us.
00074     const RawBeamData* pmswic = get_dev(rbmb,Form("E:M%sDS",dev));
00075     if (!pmswic) {
00076         MSG("BDD",Msg::kVerbose)
00077             << "PM" << dev << " not in data\n";
00078         return false;
00079     }
00080 
00081     // PM data is there, see if LVDT can tell us if it's inserted or
00082     // not
00083     const double lvdt_inness_cut = 6.0;
00084     const RawBeamData* lvdt = get_dev(rbmb,Form("E_M%sLV",dev));
00085     if (lvdt && lvdt->GetDataLength()) {
00086         double val = lvdt->GetData()[0];
00087         if (val < lvdt_inness_cut) return true;
00088         MSG("BDD",Msg::kVerbose)
00089             << "PM" << dev << " fails LVDT cut, val = " << val << endl;
00090         return false;
00091     }
00092     
00093 #if 0
00094     // No LVDT, (initial running had typo in dev list).  Check if the
00095     // "I:PMxxx" device is there - not given clear understanding of
00096     // what this actually is.
00097     const RawBeamData* ipm = get_dev(rbmb,Form("I:PM%s",dev));
00098     if (ipm) {
00099         MSG("BDD",Msg::kDebug)
00100             << "PM" << dev << " no I:PM" << dev << endl;
00101         return false;
00102     }
00103 #endif
00104 
00105     return true;
00106 }


Variable Documentation

const double min_horn_current = 150

Definition at line 28 of file BMSpillFiller.cxx.

Referenced by BMSpillFiller::Spill().


Generated on 17 Jun 2018 for loon by  doxygen 1.6.1