This loop builds events (vectors of fragments) based on timestamps and a build windows.
Definition at line 27 of file TEventBuildingLoop.h.
Public Types | |
enum | EBuildMode { EBuildMode::kDefault, EBuildMode::kTime, EBuildMode::kTimestamp, EBuildMode::kTriggerId, EBuildMode::kSkip } |
Public Member Functions | |
~TEventBuildingLoop () override | |
void | ClearQueue () override |
std::string | EndStatus () override |
unsigned long | GetBuildWindow () const |
size_t | GetItemsCurrent () override |
size_t | GetItemsPopped () override |
size_t | GetItemsPushed () override |
size_t | GetRate () override |
unsigned int | GetSortDepth () const |
std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment > > > & | InputQueue () |
bool | IsPaused () |
bool | IsRunning () |
bool | Iteration () override |
void | Join () |
std::string | Name () const |
virtual void | OnEnd () |
std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment > > > & | OutOfOrderQueue () |
std::shared_ptr< ThreadsafeQueue< std::vector< std::shared_ptr< const TFragment > > > > & | OutputQueue () |
void | Pause () |
virtual std::string | Progress () |
void | Resume () |
void | SetBuildWindow (long val) |
void | SetSortDepth (int val) |
virtual std::string | Status () |
void | Stop () |
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 TEventBuildingLoop * | Get (std::string name="", EBuildMode mode=EBuildMode::kTimestamp, long buildWindow=2000) |
static StoppableThread * | Get (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 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 | |
TEventBuildingLoop (std::string name, EBuildMode mode, long buildWindow) | |
TEventBuildingLoop (const TEventBuildingLoop &other) | |
bool | CheckBuildCondition (const std::shared_ptr< const TFragment > &) |
bool | CheckTimeCondition (const std::shared_ptr< const TFragment > &) |
bool | CheckTimestampCondition (const std::shared_ptr< const TFragment > &) |
bool | CheckTriggerIdCondition (const std::shared_ptr< const TFragment > &) |
ClassDefOverride (TEventBuildingLoop, 0) | |
TEventBuildingLoop & | operator= (const TEventBuildingLoop &other) |
Private Attributes | |
EBuildMode | fBuildMode |
long | fBuildWindow |
std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment > > > | fInputQueue |
std::vector< std::shared_ptr< const TFragment > > | fNextEvent |
std::multiset< std::shared_ptr< const TFragment >, std::function< bool(std::shared_ptr< const TFragment >, std::shared_ptr< const TFragment >)> > | fOrdered |
std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment > > > | fOutOfOrderQueue |
std::shared_ptr< ThreadsafeQueue< std::vector< std::shared_ptr< const TFragment > > > > | fOutputQueue |
bool | fPreviousSortingDepthError |
bool | fSkipInputSort |
unsigned int | fSortingDepth |
#include <TEventBuildingLoop.h>
|
strong |
Enumerator | |
---|---|
kDefault | |
kTime | |
kTimestamp | |
kTriggerId | |
kSkip |
Definition at line 29 of file TEventBuildingLoop.h.
|
overridedefault |
|
private |
Definition at line 24 of file TEventBuildingLoop.cxx.
References DYELLOW, fBuildMode, fBuildWindow, fOrdered, fSkipInputSort, kDefault, kSkip, kTime, kTimestamp, kTriggerId, and RESET_COLOR.
Referenced by ClassImp().
|
private |
|
staticinherited |
Definition at line 73 of file StoppableThread.cxx.
References StoppableThread::fColumnWidth, StoppableThread::fStatusWidth, and StoppableThread::fThreadMap.
Referenced by TGRSIint::ApplyOptions().
|
staticinherited |
Definition at line 59 of file StoppableThread.cxx.
References StoppableThread::fColumnWidth, StoppableThread::fStatusWidth, and StoppableThread::fThreadMap.
Referenced by TGRSIint::LoopUntilDone().
|
staticinherited |
Definition at line 83 of file StoppableThread.cxx.
References StoppableThread::fColumnWidth, StoppableThread::fStatusWidth, and StoppableThread::fThreadMap.
Referenced by TGRSIint::LoopUntilDone().
|
staticinherited |
Definition at line 37 of file StoppableThread.cxx.
References StoppableThread::fThreadMap.
Referenced by TChannel::GetChannel(), TGRSIint::LoopUntilDone(), and TGRSIInterruptHandler::Notify().
|
staticinherited |
Definition at line 47 of file StoppableThread.cxx.
References StoppableThread::fThreadMap.
|
private |
Definition at line 133 of file TEventBuildingLoop.cxx.
References CheckTimeCondition(), CheckTimestampCondition(), CheckTriggerIdCondition(), fBuildMode, fNextEvent, fOutputQueue, kSkip, kTime, kTimestamp, and kTriggerId.
Referenced by Iteration().
|
private |
Definition at line 150 of file TEventBuildingLoop.cxx.
References TSortingDiagnostics::AddTime(), TGRSIOptions::AnalysisOptions(), fBuildWindow, fNextEvent, fOutOfOrderQueue, fOutputQueue, fPreviousSortingDepthError, fSortingDepth, TGRSIOptions::Get(), TSingleton< TSortingDiagnostics >::Get(), TSortingDiagnostics::OutOfTimeOrder(), TGRSIOptions::SortDepth(), and TAnalysisOptions::StaticWindow().
Referenced by CheckBuildCondition().
|
private |
Definition at line 188 of file TEventBuildingLoop.cxx.
References TSortingDiagnostics::AddTimeStamp(), TGRSIOptions::AnalysisOptions(), fBuildWindow, fNextEvent, fOutOfOrderQueue, fOutputQueue, fPreviousSortingDepthError, fSortingDepth, TGRSIOptions::Get(), TSingleton< TSortingDiagnostics >::Get(), TSortingDiagnostics::OutOfOrder(), TGRSIOptions::SeparateOutOfOrder(), TGRSIOptions::SortDepth(), and TAnalysisOptions::StaticWindow().
Referenced by CheckBuildCondition().
|
private |
Definition at line 223 of file TEventBuildingLoop.cxx.
References TSortingDiagnostics::AddTimeStamp(), fNextEvent, fOutOfOrderQueue, fOutputQueue, fPreviousSortingDepthError, fSortingDepth, TGRSIOptions::Get(), TSingleton< TSortingDiagnostics >::Get(), TSortingDiagnostics::OutOfOrder(), TGRSIOptions::SeparateOutOfOrder(), and TGRSIOptions::SortDepth().
Referenced by CheckBuildCondition().
|
private |
|
staticinherited |
Definition at line 166 of file StoppableThread.cxx.
References StoppableThread::fThreadMap.
Referenced by TGRSIInterruptHandler::Notify().
|
overridevirtual |
Reimplemented from StoppableThread.
Definition at line 66 of file TEventBuildingLoop.cxx.
References fInputQueue, and fOutputQueue.
|
inlinestaticinherited |
Definition at line 75 of file StoppableThread.h.
References StoppableThread::fColumnWidth.
|
inlinestaticinherited |
Definition at line 77 of file StoppableThread.h.
References StoppableThread::fColumnWidth.
Referenced by TGRSIint::SetupPipeline().
|
overridevirtual |
Reimplemented from StoppableThread.
Definition at line 259 of file TEventBuildingLoop.cxx.
References fInputQueue, and StoppableThread::fItemsPopped.
|
static |
Referenced by TGRSIint::SetupPipeline().
|
staticinherited |
Definition at line 173 of file StoppableThread.cxx.
References StoppableThread::fThreadMap.
Referenced by ClassImp(), TTerminalLoop< T >::Get(), TFragHistLoop::Get(), TAnalysisHistLoop::Get(), TAnalysisWriteLoop::Get(), TFragWriteLoop::Get(), TUnpackingLoop::Get(), TFragmentChainLoop::Get(), and TDataLoop::Get().
|
staticinherited |
Definition at line 315 of file StoppableThread.cxx.
References StoppableThread::fThreadMap.
|
inline |
Definition at line 53 of file TEventBuildingLoop.h.
References fBuildWindow.
|
inlineoverridevirtual |
Implements StoppableThread.
Definition at line 49 of file TEventBuildingLoop.h.
References fOutputQueue.
|
inlineoverridevirtual |
Implements StoppableThread.
Definition at line 48 of file TEventBuildingLoop.h.
References fOutputQueue.
|
inlineoverridevirtual |
Implements StoppableThread.
Definition at line 47 of file TEventBuildingLoop.h.
References fOutputQueue.
|
staticinherited |
Definition at line 21 of file StoppableThread.cxx.
References StoppableThread::fThreadMap.
Referenced by StoppableThread::Print().
|
inlineoverridevirtual |
Implements StoppableThread.
Definition at line 50 of file TEventBuildingLoop.h.
|
inline |
Definition at line 56 of file TEventBuildingLoop.h.
References fSortingDepth.
|
inline |
Definition at line 35 of file TEventBuildingLoop.h.
References fInputQueue.
Referenced by TGRSIint::SetupPipeline().
|
inherited |
Definition at line 224 of file StoppableThread.cxx.
References StoppableThread::fPaused.
|
inherited |
Definition at line 219 of file StoppableThread.cxx.
References StoppableThread::fRunning.
Referenced by StoppableThread::status_out().
|
overridevirtual |
Implements StoppableThread.
Definition at line 79 of file TEventBuildingLoop.cxx.
References CheckBuildCondition(), fInputQueue, StoppableThread::fInputSize, StoppableThread::fItemsPopped, fNextEvent, fOrdered, fOutputQueue, fSkipInputSort, and fSortingDepth.
|
inherited |
Definition at line 229 of file StoppableThread.cxx.
References StoppableThread::EndStatus(), and StoppableThread::fThread.
Referenced by StoppableThread::StopAll().
|
staticinherited |
Definition at line 280 of file StoppableThread.cxx.
References StoppableThread::fStatusThread, and StoppableThread::stop_status_thread().
|
inlineinherited |
Definition at line 58 of file StoppableThread.h.
References StoppableThread::fName.
Referenced by TAnalysisWriteLoopClient::AddBranch(), TAnalysisWriteLoop::EndStatus(), TFragWriteLoop::EndStatus(), TUnpackingLoop::EndStatus(), and StoppableThread::status_out().
|
inlinevirtualinherited |
Reimplemented in TAnalysisWriteLoopClient, TFragmentChainLoop, TAnalysisWriteLoop, and TDataLoop.
Definition at line 54 of file StoppableThread.h.
Referenced by StoppableThread::Loop().
|
private |
|
inline |
Definition at line 40 of file TEventBuildingLoop.h.
References fOutOfOrderQueue.
Referenced by TGRSIint::SetupPipeline().
|
inline |
Definition at line 36 of file TEventBuildingLoop.h.
References fOutputQueue.
Referenced by TGRSIint::SetupPipeline().
|
inherited |
Definition at line 202 of file StoppableThread.cxx.
References StoppableThread::fPaused, and StoppableThread::fRunning.
|
staticinherited |
Definition at line 97 of file StoppableThread.cxx.
References StoppableThread::fThreadMap.
|
staticinherited |
Definition at line 254 of file StoppableThread.cxx.
References StoppableThread::fColumnWidth, StoppableThread::fStatusWidth, StoppableThread::fThreadMap, StoppableThread::GetNThreads(), and hex().
|
virtualinherited |
Definition at line 119 of file StoppableThread.cxx.
References StoppableThread::fColumnWidth, StoppableThread::fInputSize, and StoppableThread::fItemsPopped.
|
inherited |
Definition at line 193 of file StoppableThread.cxx.
References StoppableThread::fPaused, StoppableThread::fPausedWait, StoppableThread::fPauseMutex, and StoppableThread::fRunning.
|
staticinherited |
Definition at line 104 of file StoppableThread.cxx.
References StoppableThread::fThreadMap.
Referenced by TGRSIint::SetupPipeline().
|
staticinherited |
Definition at line 135 of file StoppableThread.cxx.
References StoppableThread::fThreadMap, and StoppableThread::Stop().
Referenced by StoppableThread::StopAll(), and TGRSIint::Terminate().
|
inline |
Definition at line 52 of file TEventBuildingLoop.h.
References fBuildWindow.
|
inline |
Definition at line 55 of file TEventBuildingLoop.h.
References fSortingDepth.
Referenced by TGRSIint::SetupPipeline().
|
staticinherited |
Definition at line 265 of file StoppableThread.cxx.
References StoppableThread::fStatusThread, StoppableThread::fStatusThreadOn, and StoppableThread::status_out_loop().
Referenced by StoppableThread::StoppableThread().
|
virtualinherited |
Definition at line 111 of file StoppableThread.cxx.
References StoppableThread::fColumnWidth, StoppableThread::fInputSize, and StoppableThread::fItemsPopped.
|
staticinherited |
Definition at line 297 of file StoppableThread.cxx.
References StoppableThread::fThreadMap, StoppableThread::GetItemsCurrent(), StoppableThread::GetItemsPopped(), StoppableThread::GetItemsPushed(), StoppableThread::GetRate(), StoppableThread::IsRunning(), and StoppableThread::Name().
Referenced by StoppableThread::status_out_loop(), and StoppableThread::StopAll().
|
staticinherited |
Definition at line 286 of file StoppableThread.cxx.
References StoppableThread::fStatusThreadOn, and StoppableThread::status_out().
Referenced by StoppableThread::start_status_thread().
|
inlinestaticinherited |
Definition at line 76 of file StoppableThread.h.
References StoppableThread::fStatusWidth.
|
inlinestaticinherited |
Definition at line 78 of file StoppableThread.h.
References StoppableThread::fStatusWidth.
Referenced by TGRSIint::SetupPipeline().
|
inherited |
Definition at line 209 of file StoppableThread.cxx.
References StoppableThread::EndStatus(), StoppableThread::fPaused, StoppableThread::fPausedWait, StoppableThread::fPauseMutex, and StoppableThread::fRunning.
Referenced by StoppableThread::SendStop().
|
staticinherited |
Definition at line 273 of file StoppableThread.cxx.
References StoppableThread::fStatusThreadOn.
Referenced by StoppableThread::join_status_thread().
|
staticinherited |
Definition at line 147 of file StoppableThread.cxx.
References StoppableThread::fThreadMap, StoppableThread::Join(), StoppableThread::SendStop(), and StoppableThread::status_out().
Referenced by TGRSIint::Terminate().
|
private |
Definition at line 76 of file TEventBuildingLoop.h.
Referenced by CheckBuildCondition(), and TEventBuildingLoop().
|
private |
Definition at line 78 of file TEventBuildingLoop.h.
Referenced by CheckTimeCondition(), CheckTimestampCondition(), GetBuildWindow(), SetBuildWindow(), and TEventBuildingLoop().
|
private |
Definition at line 71 of file TEventBuildingLoop.h.
Referenced by ClearQueue(), EndStatus(), InputQueue(), and Iteration().
|
protectedinherited |
number of items in the input (queue), only updated within Iteration(), so not always fully up-to-date (signed to hold error from queue::pop)
Definition at line 95 of file StoppableThread.h.
Referenced by TAnalysisWriteLoop::EndStatus(), TFragWriteLoop::EndStatus(), TAnalysisWriteLoopClient::GetInputSize(), Iteration(), TDataLoop::Iteration(), TDetBuildingLoop::Iteration(), TAnalysisWriteLoop::Iteration(), TUnpackingLoop::Iteration(), TFragWriteLoop::Iteration(), TFragHistLoop::Iteration(), TFragmentChainLoop::Iteration(), TAnalysisHistLoop::Iteration(), TAnalysisWriteLoopClient::Iteration(), StoppableThread::Progress(), and StoppableThread::Status().
|
protectedinherited |
number of items popped from input queue
Definition at line 94 of file StoppableThread.h.
Referenced by TAnalysisWriteLoop::EndStatus(), TFragWriteLoop::EndStatus(), EndStatus(), TFragmentChainLoop::GetItemsPopped(), TFragWriteLoop::GetItemsPopped(), TAnalysisWriteLoop::GetItemsPushed(), TFragmentChainLoop::GetItemsPushed(), TFragWriteLoop::GetItemsPushed(), TAnalysisWriteLoopClient::GetItemsPushed(), Iteration(), TDataLoop::Iteration(), TDetBuildingLoop::Iteration(), TAnalysisWriteLoop::Iteration(), TUnpackingLoop::Iteration(), TFragWriteLoop::Iteration(), TFragHistLoop::Iteration(), TFragmentChainLoop::Iteration(), TAnalysisHistLoop::Iteration(), TAnalysisWriteLoopClient::Iteration(), StoppableThread::Progress(), TFragmentChainLoop::Restart(), and StoppableThread::Status().
|
protectedinherited |
Definition at line 99 of file StoppableThread.h.
Referenced by StoppableThread::Name(), StoppableThread::StoppableThread(), and StoppableThread::~StoppableThread().
|
private |
Definition at line 83 of file TEventBuildingLoop.h.
Referenced by CheckBuildCondition(), CheckTimeCondition(), CheckTimestampCondition(), CheckTriggerIdCondition(), and Iteration().
|
private |
Definition at line 87 of file TEventBuildingLoop.h.
Referenced by Iteration(), and TEventBuildingLoop().
|
private |
Definition at line 73 of file TEventBuildingLoop.h.
Referenced by CheckTimeCondition(), CheckTimestampCondition(), CheckTriggerIdCondition(), and OutOfOrderQueue().
|
private |
Definition at line 72 of file TEventBuildingLoop.h.
Referenced by CheckBuildCondition(), CheckTimeCondition(), CheckTimestampCondition(), CheckTriggerIdCondition(), ClearQueue(), GetItemsCurrent(), GetItemsPopped(), GetItemsPushed(), Iteration(), and OutputQueue().
|
private |
Definition at line 79 of file TEventBuildingLoop.h.
Referenced by CheckTimeCondition(), CheckTimestampCondition(), and CheckTriggerIdCondition().
|
private |
Definition at line 80 of file TEventBuildingLoop.h.
Referenced by Iteration(), and TEventBuildingLoop().
|
private |
Definition at line 77 of file TEventBuildingLoop.h.
Referenced by CheckTimeCondition(), CheckTimestampCondition(), CheckTriggerIdCondition(), GetSortDepth(), Iteration(), and SetSortDepth().
|
staticinherited |
Definition at line 81 of file StoppableThread.h.
Referenced by StoppableThread::join_status_thread(), StoppableThread::start_status_thread(), and StoppableThread::~StoppableThread().
|
staticinherited |
Definition at line 83 of file StoppableThread.h.
Referenced by StoppableThread::start_status_thread(), StoppableThread::status_out_loop(), StoppableThread::stop_status_thread(), StoppableThread::StoppableThread(), and StoppableThread::~StoppableThread().
|
staticprotectedinherited |
Definition at line 91 of file StoppableThread.h.
Referenced by StoppableThread::AllThreadHeader(), StoppableThread::AllThreadProgress(), StoppableThread::AllThreadStatus(), StoppableThread::AnyThreadRunning(), StoppableThread::AnyThreadStatus(), StoppableThread::ClearAllQueues(), StoppableThread::Get(), StoppableThread::GetAll(), StoppableThread::GetNThreads(), StoppableThread::PauseAll(), StoppableThread::Print(), StoppableThread::ResumeAll(), StoppableThread::SendStop(), StoppableThread::status_out(), StoppableThread::StopAll(), StoppableThread::StoppableThread(), and StoppableThread::~StoppableThread().