7 #include "cetlib_except/exception.h" 93 std::strcpy(temp, fb.
fileName().c_str());
98 if(fOutputName.find(
".pid.root") != std::string::npos) {
99 const size_t pidpos = fOutputName.find(
".pid.root");
100 fOutputName.resize(pidpos);
103 const size_t dotpos = fOutputName.find(
'.');
104 assert(dotpos != std::string::npos);
105 fOutputName.resize(dotpos);
129 fFile =
new TFile(fOutputName.c_str(),
"RECREATE");
131 fTree =
new TTree(
"recTree",
"recTree");
135 fTree->SetAutoFlush(-3*1000*1000);
138 fSpillTree =
new TTree(
"spillTree",
"spillTree");
139 fSpillTree->SetAutoFlush(-3*1000*1000);
143 fNuTree =
new TTree(
"nuTree",
"nuTree");
144 fNuTree->SetAutoFlush(-3*1000*1000);
213 fFile->mkdir(
"metadata")->cd();
215 for(
const auto&
m: metadata){
216 TObjString(
m.second.c_str()).
Write(
m.first.c_str());
221 TH1* hPOT =
new TH1D(
"TotalPOT",
"TotalPOT;; POT", 1, 0, 1);
225 TH1* hEvents =
new TH1D(
"TotalEvents",
"TotalEvents;; Events", 1, 0, 1);
229 TH1* hLivetime =
new TH1D(
"TotalLivetime",
"TotalLiveTime;;Seconds", 1, 0, 1);
flat::Flat< caf::SRNeutrino > * fNuRec
Flat encoding of caf::SRNeutrino.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
Flat encoding of caf::StandardRecord.
virtual ~FlatMaker() noexcept
std::string const & fileName() const
Truth info for all neutrinos in the spill.
void Fill(const caf::SRSpill &sr)
DEFINE_ART_MODULE(TestTMapFile)
void Fill(const caf::SRNeutrino &sr)
void respondToOpenInputFile(const art::FileBlock &fb)
flat::Flat< caf::StandardRecord > * fRec
flat::Flat< caf::SRSpill > * fSpillRec
std::string fFileExtension
void Fill(const caf::StandardRecord &sr)
Flat encoding of caf::SRSpill.
float livetime
Length of readout [s].
void produce(art::Event &evt) noexcept
std::string fStandardRecordLabel
The StandardRecord is the primary top-level object in the Common Analysis File trees.
assert(nhit_max >=nhit_nbins)
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
FlatMaker(const fhicl::ParameterSet &pset)