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