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

CalTest.cxx

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/CalRecon/src/test/CalTest.cxx,v 1.8 2001/04/25 23:46:51 igable Exp $
00002 
00003 // Include files
00004 #include "GaudiKernel/SmartIF.h"
00005 #include "GaudiKernel/Bootstrap.h"
00006 #include "GaudiKernel/IAppMgrUI.h"
00007 #include "GaudiKernel/IProperty.h"
00008 #include "GaudiKernel/Property.h"
00009 #include "GaudiKernel/System.h"
00010 
00011 
00012 //------------------------------------------------------------------------------
00013 //
00014 //  Package    : CalRecon
00015 //
00016 //  Description: Test Main Program
00017 //
00018 //------------------------------------------------------------------------------
00019 #include <iostream>
00020 // this needed for instrument.lib??
00021 
00022 
00023 //------------------------------------------------------------------------------
00024 //
00025 //  Package    : CalRecon
00026 //
00027 //  Description: Test Main Program
00028 //
00029 //------------------------------------------------------------------------------
00030 int main( int argn, char** argc) {
00031 
00032     // get the path to this package from its root environment variable: if not there,
00033     // assume that we are in the root
00034     const char * local_path = ::getenv("CALRECONROOT");
00035     std::string joboptions_file = std::string(local_path? local_path: "");
00036 
00037     joboptions_file +=  std::string("/src/test/jobOptions.txt");
00038     
00039     // Create an instance of an application manager
00040     IInterface* iface = Gaudi::createApplicationMgr();
00041     
00042     SmartIF<IProperty>     propMgr ( IID_IProperty, iface );
00043     SmartIF<IAppMgrUI>     appMgr  ( IID_IAppMgrUI, iface );
00044     
00045     // Set properties of algorithms and services
00046     StatusCode status = StatusCode::SUCCESS;
00047     if ( iface && propMgr == iface )    {
00048         status = propMgr->setProperty( StringProperty("JobOptionsPath", joboptions_file) );
00049     }
00050     else  {
00051         exit(-1);
00052     }
00053 
00054     
00055     // Run the application manager and process events
00056     if ( appMgr )   {
00057         status = appMgr->run();
00058     }
00059     else  {
00060         return 0;
00061     }
00062     
00063     // All done - exit
00064     return 0;
00065     
00066 }

Generated on Thu Nov 29 16:38:48 2001 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001