49 if (*element != NULL){
79 if (preamble->FileHasVariablePair(
"=",
"mask", mask)) {
85 bool keep_header =
true;
86 std::string section_name;
87 std::unique_ptr<QwParameterFile> section =
nullptr;
88 std::pair<EQwHandleType,std::string> type_name;
90 if(section_name==
"PUBLISH")
continue;
96 section->ReadNextLine();
97 if (section->LineHasSectionHeader()) {
98 section->TrimSectionHeader();
99 section->TrimWhitespace();
101 std::string current_token;
102 std::string previous_token;
104 previous_token = current_token;
105 current_token = section->GetNextToken(
",");
106 if (current_token.size() == 0)
continue;
116 }
while (current_token.size() != 0);
120 while (section->ReadNextLine()) {
122 section->TrimComment();
123 section->TrimWhitespace();
124 if (section->LineIsEmpty())
continue;
126 std::string current_token = section->GetNextToken(
",");
130 for (
size_t dv = current_dv_start; dv <
fDependentName.size(); dv++) {
131 Double_t sensitivity = atof(section->GetNextToken(
",").c_str());
143 std::unique_ptr<QwParameterFile> section2;
144 std::vector<TString> publishinfo;
146 if (varvalue ==
"PUBLISH") {
148 while (section2->ReadNextLine()) {
149 section2->TrimComment();
150 section2->TrimWhitespace();
151 for (
int ii = 0; ii < 4; ii++) {
152 varvalue = section2->GetTypedNextToken<TString>();
153 if (varvalue.Length()) {
154 publishinfo.push_back(varvalue);
157 if (publishinfo.size() == 4)
200 QwWarning <<
"Independent variable for combiner has unknown type."
209 <<
"dependent variable " <<
fDependentName.at(dv) <<
" could not be found."
219 string calc =
"calc_";
237 QwWarning <<
"QwCombiner::ConnectChannels(QwSubsystemArrayParity& asym, QwSubsystemArrayParity& diff): Dependent variable, "
239 <<
", for asym/diff combiner does not have proper type, type=="
246 name.insert(0, calc);
258 throw std::runtime_error(
"Cannot create alias '" + name +
260 "': no independent variables found to determine channel type");
269 else if(dv_ptr!=NULL){
273 <<
"or is not a known channel type." <<
QwLog::endl;
278 if(new_chan != NULL){
314 QwWarning <<
"Independent variable for MPS combiner has unknown type."
321 <<
"dependent variable " <<
fDependentName.at(dv) <<
" could not be found."
331 string calc =
"calc_";
337 QwWarning <<
"QwCombiner::ConnectChannels(QwSubsystemArrayParity& event): Dependent variable, "
339 <<
", for MPS combiner does not have MPS type, type=="
363 <<
"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)
#define REGISTER_DATA_HANDLER_FACTORY(A)
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
Data handler that forms linear combinations of channels.
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