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

test_AnalysisNtuple.cxx

Go to the documentation of this file.
00001 
00008 // Include files
00009 // Gaudi system includes
00010 
00011 #include "GaudiKernel/MsgStream.h"
00012 #include "GaudiKernel/AlgFactory.h"
00013 #include "GaudiKernel/IDataProviderSvc.h"
00014 #include "GaudiKernel/SmartDataPtr.h"
00015 #include "GaudiKernel/Algorithm.h"
00016 #include "GaudiKernel/IToolSvc.h"
00017 #include "GaudiKernel/AlgTool.h"
00018 
00019 
00020 #include "AnalysisNtuple/IValsTool.h"
00021 
00022 #include <vector>
00023 
00024 // Define the class here instead of in a header file: not needed anywhere but here!
00025 //------------------------------------------------------------------------------
00030 class test_AnalysisNtuple : public Algorithm {
00031 public:
00032     test_AnalysisNtuple(const std::string& name, ISvcLocator* pSvcLocator);
00033     StatusCode initialize();
00034     StatusCode execute();
00035     StatusCode finalize();
00036     
00037 private: 
00038     
00040     
00041     int m_count; 
00042 };
00043 
00044 //------------------------------------------------------------------------
00045 
00046 // necessary to define a Factory for this algorithm
00047 // expect that the xxx_load.cxx file contains a call     
00048 //     DLL_DECL_ALGORITHM( test_AnalysisNtuple );
00049 
00050 static const AlgFactory<test_AnalysisNtuple>  Factory;
00051 const IAlgFactory& test_AnalysisNtupleFactory = Factory;
00052 
00053 //------------------------------------------------------------------------
00055 
00056 test_AnalysisNtuple::test_AnalysisNtuple(const std::string& name, ISvcLocator* pSvcLocator)
00057 :Algorithm(name, pSvcLocator)
00058 ,m_count(0)
00059 {
00060     
00061 }
00062 
00063 
00064 //------------------------------------------------------------------------
00065 
00067 
00068 StatusCode test_AnalysisNtuple::initialize(){
00069     StatusCode sc   = StatusCode::SUCCESS;
00070     return sc;
00071 }
00072 
00073 //------------------------------------------------------------------------
00074 
00076 StatusCode test_AnalysisNtuple::execute()
00077 {
00078 
00079     StatusCode  sc = StatusCode::SUCCESS;
00080     ++m_count;
00081 
00082     std::cout << "test code is in AnalysisNtupleAlg!" << std::endl;
00083     return sc;
00084 }
00085 
00086 
00087 //------------------------------------------------------------------------
00088 
00090 StatusCode test_AnalysisNtuple::finalize(){
00091     StatusCode  sc = StatusCode::SUCCESS;
00092     MsgStream log(msgSvc(), name());
00093     log << MSG::INFO << "finalize after " << m_count << " calls." << endreq;
00094     
00095     return sc;
00096 }
00097 
00098 
00099 
00100 
00101 
00102 

Generated on Mon Dec 1 20:09:05 2008 by doxygen 1.3.3