BDUniquifyTestModule.cxx File Reference

#include "BDUniquifyTestModule.h"
#include <BeamDataUtil/BDUniquify.h>
#include <BeamDataUtil/BDEarliest.h>
#include <RawData/RawBeamMonHeaderBlock.h>
#include <RawData/RawBeamMonBlock.h>
#include <RawData/RawRecord.h>
#include <RawData/RawBeamData.h>
#include <MinosObjectMap/MomNavigator.h>
#include <JobControl/JobCModuleRegistry.h>
#include <JobControl/JobCResult.h>
#include <MessageService/MsgService.h>

Go to the source code of this file.

Functions

 CVSID ("$Id: BDUniquifyTestModule.cxx,v 1.2 2005/11/07 23:59:31 bv Exp $")
 JOBMODULE (BDUniquifyTestModule,"BDUniquifyTest","Test BDUniquify class.")
static double get_scalar (const RawBeamMonBlock &rbmb, const char *name)
static void dump (const char *prefix, const RawBeamMonHeaderBlock &rbmhb, const RawBeamMonBlock &rbmb)

Function Documentation

CVSID ( "$Id: BDUniquifyTestModule.  cxx,
v 1.2 2005/11/07 23:59:31 bv Exp $"   
)
static void dump ( const char *  prefix,
const RawBeamMonHeaderBlock rbmhb,
const RawBeamMonBlock rbmb 
) [static]

Definition at line 37 of file BDUniquifyTestModule.cxx.

References get_scalar(), RawBeamData::GetMsecs(), RawBeamMonBlock::GetNames(), RawBeamData::GetSeconds(), RawBeamMonHeaderBlock::GetSpillCountNum(), RawBeamMonHeaderBlock::GetTimeStamp(), BDEarliest::GetTimestamps(), and BDEarliest::SetSpill().

Referenced by BDUniquifyTestModule::Ana(), HepevtModule::Ana(), GenieModule::Get(), and HepevtModule::Get().

00040 {
00041     static BDEarliest earliest;
00042     earliest.SetSpill(rbmhb,rbmb);
00043     double dae=0,vme=0;
00044     earliest.GetTimestamps(dae, vme);
00045     VldTimeStamp vts_dae(dae), vts_vme(vme);
00046 
00047     double tortgt = get_scalar(rbmb,"E:TORTGT");
00048     double tor101 = get_scalar(rbmb,"E:TOR101");
00049 
00050     int bad = 0;
00051     vector<string> names = rbmb.GetNames();
00052     size_t siz = names.size();
00053     VldTimeStamp vts = rbmhb.GetTimeStamp();
00054     for (size_t ind=0; ind<siz; ++ind) {
00055         const RawBeamData* rbd = rbmb[names[ind]];
00056         if (!rbd) continue;
00057 
00058         VldTimeStamp tmp(rbd->GetSeconds(),rbd->GetMsecs()*1000000);
00059         if (fabs(vts - tmp) > 0.5) ++bad;
00060     }
00061 
00062     cerr << prefix << rbmhb.GetTimeStamp() << " "
00063          << "dae: " << vts_dae << " "
00064          << "vme: " << vts_vme << " "
00065          << bad << "/" << siz
00066          << " "
00067          << rbmhb.GetSpillCountNum()
00068          << " "
00069          << tor101 << " " << tortgt
00070          << endl;
00071 }

static double get_scalar ( const RawBeamMonBlock rbmb,
const char *  name 
) [static]

Definition at line 27 of file BDUniquifyTestModule.cxx.

References RawBeamData::GetData().

Referenced by dump().

00028 {
00029     const RawBeamData* data = rbmb[name];
00030     if (!data) return 0.0;
00031     const double* ddata = data->GetData();
00032     if (!ddata) return 0.0;
00033     return ddata[0];
00034 }

JOBMODULE ( BDUniquifyTestModule  ,
"BDUniquifyTest"  ,
"Test BDUniquify class."   
)

Generated on 3 Dec 2018 for loon by  doxygen 1.6.1