StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEStructOneBuffer.h
1 /**********************************************************************
2  *
3  * $Id: StEStructOneBuffer.h,v 1.2 2011/08/02 20:34:03 prindle Exp $
4  *
5  * Author: Duncan Prindle
6  *
7  **********************************************************************
8  *
9  * Description: Data buffer to hold events for mixing.
10  * Expect events to be pre-sorted in (multiplicity,z_vertex) so we
11  *
12  *
13  ***********************************************************************/
14 #ifndef STESTRUCTONEBUFFER__H
15 #define STESTRUCTONEBUFFER__H
16 
17 #include "TROOT.h"
18 class StEStructEvent;
19 
21  public:
22  StEStructOneBuffer(int nMix, int deltaMultMax, float deltaZMax, float deltaRateMax);
23  virtual ~StEStructOneBuffer();
24 
25  void resetCounter();
26  void addEvent(StEStructEvent* event);
27  StEStructEvent* nextEvent(int mult, float vz, float coinc);
28 
29  StEStructEvent** mEvent;
30  int mNumMixed; // number of events to mix
31  int mcurEvent; // index to current event
32  int mDeltaMultMax;
33  float mDeltaZMax;
34  float mDeltaRateMax;
35 
36  ClassDef(StEStructOneBuffer,1)
37 };
38 
39 
40 inline void StEStructOneBuffer::resetCounter() {
41  mcurEvent=-1;
42 };
43 
44 
45 #endif
46 /***********************************************************************
47  *
48  *
49  *********************************************************************/
50