Holds data relevent to each run. More...
#include <TSetupData.h>
Public Member Functions | |
std::string | GetBankName (std::string DetectorName) const |
std::string | GetDetectorName (std::string BankName) const |
void | GetAllDetectors (std::map< std::string, std::string > &detectors) const |
void | GetAllDetectors (std::vector< std::string > &detectors) const |
bool | IsEnable (const std::string &BankName) |
Getters | |
double | GetClockTick (const std::string &BankName) const |
int | GetNBits (const std::string &BankName) const |
double | GetADCSlopeCalib (const std::string &BankName) const |
Deprecated. | |
double | GetADCOffsetCalib (const std::string &BankName) const |
Deprecated. | |
double | GetTimeShift (const std::string &BankName) const |
Timing offset of bank from muSc. | |
int | GetTriggerPolarity (const std::string &BankName) const |
Pulse polarity. | |
int | GetPedestal (const std::string &BankName) const |
bool | GetEnableBit (const std::string &BankName) const |
Setters | |
bool | SetDetectorName (std::string BankName, std::string value) |
void | SetClockTick (std::string BankName, double value) |
void | SetNBits (std::string BankName, int value) |
void | SetTimeShift (std::string BankName, double value) |
void | SetTriggerPolarity (std::string BankName, int value) |
void | SetPedestal (std::string BankName, int value) |
void | SetADCSlopeCalib (std::string BankName, double value) |
void | SetADCOffsetCalib (std::string BankName, double value) |
void | SetEnableBit (std::string BankName, bool value) |
Static Public Member Functions | |
static TSetupData * | Instance () |
(Quasi-)Singleton interface | |
static bool | IsFADC (const std::string &BankName) |
static bool | IsHoustonCAEN (const std::string &BankName) |
static bool | IsBostonCAEN (const std::string &BankName) |
static bool | IsSlow (const std::string &BankName) |
static bool | IsFast (const std::string &BankName) |
Public Attributes | |
Maps | |
std::map< std::string, std::string > | fBankToDetectorMap |
The physical detector name. | |
std::map< std::string, double > | fBankToClockTickMap |
The length, in nanoseconds, of each sample clock tick. | |
std::map< std::string, int > | fBankToBitMap |
The number of bits (precision) each ADC sample has. | |
std::map< std::string, double > | fBankToADCSlopeCalibMap |
Deprecated. | |
std::map< std::string, double > | fBankToADCOffsetCalibMap |
Deprecated. | |
std::map< std::string, double > | fBankToTimeShift |
The timing offset from the muSc. | |
std::map< std::string, int > | fBankToPolarityMap |
The pulse polarity (positive = 1, negative = -1). | |
std::map< std::string, int > | fBankToPedestalMap |
The voltage offet in units of ADC. | |
std::map< std::string, bool > | fBankToEnableBitMap |
Whether or not the channel was enabled. | |
Private Member Functions | |
double | GetValue (const std::map< std::string, double > &map, const std::string &BankName) const |
int | GetValue (const std::map< std::string, int > &map, const std::string &BankName) const |
bool | GetValue (const std::map< std::string, bool > &map, const std::string &BankName) const |
Holds data relevent to each run.
TSetupData (TSD) holds information about each run. This consists mainly of data from the ODB WireMap, most importantly a mapping between each digitizer channel and the physical detector it had plugged in. Other hardware information such as the bit precision of each digitizer channel, is also contained here.
Definition at line 24 of file TSetupData.h.
double TSetupData::GetADCOffsetCalib | ( | const std::string & | BankName | ) | const [inline] |
Deprecated.
Definition at line 79 of file TSetupData.h.
References fBankToADCOffsetCalibMap, and GetValue().
Referenced by SetupRecord::InitMetaData().
00079 { return GetValue(fBankToADCOffsetCalibMap,BankName); };
double TSetupData::GetADCSlopeCalib | ( | const std::string & | BankName | ) | const [inline] |
Deprecated.
Definition at line 77 of file TSetupData.h.
References fBankToADCSlopeCalibMap, and GetValue().
Referenced by SetupRecord::InitMetaData().
00077 { return GetValue(fBankToADCSlopeCalibMap,BankName); };
void TSetupData::GetAllDetectors | ( | std::vector< std::string > & | detectors | ) | const |
[out] | detectors | Vector of all detectors, omitting detectors named "blank". |
Definition at line 21 of file TSetupData.cpp.
References fBankToDetectorMap.
00021 { 00022 std::map<std::string, std::string>::const_iterator it; 00023 for (it=fBankToDetectorMap.begin();it!= fBankToDetectorMap.end(); ++it){ 00024 if(it->second!="blank" ) detectors.push_back(it->second); 00025 } 00026 }
void TSetupData::GetAllDetectors | ( | std::map< std::string, std::string > & | detectors | ) | const |
[out] | detectors | Map with detectors as keys and banks as the mapped value, omitting detectors name "blank". |
Definition at line 14 of file TSetupData.cpp.
References fBankToDetectorMap.
Referenced by MakeAnalysedPulses::BeforeFirstEntry().
00014 { 00015 std::map<std::string, std::string>::const_iterator it; 00016 for (it=fBankToDetectorMap.begin();it!= fBankToDetectorMap.end(); ++it){ 00017 if(it->second!="blank" ) detectors[it->second]=it->first; 00018 } 00019 }
std::string TSetupData::GetBankName | ( | std::string | DetectorName | ) | const |
Referenced by ExportPulse::BeforeFirstEntry(), PlotTAP_TDiff::BookHistograms(), PlotTAP_selfCorrelation::BookHistograms(), MDQ_muScTDiff(), MDQ_TDCCheck(), MFastSlowCorrelator(), MMuSCTimeDifferences(), PlotTAP_Energy::ProcessEntry(), PlotTAP_Amplitude::ProcessEntry(), GeSpectrum::ProcessEntry(), FastSlowCompare::ProcessEntry(), and ExportPulse::SetCurrentDetectorName().
double TSetupData::GetClockTick | ( | const std::string & | BankName | ) | const [inline] |
Definition at line 74 of file TSetupData.h.
References fBankToClockTickMap, and GetValue().
Referenced by TPulseIsland::GetClockTickInNs(), SetupRecord::InitMetaData(), MDQ_IslandTimestamp_init(), PrintSetupData(), and MakeTemplate::ProcessEntry().
00074 { return GetValue(fBankToClockTickMap,BankName);}
std::string TSetupData::GetDetectorName | ( | std::string | BankName | ) | const [inline] |
Definition at line 58 of file TSetupData.h.
References fBankToDetectorMap.
Referenced by TemplateCreator::BeforeFirstEntry(), IslandAmplitude::BeforeFirstEntry(), IslandLength::Book(), PulseCandidateFinder::FillParameterHistogram(), functions::InterpolatePulse(), MDQ_Amplitude(), MDQ_Amplitude_eor(), MDQ_Amplitude_init(), MDQ_DigitizerOverflow(), MDQ_DigitizerOverflow_init(), MDQ_IslandCounter(), MDQ_IslandCounter_eor(), MDQ_IslandCounter_init(), MDQ_IslandLength(), MDQ_IslandLength_eor(), MDQ_IslandLength_init(), MDQ_IslandRate(), MDQ_IslandTimestamp(), MDQ_IslandTimestamp_eor(), MDQ_IslandTimestamp_init(), MDQ_muScTDiff(), MDQ_muScTDiff_eor(), MDQ_muScTDiff_init(), MDQ_PulseShapes(), MDQ_PulseShapes_eor(), MDQ_PulseShapes_init(), MDQ_Thresholds_init(), MPulseLengths_init(), PrintSetupData(), PulseCandidateFinder_InvestigateParameters::ProcessEntry(), PlotTPI_PedestalAndNoise::ProcessEntry(), IslandLength::ProcessEntry(), and IslandAmplitude::ProcessEntry().
00058 { 00059 if (fBankToDetectorMap.find(BankName)->second != "blank") 00060 return fBankToDetectorMap.find(BankName)->second; 00061 else 00062 return BankName; 00063 };
bool TSetupData::GetEnableBit | ( | const std::string & | BankName | ) | const [inline] |
Definition at line 85 of file TSetupData.h.
References fBankToEnableBitMap, and GetValue().
Referenced by SetupRecord::InitMetaData(), and IsEnable().
00085 {return GetValue(fBankToEnableBitMap, BankName);};
int TSetupData::GetNBits | ( | const std::string & | BankName | ) | const [inline] |
Definition at line 75 of file TSetupData.h.
References fBankToBitMap, and GetValue().
Referenced by PlotTDPs::BeforeFirstEntry(), IslandAmplitude::BeforeFirstEntry(), PlotTAP_TDiff::BookHistograms(), PlotTAP_selfCorrelation::BookHistograms(), PulseCandidateFinder::CheckDigitiserOverflow(), TemplateFitter::FitPulseToTemplate(), PlotAmpVsMuScTDiff::GetHistogram(), TemplateCreator::HasPulseOverflowed(), SetupRecord::InitMetaData(), isValid(), MDQ_Amplitude_init(), MDQ_DigitizerOverflow(), MDQ_PulseShapes_init(), PlotAmpVsTDiff::PlotAmpVsTDiff(), PrintSetupData(), PulseCandidateFinder_InvestigateParameters::ProcessEntry(), MakeTemplate::ProcessEntry(), PlotTPI_PedestalAndNoise::ProcessEntry(), PlotTAP_Energy::ProcessEntry(), and PlotTAP_Amplitude::ProcessEntry().
00075 { return GetValue(fBankToBitMap,BankName);}
int TSetupData::GetPedestal | ( | const std::string & | BankName | ) | const [inline] |
Definition at line 84 of file TSetupData.h.
References fBankToPedestalMap, and GetValue().
Referenced by TPulseIsland::GetPedestal(), SetupRecord::InitMetaData(), PrintSetupData(), MakeTemplate::ProcessEntry(), and IslandAmplitude::ProcessEntry().
00084 {return GetValue(fBankToPedestalMap,BankName);};
double TSetupData::GetTimeShift | ( | const std::string & | BankName | ) | const [inline] |
Timing offset of bank from muSc.
Definition at line 81 of file TSetupData.h.
References fBankToTimeShift, and GetValue().
Referenced by GetTime(), SetupRecord::InitMetaData(), MDQ_muScTDiff(), and PrintSetupData().
00081 { return GetValue(fBankToTimeShift,BankName); };
int TSetupData::GetTriggerPolarity | ( | const std::string & | BankName | ) | const [inline] |
Pulse polarity.
Definition at line 83 of file TSetupData.h.
References fBankToPolarityMap, and GetValue().
Referenced by TPulseIsland::GetTriggerPolarity(), SetupRecord::InitMetaData(), PrintSetupData(), MakeTemplate::ProcessEntry(), and IslandAmplitude::ProcessEntry().
00083 {return GetValue(fBankToPolarityMap,BankName);};
bool TSetupData::GetValue | ( | const std::map< std::string, bool > & | map, | |
const std::string & | BankName | |||
) | const [inline, private] |
Definition at line 136 of file TSetupData.h.
00137 { 00138 std::map<std::string, bool>::const_iterator it=map.find(BankName); 00139 if(it!=map.end()) return it->second; 00140 return false; 00141 }
int TSetupData::GetValue | ( | const std::map< std::string, int > & | map, | |
const std::string & | BankName | |||
) | const [inline, private] |
Definition at line 129 of file TSetupData.h.
00130 { 00131 std::map<std::string, int>::const_iterator it=map.find(BankName); 00132 if(it!=map.end()) return it->second; 00133 return 0; 00134 }
double TSetupData::GetValue | ( | const std::map< std::string, double > & | map, | |
const std::string & | BankName | |||
) | const [inline, private] |
Definition at line 122 of file TSetupData.h.
Referenced by GetADCOffsetCalib(), GetADCSlopeCalib(), GetClockTick(), GetEnableBit(), GetNBits(), GetPedestal(), GetTimeShift(), and GetTriggerPolarity().
00123 { 00124 std::map<std::string, double>::const_iterator it=map.find(BankName); 00125 if(it!=map.end()) return it->second; 00126 return 0.; 00127 }
static bool TSetupData::IsBostonCAEN | ( | const std::string & | BankName | ) | [inline, static] |
Definition at line 113 of file TSetupData.h.
Referenced by module_event_sort_and_stitch(), module_init(), and UpdateDetectorBankNameMap().
bool TSetupData::IsEnable | ( | const std::string & | BankName | ) | [inline] |
Definition at line 117 of file TSetupData.h.
References GetEnableBit().
00117 {return GetEnableBit(BankName);}
static bool TSetupData::IsFADC | ( | const std::string & | BankName | ) | [inline, static] |
Definition at line 111 of file TSetupData.h.
Referenced by MDQ_Thresholds_eor(), and UpdateDetectorBankNameMap().
static bool TSetupData::IsFast | ( | const std::string & | BankName | ) | [inline, static] |
Definition at line 115 of file TSetupData.h.
Referenced by MakeAnalysedPulses::BeforeFirstEntry().
static bool TSetupData::IsHoustonCAEN | ( | const std::string & | BankName | ) | [inline, static] |
Definition at line 112 of file TSetupData.h.
Referenced by module_event_sort_and_stitch(), module_init(), and UpdateDetectorBankNameMap().
static bool TSetupData::IsSlow | ( | const std::string & | BankName | ) | [inline, static] |
Definition at line 114 of file TSetupData.h.
void TSetupData::SetADCOffsetCalib | ( | std::string | BankName, | |
double | value | |||
) | [inline] |
Definition at line 107 of file TSetupData.h.
References fBankToADCOffsetCalibMap.
Referenced by UpdateDetectorBankNameMap().
00107 { fBankToADCOffsetCalibMap[BankName] = value; };
void TSetupData::SetADCSlopeCalib | ( | std::string | BankName, | |
double | value | |||
) | [inline] |
Definition at line 106 of file TSetupData.h.
References fBankToADCSlopeCalibMap.
Referenced by UpdateDetectorBankNameMap().
00106 { fBankToADCSlopeCalibMap[BankName] = value; }
void TSetupData::SetClockTick | ( | std::string | BankName, | |
double | value | |||
) | [inline] |
Definition at line 101 of file TSetupData.h.
References fBankToClockTickMap.
Referenced by UpdateDetectorBankNameMap().
00101 { fBankToClockTickMap[BankName]=value; }
bool TSetupData::SetDetectorName | ( | std::string | BankName, | |
std::string | value | |||
) | [inline] |
Definition at line 93 of file TSetupData.h.
References fBankToDetectorMap.
Referenced by UpdateDetectorBankNameMap().
00093 { 00094 std::map< std::string, std::string >::iterator it; 00095 for (it = fBankToDetectorMap.begin(); it != fBankToDetectorMap.end(); ++it) 00096 if (it->second == value) 00097 return false; 00098 fBankToDetectorMap[BankName] = value; 00099 return true; 00100 }
void TSetupData::SetEnableBit | ( | std::string | BankName, | |
bool | value | |||
) | [inline] |
Definition at line 108 of file TSetupData.h.
References fBankToEnableBitMap.
Referenced by UpdateDetectorBankNameMap().
00108 {fBankToEnableBitMap[BankName] = value;};
void TSetupData::SetNBits | ( | std::string | BankName, | |
int | value | |||
) | [inline] |
Definition at line 102 of file TSetupData.h.
References fBankToBitMap.
Referenced by UpdateDetectorBankNameMap().
00102 { fBankToBitMap[BankName]=value; }
void TSetupData::SetPedestal | ( | std::string | BankName, | |
int | value | |||
) | [inline] |
Definition at line 105 of file TSetupData.h.
References fBankToPedestalMap.
Referenced by UpdateDetectorBankNameMap().
00105 { fBankToPedestalMap[BankName]=value; }
void TSetupData::SetTimeShift | ( | std::string | BankName, | |
double | value | |||
) | [inline] |
Definition at line 103 of file TSetupData.h.
References fBankToTimeShift.
Referenced by UpdateDetectorBankNameMap().
00103 { fBankToTimeShift[BankName]=value; }
void TSetupData::SetTriggerPolarity | ( | std::string | BankName, | |
int | value | |||
) | [inline] |
Definition at line 104 of file TSetupData.h.
References fBankToPolarityMap.
Referenced by UpdateDetectorBankNameMap().
00104 { fBankToPolarityMap[BankName]=value; }
std::map<std::string, double> TSetupData::fBankToADCOffsetCalibMap |
Deprecated.
Definition at line 43 of file TSetupData.h.
Referenced by GetADCOffsetCalib(), and SetADCOffsetCalib().
std::map<std::string, double> TSetupData::fBankToADCSlopeCalibMap |
Deprecated.
Definition at line 41 of file TSetupData.h.
Referenced by GetADCSlopeCalib(), and SetADCSlopeCalib().
std::map<std::string, int> TSetupData::fBankToBitMap |
The number of bits (precision) each ADC sample has.
Definition at line 39 of file TSetupData.h.
Referenced by GetNBits(), SetupRecord::InitMetaData(), and SetNBits().
std::map<std::string, double> TSetupData::fBankToClockTickMap |
The length, in nanoseconds, of each sample clock tick.
Definition at line 37 of file TSetupData.h.
Referenced by GetClockTick(), and SetClockTick().
std::map<std::string, std::string> TSetupData::fBankToDetectorMap |
The physical detector name.
Definition at line 35 of file TSetupData.h.
Referenced by GetAllDetectors(), GetDetectorName(), SetupRecord::InitChannels(), MDQ_Amplitude_init(), MDQ_DigitizerOverflow_init(), MDQ_IslandCounter_init(), MDQ_IslandLength_init(), MDQ_IslandTimestamp_init(), MDQ_muScTDiff_init(), MDQ_PulseShapes_eor(), MDQ_PulseShapes_init(), MDQ_Thresholds_eor(), MDQ_Thresholds_init(), MFastSlowCorrelator_init(), MMuSCTimeDifferences_init(), module_init(), MPulseLengths_init(), PrintSetupData(), and SetDetectorName().
std::map<std::string, bool> TSetupData::fBankToEnableBitMap |
Whether or not the channel was enabled.
Definition at line 51 of file TSetupData.h.
Referenced by GetEnableBit(), and SetEnableBit().
std::map<std::string, int> TSetupData::fBankToPedestalMap |
The voltage offet in units of ADC.
Definition at line 49 of file TSetupData.h.
Referenced by GetPedestal(), and SetPedestal().
std::map<std::string, int> TSetupData::fBankToPolarityMap |
The pulse polarity (positive = 1, negative = -1).
Definition at line 47 of file TSetupData.h.
Referenced by GetTriggerPolarity(), and SetTriggerPolarity().
std::map<std::string, double> TSetupData::fBankToTimeShift |
The timing offset from the muSc.
Definition at line 45 of file TSetupData.h.
Referenced by GetTimeShift(), and SetTimeShift().