Hall-D Software
alpha
|
#include <iostream>
#include <stdexcept>
#include <JANA/JApplication.h>
#include <TH1I.h>
#include <TH2I.h>
#include <TH3I.h>
#include <TProfile.h>
#include <TProfile2D.h>
#include <TDirectory.h>
Go to the source code of this file.
Macros | |
#define | ansi_escape ((char)0x1b) |
#define | ansi_bold ansi_escape<<"[1m" |
#define | ansi_italic ansi_escape<<"[3m" |
#define | ansi_underline ansi_escape<<"[4m" |
#define | ansi_blink ansi_escape<<"[5m" |
#define | ansi_rapid_blink ansi_escape<<"[6m" |
#define | ansi_reverse ansi_escape<<"[7m" |
#define | ansi_black ansi_escape<<"[30m" |
#define | ansi_red ansi_escape<<"[31m" |
#define | ansi_green ansi_escape<<"[32m" |
#define | ansi_blue ansi_escape<<"[34m" |
#define | ansi_normal ansi_escape<<"[0m" |
#define | ansi_up(A) ansi_escape<<"["<<(A)<<"A" |
#define | ansi_down(A) ansi_escape<<"["<<(A)<<"B" |
#define | ansi_forward(A) ansi_escape<<"["<<(A)<<"C" |
#define | ansi_back(A) ansi_escape<<"["<<(A)<<"D" |
Functions | |
vector< TDirectory * > & | GetAllDirectories (void) |
map< TString, pair< TH1I *, pthread_rwlock_t * > > & | Get1DMap (void) |
map< TString, pair< TH1D *, pthread_rwlock_t * > > & | Get1DWeightedMap (void) |
map< TString, pair< TH2I *, pthread_rwlock_t * > > & | Get2DMap (void) |
map< TString, pair< TH2D *, pthread_rwlock_t * > > & | Get2DWeightedMap (void) |
map< TString, pair< TH3I *, pthread_rwlock_t * > > & | Get3DMap (void) |
map< TString, pair< TProfile *, pthread_rwlock_t * > > & | Get1DProfileMap (void) |
map< TString, pair< TProfile2D *, pthread_rwlock_t * > > & | Get2DProfileMap (void) |
pthread_rwlock_t * | InitializeMapLock () |
void | Fill1DHistogram (const char *plugin, const char *directoryName, const char *name, const double value, const char *title, int nBins, double xmin, double xmax, bool print=false) |
void | Fill1DHistogram (const char *plugin, const char *directoryName, const char *name, const double value, const char *title, int nBins, double *xbins) |
void | Fill1DWeightedHistogram (const char *plugin, const char *directoryName, const char *name, const double value, const double weight, const char *title, int nBins, double xmin, double xmax, bool print=false) |
void | Fill2DHistogram (const char *plugin, const char *directoryName, const char *name, const double valueX, const double valueY, const char *title, int nBinsX, double xmin, double xmax, int nBinsY, double ymin, double ymax, bool print=false) |
void | Fill2DHistogram (const char *plugin, const char *directoryName, const char *name, const double valueX, const double valueY, const char *title, int nBinsX, double *xbins, int nBinsY, double *ybins, bool print=false) |
void | Fill2DWeightedHistogram (const char *plugin, const char *directoryName, const char *name, const double valueX, const double valueY, const double weight, const char *title, int nBinsX, double xmin, double xmax, int nBinsY, double ymin, double ymax, bool print=false) |
void | Fill3DHistogram (const char *plugin, const char *directoryName, const char *name, const double valueX, const double valueY, const double valueZ, const char *title, int nBinsX, double xmin, double xmax, int nBinsY, double ymin, double ymax, int nBinsZ, double zmin, double zmax, bool print=false) |
void | Fill1DProfile (const char *plugin, const char *directoryName, const char *name, const double valueX, const double valueY, const char *title, int nBinsX, double xmin, double xmax, bool print=false) |
void | Fill2DProfile (const char *plugin, const char *directoryName, const char *name, const double valueX, const double valueY, const double valueZ, const char *title, int nBinsX, double xmin, double xmax, int nBinsY, double ymin, double ymax, bool print=false) |
void | SortDirectories () |
TObject * | GetHistPointer (const char *plugin, const char *directoryName, const char *name) |
#define ansi_back | ( | A | ) | ansi_escape<<"["<<(A)<<"D" |
Definition at line 34 of file HistogramTools.h.
#define ansi_black ansi_escape<<"[30m" |
Definition at line 26 of file HistogramTools.h.
#define ansi_blink ansi_escape<<"[5m" |
Definition at line 23 of file HistogramTools.h.
#define ansi_blue ansi_escape<<"[34m" |
Definition at line 29 of file HistogramTools.h.
#define ansi_bold ansi_escape<<"[1m" |
Definition at line 20 of file HistogramTools.h.
#define ansi_down | ( | A | ) | ansi_escape<<"["<<(A)<<"B" |
Definition at line 32 of file HistogramTools.h.
#define ansi_escape ((char)0x1b) |
Definition at line 19 of file HistogramTools.h.
#define ansi_forward | ( | A | ) | ansi_escape<<"["<<(A)<<"C" |
Definition at line 33 of file HistogramTools.h.
#define ansi_green ansi_escape<<"[32m" |
Definition at line 28 of file HistogramTools.h.
Referenced by Fill1DHistogram(), Fill1DProfile(), Fill1DWeightedHistogram(), Fill2DHistogram(), Fill2DProfile(), Fill2DWeightedHistogram(), and Fill3DHistogram().
#define ansi_italic ansi_escape<<"[3m" |
Definition at line 21 of file HistogramTools.h.
#define ansi_normal ansi_escape<<"[0m" |
Definition at line 30 of file HistogramTools.h.
Referenced by Fill1DHistogram(), Fill1DProfile(), Fill1DWeightedHistogram(), Fill2DHistogram(), Fill2DProfile(), Fill2DWeightedHistogram(), and Fill3DHistogram().
#define ansi_rapid_blink ansi_escape<<"[6m" |
Definition at line 24 of file HistogramTools.h.
#define ansi_red ansi_escape<<"[31m" |
Definition at line 27 of file HistogramTools.h.
#define ansi_reverse ansi_escape<<"[7m" |
Definition at line 25 of file HistogramTools.h.
#define ansi_underline ansi_escape<<"[4m" |
Definition at line 22 of file HistogramTools.h.
#define ansi_up | ( | A | ) | ansi_escape<<"["<<(A)<<"A" |
Definition at line 31 of file HistogramTools.h.
void Fill1DHistogram | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name, | ||
const double | value, | ||
const char * | title, | ||
int | nBins, | ||
double | xmin, | ||
double | xmax, | ||
bool | print = false |
||
) |
Definition at line 83 of file HistogramTools.h.
References ansi_green, ansi_normal, Get1DMap(), GetAllDirectories(), InitializeMapLock(), japp, sprintf(), and temp.
Referenced by JEventProcessor_CDC_PerStrawReco::evnt(), JEventProcessor_TrackingPulls::evnt(), JEventProcessor_BCAL_SiPM_saturation::evnt(), JEventProcessor_BCAL_TDC_Timing::evnt(), JEventProcessor_CDC_TimeToDistance::evnt(), JEventProcessor_FCAL_Pi0HFA::evnt(), JEventProcessor_FDC_Efficiency::evnt(), JEventProcessor_FDCProjectionResiduals::evnt(), and JEventProcessor_CDC_Efficiency::Fill_Efficiency_Histos().
void Fill1DHistogram | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name, | ||
const double | value, | ||
const char * | title, | ||
int | nBins, | ||
double * | xbins | ||
) |
Definition at line 148 of file HistogramTools.h.
References Get1DMap(), GetAllDirectories(), InitializeMapLock(), japp, sprintf(), and temp.
void Fill1DProfile | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name, | ||
const double | valueX, | ||
const double | valueY, | ||
const char * | title, | ||
int | nBinsX, | ||
double | xmin, | ||
double | xmax, | ||
bool | print = false |
||
) |
Definition at line 541 of file HistogramTools.h.
References ansi_green, ansi_normal, Get1DProfileMap(), GetAllDirectories(), InitializeMapLock(), japp, sprintf(), and temp.
Referenced by JEventProcessor_CDC_Efficiency::Fill_Efficiency_Histos().
void Fill1DWeightedHistogram | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name, | ||
const double | value, | ||
const double | weight, | ||
const char * | title, | ||
int | nBins, | ||
double | xmin, | ||
double | xmax, | ||
bool | print = false |
||
) |
Definition at line 214 of file HistogramTools.h.
References ansi_green, ansi_normal, Get1DWeightedMap(), GetAllDirectories(), InitializeMapLock(), japp, sprintf(), and temp.
Referenced by JEventProcessor_BCAL_TDC_Timing::brun().
void Fill2DHistogram | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name, | ||
const double | valueX, | ||
const double | valueY, | ||
const char * | title, | ||
int | nBinsX, | ||
double | xmin, | ||
double | xmax, | ||
int | nBinsY, | ||
double | ymin, | ||
double | ymax, | ||
bool | print = false |
||
) |
Definition at line 278 of file HistogramTools.h.
References ansi_green, ansi_normal, Get2DMap(), GetAllDirectories(), InitializeMapLock(), japp, sprintf(), and temp.
Referenced by JEventProcessor_BCAL_ADC_4ns::evnt(), JEventProcessor_TrackingPulls::evnt(), JEventProcessor_CDC_PerStrawReco::evnt(), JEventProcessor_BCAL_SiPM_saturation::evnt(), JEventProcessor_FDC_InternalAlignment::evnt(), JEventProcessor_BCAL_TDC_Timing::evnt(), JEventProcessor_CDC_TimeToDistance::evnt(), JEventProcessor_BCAL_attenlength_gainratio::evnt(), JEventProcessor_FCAL_Pi0HFA::evnt(), JEventProcessor_FDCProjectionResiduals::evnt(), and JEventProcessor_CDC_Efficiency::Fill_Efficiency_Histos().
void Fill2DHistogram | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name, | ||
const double | valueX, | ||
const double | valueY, | ||
const char * | title, | ||
int | nBinsX, | ||
double * | xbins, | ||
int | nBinsY, | ||
double * | ybins, | ||
bool | print = false |
||
) |
Definition at line 344 of file HistogramTools.h.
References ansi_green, ansi_normal, Get2DMap(), GetAllDirectories(), InitializeMapLock(), japp, sprintf(), and temp.
void Fill2DProfile | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name, | ||
const double | valueX, | ||
const double | valueY, | ||
const double | valueZ, | ||
const char * | title, | ||
int | nBinsX, | ||
double | xmin, | ||
double | xmax, | ||
int | nBinsY, | ||
double | ymin, | ||
double | ymax, | ||
bool | print = false |
||
) |
Definition at line 605 of file HistogramTools.h.
References ansi_green, ansi_normal, Get2DProfileMap(), GetAllDirectories(), InitializeMapLock(), japp, sprintf(), and temp.
Referenced by JEventProcessor_TrackingPulls::evnt(), JEventProcessor_CDC_TimeToDistance::evnt(), JEventProcessor_FDC_InternalAlignment::evnt(), and JEventProcessor_CDC_Efficiency::Fill_Efficiency_Histos().
void Fill2DWeightedHistogram | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name, | ||
const double | valueX, | ||
const double | valueY, | ||
const double | weight, | ||
const char * | title, | ||
int | nBinsX, | ||
double | xmin, | ||
double | xmax, | ||
int | nBinsY, | ||
double | ymin, | ||
double | ymax, | ||
bool | print = false |
||
) |
Definition at line 409 of file HistogramTools.h.
References ansi_green, ansi_normal, Get2DWeightedMap(), GetAllDirectories(), InitializeMapLock(), japp, sprintf(), and temp.
Referenced by JEventProcessor_BCAL_TDC_Timing::evnt(), JEventProcessor_FCAL_Pi0HFA::evnt(), and JEventProcessor_BCAL_attenlength_gainratio::fini().
void Fill3DHistogram | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name, | ||
const double | valueX, | ||
const double | valueY, | ||
const double | valueZ, | ||
const char * | title, | ||
int | nBinsX, | ||
double | xmin, | ||
double | xmax, | ||
int | nBinsY, | ||
double | ymin, | ||
double | ymax, | ||
int | nBinsZ, | ||
double | zmin, | ||
double | zmax, | ||
bool | print = false |
||
) |
Definition at line 474 of file HistogramTools.h.
References ansi_green, ansi_normal, Get3DMap(), GetAllDirectories(), InitializeMapLock(), japp, sprintf(), and temp.
map<TString, pair<TH1I*, pthread_rwlock_t*> >& Get1DMap | ( | void | ) |
Definition at line 42 of file HistogramTools.h.
Referenced by Fill1DHistogram(), and GetHistPointer().
map<TString, pair<TProfile*, pthread_rwlock_t*> >& Get1DProfileMap | ( | void | ) |
Definition at line 67 of file HistogramTools.h.
Referenced by Fill1DProfile(), and GetHistPointer().
map<TString, pair<TH1D*, pthread_rwlock_t*> >& Get1DWeightedMap | ( | void | ) |
Definition at line 47 of file HistogramTools.h.
Referenced by Fill1DWeightedHistogram(), and GetHistPointer().
map<TString, pair<TH2I*, pthread_rwlock_t*> >& Get2DMap | ( | void | ) |
Definition at line 52 of file HistogramTools.h.
Referenced by Fill2DHistogram(), and GetHistPointer().
map<TString, pair<TProfile2D*, pthread_rwlock_t*> >& Get2DProfileMap | ( | void | ) |
Definition at line 72 of file HistogramTools.h.
Referenced by Fill2DProfile(), and GetHistPointer().
map<TString, pair<TH2D*, pthread_rwlock_t*> >& Get2DWeightedMap | ( | void | ) |
Definition at line 57 of file HistogramTools.h.
Referenced by Fill2DWeightedHistogram(), and GetHistPointer().
map<TString, pair<TH3I*, pthread_rwlock_t*> >& Get3DMap | ( | void | ) |
Definition at line 62 of file HistogramTools.h.
Referenced by Fill3DHistogram(), and GetHistPointer().
vector<TDirectory *>& GetAllDirectories | ( | void | ) |
Definition at line 37 of file HistogramTools.h.
Referenced by Fill1DHistogram(), Fill1DProfile(), Fill1DWeightedHistogram(), Fill2DHistogram(), Fill2DProfile(), Fill2DWeightedHistogram(), Fill3DHistogram(), and SortDirectories().
TObject* GetHistPointer | ( | const char * | plugin, |
const char * | directoryName, | ||
const char * | name | ||
) |
Definition at line 677 of file HistogramTools.h.
References Get1DMap(), Get1DProfileMap(), Get1DWeightedMap(), Get2DMap(), Get2DProfileMap(), Get2DWeightedMap(), Get3DMap(), and sprintf().
Referenced by JEventProcessor_BCAL_attenlength_gainratio::fini().
pthread_rwlock_t* InitializeMapLock | ( | ) |
Definition at line 77 of file HistogramTools.h.
Referenced by Fill1DHistogram(), Fill1DProfile(), Fill1DWeightedHistogram(), Fill2DHistogram(), Fill2DProfile(), Fill2DWeightedHistogram(), and Fill3DHistogram().
void SortDirectories | ( | ) |
Definition at line 668 of file HistogramTools.h.
References GetAllDirectories(), and japp.
Referenced by JEventProcessor_BCAL_TDC_Timing::fini(), JEventProcessor_BCAL_attenlength_gainratio::fini(), and JEventProcessor_HLDetectorTiming::fini().