MaxDaeDt Class Reference

#include <MaxDaeDt.h>

Inheritance diagram for MaxDaeDt:
Plotter

List of all members.

Public Member Functions

void Book (PlotterManager &pm)
 Implement this to book histograms or o.w. one time setup.
bool Fill (PlotterManager &pm)

Detailed Description

Definition at line 6 of file MaxDaeDt.h.


Member Function Documentation

void MaxDaeDt::Book ( PlotterManager  )  [virtual]

Implement this to book histograms or o.w. one time setup.

Reimplemented from Plotter.

Definition at line 9 of file MaxDaeDt.cxx.

References HistMan::Book(), and PlotterManager::GetHistMan().

00010 {
00011     pm.GetHistMan().Book<TH1D>("max_dae_dt","Maximum difference between 2 DAEs in data block",1000,-1,1);
00012 }

bool MaxDaeDt::Fill ( PlotterManager  )  [virtual]

Implement this to get notified each time a new event is read in. Return true to stop analyzing this event.

Reimplemented from Plotter.

Definition at line 14 of file MaxDaeDt.cxx.

References HistMan::Fill1d(), Knot::GetDevice(), PlotterManager::GetHistMan(), PlotterManager::GetKnot(), PlotterManager::GetSwicDevNames(), and AcnetDevice::timestamp.

00015 {
00016     double max_dt = 0;
00017     
00018     Knot& k = pm.GetKnot();
00019 
00020     vector<const char*> devs = pm.GetSwicDevNames();
00021     size_t siz = devs.size();
00022 
00023     for (size_t ind1=0; ind1<siz; ++ind1) {
00024         const AcnetDevice* ad1 = k.GetDevice(devs[ind1]);
00025 
00026         for (size_t ind2=0; ind2<siz; ++ind2) {
00027             const AcnetDevice* ad2 = k.GetDevice(devs[ind2]);
00028 
00029             double diff = fabs(ad1->timestamp - ad2->timestamp);
00030             if (diff > max_dt) max_dt = diff;
00031         }
00032     }
00033     pm.GetHistMan().Fill1d("max_dae_dt",max_dt);
00034     return true;
00035 }


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1