Definition at line 24 of file VP1EvtsOnServerInfo.cxx.
◆ Imp()
VP1EvtsOnServerInfo::Imp::Imp |
( |
const QString & |
infofile | ) |
|
|
inline |
◆ init()
QString VP1EvtsOnServerInfo::Imp::init |
( |
const QString & |
infofile | ) |
|
Definition at line 89 of file VP1EvtsOnServerInfo.cxx.
114 if (infofile.isEmpty())
115 return "Given empty path to info file";
116 QFileInfo
fi(infofile);
118 return "infofile "+infofile+
" does not exist";
119 if (!
fi.isReadable())
120 return "infofile "+infofile+
" is not readable";
122 return "infofile "+infofile+
" is not empty";
128 int i_begin_copyresult(-1), i_end_copyresult(-1);
129 int i_begin_checksums(-1), i_end_checksums(-1);
133 QFile
file(infofile);
134 if (!
file.open(QFile::ReadOnly))
135 return "Could not open file in readonly mode";
139 const qint64 max_linelength(1000);
140 const qint64 max_numberoflines(2000);
146 if (ilines++>max_numberoflines)
147 return "Too many lines in file";
150 QString rawline =
stream.readLine(max_linelength).simplified();
151 if (rawline.isEmpty())
155 if (rawline==
"begin_copyresult") {
156 if (i_begin_copyresult!=-1)
157 return "Saw two lines with begin_copyresult";
158 i_begin_copyresult =
lines.count();
159 }
else if (rawline==
"end_copyresult") {
160 if (i_end_copyresult!=-1)
161 return "Saw two lines with end_copyresult";
162 i_end_copyresult =
lines.count();
163 }
else if (rawline==
"begin_checksums") {
164 if (i_begin_checksums!=-1)
165 return "Saw two lines with begin_checksums";
166 i_begin_checksums =
lines.count();
167 }
else if (rawline==
"end_checksums") {
168 if (i_end_checksums!=-1)
169 return "Saw two lines with end_checksums";
170 i_end_checksums =
lines.count();
177 return "Did not read any lines from file";
180 const bool hascopyresult(i_begin_copyresult!=-1||i_end_copyresult!=-1);
182 if (i_begin_checksums==-1)
return "File did not have begin_checksums line";
183 if (i_end_checksums==-1)
return "File did not have end_checksums line";
184 if (i_end_checksums<=i_begin_checksums)
return "checksum section delimiters out of order";
187 if (i_begin_copyresult==-1)
return "File had end_copyresult but no begin_copyresult line";
188 if (i_end_copyresult==-1)
return "File had begin_copyresult but no end_copyresult line";
189 if (i_end_copyresult<=i_begin_copyresult)
return "copyresult section delimiters out of order";
190 if (i_begin_copyresult>i_begin_checksums&&i_begin_copyresult<i_end_checksums)
191 return "copyresult and checksum sections mixed";
192 if (i_end_copyresult>i_begin_checksums&&i_end_copyresult<i_end_checksums)
193 return "copyresult and checksum sections mixed";
200 for (
int i = i_begin_checksums+1;
i < i_end_checksums; ++
i) {
201 #if QTCORE_VERSION >= 0x050E00
202 QStringList
parts =
lines.at(
i).split (
' ', Qt::SkipEmptyParts );
204 QStringList
parts =
lines.at(
i).split (
' ', QString::SkipEmptyParts );
206 if (
parts.count()!=2)
207 return "Invalid line in checksums section";
211 return "Invalid md5sum in checksums section: "+md5sum;
214 return "Failed to decode event file information from filename: "+
filename;
◆ error
QString VP1EvtsOnServerInfo::Imp::error |
◆ events
The documentation for this class was generated from the following file:
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.