00001 /* 00002 * Copyright (C) 2008-2012, Daniel Kollar and Kevin Kroeninger. 00003 * All rights reserved. 00004 * 00005 * For the licensing terms see doc/COPYING. 00006 */ 00007 00008 // --------------------------------------------------------- 00009 00010 #include <TH1D.h> 00011 00012 #include "BCMTFTemplate.h" 00013 00014 // --------------------------------------------------------- 00015 BCMTFTemplate::BCMTFTemplate(const char * channelname, const char * processname) 00016 : fEfficiency(0) 00017 , fHistogram(0) 00018 , fNBins(0) 00019 { 00020 fChannelName = channelname; 00021 fProcessName = processname; 00022 fFunctionContainer = new std::vector<TF1 *>(0); 00023 } 00024 00025 // --------------------------------------------------------- 00026 BCMTFTemplate::~BCMTFTemplate() 00027 { 00028 // debugKK 00029 // if (fHistogram) 00030 // delete fHistogram; 00031 } 00032 00033 // --------------------------------------------------------- 00034 void BCMTFTemplate::SetHistogram(TH1D * hist) 00035 { 00036 fHistogram = hist; 00037 if (hist) 00038 fNBins = fHistogram->GetNbinsX(); 00039 } 00040 00041 // --------------------------------------------------------- 00042 void BCMTFTemplate::SetFunctionContainer(std::vector<TF1 *> * funccont, int nbins) 00043 { 00044 fFunctionContainer = funccont; 00045 fNBins = nbins; 00046 } 00047 00048 // ---------------------------------------------------------