ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtSidebarPSATBAvg.cxx
Go to the documentation of this file.
1 #include "AtSidebarPSATBAvg.h"
2 
3 #include "AtPSA.h" // for AtPSA
4 #include "AtPSATBAvg.h"
5 
6 #include <FairLogger.h>
7 
9 
11 {
12  auto tPSA = dynamic_cast<AtPSATBAvg *>(fPSA);
13  if (tPSA == nullptr)
14  return;
15 
17 
18  AddIntBox(fTBtoAvg, "SetTBtoAvg()", 0, 16);
19  AddIntBox(fMaxThreshold, "SetMaxThreshold()", 0, 512);
20 
21  SetIntNumber(fTBtoAvg, tPSA->GetNumTBToAvg());
22  SetIntNumber(fMaxThreshold, tPSA->GetMaxThreshold());
23 }
24 
26 {
27  auto tPSA = dynamic_cast<AtPSATBAvg *>(fPSA);
28  if (tPSA == nullptr)
29  return;
30 
31  auto value = GetIntNumber(fTBtoAvg);
32  tPSA->SetNumTBToAvg(value);
33  LOG(debug) << fTBtoAvg << " set: " << value;
34 }
35 
37 {
38  auto tPSA = dynamic_cast<AtPSATBAvg *>(fPSA);
39  if (tPSA == nullptr)
40  return;
41 
42  auto value = GetIntNumber(fMaxThreshold);
43  tPSA->SetMaxThreshold(value);
44  LOG(debug) << fMaxThreshold << " set: " << value;
45 }
AtSidebarPSATBAvg::FillFrame
void FillFrame() override
Definition: AtSidebarPSATBAvg.cxx:10
AtSidebarAddon::GetIntNumber
Long_t GetIntNumber(std::string label)
Definition: AtSidebarAddon.cxx:63
AtSidebarPSATBAvg::fTBtoAvg
const std::string fTBtoAvg
Definition: AtSidebarPSATBAvg.h:17
AtSidebarPSATBAvg
Definition: AtSidebarPSATBAvg.h:15
AtSidebarPSATBAvg.h
AtSidebarPSA::FillFrame
void FillFrame() override
Definition: AtSidebarPSA.cxx:9
AtSidebarPSA::fPSA
AtPSA * fPSA
Definition: AtSidebarPSA.h:18
AtSidebarAddon::AddIntBox
void AddIntBox(std::string label, std::string function, int min=0, int max=1)
Definition: AtSidebarAddon.cxx:34
AtSidebarPSATBAvg::fMaxThreshold
const std::string fMaxThreshold
Definition: AtSidebarPSATBAvg.h:18
AtSidebarPSATBAvg::SetTBtoAvg
void SetTBtoAvg()
Definition: AtSidebarPSATBAvg.cxx:25
AtSidebarAddon::SetIntNumber
void SetIntNumber(std::string label, Long_t value)
Definition: AtSidebarAddon.cxx:82
AtSidebarPSATBAvg::SetMaxThreshold
void SetMaxThreshold()
Definition: AtSidebarPSATBAvg.cxx:36
AtPSATBAvg.h
AtPSATBAvg
Constructs a hit from averaged TBs.
Definition: AtPSATBAvg.h:21
AtPSA.h
ClassImp
ClassImp(AtSidebarPSATBAvg)