Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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
minoscvs
Version:
Revision
1.3
Date:
Date
2005/04/26 20:54:24
Contact: bv@bnl.gov

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

Id
BDPipeline.h,v 1.3 2005/04/26 20:54:24 minoscvs Exp

Definition at line 42 of file BDPipeline.h.


Member Typedef Documentation

typedef std::vector<BDProcessor*> BDPipeline::ProcessPipeline
 

A collection of spill processors.

Definition at line 49 of file BDPipeline.h.

Referenced by GetProcessPipeline().


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.

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.

00044 {
00045     return fPayloadBlock;
00046 }

template<class ProcessorType>
ProcessorType * BDPipeline::GetProcessor  ) 
 

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

Definition at line 77 of file BDPipeline.h.

References fPipe.

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

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 ProcessPipeline.

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

const RawBeamMonHeaderBlock* BDPipeline::fHeaderBlock [private]
 

Definition at line 73 of file BDPipeline.h.

Referenced by SetSpill().

const RawBeamMonBlock* BDPipeline::fPayloadBlock [private]
 

Definition at line 72 of file BDPipeline.h.

Referenced by SetSpill().

ProcessPipeline BDPipeline::fPipe [private]
 

Definition at line 71 of file BDPipeline.h.

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


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:08:46 2010 for loon by  doxygen 1.3.9.1