CbmRoot
CbmMvdSensorFrameBuffer.h
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // ----- CbmMvdSensorFrameBuffer header file -----
3 // ----- Created 02/02/12 by M. Deveaux -----
4 // ------------------------------------------------------------------------
5 
16 #ifndef CBMMVDSENSORFRAMEBUFFER_H
17 #define CBMMVDSENSORFRAMEBUFFER_H 1
18 
19 #include "CbmMvdSensor.h"
20 #include "CbmMvdSensorBuffer.h"
21 #include "TObject.h"
22 #include <iostream>
23 
24 #include "CbmMvdHit.h"
25 
26 class TClonesArray;
28 
30 
31 public:
34 
36  virtual ~CbmMvdSensorFrameBuffer();
37 
40  // Send a new event to the buffer. The event will be absorbed but not processed.
41  // The input - array will be emptied
42  void SendInputArray(TClonesArray* inputStream);
43  void SetInput(CbmMvdPoint* point);
44 
45  // Receives the current event from the buffer. The Event is defined by the functions
46  // BuildTimeSlice or BuildMimosaFrame. The memory is not emtied, use Clear*-methods
47  // to clear it explitly
48  TClonesArray* GetOutputArray() {
49  SetPluginReady(false);
50  return fOutputPoints;
51  };
52 
53 
56  virtual void ExecChain();
57  virtual void InitBuffer(CbmMvdSensor* mySensor);
58  virtual void BuildTimeSlice(Double_t /*tStart*/, Double_t /*tStop*/) {
59  std::cout << "Do not use " << GetName() << "::BuildTimeSlice()"
60  << std::endl;
61  };
62 
79  virtual void BuildMimosaFrame(Int_t frameNumber);
80 
81  virtual void Finish() { ; };
82 
83 
85  //==============================================================
89  virtual void ClearFrame(Int_t frameNumber);
90 
96  virtual void ClearTimeSlice(Double_t tStart, Double_t tStop);
97 
98 private:
99  TClonesArray* fCurrentEvent;
100  TClonesArray* fOutputPoints;
101 
104  Bool_t bOverflow;
105  Double_t currentTime;
106 
109 
111 };
112 
113 
114 #endif
CbmMvdSensorFrameBuffer::currentTime
Double_t currentTime
Definition: CbmMvdSensorFrameBuffer.h:105
CbmMvdSensorFrameBuffer::SetInput
void SetInput(CbmMvdPoint *point)
Definition: CbmMvdSensorFrameBuffer.cxx:100
CbmMvdSensorFrameBuffer::ExecChain
virtual void ExecChain()
Definition: CbmMvdSensorFrameBuffer.cxx:54
CbmMvdSensor.h
CbmMvdSensorFrameBuffer::ClearTimeSlice
virtual void ClearTimeSlice(Double_t tStart, Double_t tStop)
Definition: CbmMvdSensorFrameBuffer.cxx:207
CbmMvdSensorFrameBuffer::bOverflow
Bool_t bOverflow
Definition: CbmMvdSensorFrameBuffer.h:104
CbmMvdSensorFrameBuffer::operator=
CbmMvdSensorFrameBuffer operator=(const CbmMvdSensorFrameBuffer &)
CbmMvdSensorFrameBuffer::thisFrame
Int_t thisFrame
Definition: CbmMvdSensorFrameBuffer.h:102
CbmMvdSensorFrameBuffer::~CbmMvdSensorFrameBuffer
virtual ~CbmMvdSensorFrameBuffer()
Definition: CbmMvdSensorFrameBuffer.cxx:28
CbmMvdSensor
Definition: CbmMvdSensor.h:40
CbmMvdPoint
Definition: CbmMvdPoint.h:28
CbmMvdSensorFrameBuffer::InitBuffer
virtual void InitBuffer(CbmMvdSensor *mySensor)
Definition: CbmMvdSensorFrameBuffer.cxx:34
CbmMvdSensorFrameBuffer::fOutputPoints
TClonesArray * fOutputPoints
Definition: CbmMvdSensorFrameBuffer.h:100
CbmMvdSensorFrameBuffer::GetOutputArray
TClonesArray * GetOutputArray()
Definition: CbmMvdSensorFrameBuffer.h:48
CbmMvdSensorPlugin::GetName
virtual const char * GetName() const
Definition: CbmMvdSensorPlugin.h:62
CbmMvdSensorFrameBuffer::BuildTimeSlice
virtual void BuildTimeSlice(Double_t, Double_t)
Definition: CbmMvdSensorFrameBuffer.h:58
CbmMvdSensorFrameBuffer::fCurrentEvent
TClonesArray * fCurrentEvent
Definition: CbmMvdSensorFrameBuffer.h:99
CbmMvdSensorFrameBuffer::ClearFrame
virtual void ClearFrame(Int_t frameNumber)
Definition: CbmMvdSensorFrameBuffer.cxx:167
CbmMvdSensorPlugin::SetPluginReady
void SetPluginReady(bool flag)
Definition: CbmMvdSensorPlugin.h:60
CbmMvdSensorFrameBuffer
Definition: CbmMvdSensorFrameBuffer.h:29
CbmMvdSensorFrameBuffer::fSensorData
CbmMvdSensorDataSheet * fSensorData
Definition: CbmMvdSensorFrameBuffer.h:103
CbmMvdHit.h
CbmMvdSensorFrameBuffer::SendInputArray
void SendInputArray(TClonesArray *inputStream)
Definition: CbmMvdSensorFrameBuffer.cxx:79
CbmMvdSensorFrameBuffer::BuildMimosaFrame
virtual void BuildMimosaFrame(Int_t frameNumber)
Definition: CbmMvdSensorFrameBuffer.cxx:107
CbmMvdSensorFrameBuffer::lastFrame
Int_t lastFrame
Definition: CbmMvdSensorFrameBuffer.h:102
CbmMvdSensorFrameBuffer::CbmMvdSensorFrameBuffer
CbmMvdSensorFrameBuffer(const CbmMvdSensorFrameBuffer &)
CbmMvdSensorBuffer.h
CbmMvdSensorFrameBuffer::Finish
virtual void Finish()
Definition: CbmMvdSensorFrameBuffer.h:81
CbmMvdSensorDataSheet
Definition: CbmMvdSensorDataSheet.h:22
CbmMvdSensorFrameBuffer::CbmMvdSensorFrameBuffer
CbmMvdSensorFrameBuffer()
Definition: CbmMvdSensorFrameBuffer.cxx:13
CbmMvdSensorFrameBuffer::ClassDef
ClassDef(CbmMvdSensorFrameBuffer, 1)
CbmMvdSensorBuffer
Definition: CbmMvdSensorBuffer.h:28