StHbtMaker.cxx 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /***************************************************************************
  2. *
  3. * $Id: StHbtMaker.cxx,v 1.14 2007/04/28 17:56:14 perev Exp $
  4. *
  5. * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu
  6. ***************************************************************************
  7. *
  8. * Description: part of STAR HBT Framework: StHbtMaker package
  9. * Maker class is the interface with root4star/Maker framework
  10. *
  11. ***************************************************************************
  12. *
  13. * $Log: StHbtMaker.cxx,v $
  14. * Revision 1.14 2007/04/28 17:56:14 perev
  15. * Redundant StChain.h removed
  16. *
  17. * Revision 1.13 2003/09/02 17:58:19 perev
  18. * gcc 3.2 updates + WarnOff
  19. *
  20. * Revision 1.12 2003/01/31 20:29:37 magestro
  21. * Small change to eliminate compiler warning
  22. *
  23. * Revision 1.11 2001/09/05 20:40:42 laue
  24. * Updates of the hbtMuDstTree microDSTs
  25. *
  26. * Revision 1.9 2000/04/03 16:21:12 laue
  27. * some include files changed
  28. *
  29. * Revision 1.8 2000/01/25 17:33:38 laue
  30. * I. In order to run the stand alone version of the StHbtMaker the following
  31. * changes have been done:
  32. * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements
  33. * b) unnecessary includes of StMaker.h have been removed
  34. * c) the subdirectory StHbtMaker/doc/Make has been created including everything
  35. * needed for the stand alone version
  36. *
  37. * II. To reduce the amount of compiler warning
  38. * a) some variables have been type casted
  39. * b) some destructors have been declared as virtual
  40. *
  41. * Revision 1.7 1999/09/24 01:23:08 fisyak
  42. * Reduced Include Path
  43. *
  44. * Revision 1.6 1999/09/08 04:15:51 lisa
  45. * persistent microDST implementation tweaked to please fickle solaris details
  46. *
  47. * Revision 1.5 1999/09/05 02:58:10 lisa
  48. * add ASCII microDST reader/writer AND franksParticle cuts
  49. *
  50. * Revision 1.4 1999/07/26 16:21:25 lisa
  51. * always convert string to char when output - needed on solaris
  52. *
  53. * Revision 1.3 1999/07/15 13:57:10 perev
  54. * cleanup
  55. *
  56. * Revision 1.2 1999/07/06 22:33:18 lisa
  57. * Adjusted all to work in pro and new - dev itself is broken
  58. *
  59. * Revision 1.1.1.1 1999/06/29 16:02:56 lisa
  60. * Installation of StHbtMaker
  61. *
  62. **************************************************************************/
  63. #include <Stiostream.h>
  64. #include <stdlib.h>
  65. #ifdef __ROOT__
  66. #endif
  67. #include "StHbtMaker.h"
  68. #ifdef __ROOT__
  69. ClassImp(StHbtMaker)
  70. #endif
  71. //_____________________________________________________________________________
  72. StHbtMaker::StHbtMaker(const char*name, const char * title) :
  73. #ifdef __ROOT__
  74. StMaker(name,title) ,
  75. #endif
  76. mDebug(0)
  77. {
  78. // StHbtMaker - constructor
  79. mHbtManager = new StHbtManager;
  80. cout << string::npos << endl;
  81. }
  82. //_____________________________________________________________________________
  83. StHbtMaker::~StHbtMaker()
  84. {
  85. // StHbtMaker - destructor
  86. cout << "Inside ReaderMaker Destructor" << endl;
  87. #ifdef __ROOT__
  88. SafeDelete(mHbtManager); //
  89. #else
  90. delete mHbtManager;
  91. #endif
  92. }
  93. //_____________________________________________________________________________
  94. void StHbtMaker::Clear(const char*)
  95. {
  96. /* no-op - do not delete manager! */
  97. #ifdef __ROOT__
  98. StMaker::Clear();
  99. #endif
  100. }
  101. //_____________________________________________________________________________
  102. //_____________________________________________________________________________
  103. Int_t StHbtMaker::Init()
  104. {
  105. if (mHbtManager->Init()){
  106. cout << "StHbtMaker::Init() - Manager init failed " << endl;
  107. return (2);
  108. }
  109. cout << "StHbtMaker::Init() - requesting a Report " << endl;
  110. StHbtString tempString = mHbtManager->Report();
  111. cout << "Got the report, now let me try to put it to screen" << endl;
  112. cout << tempString.c_str() << endl; //!
  113. #ifdef __ROOT__
  114. return StMaker::Init();
  115. #else
  116. return 0;
  117. #endif
  118. }
  119. //_____________________________________________________________________________
  120. Int_t StHbtMaker::Finish()
  121. {
  122. cout << mHbtManager->Report().c_str() << endl; //!
  123. mHbtManager->Finish();
  124. #ifdef __ROOT__
  125. return StMaker::Finish();
  126. #else
  127. return 0;
  128. #endif
  129. }
  130. //_____________________________________________________________________________
  131. Int_t StHbtMaker::Make()
  132. {
  133. if (mDebug>1) cout << "\nStHbtMaker::Make -- processing event" << endl;
  134. #ifdef __ROOT__
  135. if (mHbtManager->ProcessEvent()){
  136. return kStEOF; // non-zero value returned --> end of file action
  137. }
  138. else{
  139. return kStOK;
  140. }
  141. #else
  142. return mHbtManager->ProcessEvent();
  143. #endif
  144. }