25#include <TEventList.h>
54 std::pair<EQwHandleType,std::string> type_name;
68 if (primary_token ==
"iv") {
73 else if (primary_token ==
"dv") {
78 else if (primary_token ==
"treetype") {
82 QwError <<
"Function LoadChannelMap in LRBCorrector.cc read in invalid primary_token." <<
QwLog::endl;
89 std::string SlopeFile = SlopeFilePath + SlopeFileName;
90 TString corFileName(SlopeFile);
93 TFile* corFile =
new TFile(corFileName);
94 if (! corFile->IsOpen()) {
100 TH1 *dvnames = (TH1 *) corFile->Get(
"DVname");
107 TString name = dvnames->GetXaxis()->GetBinLabel(i+1);
108 name.Remove(0, name.First(
"_") + 1);
110 QwWarning <<
"DV name expected differs from found: "
119 TH1 *ivnames = (TH1 *) corFile->Get(
"IVname");
126 TString name = ivnames->GetXaxis()->GetBinLabel(i+1);
127 name.Remove(0, name.First(
"_") + 1);
129 QwWarning <<
"IV name expected differs from found: "
138 TKey* key = corFile->GetKey(
"slopes");
146 for (Short_t cycle=1; cycle<=
fLastCycle; cycle++){
147 TKey* key_cycle = corFile->GetKey(
"slopes", cycle);
148 TMatrixD *alphasM = (TMatrixD *) key_cycle->ReadObj();
155 QwWarning <<
"Slope matrix has wrong number of rows: "
162 QwWarning <<
"Slope matrix has wrong number of cols: "
204 QwWarning <<
"Independent variable for corrector has unknown type."
#define QwError
Predefined log drain for errors.
#define QwWarning
Predefined log drain for warnings.
#define QwMessage
Predefined log drain for regular messages.
Parameter file parsing and management.
Definition of the pure virtual base class of all data elements.
Decoding and management for VQWK ADC channels (6x32-bit datawords)
#define REGISTER_DATA_HANDLER_FACTORY(A)
Linear regression blue corrector data handler class.
Helicity pattern analysis and management.
const VQwHardwareChannel * RequestExternalPointer(const TString &name) const
const VQwHardwareChannel * RequestExternalPointer(const TString &name) const
Retrieve a direct pointer to an external variable Searches for the named variable in external subsyst...
static std::ostream & endl(std::ostream &)
End of the line.
Configuration file parser with flexible tokenization and search capabilities.
Bool_t PopValue(const std::string keyname, T &retvalue)
void TrimWhitespace(TString::EStripType head_tail=TString::kBoth)
void TrimComment(const char commentchar)
std::string GetNextToken(const std::string &separatorchars)
Get next token as a string.
Abstract base for concrete hardware channels implementing dual-operator pattern.
Linear-regression corrector applying per-burst slopes to data.
std::map< Short_t, std::vector< std::vector< Double_t > > > fSensitivity
std::string fAlphaFilePath
std::string fAlphaFileBase
void ParseConfigFile(QwParameterFile &file) override
std::vector< std::string > fIndependentName
void ProcessData() override
Int_t ConnectChannels(QwSubsystemArrayParity &asym, QwSubsystemArrayParity &diff) override
std::vector< EQwHandleType > fIndependentType
std::vector< const VQwHardwareChannel * > fIndependentVar
std::string fAlphaFileSuff
std::vector< std::string > fIndependentFull
Subsystem array container specialized for parity analysis with asymmetry calculations.
void CalcOneOutput(const VQwHardwareChannel *dv, VQwHardwareChannel *output, std::vector< const VQwHardwareChannel * > &ivs, std::vector< Double_t > &sens)
std::vector< std::string > fDependentFull
virtual void ParseConfigFile(QwParameterFile &file)
std::vector< const VQwHardwareChannel * > fDependentVar
VQwDataHandler(const TString &name)
std::string ParseSeparator
Short_t fBurstCounter
When a datahandler array is processed, handlers with lower priority will be processed before handlers...
std::vector< VQwHardwareChannel * > fOutputVar
std::pair< EQwHandleType, std::string > ParseHandledVariable(const std::string &variable)
std::vector< EQwHandleType > fDependentType
std::vector< std::string > fDependentName
virtual Int_t ConnectChannels(QwSubsystemArrayParity &, QwSubsystemArrayParity &asym, QwSubsystemArrayParity &diff)