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

CalTest.cxx File Reference

#include "GaudiKernel/SmartIF.h"
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/IAppMgrUI.h"
#include "GaudiKernel/IProperty.h"
#include "GaudiKernel/Property.h"
#include "GaudiKernel/System.h"
#include <iostream>

Go to the source code of this file.

Functions

int main (int argn, char **argc)


Function Documentation

int main int    argn,
char **    argc
 

Definition at line 30 of file CalTest.cxx.

00030                                  {
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:52 2001 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001