#includeIn this example, we create a new TH1D object with the name "myHist". We then use the GetName() function to print the name of the histogram to the console. Finally, we save the histogram to a ROOT file and delete the histogram object. The package library used in this example is ROOT, which is an open-source data analysis framework used primarily in high-energy physics.#include "TH1D.h" #include "TFile.h" int main(){ // Create a new histogram object TH1D* hist = new TH1D("myHist","My Histogram",50,0,100); // Print the name of the histogram std::cout << "Histogram Name: " << hist->GetName() << std::endl; // Save the histogram to a file TFile* file = new TFile("histogram.root","RECREATE"); hist->Write(); file->Close(); // Delete the histogram object delete hist; delete file; return 0; }