QwAnalysis
|
#include <QwParameterFile.h>
Public Member Functions | |
QwParameterFile (const std::string &filename) | |
QwParameterFile (const std::stringstream &stream) | |
virtual | ~QwParameterFile () |
std::streambuf * | rdbuf () const |
Access the streambuf pointer in the same way as on a std::ifstream. More... | |
void | SetCommentChars (const std::string value) |
Set various sets of special characters. More... | |
void | SetWhitespaceChars (const std::string value) |
void | SetTokenSepChars (const std::string value) |
void | SetSectionChars (const std::string value) |
void | SetModuleChars (const std::string value) |
Bool_t | ReadNextLine () |
Bool_t | ReadNextLine (std::string &varvalue) |
Bool_t | ReadNextLine_Greedy (std::string &varvalue) |
Bool_t | ReadNextLine_Single (std::string &varvalue) |
void | TrimWhitespace (TString::EStripType head_tail=TString::kBoth) |
void | TrimComment (const char commentchar) |
void | TrimComment (const std::string &commentchars) |
void | TrimComment () |
void | TrimSectionHeader () |
void | TrimModuleHeader () |
TString | LastString (TString in, char *delim) |
TString | GetParameterFileContents () |
Bool_t | LineIsEmpty () |
Bool_t | IsEOF () |
std::string | GetNextToken (const std::string &separatorchars) |
Get next token as a string. More... | |
std::string | GetNextToken () |
template<typename T > | |
T | GetTypedNextToken () |
Get next token into specific type. More... | |
std::string | GetLine () |
void | AddLine (const std::string &line) |
void | RewindToFileStart () |
void | RewindToLineStart () |
Bool_t | HasValue (TString &vname) |
Bool_t | HasVariablePair (const std::string &separatorchars, std::string &varname, std::string &varvalue) |
Bool_t | HasVariablePair (const std::string &separatorchars, TString &varname, TString &varvalue) |
Bool_t | FileHasVariablePair (const std::string &separatorchars, const std::string &varname, std::string &varvalue) |
Bool_t | FileHasVariablePair (const std::string &separatorchars, const TString &varname, TString &varvalue) |
Bool_t | LineHasSectionHeader () |
Bool_t | LineHasSectionHeader (std::string &secname) |
Bool_t | LineHasSectionHeader (TString &secname) |
Bool_t | LineHasModuleHeader () |
Bool_t | LineHasModuleHeader (std::string &secname) |
Bool_t | LineHasModuleHeader (TString &secname) |
Bool_t | FileHasSectionHeader (const std::string &secname) |
Bool_t | FileHasSectionHeader (const TString &secname) |
Bool_t | FileHasModuleHeader (const std::string &secname) |
Bool_t | FileHasModuleHeader (const TString &secname) |
Bool_t | SkipSection (std::string secname) |
Skips from the beginning of the section 'secname' until the first section that does not have that name. More... | |
QwParameterFile * | ReadSectionPreamble () |
Rewinds to the start and read until it finds next section header. More... | |
QwParameterFile * | ReadUntilNextSection (const bool add_current_line=false) |
QwParameterFile * | ReadNextSection (std::string &secname, const bool keep_header=false) |
QwParameterFile * | ReadNextSection (TString &secname, const bool keep_header=false) |
QwParameterFile * | ReadNextSection (const bool keep_header=false) |
QwParameterFile * | ReadModulePreamble () |
Rewinds to the start and read until it finds next module header. More... | |
QwParameterFile * | ReadUntilNextModule (const bool add_current_line=false) |
QwParameterFile * | ReadNextModule (std::string &secname, bool keep_header=false) |
QwParameterFile * | ReadNextModule (TString &secname, bool keep_header=false) |
QwParameterFile * | ReadNextModule (const bool keep_header=false) |
const TString | GetParamFilename () |
const TString | GetParamFilenameAndPath () |
const std::pair< TString, TString > | GetParamFileNameContents () |
void | SetParamFilename () |
void | EnableGreediness () |
void | DisableGreediness () |
void | AddBreakpointKeyword (std::string keyname) |
void | Close () |
Bool_t | HasNewPairs () |
template<typename T > | |
Bool_t | ReturnValue (const std::string keyname, T &retvalue) |
template<typename T > | |
Bool_t | PopValue (const std::string keyname, T &retvalue) |
template<typename T > | |
T | ConvertValue (const std::string &value) |
Convert string value into specific type. More... | |
template<> | |
UInt_t | ConvertValue (const std::string &value) |
template<> | |
TString | ConvertValue (const std::string &value) |
Static Public Member Functions | |
static UInt_t | GetUInt (const TString &varvalue) |
static void | AppendToSearchPath (const TString &searchdir) |
Add a directory to the search path. More... | |
static void | SetCurrentRunNumber (const UInt_t runnumber) |
Set the current run number for looking up the appropriate parameter file. More... | |
static std::pair< int, int > | ParseIntRange (const std::string &separatorchars, const std::string &range) |
Parse a range of integers as #:# where either can be missing. More... | |
Protected Member Functions | |
void | Trim (const std::string &chars, std::string &token, TString::EStripType head_tail=TString::kBoth) |
void | TrimWhitespace (std::string &token, TString::EStripType head_tail) |
Bool_t | GetKeyValue (const std::string keyname, std::string &retvalue, Bool_t should_erase=kFALSE) |
Current position in the line. More... | |
Protected Attributes | |
std::string | fCommentChars |
std::string | fWhitespaceChars |
std::string | fTokenSepChars |
std::string | fSectionChars |
std::string | fModuleChars |
const std::string | fFilename |
std::ifstream | fFile |
std::stringstream | fStream |
std::string | fLine |
size_t | fCurrentPos |
Internal line storage. More... | |
Bool_t | fBeGreedy |
std::set< std::string > | fBreakpointWords |
std::map< std::string, std::string > | fKeyValuePair |
Bool_t | fHasNewPairs |
Static Protected Attributes | |
static std::vector< bfs::path > | fSearchPaths |
static UInt_t | fCurrentRunNumber = 0 |
static const std::string | kDefaultCommentChars = "#!;" |
static const std::string | kDefaultWhitespaceChars = " \t\r" |
static const std::string | kDefaultTokenSepChars = ", \t" |
static const std::string | kDefaultSectionChars = "[]" |
static const std::string | kDefaultModuleChars = "<>" |
Private Member Functions | |
int | FindFile (const bfs::path &dir_path, const std::string &file_stem, const std::string &file_ext, bfs::path &path_found) |
Find the first file in a directory that conforms to the run label. More... | |
bool | OpenFile (const bfs::path &path_found) |
Open a file. More... | |
QwParameterFile () | |
QwParameterFile (const QwParameterFile &input) | |
void | SetEOF () |
Private Attributes | |
TString | fBestParamFileName |
TString | fBestParamFileNameAndPath |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const QwParameterFile &file) |
Definition at line 43 of file QwParameterFile.h.
QwParameterFile::QwParameterFile | ( | const std::string & | name | ) |
Constructor
name | Name of the file to be opened |
If file starts with an explicit slash ('/'), it is assumed to be a full path.
Definition at line 111 of file QwParameterFile.cc.
References QwLog::endl(), FindFile(), fSearchPaths, Qw::kGreen, Qw::kNormal, OpenFile(), QwError, QwMessage, QwWarning, and SetEOF().
QwParameterFile::QwParameterFile | ( | const std::stringstream & | stream | ) |
Constructor
stream | String stream for reading |
Definition at line 92 of file QwParameterFile.cc.
References fStream.
|
inlinevirtual |
Definition at line 53 of file QwParameterFile.h.
|
inlineprivate |
Definition at line 332 of file QwParameterFile.h.
Referenced by ReadUntilNextModule(), and ReadUntilNextSection().
|
inlineprivate |
Definition at line 345 of file QwParameterFile.h.
void QwParameterFile::AddBreakpointKeyword | ( | std::string | keyname | ) |
Definition at line 876 of file QwParameterFile.cc.
References fBreakpointWords.
|
inline |
Definition at line 136 of file QwParameterFile.h.
References fStream.
Referenced by ReadUntilNextModule(), and ReadUntilNextSection().
|
static |
Add a directory to the search path.
Append a directory to the list of search paths
searchdir | Directory to be added |
Definition at line 35 of file QwParameterFile.cc.
References fSearchPaths.
Referenced by main().
|
inline |
|
inline |
Convert string value into specific type.
Definition at line 241 of file QwParameterFile.h.
References Qw::T.
Referenced by QwDetectorInfo::LoadCrosstalkDefinition(), and QwDetectorInfo::LoadGeometryDefinition().
|
inline |
Definition at line 369 of file QwParameterFile.h.
|
inline |
Definition at line 379 of file QwParameterFile.h.
|
inline |
|
inline |
Bool_t QwParameterFile::FileHasModuleHeader | ( | const std::string & | secname | ) |
Definition at line 629 of file QwParameterFile.cc.
References LineHasModuleHeader(), ReadNextLine(), and RewindToFileStart().
Referenced by QwRegressionSubsystem::ConstructBranch(), QwMainCerenkovDetector::ConstructBranch(), QwBeamLine::ConstructBranch(), QwIntegratedRaster::ConstructBranch(), and QwLumi::ConstructBranch().
Bool_t QwParameterFile::FileHasModuleHeader | ( | const TString & | secname | ) |
Definition at line 617 of file QwParameterFile.cc.
References LineHasModuleHeader(), ReadNextLine(), and RewindToFileStart().
Bool_t QwParameterFile::FileHasSectionHeader | ( | const std::string & | secname | ) |
Definition at line 605 of file QwParameterFile.cc.
References LineHasSectionHeader(), ReadNextLine(), and RewindToFileStart().
Referenced by QwSubsystemArray::ConstructBranch().
Bool_t QwParameterFile::FileHasSectionHeader | ( | const TString & | secname | ) |
Definition at line 593 of file QwParameterFile.cc.
References LineHasSectionHeader(), ReadNextLine(), and RewindToFileStart().
Bool_t QwParameterFile::FileHasVariablePair | ( | const std::string & | separatorchars, |
const std::string & | varname, | ||
std::string & | varvalue | ||
) |
Definition at line 516 of file QwParameterFile.cc.
References HasVariablePair(), ReadNextLine(), and RewindToFileStart().
Referenced by FileHasVariablePair(), QwDetectorInfo::LoadGeometryDefinition(), and QwSubsystemArray::LoadSubsystemsFromParameterFile().
Bool_t QwParameterFile::FileHasVariablePair | ( | const std::string & | separatorchars, |
const TString & | varname, | ||
TString & | varvalue | ||
) |
Definition at line 505 of file QwParameterFile.cc.
References FileHasVariablePair().
|
private |
Find the first file in a directory that conforms to the run label.
Find the file in a directory with highest-scoring run label
directory | Directory to search in |
file_stem | File name stem to search for |
file_ext | File name extensions to search for |
best_path | (returns) Path to the highest-scoring file |
Definition at line 267 of file QwParameterFile.cc.
References QwLog::endl(), fCurrentRunNumber, ParseIntRange(), QwError, and QwWarning.
Referenced by QwParameterFile().
|
inlineprotected |
Current position in the line.
Definition at line 308 of file QwParameterFile.h.
References fKeyValuePair.
Referenced by PopValue(), and ReturnValue().
|
inline |
Definition at line 135 of file QwParameterFile.h.
References fLine.
Referenced by QwEventBuffer::GetNextRunRange(), HasValue(), QwHistogramHelper::LoadTreeParamsFromFile(), QwEventBuffer::ProcessOptions(), ReadUntilNextModule(), and ReadUntilNextSection().
std::string QwParameterFile::GetNextToken | ( | const std::string & | separatorchars | ) |
Get next token as a string.
Definition at line 762 of file QwParameterFile.cc.
References fCurrentPos, fLine, and TrimWhitespace().
Referenced by QwRegression::LoadChannelMap(), and QwMainCerenkovDetector::LoadChannelMap().
|
inline |
Definition at line 127 of file QwParameterFile.h.
References fTokenSepChars, and GetNextToken().
Referenced by GetNextToken(), and GetTypedNextToken().
TString QwParameterFile::GetParameterFileContents | ( | ) |
Definition at line 861 of file QwParameterFile.cc.
References fBestParamFileNameAndPath, and Qw::ms.
Referenced by GetParamFileNameContents().
|
inline |
Definition at line 191 of file QwParameterFile.h.
References fBestParamFileName.
Referenced by GetParamFileNameContents().
|
inline |
Definition at line 192 of file QwParameterFile.h.
References fBestParamFileNameAndPath.
|
inline |
Definition at line 194 of file QwParameterFile.h.
References GetParameterFileContents(), and GetParamFilename().
Referenced by VQwSubsystemTracking::LoadCrosstalkDefinition(), and VQwSubsystemTracking::LoadGeometryDefinition().
|
inline |
Get next token into specific type.
Definition at line 131 of file QwParameterFile.h.
References GetNextToken().
Referenced by QwBeamLine::AssignGeometry(), QwHistogramHelper::GetHistParamsFromLine(), QwBeamLine::LoadChannelMap(), and QwBeamDetectorID::QwBeamDetectorID().
|
static |
Convert a string number value to an unsigned integer
varvalue | String with decimal or hexadecimal number |
Definition at line 54 of file QwParameterFile.cc.
Referenced by QwDriftChamberHDC::LoadChannelMap(), QwDriftChamberVDC::LoadChannelMap(), QwSciFiDetector::LoadChannelMap(), QwScaler::LoadChannelMap(), QwTriggerScintillator::LoadChannelMap(), QwRaster::LoadChannelMap(), QwMainDetector::LoadChannelMap(), QwHelicity::LoadChannelMap(), QwComptonPhotonDetector::LoadChannelMap(), QwMainCerenkovDetector::LoadChannelMap(), QwIntegratedRaster::LoadChannelMap(), QwMollerDetector::LoadChannelMap(), QwLumi::LoadChannelMap(), QwComptonElectronDetector::LoadChannelMap(), QwScanner::LoadChannelMap(), VQwSubsystem::LoadDetectorMaps(), QwBeamLine::LoadEventCuts(), QwMainCerenkovDetector::LoadEventCuts(), QwIntegratedRaster::LoadEventCuts(), QwBeamMod::LoadEventCuts(), QwLumi::LoadEventCuts(), and QwHelicity::ProcessOptions().
|
inline |
Bool_t QwParameterFile::HasValue | ( | TString & | vname | ) |
Definition at line 447 of file QwParameterFile.cc.
References QwLog::endl(), GetLine(), QwMessage, ReadNextLine(), RewindToFileStart(), and TrimWhitespace().
Referenced by QwEnergyCalculator::ConstructBranch(), QwHaloMonitor::ConstructBranch(), QwIntegratedRasterChannel< T >::ConstructBranch(), QwClock< T >::ConstructBranch(), QwCombinedPMT::ConstructBranch(), QwQPD::ConstructBranch(), QwBPMCavity::ConstructBranch(), QwLinearDiodeArray::ConstructBranch(), QwCombinedBPM< T >::ConstructBranch(), QwBPMStripline< T >::ConstructBranch(), VQwHardwareChannel::ConstructBranch(), QwIntegrationPMT::ConstructBranch(), and QwBCM< T >::ConstructBranch().
Bool_t QwParameterFile::HasVariablePair | ( | const std::string & | separatorchars, |
std::string & | varname, | ||
std::string & | varvalue | ||
) |
Definition at line 485 of file QwParameterFile.cc.
References fLine, and TrimWhitespace().
Referenced by QwEPICSEvent::ExtractEPICSValues(), FileHasVariablePair(), HasVariablePair(), QwDetectorInfo::LoadCrosstalkDefinition(), VQwSubsystem::LoadDetectorMaps(), ReadNextLine_Greedy(), and ReadNextLine_Single().
Bool_t QwParameterFile::HasVariablePair | ( | const std::string & | separatorchars, |
TString & | varname, | ||
TString & | varvalue | ||
) |
Definition at line 471 of file QwParameterFile.cc.
References HasVariablePair().
|
inline |
Definition at line 123 of file QwParameterFile.h.
References fStream.
Referenced by QwEventBuffer::GetNextEventRange(), QwEventBuffer::GetNextRunRange(), ReadNextModule(), and ReadNextSection().
TString QwParameterFile::LastString | ( | TString | in, |
char * | delim | ||
) |
Definition at line 853 of file QwParameterFile.cc.
Referenced by SetParamFilename().
Bool_t QwParameterFile::LineHasModuleHeader | ( | ) |
Definition at line 562 of file QwParameterFile.cc.
Referenced by FileHasModuleHeader(), LineHasModuleHeader(), ReadNextModule(), and ReadUntilNextModule().
Bool_t QwParameterFile::LineHasModuleHeader | ( | std::string & | secname | ) |
Definition at line 576 of file QwParameterFile.cc.
References fLine, fModuleChars, TrimComment(), and TrimWhitespace().
Bool_t QwParameterFile::LineHasModuleHeader | ( | TString & | secname | ) |
Definition at line 568 of file QwParameterFile.cc.
References LineHasModuleHeader().
Bool_t QwParameterFile::LineHasSectionHeader | ( | ) |
Definition at line 532 of file QwParameterFile.cc.
Referenced by FileHasSectionHeader(), LineHasSectionHeader(), QwRegression::LoadChannelMap(), ReadNextSection(), ReadUntilNextSection(), and SkipSection().
Bool_t QwParameterFile::LineHasSectionHeader | ( | std::string & | secname | ) |
Definition at line 546 of file QwParameterFile.cc.
References fLine, TrimComment(), and TrimWhitespace().
Bool_t QwParameterFile::LineHasSectionHeader | ( | TString & | secname | ) |
Definition at line 538 of file QwParameterFile.cc.
References LineHasSectionHeader().
|
inline |
Definition at line 122 of file QwParameterFile.h.
References fLine.
Referenced by QwEventBuffer::GetNextEventRange(), QwRegression::LoadChannelMap(), QwHistogramHelper::LoadHistParamsFromFile(), QwHistogramHelper::LoadTreeParamsFromFile(), and ReadNextLine_Greedy().
|
private |
Open a file.
Open a file at the specified location
file | Path to file to be opened |
Definition at line 205 of file QwParameterFile.cc.
References QwLog::endl(), fBestParamFileNameAndPath, fFile, fStream, QwError, and SetParamFilename().
Referenced by QwParameterFile().
|
static |
Parse a range of integers as #:# where either can be missing.
Separate a separated range of integers into a pair of values.
separatorchars | String with possible separator characters to consider. |
range | String containing two integers separated by a separator character, or a single value. If the string begins with the separator character, the first value is taken as zero. If the string ends with the separator character, the second value is taken as kMaxInt. |
Definition at line 802 of file QwParameterFile.cc.
References QwLog::endl(), QwError, and QwVerbose.
Referenced by FindFile(), QwOptions::GetIntValuePair(), QwEventBuffer::GetNextEventRange(), and QwEventBuffer::GetNextRunRange().
|
inline |
Definition at line 223 of file QwParameterFile.h.
References GetKeyValue().
|
inline |
Access the streambuf pointer in the same way as on a std::ifstream.
Definition at line 56 of file QwParameterFile.h.
References fStream.
Referenced by QwOptions::ParseConfigFile().
QwParameterFile * QwParameterFile::ReadModulePreamble | ( | ) |
Rewinds to the start and read until it finds next module header.
Read the lines until the first header
Definition at line 736 of file QwParameterFile.cc.
References ReadUntilNextModule(), and RewindToFileStart().
|
inline |
Definition at line 71 of file QwParameterFile.h.
References fCurrentPos.
Referenced by QwEPICSEvent::ExtractEPICSValues(), FileHasModuleHeader(), FileHasSectionHeader(), FileHasVariablePair(), QwEventBuffer::GetNextEventRange(), HasValue(), QwRegression::LoadChannelMap(), QwBeamLine::LoadChannelMap(), QwMainCerenkovDetector::LoadChannelMap(), QwDetectorInfo::LoadCrosstalkDefinition(), VQwSubsystem::LoadDetectorMaps(), QwHistogramHelper::LoadHistParamsFromFile(), QwHistogramHelper::LoadTreeParamsFromFile(), ReadNextLine_Single(), ReadNextModule(), ReadNextSection(), ReadUntilNextModule(), ReadUntilNextSection(), and SkipSection().
|
inline |
Definition at line 76 of file QwParameterFile.h.
References fBeGreedy, ReadNextLine_Greedy(), and ReadNextLine_Single().
Bool_t QwParameterFile::ReadNextLine_Greedy | ( | std::string & | varvalue | ) |
Definition at line 882 of file QwParameterFile.cc.
References fBreakpointWords, fHasNewPairs, fKeyValuePair, HasVariablePair(), LineIsEmpty(), ReadNextLine_Single(), RewindToLineStart(), TrimComment(), and TrimWhitespace().
Referenced by ReadNextLine().
|
inline |
Definition at line 83 of file QwParameterFile.h.
References fCurrentPos, fLine, fStream, HasVariablePair(), and ReadNextLine().
Referenced by ReadNextLine(), and ReadNextLine_Greedy().
QwParameterFile * QwParameterFile::ReadNextModule | ( | std::string & | secname, |
bool | keep_header = false |
||
) |
Read the lines of the next module
secname | Name of the next module (returns) |
keep_header | Flag to keep header of module |
Definition at line 748 of file QwParameterFile.cc.
References IsEOF(), LineHasModuleHeader(), ReadNextLine(), and ReadUntilNextModule().
Referenced by VQwSubsystemTracking::LoadGeometryDefinition(), QwHistogramHelper::LoadTreeParamsFromFile(), and ReadNextModule().
QwParameterFile * QwParameterFile::ReadNextModule | ( | TString & | secname, |
bool | keep_header = false |
||
) |
Definition at line 755 of file QwParameterFile.cc.
References IsEOF(), LineHasModuleHeader(), ReadNextLine(), and ReadUntilNextModule().
|
inline |
Definition at line 183 of file QwParameterFile.h.
References ReadNextModule().
QwParameterFile * QwParameterFile::ReadNextSection | ( | std::string & | secname, |
const bool | keep_header = false |
||
) |
Read the lines of the next section
secname | Name of the next section (returns) |
keep_header | Keep the header inside the section |
Definition at line 717 of file QwParameterFile.cc.
References IsEOF(), LineHasSectionHeader(), ReadNextLine(), and ReadUntilNextSection().
Referenced by QwEventBuffer::GetNextRunRange(), QwRegression::LoadChannelMap(), QwBeamLine::LoadChannelMap(), QwMainCerenkovDetector::LoadChannelMap(), QwBeamMod::LoadChannelMap(), VQwSubsystemTracking::LoadCrosstalkDefinition(), VQwSubsystemTracking::LoadGeometryDefinition(), QwSubsystemArray::LoadSubsystemsFromParameterFile(), QwHistogramHelper::LoadTreeParamsFromFile(), and ReadNextSection().
QwParameterFile * QwParameterFile::ReadNextSection | ( | TString & | secname, |
const bool | keep_header = false |
||
) |
Definition at line 724 of file QwParameterFile.cc.
References IsEOF(), LineHasSectionHeader(), ReadNextLine(), and ReadUntilNextSection().
|
inline |
Definition at line 173 of file QwParameterFile.h.
References ReadNextSection().
QwParameterFile * QwParameterFile::ReadSectionPreamble | ( | ) |
Rewinds to the start and read until it finds next section header.
Read the lines until the first header
Definition at line 705 of file QwParameterFile.cc.
References ReadUntilNextSection(), and RewindToFileStart().
Referenced by QwSubsystemArray::ConstructBranch(), VQwSubsystemTracking::LoadCrosstalkDefinition(), VQwSubsystemTracking::LoadGeometryDefinition(), and QwSubsystemArray::LoadSubsystemsFromParameterFile().
QwParameterFile * QwParameterFile::ReadUntilNextModule | ( | const bool | add_current_line = false | ) |
Read from current position until next module header
Definition at line 660 of file QwParameterFile.cc.
References AddLine(), GetLine(), LineHasModuleHeader(), QwParameterFile(), and ReadNextLine().
Referenced by QwRegressionSubsystem::ConstructBranch(), QwMainCerenkovDetector::ConstructBranch(), QwBeamLine::ConstructBranch(), QwIntegratedRaster::ConstructBranch(), QwLumi::ConstructBranch(), ReadModulePreamble(), and ReadNextModule().
QwParameterFile * QwParameterFile::ReadUntilNextSection | ( | const bool | add_current_line = false | ) |
Read from current position until next section header
Definition at line 645 of file QwParameterFile.cc.
References AddLine(), GetLine(), LineHasSectionHeader(), QwParameterFile(), and ReadNextLine().
Referenced by QwSubsystemArray::ConstructBranch(), ReadNextSection(), and ReadSectionPreamble().
|
inline |
Definition at line 214 of file QwParameterFile.h.
References GetKeyValue().
Referenced by VQwScaler_Channel::LoadChannelParameters(), and QwVQWK_Channel::LoadChannelParameters().
|
inline |
Definition at line 138 of file QwParameterFile.h.
References fStream.
Referenced by QwRegressionSubsystem::ConstructBranch(), QwMainCerenkovDetector::ConstructBranch(), QwBeamLine::ConstructBranch(), QwIntegratedRaster::ConstructBranch(), QwLumi::ConstructBranch(), FileHasModuleHeader(), FileHasSectionHeader(), FileHasVariablePair(), HasValue(), QwDetectorInfo::LoadCrosstalkDefinition(), VQwSubsystem::LoadDetectorMaps(), VQwSubsystemTracking::LoadGeometryDefinition(), ReadModulePreamble(), and ReadSectionPreamble().
|
inline |
Definition at line 139 of file QwParameterFile.h.
References fCurrentPos.
Referenced by ReadNextLine_Greedy().
|
inline |
Set various sets of special characters.
Definition at line 65 of file QwParameterFile.h.
References fCommentChars.
|
inlinestatic |
Set the current run number for looking up the appropriate parameter file.
Definition at line 62 of file QwParameterFile.h.
References fCurrentRunNumber.
Referenced by main().
|
inlineprivate |
Definition at line 358 of file QwParameterFile.h.
References fStream.
Referenced by QwParameterFile().
|
inline |
void QwParameterFile::SetParamFilename | ( | ) |
Definition at line 845 of file QwParameterFile.cc.
References fBestParamFileName, fBestParamFileNameAndPath, and LastString().
Referenced by OpenFile().
|
inline |
|
inline |
|
inline |
Bool_t QwParameterFile::SkipSection | ( | std::string | secname | ) |
Skips from the beginning of the section 'secname' until the first section that does not have that name.
Definition at line 671 of file QwParameterFile.cc.
References QwLog::endl(), LineHasSectionHeader(), QwDebug, and ReadNextLine().
|
protected |
Definition at line 388 of file QwParameterFile.cc.
Referenced by TrimModuleHeader(), TrimSectionHeader(), and TrimWhitespace().
void QwParameterFile::TrimComment | ( | const char | commentchar | ) |
Definition at line 418 of file QwParameterFile.cc.
References TrimComment().
Referenced by QwHistogramHelper::GetHistParamsFromFile(), QwEventBuffer::GetNextEventRange(), QwMagneticField::LoadBeamProperty(), QwEvent::LoadBeamProperty(), QwEPICSEvent::LoadChannelMap(), QwRegression::LoadChannelMap(), QwBeamLine::LoadChannelMap(), QwMainCerenkovDetector::LoadChannelMap(), QwComptonElectronDetector::LoadChannelMap(), VQwSubsystemTracking::LoadCrosstalkDefinition(), VQwSubsystem::LoadDetectorMaps(), VQwSubsystemTracking::LoadGeometryDefinition(), QwHistogramHelper::LoadHistParamsFromFile(), QwBeamMod::LoadInputParameters(), QwComptonElectronDetector::LoadInputParameters(), and QwHistogramHelper::LoadTreeParamsFromFile().
void QwParameterFile::TrimComment | ( | const std::string & | commentchars | ) |
|
inline |
Definition at line 115 of file QwParameterFile.h.
References fCommentChars, and TrimComment().
Referenced by LineHasModuleHeader(), LineHasSectionHeader(), ReadNextLine_Greedy(), and TrimComment().
void QwParameterFile::TrimModuleHeader | ( | ) |
Definition at line 440 of file QwParameterFile.cc.
References fLine, fModuleChars, and Trim().
void QwParameterFile::TrimSectionHeader | ( | ) |
Definition at line 434 of file QwParameterFile.cc.
References fLine, fSectionChars, and Trim().
Referenced by QwRegression::LoadChannelMap().
void QwParameterFile::TrimWhitespace | ( | TString::EStripType | head_tail = TString::kBoth | ) |
Definition at line 380 of file QwParameterFile.cc.
References fLine.
Referenced by QwEPICSEvent::ExtractEPICSValues(), QwEventBuffer::GetNextEventRange(), GetNextToken(), HasValue(), HasVariablePair(), LineHasModuleHeader(), LineHasSectionHeader(), QwRegression::LoadChannelMap(), QwBeamLine::LoadChannelMap(), QwMainCerenkovDetector::LoadChannelMap(), QwDetectorInfo::LoadCrosstalkDefinition(), VQwSubsystemTracking::LoadCrosstalkDefinition(), VQwSubsystem::LoadDetectorMaps(), QwDetectorInfo::LoadGeometryDefinition(), VQwSubsystemTracking::LoadGeometryDefinition(), QwHistogramHelper::LoadHistParamsFromFile(), QwHistogramHelper::LoadTreeParamsFromFile(), and ReadNextLine_Greedy().
|
protected |
Definition at line 411 of file QwParameterFile.cc.
References fWhitespaceChars, and Trim().
|
friend |
Definition at line 780 of file QwParameterFile.cc.
|
protected |
Definition at line 324 of file QwParameterFile.h.
Referenced by DisableGreediness(), EnableGreediness(), and ReadNextLine().
|
private |
Definition at line 265 of file QwParameterFile.h.
Referenced by GetParamFilename(), and SetParamFilename().
|
private |
Definition at line 266 of file QwParameterFile.h.
Referenced by GetParameterFileContents(), GetParamFilenameAndPath(), OpenFile(), and SetParamFilename().
|
protected |
Definition at line 325 of file QwParameterFile.h.
Referenced by AddBreakpointKeyword(), and ReadNextLine_Greedy().
|
protected |
Definition at line 290 of file QwParameterFile.h.
Referenced by SetCommentChars(), and TrimComment().
|
protected |
Internal line storage.
Definition at line 304 of file QwParameterFile.h.
Referenced by GetNextToken(), ReadNextLine(), ReadNextLine_Single(), and RewindToLineStart().
|
staticprotected |
Definition at line 280 of file QwParameterFile.h.
Referenced by FindFile(), and SetCurrentRunNumber().
|
protected |
Definition at line 299 of file QwParameterFile.h.
Referenced by Close(), and OpenFile().
|
protected |
Definition at line 298 of file QwParameterFile.h.
|
protected |
Definition at line 327 of file QwParameterFile.h.
Referenced by HasNewPairs(), and ReadNextLine_Greedy().
|
protected |
Definition at line 326 of file QwParameterFile.h.
Referenced by GetKeyValue(), and ReadNextLine_Greedy().
|
protected |
Definition at line 303 of file QwParameterFile.h.
Referenced by GetLine(), GetNextToken(), HasVariablePair(), LineHasModuleHeader(), LineHasSectionHeader(), LineIsEmpty(), ReadNextLine_Single(), TrimComment(), TrimModuleHeader(), TrimSectionHeader(), and TrimWhitespace().
|
protected |
Definition at line 294 of file QwParameterFile.h.
Referenced by LineHasModuleHeader(), SetModuleChars(), and TrimModuleHeader().
|
staticprotected |
Definition at line 277 of file QwParameterFile.h.
Referenced by AppendToSearchPath(), and QwParameterFile().
|
protected |
Definition at line 293 of file QwParameterFile.h.
Referenced by SetSectionChars(), and TrimSectionHeader().
|
protected |
Definition at line 300 of file QwParameterFile.h.
Referenced by AddLine(), IsEOF(), OpenFile(), operator<<(), QwParameterFile(), rdbuf(), ReadNextLine_Single(), RewindToFileStart(), and SetEOF().
|
protected |
Definition at line 292 of file QwParameterFile.h.
Referenced by GetNextToken(), and SetTokenSepChars().
|
protected |
Definition at line 291 of file QwParameterFile.h.
Referenced by SetWhitespaceChars(), and TrimWhitespace().
|
staticprotected |
Definition at line 283 of file QwParameterFile.h.
|
staticprotected |
Definition at line 287 of file QwParameterFile.h.
|
staticprotected |
Definition at line 286 of file QwParameterFile.h.
|
staticprotected |
Definition at line 285 of file QwParameterFile.h.
|
staticprotected |
Definition at line 284 of file QwParameterFile.h.