GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TRateScalerQueue Class Reference

Detailed Description

This class is where we store scalers. It is thread-safe and returns it's status in order to monitor progress.

Definition at line 86 of file TScalerQueue.h.

Public Member Functions

 TRateScalerQueue (const TRateScalerQueue &)=default
 
 TRateScalerQueue (TRateScalerQueue &&) noexcept=default
 
 ~TRateScalerQueue ()=default
 
void Add (TScalerData *)
 
void CheckStatus () const
 
void Clear (Option_t *opt="") override
 
unsigned int GetTotalScalersIn () const
 
unsigned int GetTotalScalersOut () const
 
TRateScalerQueueoperator= (const TRateScalerQueue &)=default
 
TRateScalerQueueoperator= (TRateScalerQueue &&) noexcept=default
 
void Pop () override
 
TScalerDataPopScaler ()
 
void Print (Option_t *opt="") const override
 
bool Running () const
 
int Size () const
 
void StartStatusUpdate ()
 
void Stop ()
 
void StopStatusUpdate ()
 

Static Public Member Functions

static TRateScalerQueueGet ()
 

Static Public Attributes

static std::mutex All
 
static std::mutex Sorted
 

Private Member Functions

 TRateScalerQueue ()
 
void ResetRateCounter ()
 
void StatusUpdate ()
 

Private Attributes

std::queue< TScalerData * > fRateScalerQueue
 
int fScalersIn {0}
 
int fScalersInQueue {0}
 
int fScalersOut {0}
 
bool fStatusUpdateOn {false}
 
bool fStop {false}
 
TStopwatch * fStopwatch {nullptr}
 
unsigned int fTotalScalersIn {0}
 
unsigned int fTotalScalersOut {0}
 

Static Private Attributes

static TRateScalerQueuefRateScalerQueueClassPointer = nullptr
 
static std::map< int, int > fScalerIdMap
 
+ Inheritance diagram for TRateScalerQueue:
+ Collaboration diagram for TRateScalerQueue:

Constructor & Destructor Documentation

◆ TRateScalerQueue() [1/3]

TRateScalerQueue::TRateScalerQueue ( const TRateScalerQueue & )
default

◆ TRateScalerQueue() [2/3]

TRateScalerQueue::TRateScalerQueue ( TRateScalerQueue && )
defaultnoexcept

◆ ~TRateScalerQueue()

TRateScalerQueue::~TRateScalerQueue ( )
default

◆ TRateScalerQueue() [3/3]

TRateScalerQueue::TRateScalerQueue ( )
private

Definition at line 223 of file TScalerQueue.cxx.

References Clear(), fRateScalerQueueClassPointer, and fStopwatch.

Referenced by Get().

Member Function Documentation

◆ Add()

void TRateScalerQueue::Add ( TScalerData * scalerData)

◆ CheckStatus()

void TRateScalerQueue::CheckStatus ( ) const

Definition at line 345 of file TScalerQueue.cxx.

References All, BLUE, DGREEN, fTotalScalersIn, fTotalScalersOut, RESET_COLOR, and Size().

Referenced by Print().

◆ Clear()

void TRateScalerQueue::Clear ( Option_t * opt = "")
override

Clear the entire Queue, Queue counters, and timer.

Definition at line 239 of file TScalerQueue.cxx.

References All, fRateScalerQueue, fScalersIn, fScalersInQueue, fScalersOut, fStopwatch, fTotalScalersIn, fTotalScalersOut, RED, and RESET_COLOR.

Referenced by TRateScalerQueue().

◆ Get()

◆ GetTotalScalersIn()

unsigned int TRateScalerQueue::GetTotalScalersIn ( ) const
inline

Definition at line 137 of file TScalerQueue.h.

References fTotalScalersIn.

◆ GetTotalScalersOut()

unsigned int TRateScalerQueue::GetTotalScalersOut ( ) const
inline

Definition at line 138 of file TScalerQueue.h.

References fTotalScalersOut.

◆ operator=() [1/2]

TRateScalerQueue & TRateScalerQueue::operator= ( const TRateScalerQueue & )
default

◆ operator=() [2/2]

TRateScalerQueue & TRateScalerQueue::operator= ( TRateScalerQueue && )
defaultnoexcept

◆ Pop()

void TRateScalerQueue::Pop ( )
override

Definition at line 306 of file TScalerQueue.cxx.

References fRateScalerQueue, fScalersInQueue, fScalersOut, and Sorted.

◆ PopScaler()

TScalerData * TRateScalerQueue::PopScaler ( )

◆ Print()

void TRateScalerQueue::Print ( Option_t * opt = "") const
override

Print the status of the Scaler Queue

Definition at line 233 of file TScalerQueue.cxx.

References CheckStatus().

◆ ResetRateCounter()

void TRateScalerQueue::ResetRateCounter ( )
private

Definition at line 382 of file TScalerQueue.cxx.

References All, fScalersIn, and fScalersOut.

Referenced by StatusUpdate().

◆ Running()

bool TRateScalerQueue::Running ( ) const
inline

Definition at line 140 of file TScalerQueue.h.

References fStop.

◆ Size()

int TRateScalerQueue::Size ( ) const

Definition at line 339 of file TScalerQueue.cxx.

References fScalersInQueue.

Referenced by CheckStatus(), PopScaler(), and StatusUpdate().

◆ StartStatusUpdate()

void TRateScalerQueue::StartStatusUpdate ( )

The status thread runs the status update at various intervals to show the progress of the analysis tree.

Definition at line 271 of file TScalerQueue.cxx.

References fStatusUpdateOn, and StatusUpdate().

◆ StatusUpdate()

void TRateScalerQueue::StatusUpdate ( )
private

◆ Stop()

void TRateScalerQueue::Stop ( )
inline

Definition at line 141 of file TScalerQueue.h.

References fStop.

◆ StopStatusUpdate()

void TRateScalerQueue::StopStatusUpdate ( )

Stops the status update

Definition at line 280 of file TScalerQueue.cxx.

References fStatusUpdateOn.

Member Data Documentation

◆ All

std::mutex TRateScalerQueue::All
static

Definition at line 121 of file TScalerQueue.h.

Referenced by CheckStatus(), Clear(), ResetRateCounter(), and StatusUpdate().

◆ fRateScalerQueue

std::queue<TScalerData*> TRateScalerQueue::fRateScalerQueue
private

Definition at line 99 of file TScalerQueue.h.

Referenced by Add(), Clear(), Pop(), and PopScaler().

◆ fRateScalerQueueClassPointer

TRateScalerQueue * TRateScalerQueue::fRateScalerQueueClassPointer = nullptr
staticprivate

Definition at line 97 of file TScalerQueue.h.

Referenced by TRateScalerQueue(), and Get().

◆ fScalerIdMap

std::map<int, int> TRateScalerQueue::fScalerIdMap
staticprivate

Definition at line 116 of file TScalerQueue.h.

◆ fScalersIn

int TRateScalerQueue::fScalersIn {0}
private

Definition at line 107 of file TScalerQueue.h.

Referenced by Add(), Clear(), ResetRateCounter(), and StatusUpdate().

◆ fScalersInQueue

int TRateScalerQueue::fScalersInQueue {0}
private

Definition at line 100 of file TScalerQueue.h.

Referenced by Add(), Clear(), Pop(), PopScaler(), and Size().

◆ fScalersOut

int TRateScalerQueue::fScalersOut {0}
private

Definition at line 108 of file TScalerQueue.h.

Referenced by Clear(), Pop(), PopScaler(), ResetRateCounter(), and StatusUpdate().

◆ fStatusUpdateOn

bool TRateScalerQueue::fStatusUpdateOn {false}
private

Definition at line 103 of file TScalerQueue.h.

Referenced by StartStatusUpdate(), StatusUpdate(), and StopStatusUpdate().

◆ fStop

bool TRateScalerQueue::fStop {false}
private

Definition at line 105 of file TScalerQueue.h.

Referenced by Running(), and Stop().

◆ fStopwatch

TStopwatch* TRateScalerQueue::fStopwatch {nullptr}
private

Definition at line 110 of file TScalerQueue.h.

Referenced by TRateScalerQueue(), Clear(), and StatusUpdate().

◆ fTotalScalersIn

unsigned int TRateScalerQueue::fTotalScalersIn {0}
private

Definition at line 113 of file TScalerQueue.h.

Referenced by Add(), CheckStatus(), Clear(), and GetTotalScalersIn().

◆ fTotalScalersOut

unsigned int TRateScalerQueue::fTotalScalersOut {0}
private

Definition at line 114 of file TScalerQueue.h.

Referenced by CheckStatus(), Clear(), GetTotalScalersOut(), and PopScaler().

◆ Sorted

std::mutex TRateScalerQueue::Sorted
static

Definition at line 122 of file TScalerQueue.h.

Referenced by Add(), Pop(), and PopScaler().