MUSIC unknown
Analysis for the MUSIC active-target ionization chamber
Loading...
Searching...
No Matches
EventsSummary.hpp File Reference
#include "Constants.hpp"
#include "FileSet.hpp"
#include "IOUtils.hpp"
#include "Normalization.hpp"
#include "PlottingUtils.hpp"
#include <TCanvas.h>
#include <TFile.h>
#include <TGraph.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TString.h>
#include <TTree.h>
#include <mutex>
#include <vector>
Include dependency graph for EventsSummary.hpp:

Go to the source code of this file.

Classes

struct  SummaryHistograms
 The standard diagnostic histogram set for a subfile. More...
struct  SummaryHistConfig
 Axis ranges and labels for building a SummaryHistograms set. More...
class  EventsSummary
 Calibrated summary plots and sample traces, built from events files. More...

Functions

void CreateSummaryHistograms (SummaryHistograms &h, const SummaryHistConfig &cfg)
 Allocate every histogram in the set.
void SaveAndDeleteSummaryHistograms (SummaryHistograms &h, TFile *out_file, const TString &subdir, const TString &plot_suffix)
 Write the set to file, save the plots, then free every histogram.

Function Documentation

◆ CreateSummaryHistograms()

void CreateSummaryHistograms ( SummaryHistograms & h,
const SummaryHistConfig & cfg )

Allocate every histogram in the set.

Parameters
[out]hSet to populate; existing pointers are overwritten, not freed.
cfgAxis ranges and labels.

Definition at line 4 of file EventsSummary.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits(), and EventsSummary::BuildNormedSummaryHistograms().

◆ SaveAndDeleteSummaryHistograms()

void SaveAndDeleteSummaryHistograms ( SummaryHistograms & h,
TFile * out_file,
const TString & subdir,
const TString & plot_suffix )

Write the set to file, save the plots, then free every histogram.

Parameters
[in,out]hSet to write; every pointer is deleted and left dangling.
out_fileDestination file. Must be open for writing.
subdirPlot subdirectory under the plots base.
plot_suffixSuffix appended to each plot filename.
Warning
Deletes the histograms. Do not touch h afterwards without calling CreateSummaryHistograms() again.

Definition at line 76 of file EventsSummary.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits(), and EventsSummary::BuildNormedSummaryHistograms().