46 if (*element != NULL){
76 if (preamble->FileHasVariablePair(
"=",
"mask", mask)) {
82 bool keep_header =
true;
83 std::string section_name;
84 std::unique_ptr<QwParameterFile> section =
nullptr;
85 std::pair<EQwHandleType,std::string> type_name;
87 if(section_name==
"PUBLISH")
continue;
93 section->ReadNextLine();
94 if (section->LineHasSectionHeader()) {
95 section->TrimSectionHeader();
96 section->TrimWhitespace();
98 std::string current_token;
99 std::string previous_token;
101 previous_token = current_token;
102 current_token = section->GetNextToken(
",");
103 if (current_token.size() == 0)
continue;
113 }
while (current_token.size() != 0);
117 while (section->ReadNextLine()) {
119 section->TrimComment();
120 section->TrimWhitespace();
121 if (section->LineIsEmpty())
continue;
123 std::string current_token = section->GetNextToken(
",");
127 for (
size_t dv = current_dv_start; dv <
fDependentName.size(); dv++) {
128 Double_t sensitivity = atof(section->GetNextToken(
",").c_str());
140 std::unique_ptr<QwParameterFile> section2;
141 std::vector<TString> publishinfo;
143 if (varvalue ==
"PUBLISH") {
145 while (section2->ReadNextLine()) {
146 section2->TrimComment();
147 section2->TrimWhitespace();
148 for (
int ii = 0; ii < 4; ii++) {
149 varvalue = section2->GetTypedNextToken<TString>();
150 if (varvalue.Length()) {
151 publishinfo.push_back(varvalue);
154 if (publishinfo.size() == 4)
197 QwWarning <<
"Independent variable for combiner has unknown type."
206 <<
"dependent variable " <<
fDependentName.at(dv) <<
" could not be found."
216 string calc =
"calc_";
234 QwWarning <<
"QwCombiner::ConnectChannels(QwSubsystemArrayParity& asym, QwSubsystemArrayParity& diff): Dependent variable, "
236 <<
", for asym/diff combiner does not have proper type, type=="
243 name.insert(0, calc);
255 throw std::runtime_error(
"Cannot create alias '" + name +
257 "': no independent variables found to determine channel type");
266 else if(dv_ptr!=NULL){
270 <<
"or is not a known channel type." <<
QwLog::endl;
275 if(new_chan != NULL){
311 QwWarning <<
"Independent variable for MPS combiner has unknown type."
318 <<
"dependent variable " <<
fDependentName.at(dv) <<
" could not be found."
328 string calc =
"calc_";
334 QwWarning <<
"QwCombiner::ConnectChannels(QwSubsystemArrayParity& event): Dependent variable, "
336 <<
", for MPS combiner does not have MPS type, type=="
360 <<
"or is not a known channel type." <<
QwLog::endl;
Definition of the pure virtual base class of all subsystems.
A logfile class, based on an identical class in the Hermes analyzer.
#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.
Decoding and management for Moller ADC channels (6x32-bit datawords)
Definition of the pure virtual base class of all data elements.
Prompt summary data management.
Decoding and management for VQWK ADC channels (6x32-bit datawords)
Data combiner handler for channel operations.
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.
static UInt_t GetUInt(const TString &varvalue)
std::unique_ptr< QwParameterFile > ReadSectionPreamble()
Rewinds to the start and read until it finds next section header.
std::unique_ptr< QwParameterFile > ReadNextSection(std::string &secname, const bool keep_header=false)
void SetSubsystemName(TString sysname)
Set the name of the inheriting subsystem name.
virtual const TString & GetElementName() const
Get the name of this element.
void SetElementName(const TString &name)
Set the name of this element.
Abstract base for concrete hardware channels implementing dual-operator pattern.
virtual VQwHardwareChannel * Clone() const
std::vector< std::vector< std::string > > fIndependentName
QwCombiner(const TString &name)
Constructor with name.
std::vector< std::vector< Double_t > > fSensitivity
const UInt_t * fErrorFlagPointer
void ProcessData() override
Int_t ConnectChannels(QwSubsystemArrayParity &event) override
Connect to Channels (event only)
std::vector< std::vector< const VQwHardwareChannel * > > fIndependentVar
std::vector< VQwHardwareChannel * >::iterator Iterator_HdwChan
~QwCombiner() override
Virtual destructor.
QwCombiner()
Default constructor (Protected for child class access)
UInt_t fErrorFlagMask
Error flag mask.
std::vector< std::vector< EQwHandleType > > fIndependentType
List of channels to use in the combiner.
Subsystem array container specialized for parity analysis with asymmetry calculations.
const UInt_t * GetEventcutErrorFlagPointer() const
void CalcOneOutput(const VQwHardwareChannel *dv, VQwHardwareChannel *output, std::vector< const VQwHardwareChannel * > &ivs, std::vector< Double_t > &sens)
std::vector< std::string > fDependentFull
std::vector< std::vector< TString > > fPublishList
std::vector< const VQwHardwareChannel * > fDependentVar
VQwDataHandler(const TString &name)
std::string ParseSeparator
std::vector< VQwHardwareChannel * > fOutputVar
std::pair< EQwHandleType, std::string > ParseHandledVariable(const std::string &variable)
std::vector< EQwHandleType > fDependentType
std::vector< std::string > fDependentName