GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
TAnalysisHistLoop Class Reference

This loop takes built events and fills histograms using 'histos/MakeAnalysisHistograms.cxx'

Definition at line 26 of file TAnalysisHistLoop.h.

Public Member Functions

 ~TAnalysisHistLoop () override
 
void AddCutFile (TFile *cut_file)
 
void ClearHistograms ()
 
void ClearQueue () override
 
virtual std::string EndStatus ()
 
TList * GetGates ()
 
size_t GetItemsCurrent () override
 
size_t GetItemsPopped () override
 
size_t GetItemsPushed () override
 
std::string GetLibraryName () const
 
TList * GetObjects ()
 
std::string GetOutputFilename () const
 
size_t GetRate () override
 
std::shared_ptr< ThreadsafeQueue< std::shared_ptr< TUnpackedEvent > > > & InputQueue ()
 
bool IsPaused ()
 
bool IsRunning ()
 
void Join ()
 
void LoadLibrary (std::string library)
 
std::string Name () const
 
virtual void OnEnd ()
 
void Pause ()
 
virtual std::string Progress ()
 
void Resume ()
 
void SetOutputFilename (const std::string &name)
 
virtual std::string Status ()
 
void Stop ()
 
void Write ()
 

Static Public Member Functions

static std::string AllThreadHeader ()
 
static std::string AllThreadProgress ()
 
static std::string AllThreadStatus ()
 
static bool AnyThreadRunning ()
 
static std::string AnyThreadStatus ()
 
static void ClearAllQueues ()
 
static void ColumnWidth (size_t val)
 
static size_t ColumnWidth ()
 
static TAnalysisHistLoopGet (std::string name="")
 
static StoppableThreadGet (const std::string &name)
 
static std::vector< StoppableThread * > GetAll ()
 
static int GetNThreads ()
 
static void join_status_thread ()
 
static void PauseAll ()
 
static void Print ()
 
static void ResumeAll ()
 
static void SendStop ()
 
static void start_status_thread ()
 
static void status_out ()
 
static void status_out_loop ()
 
static void StatusWidth (size_t val)
 
static size_t StatusWidth ()
 
static void stop_status_thread ()
 
static void StopAll ()
 

Static Public Attributes

static std::thread fStatusThread
 
static bool fStatusThreadOn = false
 

Protected Member Functions

bool Iteration () override
 

Protected Attributes

std::atomic_long fInputSize {0}
 
std::atomic_size_t fItemsPopped {0}
 
std::string fName
 

Static Protected Attributes

static std::map< std::string, StoppableThread * > fThreadMap
 

Private Member Functions

 TAnalysisHistLoop (std::string name)
 
 ClassDefOverride (TAnalysisHistLoop, 0)
 
void CloseFile ()
 
void OpenFile ()
 

Private Attributes

TCompiledHistograms fCompiledHistograms
 
std::shared_ptr< ThreadsafeQueue< std::shared_ptr< TUnpackedEvent > > > fInputQueue
 
TFile * fOutputFile
 
std::string fOutputFilename
 

#include <TAnalysisHistLoop.h>

+ Inheritance diagram for TAnalysisHistLoop:
+ Collaboration diagram for TAnalysisHistLoop:

Constructor & Destructor Documentation

◆ ~TAnalysisHistLoop()

TAnalysisHistLoop::~TAnalysisHistLoop ( )
override

Definition at line 32 of file TAnalysisHistLoop.cxx.

References CloseFile().

◆ TAnalysisHistLoop()

TAnalysisHistLoop::TAnalysisHistLoop ( std::string  name)
private

Definition at line 25 of file TAnalysisHistLoop.cxx.

References TGRSIOptions::Get(), and LoadLibrary().

Referenced by Get().

Member Function Documentation

◆ AddCutFile()

void TAnalysisHistLoop::AddCutFile ( TFile *  cut_file)

◆ AllThreadHeader()

std::string StoppableThread::AllThreadHeader ( )
staticinherited

◆ AllThreadProgress()

std::string StoppableThread::AllThreadProgress ( )
staticinherited

◆ AllThreadStatus()

std::string StoppableThread::AllThreadStatus ( )
staticinherited

◆ AnyThreadRunning()

bool StoppableThread::AnyThreadRunning ( )
staticinherited

◆ AnyThreadStatus()

std::string StoppableThread::AnyThreadStatus ( )
staticinherited

Definition at line 47 of file StoppableThread.cxx.

References StoppableThread::fThreadMap.

◆ ClassDefOverride()

TAnalysisHistLoop::ClassDefOverride ( TAnalysisHistLoop  ,
 
)
private

◆ ClearAllQueues()

void StoppableThread::ClearAllQueues ( )
staticinherited

Definition at line 166 of file StoppableThread.cxx.

References StoppableThread::fThreadMap.

Referenced by TGRSIInterruptHandler::Notify().

◆ ClearHistograms()

void TAnalysisHistLoop::ClearHistograms ( )

◆ ClearQueue()

void TAnalysisHistLoop::ClearQueue ( )
overridevirtual

Reimplemented from StoppableThread.

Definition at line 37 of file TAnalysisHistLoop.cxx.

References fInputQueue.

◆ CloseFile()

void TAnalysisHistLoop::CloseFile ( )
private

Definition at line 79 of file TAnalysisHistLoop.cxx.

References fOutputFile, fOutputFilename, and Write().

Referenced by ~TAnalysisHistLoop().

◆ ColumnWidth() [1/2]

static void StoppableThread::ColumnWidth ( size_t  val)
inlinestaticinherited

Definition at line 75 of file StoppableThread.h.

References StoppableThread::fColumnWidth.

◆ ColumnWidth() [2/2]

static size_t StoppableThread::ColumnWidth ( )
inlinestaticinherited

Definition at line 77 of file StoppableThread.h.

References StoppableThread::fColumnWidth.

Referenced by TGRSIint::SetupPipeline().

◆ EndStatus()

virtual std::string StoppableThread::EndStatus ( )
inlinevirtualinherited

◆ Get() [1/2]

TAnalysisHistLoop * TAnalysisHistLoop::Get ( std::string  name = "")
static

Definition at line 13 of file TAnalysisHistLoop.cxx.

References StoppableThread::Get(), and TAnalysisHistLoop().

Referenced by TGRSIint::SetupPipeline().

◆ Get() [2/2]

◆ GetAll()

std::vector< StoppableThread * > StoppableThread::GetAll ( )
staticinherited

Definition at line 315 of file StoppableThread.cxx.

References StoppableThread::fThreadMap.

◆ GetGates()

TList * TAnalysisHistLoop::GetGates ( )

Definition at line 126 of file TAnalysisHistLoop.cxx.

References fCompiledHistograms, and TCompiledHistograms::GetGates().

◆ GetItemsCurrent()

size_t TAnalysisHistLoop::GetItemsCurrent ( )
inlineoverridevirtual

Implements StoppableThread.

Definition at line 54 of file TAnalysisHistLoop.h.

◆ GetItemsPopped()

size_t TAnalysisHistLoop::GetItemsPopped ( )
inlineoverridevirtual

Implements StoppableThread.

Definition at line 52 of file TAnalysisHistLoop.h.

◆ GetItemsPushed()

size_t TAnalysisHistLoop::GetItemsPushed ( )
inlineoverridevirtual

Implements StoppableThread.

Definition at line 53 of file TAnalysisHistLoop.h.

◆ GetLibraryName()

std::string TAnalysisHistLoop::GetLibraryName ( ) const

◆ GetNThreads()

int StoppableThread::GetNThreads ( )
staticinherited

Definition at line 21 of file StoppableThread.cxx.

References StoppableThread::fThreadMap.

Referenced by StoppableThread::Print().

◆ GetObjects()

TList * TAnalysisHistLoop::GetObjects ( )

◆ GetOutputFilename()

std::string TAnalysisHistLoop::GetOutputFilename ( ) const

Definition at line 136 of file TAnalysisHistLoop.cxx.

References fOutputFilename.

Referenced by Write().

◆ GetRate()

size_t TAnalysisHistLoop::GetRate ( )
inlineoverridevirtual

Implements StoppableThread.

Definition at line 55 of file TAnalysisHistLoop.h.

◆ InputQueue()

std::shared_ptr<ThreadsafeQueue<std::shared_ptr<TUnpackedEvent> > >& TAnalysisHistLoop::InputQueue ( )
inline

Definition at line 33 of file TAnalysisHistLoop.h.

References fInputQueue.

Referenced by TGRSIint::SetupPipeline().

◆ IsPaused()

bool StoppableThread::IsPaused ( )
inherited

Definition at line 224 of file StoppableThread.cxx.

References StoppableThread::fPaused.

◆ IsRunning()

bool StoppableThread::IsRunning ( )
inherited

Definition at line 219 of file StoppableThread.cxx.

References StoppableThread::fRunning.

Referenced by StoppableThread::status_out().

◆ Iteration()

bool TAnalysisHistLoop::Iteration ( )
overrideprotectedvirtual

◆ Join()

void StoppableThread::Join ( )
inherited

◆ join_status_thread()

void StoppableThread::join_status_thread ( )
staticinherited

◆ LoadLibrary()

void TAnalysisHistLoop::LoadLibrary ( std::string  library)

Definition at line 111 of file TAnalysisHistLoop.cxx.

References fCompiledHistograms, and TCompiledHistograms::Load().

Referenced by TAnalysisHistLoop().

◆ Name()

std::string StoppableThread::Name ( ) const
inlineinherited

◆ OnEnd()

virtual void StoppableThread::OnEnd ( )
inlinevirtualinherited

Reimplemented in TAnalysisWriteLoopClient, TFragmentChainLoop, TAnalysisWriteLoop, and TDataLoop.

Definition at line 54 of file StoppableThread.h.

Referenced by StoppableThread::Loop().

◆ OpenFile()

void TAnalysisHistLoop::OpenFile ( )
private

◆ Pause()

void StoppableThread::Pause ( )
inherited

Definition at line 202 of file StoppableThread.cxx.

References StoppableThread::fPaused, and StoppableThread::fRunning.

◆ PauseAll()

void StoppableThread::PauseAll ( )
staticinherited

Definition at line 97 of file StoppableThread.cxx.

References StoppableThread::fThreadMap.

◆ Print()

void StoppableThread::Print ( )
staticinherited

◆ Progress()

std::string StoppableThread::Progress ( )
virtualinherited

◆ Resume()

void StoppableThread::Resume ( )
inherited

◆ ResumeAll()

void StoppableThread::ResumeAll ( )
staticinherited

Definition at line 104 of file StoppableThread.cxx.

References StoppableThread::fThreadMap.

Referenced by TGRSIint::SetupPipeline().

◆ SendStop()

void StoppableThread::SendStop ( )
staticinherited

◆ SetOutputFilename()

void TAnalysisHistLoop::SetOutputFilename ( const std::string &  name)

Definition at line 131 of file TAnalysisHistLoop.cxx.

References fOutputFilename.

Referenced by TGRSIint::SetupPipeline().

◆ start_status_thread()

void StoppableThread::start_status_thread ( )
staticinherited

◆ Status()

std::string StoppableThread::Status ( )
virtualinherited

◆ status_out()

◆ status_out_loop()

void StoppableThread::status_out_loop ( )
staticinherited

◆ StatusWidth() [1/2]

static void StoppableThread::StatusWidth ( size_t  val)
inlinestaticinherited

Definition at line 76 of file StoppableThread.h.

References StoppableThread::fStatusWidth.

◆ StatusWidth() [2/2]

static size_t StoppableThread::StatusWidth ( )
inlinestaticinherited

Definition at line 78 of file StoppableThread.h.

References StoppableThread::fStatusWidth.

Referenced by TGRSIint::SetupPipeline().

◆ Stop()

◆ stop_status_thread()

void StoppableThread::stop_status_thread ( )
staticinherited

◆ StopAll()

void StoppableThread::StopAll ( )
staticinherited

◆ Write()

Member Data Documentation

◆ fCompiledHistograms

TCompiledHistograms TAnalysisHistLoop::fCompiledHistograms
private

◆ fInputQueue

std::shared_ptr<ThreadsafeQueue<std::shared_ptr<TUnpackedEvent> > > TAnalysisHistLoop::fInputQueue
private

Definition at line 72 of file TAnalysisHistLoop.h.

Referenced by ClearQueue(), InputQueue(), and Iteration().

◆ fInputSize

◆ fItemsPopped

◆ fName

std::string StoppableThread::fName
protectedinherited

◆ fOutputFile

TFile* TAnalysisHistLoop::fOutputFile
private

Definition at line 68 of file TAnalysisHistLoop.h.

Referenced by CloseFile(), Iteration(), OpenFile(), and Write().

◆ fOutputFilename

std::string TAnalysisHistLoop::fOutputFilename
private

Definition at line 69 of file TAnalysisHistLoop.h.

Referenced by CloseFile(), GetOutputFilename(), OpenFile(), and SetOutputFilename().

◆ fStatusThread

std::thread StoppableThread::fStatusThread
staticinherited

◆ fStatusThreadOn

◆ fThreadMap