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

Object passed to the online histograms.

For each event, an instance of this type will be passed to the custom histogrammer. This class contains all detectors present, and all existing cuts and histograms.

Definition at line 28 of file TRuntimeObjects.h.

Public Member Functions

 TRuntimeObjects (std::shared_ptr< const TFragment > frag, TList *objects, TList *gates, std::vector< TFile *> &cut_files, TDirectory *directory=nullptr, const char *name="default")
 
 TRuntimeObjects (TList *objects, TList *gates, std::vector< TFile *> &cut_files, TDirectory *directory=nullptr, const char *name="default")
 
TH1 * FillHistogram (const char *name, int bins, double low, double high, double value, double weight=1)
 
TH2 * FillHistogram (const char *name, int Xbins, double Xlow, double Xhigh, double Xvalue, int Ybins, double Ylow, double Yhigh, double Yvalue, double weight=1)
 
TH1 * FillHistogram (const std::string &name, int bins, double low, double high, double value, double weight=1)
 
TH2 * FillHistogram (const std::string &name, int Xbins, double Xlow, double Xhigh, double Xvalue, int Ybins, double Ylow, double Yhigh, double Yvalue, double weight=1)
 
TDirectory * FillHistogram (const char *dirname, const char *name, int bins, double low, double high, double value, double weight=1)
 
TDirectory * FillHistogram (const char *dirname, const char *name, int Xbins, double Xlow, double Xhigh, double Xvalue, int Ybins, double Ylow, double Yhigh, double Yvalue, double weight=1)
 
TDirectory * FillHistogram (const std::string &dirname, const std::string &name, int bins, double low, double high, double value, double weight=1)
 
TDirectory * FillHistogram (const std::string &dirname, const std::string &name, int Xbins, double Xlow, double Xhigh, double Xvalue, int Ybins, double Ylow, double Yhigh, double Yvalue, double weight=1)
 
TH2 * FillHistogramSym (const char *name, int Xbins, double Xlow, double Xhigh, double Xvalue, int Ybins, double Ylow, double Yhigh, double Yvalue)
 
TH2 * FillHistogramSym (const std::string &name, int Xbins, double Xlow, double Xhigh, double Xvalue, int Ybins, double Ylow, double Yhigh, double Yvalue)
 
TDirectory * FillHistogramSym (const char *dirname, const char *name, int Xbins, double Xlow, double Xhigh, double Xvalue, int Ybins, double Ylow, double Yhigh, double Yvalue)
 
TDirectory * FillHistogramSym (const std::string &dirname, const std::string &name, int Xbins, double Xlow, double Xhigh, double Xvalue, int Ybins, double Ylow, double Yhigh, double Yvalue)
 
TProfile * FillProfileHist (const char *name, int Xbins, double Xlow, double Xhigh, double Xvalue, double Yvalue)
 
TProfile * FillProfileHist (const std::string &name, int Xbins, double Xlow, double Xhigh, double Xvalue, double Yvalue)
 
TDirectory * FillProfileHist (const char *dirname, const char *name, int Xbins, double Xlow, double Xhigh, double Xvalue, double Yvalue)
 
TDirectory * FillProfileHist (const std::string &dirname, const std::string &name, int Xbins, double Xlow, double Xhigh, double Xvalue, double Yvalue)
 
TCutG * GetCut (const std::string &name)
 
template<typename T >
std::shared_ptr< T > GetDetector ()
 
TDirectory * GetDirectory () const
 
std::shared_ptr< const TFragmentGetFragment ()
 
TList & GetGates ()
 
TList * GetGatesPtr ()
 
TList & GetObjects ()
 
TList * GetObjectsPtr ()
 
double GetVariable (const char *name)
 
void SetDetectors (std::shared_ptr< TUnpackedEvent > det)
 
void SetDirectory (TDirectory *dir)
 
void SetFragment (std::shared_ptr< const TFragment > frag)
 

Static Public Member Functions

static TRuntimeObjectsGet (const std::string &name="default")
 

Private Member Functions

 ClassDefOverride (TRuntimeObjects, 0)
 
TDirectory * FindDirectory (const char *)
 

Private Attributes

std::vector< TFile * > & fCut_files
 
std::shared_ptr< TUnpackedEventfDetectors
 
TDirectory * fDirectory
 
std::shared_ptr< const TFragmentfFrag
 
TList * fGates
 
TList * fObjects
 

Static Private Attributes

static std::map< std::string, TRuntimeObjects * > fRuntimeMap
 

#include <TRuntimeObjects.h>

+ Inheritance diagram for TRuntimeObjects:
+ Collaboration diagram for TRuntimeObjects:

Constructor & Destructor Documentation

◆ TRuntimeObjects() [1/2]

TRuntimeObjects::TRuntimeObjects ( std::shared_ptr< const TFragment frag,
TList *  objects,
TList *  gates,
std::vector< TFile *> &  cut_files,
TDirectory *  directory = nullptr,
const char *  name = "default" 
)

Constructor.

Definition at line 21 of file TRuntimeObjects.cxx.

References fRuntimeMap.

◆ TRuntimeObjects() [2/2]

TRuntimeObjects::TRuntimeObjects ( TList *  objects,
TList *  gates,
std::vector< TFile *> &  cut_files,
TDirectory *  directory = nullptr,
const char *  name = "default" 
)

Definition at line 40 of file TRuntimeObjects.cxx.

References fRuntimeMap.

Member Function Documentation

◆ ClassDefOverride()

TRuntimeObjects::ClassDefOverride ( TRuntimeObjects  ,
 
)
private

◆ FillHistogram() [1/8]

TH1 * TRuntimeObjects::FillHistogram ( const char *  name,
int  bins,
double  low,
double  high,
double  value,
double  weight = 1 
)

◆ FillHistogram() [2/8]

TH2 * TRuntimeObjects::FillHistogram ( const char *  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
int  Ybins,
double  Ylow,
double  Yhigh,
double  Yvalue,
double  weight = 1 
)

Definition at line 55 of file TRuntimeObjects.cxx.

References FillHistogram().

Referenced by FillHistogram().

◆ FillHistogram() [3/8]

TH1* TRuntimeObjects::FillHistogram ( const std::string &  name,
int  bins,
double  low,
double  high,
double  value,
double  weight = 1 
)
inline

Definition at line 64 of file TRuntimeObjects.h.

References FillHistogram().

◆ FillHistogram() [4/8]

TH2* TRuntimeObjects::FillHistogram ( const std::string &  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
int  Ybins,
double  Ylow,
double  Yhigh,
double  Yvalue,
double  weight = 1 
)
inline

Definition at line 68 of file TRuntimeObjects.h.

References FillHistogram().

◆ FillHistogram() [5/8]

TDirectory * TRuntimeObjects::FillHistogram ( const char *  dirname,
const char *  name,
int  bins,
double  low,
double  high,
double  value,
double  weight = 1 
)

Definition at line 77 of file TRuntimeObjects.cxx.

References FindDirectory(), and hist.

◆ FillHistogram() [6/8]

TDirectory * TRuntimeObjects::FillHistogram ( const char *  dirname,
const char *  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
int  Ybins,
double  Ylow,
double  Yhigh,
double  Yvalue,
double  weight = 1 
)

Definition at line 95 of file TRuntimeObjects.cxx.

References FindDirectory(), and hist.

◆ FillHistogram() [7/8]

TDirectory* TRuntimeObjects::FillHistogram ( const std::string &  dirname,
const std::string &  name,
int  bins,
double  low,
double  high,
double  value,
double  weight = 1 
)
inline

Definition at line 93 of file TRuntimeObjects.h.

References FillHistogram().

◆ FillHistogram() [8/8]

TDirectory* TRuntimeObjects::FillHistogram ( const std::string &  dirname,
const std::string &  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
int  Ybins,
double  Ylow,
double  Yhigh,
double  Yvalue,
double  weight = 1 
)
inline

Definition at line 98 of file TRuntimeObjects.h.

References FillHistogram().

◆ FillHistogramSym() [1/4]

TH2 * TRuntimeObjects::FillHistogramSym ( const char *  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
int  Ybins,
double  Ylow,
double  Yhigh,
double  Yvalue 
)

Definition at line 69 of file TRuntimeObjects.cxx.

Referenced by FillHistogramSym().

◆ FillHistogramSym() [2/4]

TH2* TRuntimeObjects::FillHistogramSym ( const std::string &  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
int  Ybins,
double  Ylow,
double  Yhigh,
double  Yvalue 
)
inline

Definition at line 78 of file TRuntimeObjects.h.

References FillHistogramSym().

◆ FillHistogramSym() [3/4]

TDirectory * TRuntimeObjects::FillHistogramSym ( const char *  dirname,
const char *  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
int  Ybins,
double  Ylow,
double  Yhigh,
double  Yvalue 
)

Definition at line 133 of file TRuntimeObjects.cxx.

References FindDirectory(), and hist.

◆ FillHistogramSym() [4/4]

TDirectory* TRuntimeObjects::FillHistogramSym ( const std::string &  dirname,
const std::string &  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
int  Ybins,
double  Ylow,
double  Yhigh,
double  Yvalue 
)
inline

Definition at line 109 of file TRuntimeObjects.h.

References FillHistogramSym().

◆ FillProfileHist() [1/4]

TProfile * TRuntimeObjects::FillProfileHist ( const char *  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
double  Yvalue 
)

Definition at line 62 of file TRuntimeObjects.cxx.

Referenced by FillProfileHist().

◆ FillProfileHist() [2/4]

TProfile* TRuntimeObjects::FillProfileHist ( const std::string &  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
double  Yvalue 
)
inline

Definition at line 73 of file TRuntimeObjects.h.

References FillProfileHist().

◆ FillProfileHist() [3/4]

TDirectory * TRuntimeObjects::FillProfileHist ( const char *  dirname,
const char *  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
double  Yvalue 
)

Definition at line 113 of file TRuntimeObjects.cxx.

References FindDirectory().

◆ FillProfileHist() [4/4]

TDirectory* TRuntimeObjects::FillProfileHist ( const std::string &  dirname,
const std::string &  name,
int  Xbins,
double  Xlow,
double  Xhigh,
double  Xvalue,
double  Yvalue 
)
inline

Definition at line 104 of file TRuntimeObjects.h.

References FillProfileHist().

◆ FindDirectory()

TDirectory * TRuntimeObjects::FindDirectory ( const char *  dirname)
private

Definition at line 183 of file TRuntimeObjects.cxx.

References GetObjects().

Referenced by FillHistogram(), FillHistogramSym(), and FillProfileHist().

◆ Get()

static TRuntimeObjects* TRuntimeObjects::Get ( const std::string &  name = "default")
inlinestatic

Definition at line 117 of file TRuntimeObjects.h.

References fRuntimeMap.

◆ GetCut()

TCutG * TRuntimeObjects::GetCut ( const std::string &  name)

Definition at line 164 of file TRuntimeObjects.cxx.

References fCut_files.

◆ GetDetector()

template<typename T >
std::shared_ptr<T> TRuntimeObjects::GetDetector ( )
inline

Returns a pointer to the detector of type T.

Definition at line 41 of file TRuntimeObjects.h.

References fDetectors.

Referenced by MakeAnalysisHistograms().

◆ GetDirectory()

TDirectory* TRuntimeObjects::GetDirectory ( ) const
inline

Definition at line 131 of file TRuntimeObjects.h.

References fDirectory.

◆ GetFragment()

std::shared_ptr<const TFragment> TRuntimeObjects::GetFragment ( )
inline

Definition at line 46 of file TRuntimeObjects.h.

References fFrag.

Referenced by MakeFragmentHistograms().

◆ GetGates()

TList & TRuntimeObjects::GetGates ( )

Definition at line 159 of file TRuntimeObjects.cxx.

References fGates.

◆ GetGatesPtr()

TList* TRuntimeObjects::GetGatesPtr ( )
inline

Definition at line 55 of file TRuntimeObjects.h.

References fGates.

◆ GetObjects()

TList & TRuntimeObjects::GetObjects ( )

Definition at line 154 of file TRuntimeObjects.cxx.

References fObjects.

Referenced by FindDirectory().

◆ GetObjectsPtr()

TList* TRuntimeObjects::GetObjectsPtr ( )
inline

Definition at line 54 of file TRuntimeObjects.h.

References fObjects.

◆ GetVariable()

double TRuntimeObjects::GetVariable ( const char *  name)

Definition at line 178 of file TRuntimeObjects.cxx.

References GValue::Value().

◆ SetDetectors()

void TRuntimeObjects::SetDetectors ( std::shared_ptr< TUnpackedEvent det)
inline

Definition at line 127 of file TRuntimeObjects.h.

References fDetectors.

Referenced by TCompiledHistograms::Fill().

◆ SetDirectory()

void TRuntimeObjects::SetDirectory ( TDirectory *  dir)
inline

Definition at line 130 of file TRuntimeObjects.h.

References fDirectory.

Referenced by TCompiledHistograms::Fill().

◆ SetFragment()

void TRuntimeObjects::SetFragment ( std::shared_ptr< const TFragment frag)
inline

Definition at line 126 of file TRuntimeObjects.h.

References fFrag.

Referenced by TCompiledHistograms::Fill().

Member Data Documentation

◆ fCut_files

std::vector<TFile*>& TRuntimeObjects::fCut_files
private

Definition at line 142 of file TRuntimeObjects.h.

Referenced by GetCut().

◆ fDetectors

std::shared_ptr<TUnpackedEvent> TRuntimeObjects::fDetectors
private

Definition at line 137 of file TRuntimeObjects.h.

Referenced by GetDetector(), and SetDetectors().

◆ fDirectory

TDirectory* TRuntimeObjects::fDirectory
private

Definition at line 144 of file TRuntimeObjects.h.

Referenced by GetDirectory(), and SetDirectory().

◆ fFrag

std::shared_ptr<const TFragment> TRuntimeObjects::fFrag
private

Definition at line 138 of file TRuntimeObjects.h.

Referenced by GetFragment(), and SetFragment().

◆ fGates

TList* TRuntimeObjects::fGates
private

Definition at line 141 of file TRuntimeObjects.h.

Referenced by GetGates(), and GetGatesPtr().

◆ fObjects

TList* TRuntimeObjects::fObjects
private

Definition at line 140 of file TRuntimeObjects.h.

Referenced by GetObjects(), and GetObjectsPtr().

◆ fRuntimeMap

std::map< std::string, TRuntimeObjects * > TRuntimeObjects::fRuntimeMap
staticprivate

Definition at line 134 of file TRuntimeObjects.h.

Referenced by Get(), and TRuntimeObjects().