9 #ifndef NAIA_SKIMTREEHANDLE_H
10 #define NAIA_SKIMTREEHANDLE_H
35 SkimTreeHandle(std::unique_ptr<TFile> outFile, std::unique_ptr<T> chain, T *originalChain)
54 NAIA::Version versionHeader;
55 m_outFile->WriteTObject(&versionHeader,
"VersionHeader");
62 m_chain->m_rti.tree->Branch(
"RTIInfo", rtiInfo);
64 for (
int ii = 0; ii <
m_originalChain->GetRTITree()->GetEntries(); ii++) {
75 m_originalChain->GetFileInfoTree()->SetBranchAddress(
"FileInfo", &fileInfo);
76 m_chain->m_file.tree->Branch(
"FileInfo", fileInfo);
78 m_originalChain->GetFileInfoTree()->SetBranchAddress(
"MCFileInfo", &fileInfoMC);
79 m_chain->m_file.tree->Branch(
"MCFileInfo", fileInfoMC);
82 for (
int ii = 0; ii <
m_originalChain->GetFileInfoTree()->GetEntries(); ii++) {
107 #endif // NAIA_SKIMTREEHANDLE_H
Helper class to ease skimming operations.
std::unique_ptr< T > m_chain
std::unique_ptr< TFile > m_outFile
TFile * RootFile()
Get a non-owning pointer to the underlying rootfile.
SkimTreeHandle(std::unique_ptr< TFile > outFile, std::unique_ptr< T > chain, T *originalChain)
Construct a new SkimTreeHandle.
Container class for processed File information.
Container class for additional MC File information.
int Write()
Writes the skimmed tree on the output rootfile.
int Fill()
Fills the underlying event in the output tree.
Container class for RTI info.