BeamMonBaseModule Class Reference

#include <BeamMonBaseModule.h>

Inheritance diagram for BeamMonBaseModule:

JobCModule HadMuMonModule HornModule LossModule NpotModule TargetModule TempModule List of all members.

Public Member Functions

 BeamMonBaseModule ()
virtual ~BeamMonBaseModule ()
JobCResult Ana (const MomNavigator *mom)
virtual const RegistryDefaultConfig () const
HistMan GetHistMan ()

Protected Member Functions

RegistryDefaultConfigWritable () const
virtual void Fill (const RawBeamMonHeaderBlock &header, const RawBeamMonBlock &block)=0

Private Attributes

Registry fConfig

Detailed Description

Definition at line 27 of file BeamMonBaseModule.h.


Constructor & Destructor Documentation

BeamMonBaseModule::BeamMonBaseModule (  ) 

Definition at line 26 of file BeamMonBaseModule.cxx.

00027 {
00028 }

BeamMonBaseModule::~BeamMonBaseModule (  )  [virtual]

Definition at line 30 of file BeamMonBaseModule.cxx.

00031 {
00032 }


Member Function Documentation

JobCResult BeamMonBaseModule::Ana ( const MomNavigator mom  )  [virtual]

Implement this for read only access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 55 of file BeamMonBaseModule.cxx.

References Fill(), JobCResult::kAOK, JobCResult::kFailed, Msg::kVerbose, Msg::kWarning, and MSG.

00056 {
00057     vector<const RawRecord*> rrv = DataUtil::GetRecords<const RawRecord>(mom);
00058     const RawBeamMonBlock* block = 0;
00059     const RawBeamMonHeaderBlock* head = 0;
00060 
00061     for (size_t ind=0; ind<rrv.size(); ++ind) {
00062         const RawRecord* rr = rrv[ind];
00063         string stream_name = rr->GetTempTags().GetCharString("stream");
00064         MSG("BD",Msg::kVerbose)
00065             << "Found stream: " << stream_name << endl;
00066 
00067         const RawBeamMonBlock* b = get_block<RawBeamMonBlock>(*rr);
00068         if (b) block=b;
00069         const RawBeamMonHeaderBlock* h = get_block<RawBeamMonHeaderBlock>(*rr);
00070         if (h) head=h;
00071     }
00072     if (! (block && head)) {
00073         MSG("BD",Msg::kWarning)
00074             << "BeamMonBaseModule::Ana: failed to find both header and payload blocks\n";
00075         return JobCResult::kFailed;
00076     }
00077 
00078     this->Fill(*head,*block);
00079 
00080     return JobCResult::kAOK;
00081 }

const Registry & BeamMonBaseModule::DefaultConfig (  )  const [virtual]

Return default config. Subclasses may inherit from this but should call the non-const version and add parameters to that registry.

Reimplemented from JobCModule.

Definition at line 84 of file BeamMonBaseModule.cxx.

References DefaultConfigWritable().

00085 {
00086     return DefaultConfigWritable();
00087 }

Registry & BeamMonBaseModule::DefaultConfigWritable (  )  const [protected]

Sub class can call this to get non-const config Registry to which the subclass can add any subclass specific configuration

Definition at line 89 of file BeamMonBaseModule.cxx.

References fConfig, Registry::Set(), and Registry::Size().

Referenced by DefaultConfig().

00090 {
00091     if (fConfig.Size() == 0) {
00092         fConfig.Set("folder","Monitoring");
00093     }
00094     return fConfig;
00095 }

virtual void BeamMonBaseModule::Fill ( const RawBeamMonHeaderBlock header,
const RawBeamMonBlock block 
) [protected, pure virtual]

Subclass implements to visit each RawBeamMonBlock to fill histograms. Booking should be done in BeginJob().

Implemented in HadMuMonModule, HornModule, LossModule, NpotModule, TargetModule, and TempModule.

Referenced by Ana().

HistMan BeamMonBaseModule::GetHistMan (  ) 

Get a HistMan rooted on the folder set by the "folder" config parameter.

Definition at line 48 of file BeamMonBaseModule.cxx.

References Registry::Get(), and JobCModule::GetConfig().

Referenced by TempModule::BeginJob(), TargetModule::BeginJob(), NpotModule::BeginJob(), LossModule::BeginJob(), HornModule::BeginJob(), HadMuMonModule::BeginJob(), TargetModule::Fill(), and LossModule::Fill().

00049 {
00050     const char* folder = "Monitoring";
00051     this->GetConfig().Get("folder",folder);
00052     return HistMan(folder);
00053 }


Member Data Documentation

Registry BeamMonBaseModule::fConfig [mutable, private]

Reimplemented from JobCModule.

Definition at line 53 of file BeamMonBaseModule.h.

Referenced by DefaultConfigWritable().


The documentation for this class was generated from the following files:
Generated on Wed Sep 10 22:50:51 2014 for loon by  doxygen 1.4.7