From 54e5037d0ab3c11a0bbb929f0e61b4fdd73ea7f7 Mon Sep 17 00:00:00 2001 From: Andrey Popov Date: Thu, 25 Feb 2016 22:57:23 +0100 Subject: [PATCH] Disable reading of branches with properties that are not used currently. --- modules/PECReader/src/PECJetMETReader.cpp | 6 ++++-- modules/PECReader/src/PECLeptonReader.cpp | 13 +++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/PECReader/src/PECJetMETReader.cpp b/modules/PECReader/src/PECJetMETReader.cpp index 27a88c3..abe5791 100644 --- a/modules/PECReader/src/PECJetMETReader.cpp +++ b/modules/PECReader/src/PECJetMETReader.cpp @@ -58,10 +58,12 @@ void PECJetMETReader::BeginRun(Dataset const &) GetMaster().GetPluginBefore(leptonPluginName, GetName())); - // Set up the tree + // Set up the tree. Branches with properties that are not currently not used, are disabled inputDataPlugin->LoadTree(treeName); TTree *tree = inputDataPlugin->ExposeTree(treeName); ROOTLock::Lock(); + tree->SetBranchStatus("jets.secVertexMass", false); + tree->SetBranchStatus("jets.pullAngle", false); tree->SetBranchAddress("jets", &bfJetPointer); tree->SetBranchAddress("METs", &bfMETPointer); ROOTLock::Unlock(); @@ -139,7 +141,7 @@ bool PECJetMETReader::ProcessEvent() jet.SetBTag(BTagger::Algorithm::CSV, j.BTagCSV()); jet.SetArea(j.Area()); jet.SetCharge(j.Charge()); - jet.SetPullAngle(j.PullAngle()); + // jet.SetPullAngle(j.PullAngle()); jet.SetParentID(j.Flavour()); diff --git a/modules/PECReader/src/PECLeptonReader.cpp b/modules/PECReader/src/PECLeptonReader.cpp index a99921c..90566c5 100644 --- a/modules/PECReader/src/PECLeptonReader.cpp +++ b/modules/PECReader/src/PECLeptonReader.cpp @@ -37,14 +37,19 @@ void PECLeptonReader::BeginRun(Dataset const &) GetMaster().GetPluginBefore(inputDataPluginName, GetName())); - // Set up the trees + // Set up the trees. Branches with properties that are currently not utilized, are disabled inputDataPlugin->LoadTree(electronTreeName); inputDataPlugin->LoadTree(muonTreeName); ROOTLock::Lock(); - inputDataPlugin->ExposeTree(electronTreeName)-> - SetBranchAddress("electrons", &bfElectronPointer); - inputDataPlugin->ExposeTree(muonTreeName)->SetBranchAddress("muons", &bfMuonPointer); + TTree *t = inputDataPlugin->ExposeTree(electronTreeName); + t->SetBranchStatus("electrons.dB", false); + t->SetBranchStatus("electrons.mvaId*", false); + t->SetBranchAddress("electrons", &bfElectronPointer); + + t = inputDataPlugin->ExposeTree(muonTreeName); + t->SetBranchStatus("muons.dB", false); + t->SetBranchAddress("muons", &bfMuonPointer); ROOTLock::Unlock(); }