#include <RootTreeHandler.h>
Public Member Functions | |
void | readTree (const int maxEvents, const TString &fileName, MuonPairVector *savedPair, const int muonType, std::vector< std::pair< unsigned int, unsigned long long > > *evtRun, MuonPairVector *genPair=nullptr) |
void | readTree (const int maxEvents, const TString &fileName, MuonPairExtendedVector *savedPair, const int muonType, std::vector< std::pair< unsigned int, unsigned long long > > *evtRun, MuonPairExtendedVector *genPair=nullptr) |
void | readTree (const int maxEvents, const TString &fileName, std::vector< MuonPair > *savedPair, const int muonType, std::vector< GenMuonPair > *genPair=nullptr) |
Used to read the external trees. More... | |
void | writeTree (const TString &fileName, const std::vector< MuonPair > *savedPair, const int muonType=0, const std::vector< GenMuonPair > *genPair=nullptr, const bool saveAll=false) |
This class can be used to save all the muon pairs (and gen muon pairs if any) to a root tree.
The writeTree method gets the name of the file to store the tree and the savedPair (and possibly genPair) vector of muon pairs.
Likewise, the readTree method takes the same arguments. It reads back from the file with the given name the pairs and stores them in the given savedPair (and genPair) vector.
Definition at line 24 of file RootTreeHandler.h.
|
inline |
Definition at line 86 of file RootTreeHandler.h.
References gather_cfg::cout, MuScleFitEvent::event(), MuonPair::event, beamvalidation::exit(), geometryDiff::file, MillePedeFileConverter_cfg::fileName, mps_fire::i, Data_TkAlMinBias_Run2018C_PromptReco_v3_cff::maxEvents, MuonPair::mu1, GenMuonPair::mu1, MuonPair::mu2, GenMuonPair::mu2, MuScleFitMuon::p4(), and MuScleFitEvent::run().
Referenced by ResolutionAnalyzer::analyze(), TreeSplitter::endJob(), ErrorsAnalyzer::fillHistograms(), ErrorsPropagationAnalyzer::fillHistograms(), main(), and MuScleFit::selectMuons().
|
inline |
Definition at line 128 of file RootTreeHandler.h.
References gather_cfg::cout, MuScleFitEvent::event(), MuonPair::event, beamvalidation::exit(), geometryDiff::file, MillePedeFileConverter_cfg::fileName, mps_fire::i, Data_TkAlMinBias_Run2018C_PromptReco_v3_cff::maxEvents, MuonPair::mu1, GenMuonPair::mu1, MuonPair::mu2, GenMuonPair::mu2, and MuScleFitEvent::run().
|
inline |
Used to read the external trees.
Definition at line 169 of file RootTreeHandler.h.
References gather_cfg::cout, beamvalidation::exit(), geometryDiff::file, MillePedeFileConverter_cfg::fileName, mps_fire::i, and Data_TkAlMinBias_Run2018C_PromptReco_v3_cff::maxEvents.
|
inline |
Definition at line 28 of file RootTreeHandler.h.
References MuonPair::copy(), GenMuonPair::copy(), gather_cfg::cout, beamvalidation::exit(), DeadROC_duringRun::f1, MillePedeFileConverter_cfg::fileName, and caHitNtupletGeneratorKernels::iev.
Referenced by TreeSplitter::endJob(), main(), and MuScleFit::~MuScleFit().