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

This class gathers various diagnostics calculated during the sorting from a raw file to a fragment tree and analysis tree and provides convenient methods of printing and/or visualizing them.

Definition at line 31 of file TSortingDiagnostics.h.

Public Member Functions

 TSortingDiagnostics ()
 
 TSortingDiagnostics (const TSortingDiagnostics &)
 
 ~TSortingDiagnostics () override
 
void AddDetectorClass (TChannel *)
 
void AddTime (double val)
 
void AddTimeStamp (Long_t val)
 
void Clear (Option_t *opt="all") override
 
void Copy (TObject &) const override
 
void Draw (Option_t *opt="") override
 
std::unordered_map< long, std::pair< long, long > > FragmentsOutOfOrder ()
 
std::unordered_map< double, std::pair< double, double > > FragmentsOutOfTimeOrder ()
 
long MaxEntryDiff () const
 
void MissingChannel (const UInt_t &address)
 
size_t NumberOfFragmentsOutOfOrder () const
 
size_t NumberOfFragmentsOutOfTimeOrder () const
 
void OutOfOrder (long newFragTS, long oldFragTS, long newEntry)
 
void OutOfTimeOrder (double newFragTime, double oldFragTime, long newEntry)
 
void Print (Option_t *opt="") const override
 
void RemovedHits (TClass *detClass, long removed, long total)
 
void WriteToFile (const char *) const
 

Static Public Member Functions

static TSortingDiagnosticsAddCurrent ()
 
static TSortingDiagnosticsGet (bool verbose=false)
 
static TSortingDiagnosticsGetAll ()
 
static void PrintDirectory ()
 
static void Set (TSortingDiagnostics *val)
 

Private Attributes

std::unordered_map< long, std::pair< long, long > > fFragmentsOutOfOrder
 
std::unordered_map< double, std::pair< double, double > > fFragmentsOutOfTimeOrder
 
std::unordered_map< TClass *, std::pair< long, long > > fHitsRemoved
 
long fMaxEntryDiff {0}
 
std::unordered_map< UInt_t, long > fMissingChannels
 
std::unordered_map< TClass *, long > fMissingDetectorClasses
 
std::vector< double > fPreviousTimes
 
std::vector< Long_t > fPreviousTimeStamps
 

Friends

class TSingleton< TSortingDiagnostics >
 

#include <TSortingDiagnostics.h>

+ Inheritance diagram for TSortingDiagnostics:
+ Collaboration diagram for TSortingDiagnostics:

Constructor & Destructor Documentation

◆ TSortingDiagnostics() [1/2]

TSortingDiagnostics::TSortingDiagnostics ( )

Definition at line 9 of file TSortingDiagnostics.cxx.

References Clear().

◆ TSortingDiagnostics() [2/2]

TSortingDiagnostics::TSortingDiagnostics ( const TSortingDiagnostics )

Definition at line 14 of file TSortingDiagnostics.cxx.

References Clear().

◆ ~TSortingDiagnostics()

TSortingDiagnostics::~TSortingDiagnostics ( )
overridedefault

Member Function Documentation

◆ AddCurrent()

static TSortingDiagnostics * TSingleton< TSortingDiagnostics >::AddCurrent ( )
inlinestaticinherited

Definition at line 137 of file TSingleton.h.

◆ AddDetectorClass()

void TSortingDiagnostics::AddDetectorClass ( TChannel channel)

◆ AddTime()

void TSortingDiagnostics::AddTime ( double  val)
inline

Definition at line 55 of file TSortingDiagnostics.h.

References fPreviousTimes.

Referenced by TEventBuildingLoop::CheckTimeCondition().

◆ AddTimeStamp()

void TSortingDiagnostics::AddTimeStamp ( Long_t  val)
inline

◆ Clear()

void TSortingDiagnostics::Clear ( Option_t *  opt = "all")
override

◆ Copy()

void TSortingDiagnostics::Copy ( TObject &  obj) const
override

◆ Draw()

void TSortingDiagnostics::Draw ( Option_t *  opt = "")
override

Definition at line 147 of file TSortingDiagnostics.cxx.

◆ FragmentsOutOfOrder()

std::unordered_map<long, std::pair<long, long> > TSortingDiagnostics::FragmentsOutOfOrder ( )
inline

Definition at line 63 of file TSortingDiagnostics.h.

References fFragmentsOutOfOrder.

◆ FragmentsOutOfTimeOrder()

std::unordered_map<double, std::pair<double, double> > TSortingDiagnostics::FragmentsOutOfTimeOrder ( )
inline

Definition at line 65 of file TSortingDiagnostics.h.

References fFragmentsOutOfTimeOrder.

◆ Get()

◆ GetAll()

static TSortingDiagnostics * TSingleton< TSortingDiagnostics >::GetAll ( )
inlinestaticinherited

Definition at line 62 of file TSingleton.h.

◆ MaxEntryDiff()

long TSortingDiagnostics::MaxEntryDiff ( ) const
inline

Definition at line 66 of file TSortingDiagnostics.h.

References fMaxEntryDiff.

◆ MissingChannel()

void TSortingDiagnostics::MissingChannel ( const UInt_t &  address)

Definition at line 71 of file TSortingDiagnostics.cxx.

References fMissingChannels.

Referenced by TUnpackedEvent::Build().

◆ NumberOfFragmentsOutOfOrder()

size_t TSortingDiagnostics::NumberOfFragmentsOutOfOrder ( ) const
inline

Definition at line 62 of file TSortingDiagnostics.h.

References fFragmentsOutOfOrder.

Referenced by Print(), and WriteToFile().

◆ NumberOfFragmentsOutOfTimeOrder()

size_t TSortingDiagnostics::NumberOfFragmentsOutOfTimeOrder ( ) const
inline

Definition at line 64 of file TSortingDiagnostics.h.

References fFragmentsOutOfTimeOrder.

Referenced by Print(), and WriteToFile().

◆ OutOfOrder()

void TSortingDiagnostics::OutOfOrder ( long  newFragTS,
long  oldFragTS,
long  newEntry 
)

◆ OutOfTimeOrder()

void TSortingDiagnostics::OutOfTimeOrder ( double  newFragTime,
double  oldFragTime,
long  newEntry 
)

◆ Print()

◆ PrintDirectory()

static void TSingleton< TSortingDiagnostics >::PrintDirectory ( )
inlinestaticinherited

Definition at line 166 of file TSingleton.h.

◆ RemovedHits()

void TSortingDiagnostics::RemovedHits ( TClass *  detClass,
long  removed,
long  total 
)

Definition at line 161 of file TSortingDiagnostics.cxx.

References fHitsRemoved.

Referenced by TTigress::BuildHits().

◆ Set()

static void TSingleton< TSortingDiagnostics >::Set ( TSortingDiagnostics val)
inlinestaticinherited

Definition at line 129 of file TSingleton.h.

◆ WriteToFile()

void TSortingDiagnostics::WriteToFile ( const char *  fileName) const

Friends And Related Function Documentation

◆ TSingleton< TSortingDiagnostics >

friend class TSingleton< TSortingDiagnostics >
friend

Definition at line 33 of file TSortingDiagnostics.h.

Member Data Documentation

◆ fFragmentsOutOfOrder

std::unordered_map<long, std::pair<long, long> > TSortingDiagnostics::fFragmentsOutOfOrder
private

◆ fFragmentsOutOfTimeOrder

std::unordered_map<double, std::pair<double, double> > TSortingDiagnostics::fFragmentsOutOfTimeOrder
private

◆ fHitsRemoved

std::unordered_map<TClass*, std::pair<long, long> > TSortingDiagnostics::fHitsRemoved
private

removed hits and total hits per detector class

Definition at line 49 of file TSortingDiagnostics.h.

Referenced by Print(), and RemovedHits().

◆ fMaxEntryDiff

long TSortingDiagnostics::fMaxEntryDiff {0}
private

Definition at line 45 of file TSortingDiagnostics.h.

Referenced by MaxEntryDiff(), OutOfOrder(), OutOfTimeOrder(), Print(), and WriteToFile().

◆ fMissingChannels

std::unordered_map<UInt_t, long> TSortingDiagnostics::fMissingChannels
private

counts of missing channels

Definition at line 46 of file TSortingDiagnostics.h.

Referenced by MissingChannel(), and Print().

◆ fMissingDetectorClasses

std::unordered_map<TClass*, long> TSortingDiagnostics::fMissingDetectorClasses
private

counts of missing detector classes

Definition at line 47 of file TSortingDiagnostics.h.

Referenced by AddDetectorClass(), Clear(), Copy(), and Print().

◆ fPreviousTimes

std::vector<double> TSortingDiagnostics::fPreviousTimes
private

times of previous fragments, saved every 'BuildWindow' entries

Definition at line 44 of file TSortingDiagnostics.h.

Referenced by AddTime(), and OutOfTimeOrder().

◆ fPreviousTimeStamps

std::vector<Long_t> TSortingDiagnostics::fPreviousTimeStamps
private

timestamps of previous fragments, saved every 'BuildWindow' entries

Definition at line 43 of file TSortingDiagnostics.h.

Referenced by AddTimeStamp(), and OutOfOrder().