Hello World example for TH1.
Shows how to create, fill and write a histogram to a ROOT file.
{
int nBins = 30;
const std::array values{1, 2, 3, 3, 3, 4, 3, 2, 1, 0};
for (double val : values) {
}
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
1-D histogram with a double per channel (see TH1 documentation)
- Date
- November 2024
- Author
- Giacomo Parolini (CERN)
Definition in file hist000_TH1_first.C.