Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Disable reading of branches with properties that are not used currently.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-popov committed Feb 25, 2016
1 parent 1cf3d26 commit 54e5037
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions modules/PECReader/src/PECJetMETReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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());

Expand Down
13 changes: 9 additions & 4 deletions modules/PECReader/src/PECLeptonReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 54e5037

Please sign in to comment.