BDPipeline Class Reference
[BeamDataUtil]

A collection of procedures for analyzing Beam Monitoring Data. More...

#include <BDPipeline.h>

List of all members.

Public Types

typedef std::vector
< BDProcessor * > 
ProcessPipeline
 A collection of spill processors.

Public Member Functions

 BDPipeline ()
 ~BDPipeline ()
ProcessPipelineGetProcessPipeline ()
void SetSpill (const RawBeamMonHeaderBlock &rbmhb, const RawBeamMonBlock &rbmb)
 Call each processors SetSpill.
template<class ProcessorType >
ProcessorType * GetProcessor ()
 Return the first processor of given type or 0 if not found.
const RawBeamMonHeaderBlockGetHeaderBlock () const
 Return Current Header Block, can be zero.
const RawBeamMonBlockGetPayloadBlock () const
 Return current payload block, can be zero.

Private Attributes

ProcessPipeline fPipe
const RawBeamMonBlockfPayloadBlock
const RawBeamMonHeaderBlockfHeaderBlock

Detailed Description

A collection of procedures for analyzing Beam Monitoring Data.

This object accepts spill data and maintains a pipeline of BDProcessors each of which visits this data and should analyze one specific element of the beam monitoring data and store the result for later use by others.

Note:
It is intended for use in the beam monitoring DBU process the shift Online Monitor shift histogram generator and the ntupler, but may be useful for general analysis of BeamMon RawData files.
Author:
(last to touch it)
Author
rhatcher
Version:
Revision
1.4
Date:
Date
2011/10/27 18:29:02

Contact: bv@bnl.gov

Created on: Fri Apr 15 09:57:33 2005

Id
BDPipeline.h,v 1.4 2011/10/27 18:29:02 rhatcher Exp

Definition at line 43 of file BDPipeline.h.


Member Typedef Documentation

A collection of spill processors.

Definition at line 50 of file BDPipeline.h.


Constructor & Destructor Documentation

BDPipeline::BDPipeline (  ) 

Definition at line 13 of file BDPipeline.cxx.

00014 {
00015 }

BDPipeline::~BDPipeline (  ) 

Definition at line 17 of file BDPipeline.cxx.

References fPipe.

00018 {
00019     while (fPipe.size()) {
00020         delete fPipe.back();
00021         fPipe.pop_back();
00022     }
00023 }


Member Function Documentation

const RawBeamMonHeaderBlock * BDPipeline::GetHeaderBlock (  )  const

Return Current Header Block, can be zero.

Definition at line 38 of file BDPipeline.cxx.

References fHeaderBlock.

00039 {
00040     return fHeaderBlock;
00041 }

const RawBeamMonBlock * BDPipeline::GetPayloadBlock (  )  const

Return current payload block, can be zero.

Definition at line 43 of file BDPipeline.cxx.

References fPayloadBlock.

00044 {
00045     return fPayloadBlock;
00046 }

template<class ProcessorType >
ProcessorType * BDPipeline::GetProcessor (  )  [inline]

Return the first processor of given type or 0 if not found.

Definition at line 78 of file BDPipeline.h.

References fPipe.

00079 {
00080     for (size_t ind=0; ind<fPipe.size(); ++ind) {
00081         ProcessorType* p = dynamic_cast<ProcessorType*>(fPipe[ind]);
00082         if (p) return p;
00083     }
00084     return 0;
00085 }

BDPipeline::ProcessPipeline & BDPipeline::GetProcessPipeline (  ) 

Access the vector of spill processors read-write. Any BDProcessors added become owned by the pipeline and will be delete when this object is destroyed.

Definition at line 47 of file BDPipeline.cxx.

References fPipe.

Referenced by BeamMonSwicPedsDbuModule::BeamMonSwicPedsDbuModule(), and BeamMonDbuModule::FillPipeline().

00048 {
00049     return fPipe;
00050 }

void BDPipeline::SetSpill ( const RawBeamMonHeaderBlock rbmhb,
const RawBeamMonBlock rbmb 
)

Call each processors SetSpill.

Definition at line 26 of file BDPipeline.cxx.

References fHeaderBlock, fPayloadBlock, and fPipe.

Referenced by BeamMonSwicPedsDbuModule::Ana(), and BeamMonDbuModule::Process().

00028 {
00029     fPayloadBlock = &rbmb;
00030     fHeaderBlock = &rbmhb;
00031 
00032     size_t siz = fPipe.size();
00033     for (size_t ind=0; ind<siz; ++ind) {
00034         fPipe[ind]->SetSpill(*fHeaderBlock,*fPayloadBlock);
00035     }
00036 }


Member Data Documentation

Definition at line 74 of file BDPipeline.h.

Referenced by GetHeaderBlock(), and SetSpill().

Definition at line 73 of file BDPipeline.h.

Referenced by GetPayloadBlock(), and SetSpill().

Definition at line 72 of file BDPipeline.h.

Referenced by GetProcessor(), GetProcessPipeline(), SetSpill(), and ~BDPipeline().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1