From a50ef86897b8dfb4ddc76d0b6103889d1c517b03 Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Thu, 2 May 2019 15:22:09 -0400 Subject: [PATCH] Updating code to work with load-library features --- rootScripts/aggregator/anaInt.cfg | 3 ++- rootScripts/aggregator/camAna.hh | 5 ++--- rootScripts/aggregator/camguin.hh | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/rootScripts/aggregator/anaInt.cfg b/rootScripts/aggregator/anaInt.cfg index 04e8534e6..604fdb412 100644 --- a/rootScripts/aggregator/anaInt.cfg +++ b/rootScripts/aggregator/anaInt.cfg @@ -24,8 +24,9 @@ definecut bcmds_cut (-1*bcm_ds>1) newpage 2 5 title CAMGUIN Test + loadlib camguin_C.so macro ./camguin.C("draw","evt","bcm_an_ds3","hw_sum","defaultCuts",0,"clean") - macro ./camguin.C("meanRms","mul","yield_sam1","hw_sum","defaultCuts",0,"defaultHist") + loadmacro camguin_C.so ./camguin.C("meanRms","mul","yield_sam1","hw_sum","defaultCuts",0,"defaultHist") macro ./camguin.C("int","evt","bcm_an_us","hw_sum","defaultCuts",0,"defaultHist") macro ./camguin.C("redraw","evt","bcm_an_us","hw_sum","defaultCuts",0,"defaultHist") macro ./camguin.C("intloop","evt","bcm_an_ds","hw_sum","defaultCuts",0,"clean") diff --git a/rootScripts/aggregator/camAna.hh b/rootScripts/aggregator/camAna.hh index c6f846a4e..deded11bb 100644 --- a/rootScripts/aggregator/camAna.hh +++ b/rootScripts/aggregator/camAna.hh @@ -36,9 +36,7 @@ void writeMean_Loop_h(TString tree = "mul", TString branch = "asym_vqwk_04_0ch0" TString channel = tree + "_" + branch + "_" + leaf; // Make an instance of the relevant data source TLeaf *Leaf = getLeaf_h(tree,branch,leaf,runNumber,nRuns); - if (!Leaf){ - return; - } + if (Leaf){ TBranch *Branch = Leaf->GetBranch(); TTree *Tree = Branch->GetTree(); Int_t numEntries = Tree->GetEntries(); @@ -56,6 +54,7 @@ void writeMean_Loop_h(TString tree = "mul", TString branch = "asym_vqwk_04_0ch0" } data_mean = data/(1.0*n_data); writeFile_h(analysis,data_mean,runNumber,nRuns); + } } void writeInt_loop_h(TString tree = "mul", TString branch = "asym_vqwk_04_0ch0", TString leaf = "hw_sum", TString cut = "defaultCut", Int_t runNumber = 0, Int_t nRuns = -1){ diff --git a/rootScripts/aggregator/camguin.hh b/rootScripts/aggregator/camguin.hh index 8feecbd83..fc401bb32 100644 --- a/rootScripts/aggregator/camguin.hh +++ b/rootScripts/aggregator/camguin.hh @@ -18,6 +18,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include using namespace std; int debug = 0;