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

Public Member Functions | |
| NpotModule () | |
| virtual | ~NpotModule () |
| void | BeginJob () |
Private Member Functions | |
| void | Fill (const RawBeamMonHeaderBlock &head, const RawBeamMonBlock &block) |
Private Attributes | |
| StripHist * | fStripHist |
|
|
Definition at line 30 of file NpotModule.cxx. References fStripHist, and StripHist::SetStripRange(). 00031 {
00032
00033 fStripHist = new StripHist("Protons Delivered Per Spill",
00034 "Number of Protons Delivered to NuMI per Spill",
00035 250,0,25);
00036 fStripHist->SetStripRange(1*Munits::day);
00037 }
|
|
|
Definition at line 39 of file NpotModule.cxx. 00040 {
00041 }
|
|
|
Implement for notification of begin of job Reimplemented from JobCModule. Definition at line 44 of file NpotModule.cxx. References HistMan::Adopt(), StripHist::Draw(), fStripHist, StripHist::GetHist(), and BeamMonBaseModule::GetHistMan(). 00045 {
00046 TCanvas* canvas = new TCanvas("Protons Delivered Per Spill",
00047 "Number of Protons Delivered to NuMI",
00048 500,400);
00049
00050 TH1D& hist = fStripHist->GetHist();
00051 hist.SetXTitle("Protons Delivered per Spill (1E12)");
00052
00053 canvas->cd();
00054 fStripHist->Draw("AB");
00055
00056 HistMan hm = this->GetHistMan();
00057 hm.Adopt("Protons",canvas);
00058 }
|
|
||||||||||||
|
Subclass implements to visit each RawBeamMonBlock to fill histograms. Booking should be done in BeginJob(). Implements BeamMonBaseModule. Definition at line 61 of file NpotModule.cxx. References StripHist::Fill(), Form(), fStripHist, RawBeamData::GetData(), RawBeamData::GetDataLength(), RawBeamData::GetMsecs(), RawBeamData::GetSeconds(), and MSG. 00062 {
00063 const RawBeamData* tortgt = block["E:TORTGT"];
00064 if (!tortgt) {
00065 MSG("BD",Msg::kWarning)
00066 << "No TORTGT in the data\n";
00067 return;
00068 }
00069 if (! tortgt->GetDataLength()) {
00070 MSG("BD",Msg::kWarning)
00071 << "TORTGT exists but w/out data\n";
00072 return;
00073 }
00074
00075 double npot = tortgt->GetData()[0];
00076 double dae = 1.0*tortgt->GetSeconds() + tortgt->GetMsecs()*0.001;
00077 MSG("BD",Msg::kDebug)
00078 << "npot = " << npot << ", dae = " << Form("%12u",dae) << endl;
00079
00080 fStripHist->Fill(dae,npot);
00081 }
|
|
|
Definition at line 16 of file NpotModule.h. Referenced by BeginJob(), Fill(), and NpotModule(). |
1.3.9.1