5#include "KVRunListLine.h"
29 calling_field_keys =
false;
30 calling_run_keys =
false;
76 dummy.
Remove(TString::kBoth,
'\t');
78 dummy.
Remove(TString::kBoth,
' ');
80#if ROOT_VERSION_CODE >= ROOT_VERSION(3,5,0)
132 while ((field = (
TObjString*) next_field())) {
144 Error(
Form(
"%s::SetFields",
IsA()->GetName()),
"No indices set");
248 cout <<
IsA()->
GetName() <<
" object" << endl;
249 cout <<
"Current line : " << endl <<
fLine << endl;
255 cout <<
"Field name : current value" << endl;
256 cout <<
"==========================" << endl;
301 const Char_t*
string)
const
333 if (sscanf(
GetField(field_name), fmt, &trigger) != 1) {
335 "trigger field - %s - unreadable",
GetField(field_name));
TClass * IsA() const override
char * Form(const char *fmt,...)
KVNamedParameter * GetParameter(Int_t idx) const
return the parameter object with index idx
void SetValue(const Char_t *name, value_type value)
virtual void Clear(Option_t *opt="")
Int_t GetNpar() const
return the number of stored parameters
Base class for reading runlists for experiments ,.
Int_t BreakLineIntoFields(const char)
TString fLine
line to analyse
Bool_t FieldContains(const Char_t *, const Char_t *) const
Returns true if "field" exists, has been filled, and contains "string" as part or all of its value.
Bool_t HasFieldValue(const Char_t *) const
TObjArray * fFields
array of all fields after break down of fLine
KVList fFieldKeys
key words used to recognise field headings
Float_t GetFloatField(const Char_t *)
Int_t GetFieldIndex(const Char_t *) const
virtual Bool_t IsFieldHeader()
Returns kTRUE if and only if current line contains ALL of the keywords defined by SetFieldKeys()
virtual void Print() const
Bool_t IsFloat(const Char_t *name)
virtual Bool_t GoodRunLine()
Returns kTRUE if and only if current line contains integer values for ALL the fields defined by SetRu...
TObjString * GetFieldString(const Char_t *) const
Bool_t fFieldsSet
flag set once fields have been set
virtual Int_t GetTrigger(const Char_t *field_name="Trigger", const Char_t *fmt="M>=%d")
KVList fRunKeys
fields that must be present (have a value) for a line to be considered a "good run line"
void PrintFieldValue(const Char_t *name) const
Int_t fMaxNFields
maximum allowed number of fields i.e. size of TObjArray fFields
Int_t GetIntField(const Char_t *)
virtual const Char_t * GetField(const Char_t *) const
KVNameValueList fIndexList
list of integer indexes corresponding to field names
virtual void Clear(Option_t *option="")
virtual Int_t GetSize() const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
const char * GetName() const override
virtual void Expand(Int_t newSize)
void Delete(Option_t *option="") override
const TString & GetString() const
const char * Data() const
TString & Remove(EStripType s, char c)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const