00001 00002 /*************************************************************************** 00003 * 00004 * $Id: StHbtMaker.cxx,v 1.14 2007/04/28 17:56:14 perev Exp $ 00005 * 00006 * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu 00007 *************************************************************************** 00008 * 00009 * Description: part of STAR HBT Framework: StHbtMaker package 00010 * Maker class is the interface with root4star/Maker framework 00011 * 00012 *************************************************************************** 00013 * 00014 * $Log: StHbtMaker.cxx,v $ 00015 * Revision 1.14 2007/04/28 17:56:14 perev 00016 * Redundant StChain.h removed 00017 * 00018 * Revision 1.13 2003/09/02 17:58:19 perev 00019 * gcc 3.2 updates + WarnOff 00020 * 00021 * Revision 1.12 2003/01/31 20:29:37 magestro 00022 * Small change to eliminate compiler warning 00023 * 00024 * Revision 1.11 2001/09/05 20:40:42 laue 00025 * Updates of the hbtMuDstTree microDSTs 00026 * 00027 * Revision 1.9 2000/04/03 16:21:12 laue 00028 * some include files changed 00029 * 00030 * Revision 1.8 2000/01/25 17:33:38 laue 00031 * I. In order to run the stand alone version of the StHbtMaker the following 00032 * changes have been done: 00033 * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements 00034 * b) unnecessary includes of StMaker.h have been removed 00035 * c) the subdirectory StHbtMaker/doc/Make has been created including everything 00036 * needed for the stand alone version 00037 * 00038 * II. To reduce the amount of compiler warning 00039 * a) some variables have been type casted 00040 * b) some destructors have been declared as virtual 00041 * 00042 * Revision 1.7 1999/09/24 01:23:08 fisyak 00043 * Reduced Include Path 00044 * 00045 * Revision 1.6 1999/09/08 04:15:51 lisa 00046 * persistent microDST implementation tweaked to please fickle solaris details 00047 * 00048 * Revision 1.5 1999/09/05 02:58:10 lisa 00049 * add ASCII microDST reader/writer AND franksParticle cuts 00050 * 00051 * Revision 1.4 1999/07/26 16:21:25 lisa 00052 * always convert string to char when output - needed on solaris 00053 * 00054 * Revision 1.3 1999/07/15 13:57:10 perev 00055 * cleanup 00056 * 00057 * Revision 1.2 1999/07/06 22:33:18 lisa 00058 * Adjusted all to work in pro and new - dev itself is broken 00059 * 00060 * Revision 1.1.1.1 1999/06/29 16:02:56 lisa 00061 * Installation of StHbtMaker 00062 * 00063 **************************************************************************/ 00064 00065 #include <Stiostream.h> 00066 #include <stdlib.h> 00067 00068 #ifdef __ROOT__ 00069 #endif 00070 00071 #include "StHbtMaker.h" 00072 00073 #ifdef __ROOT__ 00074 ClassImp(StHbtMaker) 00075 #endif 00076 00077 //_____________________________________________________________________________ 00078 00079 00080 StHbtMaker::StHbtMaker(const char*name, const char * title) : 00081 #ifdef __ROOT__ 00082 StMaker(name,title) , 00083 #endif 00084 mDebug(0) 00085 { 00086 // StHbtMaker - constructor 00087 mHbtManager = new StHbtManager; 00088 cout << string::npos << endl; 00089 } 00090 //_____________________________________________________________________________ 00091 StHbtMaker::~StHbtMaker() 00092 { 00093 // StHbtMaker - destructor 00094 cout << "Inside ReaderMaker Destructor" << endl; 00095 #ifdef __ROOT__ 00096 SafeDelete(mHbtManager); // 00097 #else 00098 delete mHbtManager; 00099 #endif 00100 } 00101 //_____________________________________________________________________________ 00102 void StHbtMaker::Clear(const char*) 00103 { 00104 /* no-op - do not delete manager! */ 00105 #ifdef __ROOT__ 00106 StMaker::Clear(); 00107 #endif 00108 } 00109 //_____________________________________________________________________________ 00110 //_____________________________________________________________________________ 00111 Int_t StHbtMaker::Init() 00112 { 00113 if (mHbtManager->Init()){ 00114 cout << "StHbtMaker::Init() - Manager init failed " << endl; 00115 return (2); 00116 } 00117 cout << "StHbtMaker::Init() - requesting a Report " << endl; 00118 StHbtString tempString = mHbtManager->Report(); 00119 cout << "Got the report, now let me try to put it to screen" << endl; 00120 cout << tempString.c_str() << endl; 00121 #ifdef __ROOT__ 00122 return StMaker::Init(); 00123 #else 00124 return 0; 00125 #endif 00126 } 00127 //_____________________________________________________________________________ 00128 Int_t StHbtMaker::Finish() 00129 { 00130 cout << mHbtManager->Report().c_str() << endl; 00131 mHbtManager->Finish(); 00132 #ifdef __ROOT__ 00133 return StMaker::Finish(); 00134 #else 00135 return 0; 00136 #endif 00137 } 00138 //_____________________________________________________________________________ 00139 Int_t StHbtMaker::Make() 00140 { 00141 if (mDebug>1) cout << "\nStHbtMaker::Make -- processing event" << endl; 00142 #ifdef __ROOT__ 00143 if (mHbtManager->ProcessEvent()){ 00144 return kStEOF; // non-zero value returned --> end of file action 00145 } 00146 else{ 00147 return kStOK; 00148 } 00149 #else 00150 return mHbtManager->ProcessEvent(); 00151 #endif 00152 }
1.5.9