56 TDirectory* cwd = gDirectory;
57 TFile*
f =
new TFile(fn.data(),
"recreate");
59 LOG(error) <<
"Cannot create file: " << fn;
62 for (int32_t is = 0; is <
NChannels; is++) {
64 auto& shape = channel.
shape;
65 int nbx = shape.size();
66 int iamin = channel.ampMinID;
68 TString
n = TString::Format(
"h%d", is);
70 TH1F
h(
n, t, nbx, -0.5 - iamin, nbx - iamin - 0.5);
71 for (
int ibx = 0; ibx < nbx; ibx++) {
72 h.SetBinContent(ibx + 1, shape[ibx]);
75 h.Write(
"", TObject::kOverwrite);