Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

PointInfoAlg Class Reference

This is an Algorithm designed to store pointing information in the tuple. More...

Collaboration diagram for PointInfoAlg:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PointInfoAlg (const std::string &name, ISvcLocator *pSvcLocator)
 ctor

StatusCode initialize ()
 set parameters and attach to various perhaps useful services.

StatusCode execute ()
 process an event

StatusCode finalize ()
 clean up, summarize


Private Attributes

PointingInfo m_pointing_info
StringProperty m_root_tree
BooleanProperty m_save_tuple
INTupleWriterSvc * m_rootTupleSvc

Detailed Description

This is an Algorithm designed to store pointing information in the tuple.

Author:
Toby Burnett
Header
/nfs/slac/g/glast/ground/cvs/FluxSvc/src/PointInfoAlg.cxx,v 1.7 2008/11/10 16:06:26 burnett Exp

Definition at line 42 of file PointInfoAlg.cxx.


Constructor & Destructor Documentation

PointInfoAlg::PointInfoAlg const std::string &  name,
ISvcLocator *  pSvcLocator
 

ctor

Definition at line 68 of file PointInfoAlg.cxx.

References m_root_tree, and m_save_tuple.

00069 :Algorithm(name, pSvcLocator) 
00070 {
00071     // declare properties with setProperties calls
00072 
00073     declareProperty("pointing_info_tree_name",  m_root_tree="MeritTuple");
00074     declareProperty("save_pointing_info",  m_save_tuple=false);
00075 
00076 }


Member Function Documentation

StatusCode PointInfoAlg::execute  ) 
 

process an event

Definition at line 102 of file PointInfoAlg.cxx.

References PointingInfo::forTDS(), m_pointing_info, m_root_tree, m_rootTupleSvc, m_save_tuple, and PointingInfo::set().

00103 {
00104     StatusCode  sc = StatusCode::SUCCESS;
00105     MsgStream   log( msgSvc(), name() );
00106     //
00107     // Purpose: set tuple items
00108  
00109     m_pointing_info.set();
00110 
00111    
00112     // put pointing stuff into the root tree
00113     if( m_rootTupleSvc!=0 && !m_root_tree.value().empty()){
00114         m_rootTupleSvc->storeRowFlag(this->m_root_tree.value(), m_save_tuple);
00115     }
00116 
00117 
00118     // Here the TDS receives the exposure data
00119     Event::ExposureCol* exposureDBase = new Event::ExposureCol;
00120     sc=eventSvc()->registerObject(EventModel::MC::ExposureCol , exposureDBase);
00121     if(sc.isFailure()) {
00122         log << MSG::ERROR << EventModel::MC::ExposureCol  
00123             <<" could not be entered into existing data store" << endreq;
00124         return sc;
00125     }
00126     exposureDBase->push_back(m_pointing_info.forTDS());
00127 
00128     return StatusCode::SUCCESS;
00129 }

StatusCode PointInfoAlg::finalize  ) 
 

clean up, summarize

Definition at line 133 of file PointInfoAlg.cxx.

00133                                  {
00134     StatusCode  sc = StatusCode::SUCCESS;
00135     return sc;
00136 }

StatusCode PointInfoAlg::initialize  ) 
 

set parameters and attach to various perhaps useful services.

Definition at line 79 of file PointInfoAlg.cxx.

References m_pointing_info, m_root_tree, m_rootTupleSvc, and PointingInfo::setPtTuple().

00079                                    {
00080     StatusCode  sc = StatusCode::SUCCESS;
00081     MsgStream log(msgSvc(), name());
00082     // Use the Job options service to set the Algorithm's parameters
00083     setProperties();
00084 
00085 
00086     // get a pointer to RootTupleSvc
00087     if( (service("RootTupleSvc", m_rootTupleSvc, true) ). isFailure() ) {
00088         log << MSG::ERROR << " RootTupleSvc is not available" << endreq;
00089         m_rootTupleSvc=0;
00090         sc = StatusCode::FAILURE;
00091     }else if( !m_root_tree.value().empty() ) {
00092         
00093         m_pointing_info.setPtTuple(m_rootTupleSvc, m_root_tree.value());
00094     }
00095 
00096 
00097     return sc;
00098 }


Member Data Documentation

PointingInfo PointInfoAlg::m_pointing_info [private]
 

Definition at line 52 of file PointInfoAlg.cxx.

Referenced by execute(), and initialize().

StringProperty PointInfoAlg::m_root_tree [private]
 

Definition at line 54 of file PointInfoAlg.cxx.

Referenced by execute(), initialize(), and PointInfoAlg().

INTupleWriterSvc* PointInfoAlg::m_rootTupleSvc [private]
 

Definition at line 57 of file PointInfoAlg.cxx.

Referenced by execute(), and initialize().

BooleanProperty PointInfoAlg::m_save_tuple [private]
 

Definition at line 55 of file PointInfoAlg.cxx.

Referenced by execute(), and PointInfoAlg().


The documentation for this class was generated from the following file:
Generated on Wed Nov 26 20:29:33 2008 by doxygen 1.3.3