PandaRoot
PndRingSorter Class Referenceabstract

#include <PndRingSorter.h>

Inheritance diagram for PndRingSorter:

Public Member Functions

 PndRingSorter (int size=100, double width=10)
 
virtual ~PndRingSorter ()
 
virtual FairTimeStamp * CreateElement (FairTimeStamp *data)=0
 
virtual void AddElement (FairTimeStamp *digi, double timestamp)
 
virtual void WriteOutElements (int index)
 writes out the entries from LowerBoundPointer up to index More...
 
virtual void WriteOutElement (int index)
 writes out the entry at the index and clears it More...
 
virtual void WriteOutAll ()
 
virtual double GetBufferSize ()
 
virtual std::vector< FairTimeStamp * > GetOutputData ()
 
virtual void DeleteOutputData ()
 
virtual void SetLowerBound (double timestampOfHitToWrite)
 
virtual void Print (std::ostream &out=std::cout)
 

Detailed Description

Definition at line 20 of file PndRingSorter.h.

Constructor & Destructor Documentation

◆ PndRingSorter()

PndRingSorter::PndRingSorter ( int  size = 100,
double  width = 10 
)
inline

Definition at line 22 of file PndRingSorter.h.

22 : fLowerBoundPointer(0, 0), fCellWidth(width), fVerbose(0) { fRingBuffer.resize(size); }

◆ ~PndRingSorter()

virtual PndRingSorter::~PndRingSorter ( )
inlinevirtual

Definition at line 24 of file PndRingSorter.h.

References AddElement(), CreateElement(), WriteOutElement(), and WriteOutElements().

24 {};

Member Function Documentation

◆ AddElement()

virtual void PndRingSorter::AddElement ( FairTimeStamp *  digi,
double  timestamp 
)
virtual

Referenced by ~PndRingSorter().

◆ CreateElement()

virtual FairTimeStamp* PndRingSorter::CreateElement ( FairTimeStamp *  data)
pure virtual

Referenced by ~PndRingSorter().

◆ DeleteOutputData()

virtual void PndRingSorter::DeleteOutputData ( )
inlinevirtual

Definition at line 35 of file PndRingSorter.h.

References SetLowerBound().

35 { fOutputData.clear(); }

◆ GetBufferSize()

virtual double PndRingSorter::GetBufferSize ( )
inlinevirtual

Definition at line 32 of file PndRingSorter.h.

32 { return fCellWidth * fRingBuffer.size(); }

◆ GetOutputData()

virtual std::vector<FairTimeStamp *> PndRingSorter::GetOutputData ( )
inlinevirtual

Definition at line 33 of file PndRingSorter.h.

33 { return fOutputData; }

◆ Print()

virtual void PndRingSorter::Print ( std::ostream &  out = std::cout)
inlinevirtual

Definition at line 38 of file PndRingSorter.h.

References i.

39  {
40  out << "RingSorter: Size " << fRingBuffer.size() << " CellWidth: " << fCellWidth << std::endl;
41  out << "LowerBoundPointer at index: " << fLowerBoundPointer.first << " Time: " << fLowerBoundPointer.second << std::endl;
42  out << "| ";
43  for (int i = 0; i < fRingBuffer.size(); i++) {
44  out << fRingBuffer[i].size() << " |";
45  }
46  out << std::endl;
47  }
unsigned int i
Definition: P4_F32vec4.h:21

◆ SetLowerBound()

virtual void PndRingSorter::SetLowerBound ( double  timestampOfHitToWrite)
virtual

Referenced by DeleteOutputData().

◆ WriteOutAll()

virtual void PndRingSorter::WriteOutAll ( )
inlinevirtual

Definition at line 31 of file PndRingSorter.h.

References WriteOutElements().

31 { WriteOutElements(fLowerBoundPointer.first); }
virtual void WriteOutElements(int index)
writes out the entries from LowerBoundPointer up to index

◆ WriteOutElement()

virtual void PndRingSorter::WriteOutElement ( int  index)
virtual

writes out the entry at the index and clears it

Referenced by ~PndRingSorter().

◆ WriteOutElements()

virtual void PndRingSorter::WriteOutElements ( int  index)
virtual

writes out the entries from LowerBoundPointer up to index

Referenced by WriteOutAll(), and ~PndRingSorter().


The documentation for this class was generated from the following file: