#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(), mergeVDriftHistosByStation::file, mps_fire::i, Data_TkAlMinBias_Run2018C_PromptReco_v3_cff::maxEvents, MuonPair::mu1, GenMuonPair::mu1, MuonPair::mu2, GenMuonPair::mu2, MuScleFitMuon::p4(), MuScleFitEvent::run(), and MainPageGenerator::tree.
Referenced by 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(), mergeVDriftHistosByStation::file, mps_fire::i, Data_TkAlMinBias_Run2018C_PromptReco_v3_cff::maxEvents, MuonPair::mu1, GenMuonPair::mu1, MuonPair::mu2, GenMuonPair::mu2, MuScleFitEvent::run(), and MainPageGenerator::tree.
|
inline |
Used to read the external trees.
Definition at line 169 of file RootTreeHandler.h.
References gather_cfg::cout, beamvalidation::exit(), mergeVDriftHistosByStation::file, mps_fire::i, Data_TkAlMinBias_Run2018C_PromptReco_v3_cff::maxEvents, and MainPageGenerator::tree.
|
inline |
Definition at line 28 of file RootTreeHandler.h.
References MuonPair::copy(), GenMuonPair::copy(), gather_cfg::cout, beamvalidation::exit(), validate-o2o-wbm::f1, iev, and MainPageGenerator::tree.
Referenced by TreeSplitter::endJob(), main(), and MuScleFit::~MuScleFit().