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 32 of file PndRingSorter.h.

Constructor & Destructor Documentation

◆ PndRingSorter()

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

Definition at line 34 of file PndRingSorter.h.

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

◆ ~PndRingSorter()

virtual PndRingSorter::~PndRingSorter ( )
inlinevirtual

Definition at line 36 of file PndRingSorter.h.

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

36 {};

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 47 of file PndRingSorter.h.

References SetLowerBound().

47 { fOutputData.clear(); }

◆ GetBufferSize()

virtual double PndRingSorter::GetBufferSize ( )
inlinevirtual

Definition at line 44 of file PndRingSorter.h.

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

◆ GetOutputData()

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

Definition at line 45 of file PndRingSorter.h.

45 { return fOutputData; }

◆ Print()

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

Definition at line 50 of file PndRingSorter.h.

References i.

51  {
52  out << "RingSorter: Size " << fRingBuffer.size() << " CellWidth: " << fCellWidth << std::endl;
53  out << "LowerBoundPointer at index: " << fLowerBoundPointer.first << " Time: " << fLowerBoundPointer.second << std::endl;
54  out << "| ";
55  for (int i = 0; i < fRingBuffer.size(); i++) {
56  out << fRingBuffer[i].size() << " |";
57  }
58  out << std::endl;
59  }
unsigned int i
Definition: P4_F32vec4.h:33

◆ SetLowerBound()

virtual void PndRingSorter::SetLowerBound ( double  timestampOfHitToWrite)
virtual

Referenced by DeleteOutputData().

◆ WriteOutAll()

virtual void PndRingSorter::WriteOutAll ( )
inlinevirtual

Definition at line 43 of file PndRingSorter.h.

References WriteOutElements().

43 { 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: