|
ATLAS Offline Software
|
#include <VP1AvailEvtsHttp.h>
Definition at line 24 of file VP1AvailEvtsHttp.h.
◆ VP1AvailEvtsHttp()
VP1AvailEvtsHttp::VP1AvailEvtsHttp |
( |
QString |
fileinfoUrl, |
|
|
int |
updateInterval, |
|
|
int |
timeCutForNew, |
|
|
const QString & |
tmpcopydir, |
|
|
int |
maxLocalFilesToKeep = -1 , |
|
|
QObject * |
parent = 0 |
|
) |
| |
Definition at line 52 of file VP1AvailEvtsHttp.cxx.
63 QUrl
url(fileinfoUrl);
66 QString infofilebasename = QFileInfo(
path).fileName();
67 if (!infofilebasename.isEmpty()&&
path.endsWith(infofilebasename)) {
◆ ~VP1AvailEvtsHttp()
VP1AvailEvtsHttp::~VP1AvailEvtsHttp |
( |
| ) |
|
|
virtual |
◆ actualCheckForEventListChanges
void VP1AvailEvents::actualCheckForEventListChanges |
( |
| ) |
|
|
privateslotinherited |
◆ actualCleanup
void VP1AvailEvents::actualCleanup |
( |
| ) |
|
|
privateslotinherited |
◆ allEventFilesInDir()
QList< VP1EventFile > VP1AvailEvents::allEventFilesInDir |
( |
const QString & |
dir | ) |
const |
|
protectedinherited |
Definition at line 202 of file VP1AvailEvents.cxx.
205 return QList<VP1EventFile>();
207 QFileInfo fi_dir(
dir);
208 if (!fi_dir.exists()||!fi_dir.isDir())
209 return QList<VP1EventFile>();
211 QDateTime modtime = fi_dir.lastModified();
212 if (abs(modtime.time().msecsTo(QTime::currentTime()))>50) {
215 return it->second.second;
219 filters <<
"*_*.pool.root";
221 QDirIterator itDir(
dir,filters,
QDir::Files | QDir::NoDotAndDotDot | QDir::Readable | QDir::CaseSensitive);
223 QList<VP1EventFile>
l;
224 while (itDir.hasNext()) {
225 QString
fn = itDir.next();
226 fn.replace(
"//",
"/");
231 message(
"Could not decode event file name: "+
fn);
◆ allLocalEvents()
QList< VP1EventFile > VP1AvailEvents::allLocalEvents |
( |
| ) |
const |
|
inherited |
◆ allLocalEventsChanged
void VP1AvailEvents::allLocalEventsChanged |
( |
| ) |
|
|
signalinherited |
◆ cleanupAndCheckForEventListChanges()
void VP1AvailEvents::cleanupAndCheckForEventListChanges |
( |
| ) |
|
|
protectedinherited |
◆ eventFileDownloadFailed
void VP1AvailEvtsHttp::eventFileDownloadFailed |
( |
const QString & |
error, |
|
|
const QString & |
urltofile, |
|
|
const QString & |
localtargetfile |
|
) |
| |
|
privateslot |
◆ eventFileDownloadSuccessful
void VP1AvailEvtsHttp::eventFileDownloadSuccessful |
( |
const QString & |
urltofile, |
|
|
const QString & |
localtargetfile, |
|
|
const QString & |
data |
|
) |
| |
|
privateslot |
◆ examineEvtsOnServer
void VP1AvailEvtsHttp::examineEvtsOnServer |
( |
| ) |
|
|
privateslot |
Definition at line 152 of file VP1AvailEvtsHttp.cxx.
163 if (localfiledir.isEmpty()) {
164 message(
"Problems with temporary local event file directory.");
185 QList<VP1EventFile> freshLocalEvents =
freshEvents();
188 if (
evt < evtToGet) {
202 if (!
err.isEmpty()) {
203 message(
"Problems starting download of :" +
url);
211 message(
"Problems with temporary local download directory.");
◆ fileInfoChanged
void VP1AvailEvtsHttp::fileInfoChanged |
( |
| ) |
|
|
privateslot |
Definition at line 106 of file VP1AvailEvtsHttp.cxx.
115 message(
"Error: No temporary retrieval directory set!");
119 QString
target = ad+
"downloadedfileinfo.txt";
126 if (!
err.isEmpty()) {
127 message(
"Problems starting download to get file-info file: "+
err);
◆ fileInfoDownloadFailed
void VP1AvailEvtsHttp::fileInfoDownloadFailed |
( |
const QString & |
error, |
|
|
const QString & |
urltofile, |
|
|
const QString & |
localtargetfile |
|
) |
| |
|
privateslot |
◆ fileInfoDownloadSuccessful
void VP1AvailEvtsHttp::fileInfoDownloadSuccessful |
( |
const QString & |
urltofile, |
|
|
const QString & |
localtargetfile |
|
) |
| |
|
privateslot |
Definition at line 133 of file VP1AvailEvtsHttp.cxx.
136 if (!newEvtsOnServerInfo->
isValid()) {
137 message(
"Problems decoding info in file downloaded from "+urltofile);
139 delete newEvtsOnServerInfo;
◆ freshEvents() [1/2]
◆ freshEvents() [2/2]
◆ freshEventsChanged
void VP1AvailEvents::freshEventsChanged |
( |
| ) |
|
|
signalinherited |
◆ inHistory()
bool VP1AvailEvents::inHistory |
( |
int |
run, |
|
|
int |
event |
|
) |
| const |
|
protectedinherited |
◆ init()
void VP1AvailEvtsHttp::init |
( |
| ) |
|
|
virtual |
◆ invalidateDirCache()
void VP1AvailEvents::invalidateDirCache |
( |
const QString & |
dir | ) |
|
|
protectedinherited |
◆ isConsideredFresh()
◆ maxLocalFilesToKeep()
int VP1AvailEvents::maxLocalFilesToKeep |
( |
| ) |
const |
|
inherited |
◆ message
void VP1AvailEvents::message |
( |
const QString & |
| ) |
const |
|
signalinherited |
◆ messageDebug()
void VP1AvailEvents::messageDebug |
( |
const QString & |
s | ) |
const |
|
protectedinherited |
◆ newestEvent()
◆ requireNewestRunNumber()
bool VP1AvailEvents::requireNewestRunNumber |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ setCurrentEvent()
void VP1AvailEvents::setCurrentEvent |
( |
int |
run, |
|
|
int |
event |
|
) |
| |
|
inherited |
◆ timeCutForNew()
int VP1AvailEvents::timeCutForNew |
( |
| ) |
const |
|
protectedinherited |
◆ tmpActiveRetrievalDir()
QString VP1AvailEvents::tmpActiveRetrievalDir |
( |
| ) |
|
|
protectedinherited |
◆ tmpDir()
const QString & VP1AvailEvents::tmpDir |
( |
| ) |
const |
|
protectedinherited |
◆ tmpLocalFileDir()
QString VP1AvailEvents::tmpLocalFileDir |
( |
| ) |
const |
|
protectedinherited |
◆ m_d
Imp* VP1AvailEvtsHttp::m_d |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
QTimer * examineEvtsOnServerTimer
char data[hepevt_bytes_allocation_ATLAS]
QString tmpLocalFileDir() const
path
python interpreter configuration --------------------------------------—
void actualCheckForEventListChanges()
VP1AvailEvtsHttp * theclass
VP1EvtsOnServerInfo * evtsOnServer
void fileInfoDownloadSuccessful(const QString &urltofile, const QString &localtargetfile)
unsigned numberOfPendingDownloads() const
static unsigned ntmpdlcount
QList< VP1EventFile > allLocalEvents() const
void allLocalEventsChanged()
VP1HttpGetFile httpgetfile_fileinfo
void cleanupAndCheckForEventListChanges()
QString tmpActiveRetrievalDir()
void eventFileDownloadSuccessful(const QString &urltofile, const QString &localtargetfile, const QString &data)
const QString & error() const
VP1HttpGetFile httpgetfile_events
void freshEventsChanged()
void message(const QString &) const
QString startDownload(const QString &urltofile, const QString &localtargetfile, const QString &md5sum="", const QString &data="")
QString lastResultToString(const QString &url)
bool inHistory(int run, int event) const
RESULT lastResult(const QString &url)
QList< VP1EventFile > freshEvents() const
VP1AvailEvents(int timeCutForNew, const QString &tmpdir, int maxLocalFilesToKeep=-1, QObject *parent=0)
VP1EventFile newestEvent() const
POOL::TEvent event(POOL::TEvent::kClassAccess)
void cleanupTmpLocalFiles()
void addUrl(const QString &)
int timeCutForNew() const
const QString & fileName() const
bool isDownloading(const QString &urltofile) const
bool requireNewestRunNumber() const
void fileInfoDownloadFailed(const QString &error, const QString &urltofile, const QString &localtargetfile)
QList< EventID > historyOrdered
void examineEvtsOnServer()
QString tmpActiveRetrievalDir
const QString & md5Sum() const
std::set< EventID > historySorted
void restartExamineEvtsOnServerTimer()
void eventFileDownloadFailed(const QString &error, const QString &urltofile, const QString &localtargetfile)
int maxLocalFilesToKeep() const
static const char * prefix_verbose()
VP1WebWatcher * webwatcher_fileinfo
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.
QList< VP1EventFile > lastFresh
QList< VP1EventFile > allEventFilesInDir(const QString &dir) const
QList< VP1EventFile > lastAllLocal
static EventID evtToID(const VP1EventFile &evt)
bool isDownloadingTo(const QString &localtargetfile) const
bool isConsideredFresh(const VP1EventFile &evt, const VP1EventFile &newestEvt) const
QString attemptGenerationOfTmpSubdir(const QString &preferredname, QString &cachevar)
std::map< QString, std::pair< QDateTime, QList< VP1EventFile > > > dircache
QList< VP1EventFile > events(int timecut=-1, bool requireNewestRunNumber=false) const
void invalidateDirCache(const QString &dir)