39 KVINDRARunListReader::~KVINDRARunListReader()
63 fRunsStream.open(filename);
64 if (fRunsStream.is_open()) {
66 Info(
Form(
"%s::OpenRLFile", IsA()->GetName()),
67 "Opened file %s for reading", filename);
71 Error(
Form(
"%s::OpenRLFile", IsA()->GetName()),
72 "Cannot open file %s for reading", filename);
89 if (fRunsStream.is_open()) {
112 if (!fRunsStream.is_open()) {
113 Error(
Form(
"%s::ReadRLLine", IsA()->GetName()),
114 "No file open for reading");
117 if (!fRunsStream.good()) {
118 Error(
Form(
"%s::ReadRLLine", IsA()->GetName()),
119 "File %s is not good for reading", fRunsFile.Data());
122 fLine.ReadLine(fRunsStream);
124 if (!fRunsStream.good())
127 if (fLine.BeginsWith(
"Version")) {
129 if (sscanf(fLine.Data(),
"Version=%d", &fVersion) == 1) {
135 else if (!fLine.BeginsWith(fComment)) {
136 fLineReader->SetLine(fLine);
137 fLineReader->BreakLineIntoFields(fSeparator);
141 fLineReader->Clear();
165 if (!strcmp(t,
"")) {
167 if (!fRunsStream.is_open()) {
168 Error(
Form(
"%s::ReadRunList", IsA()->GetName()),
169 "No runlist file open for reading");
183 while (ReadRLLine()) {
185 if (fLineReader->GoodRunLine()) {
190 fLineReader->Clear();
211 fLineReader->Print();
234 Int_t trig = fLineReader->GetTrigger(field, fmt);
235 if (trig < 0 && fLineReader->HasFieldValue(field))
236 cout <<
"...apparently on line " << GetRLLineNumber() << endl;
237 return (trig < 0 ? fTrigger : fTrigger = trig);
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char * Form(const char *fmt,...)
Utitlity base class for reading INDRA runlist files.
virtual void GoodRunLine()
Bool_t OpenRLFile(const Char_t *)
void ReadRunList(const Char_t *name="")
Int_t GetRunListTrigger(const Char_t *field, const Char_t *fmt)
Base class for reading runlists for experiments ,.