| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

StageProcessor< HEADER > Class Template Reference

Base class for all stage processor algorithms. More...

#include <StageProcessor.h>

Collaboration diagram for StageProcessor< HEADER >:

[legend]
List of all members.

Public Member Functions

 StageProcessor (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~StageProcessor ()
StatusCode initialize ()
 Sub class must call me.
StatusCode registerData (IStageData &data)
IStagethisStage ()
IStagelowerStage ()

Private Attributes

std::string m_thisStageName
std::string m_lowerStageName
IStagem_thisStage
IStagem_lowerStage
IStageDataManagerm_sdmgr

Detailed Description

template<class HEADER>
class StageProcessor< HEADER >

Base class for all stage processor algorithms.

This is a Sim15 version of DybAlgorithm

Brett Viren <bv@bnl.gov> Thu Mar 24 12:19:08 2011

Definition at line 25 of file StageProcessor.h.


Constructor & Destructor Documentation

template<class HeaderType>
StageProcessor< HeaderType >::StageProcessor ( const std::string &  name,
ISvcLocator pSvcLocator 
)

Definition at line 55 of file StageProcessor.h.

00056     : DybAlgorithm<HEADER>(name,pSvcLocator)
00057 {
00058     declareProperty("ThisStageName",m_thisStageName = "", "Name of this stage");
00059     declareProperty("LowerStageName",m_lowerStageName = "", "Name of the lower stage");
00060 
00061     this->m_pullMode = true;
00062 }

template<class HeaderType>
StageProcessor< HeaderType >::~StageProcessor (  )  [virtual]

Definition at line 66 of file StageProcessor.h.

00067 {
00068 }


Member Function Documentation

template<class HeaderType>
StatusCode StageProcessor< HeaderType >::initialize (  ) 

Sub class must call me.

Definition at line 71 of file StageProcessor.h.

00072 {
00073     // infinite loop?
00074     StatusCode sc = DybAlgorithm<HEADER>::initialize();
00075     if (sc.isFailure()) return sc;
00076 
00077     // should probably make this configurable one day
00078     sc = this->service("StageDataManager",m_sdmgr);
00079     if (sc.isFailure()) return sc;
00080 
00081 
00082     this->debug() << "This Stage " <<m_thisStageName <<endreq;
00083     this->debug() << "Lower Stage " <<m_lowerStageName <<endreq;
00084 
00085     if ("" == m_thisStageName) {
00086         this->error() << "Not configured with a stage name" << endreq;
00087         return StatusCode::FAILURE;
00088     }
00089 
00090     sc = this->toolSvc()->retrieveTool("Stage",m_thisStageName,m_thisStage);
00091     if ( sc.isFailure() ) {
00092         this->error() << "Error retrieving the public tool" << endreq;
00093         return sc;
00094     }
00095 
00096     if ("" != m_lowerStageName) {
00097         sc= this->toolSvc()->retrieveTool("Stage",m_lowerStageName,m_lowerStage);
00098         if( sc.isFailure() ) {
00099             this->error() << "Error retrieving the public tool" << endreq;
00100             return StatusCode::FAILURE;
00101         }
00102     }
00103     return StatusCode::SUCCESS;
00104 }

template<class HEADER>
StatusCode StageProcessor< HEADER >::registerData ( IStageData data  ) 

Definition at line 107 of file StageProcessor.h.

00108 {
00109     return m_sdmgr->registerData(this->Location(), data);
00110 }

template<class HEADER>
IStage* StageProcessor< HEADER >::thisStage (  )  [inline]

Definition at line 37 of file StageProcessor.h.

00037 { return m_thisStage; }

template<class HEADER>
IStage* StageProcessor< HEADER >::lowerStage (  )  [inline]

Definition at line 38 of file StageProcessor.h.

00038 { return m_lowerStage; }


Member Data Documentation

template<class HEADER>
std::string StageProcessor< HEADER >::m_thisStageName [private]

Definition at line 42 of file StageProcessor.h.

template<class HEADER>
std::string StageProcessor< HEADER >::m_lowerStageName [private]

Definition at line 43 of file StageProcessor.h.

template<class HEADER>
IStage* StageProcessor< HEADER >::m_thisStage [private]

Definition at line 45 of file StageProcessor.h.

template<class HEADER>
IStage* StageProcessor< HEADER >::m_lowerStage [private]

Definition at line 46 of file StageProcessor.h.

template<class HEADER>
IStageDataManager* StageProcessor< HEADER >::m_sdmgr [private]

Definition at line 49 of file StageProcessor.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:36:11 2011 for Stage by doxygen 1.4.7