ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
VP1
VP1Gui
VP1Gui
VP1AvailEvents.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Header file for class VP1AvailEvents //
9
// //
10
// Description: Class for keeping track of available events //
11
// when running VP1 in single-file-per-event //
12
// mode. //
13
// //
14
// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
15
// Initial version: May 2008 //
16
// //
18
19
#ifndef IVP1AVAILEVENTS_H
20
#define IVP1AVAILEVENTS_H
21
#include <QObject>
22
#include <QList>
23
#include "
VP1Gui/VP1EventFile.h
"
24
25
class
VP1AvailEvents
:
public
QObject {
26
27
Q_OBJECT
28
29
public
:
30
31
VP1AvailEvents
(
int
timeCutForNew
,
const
QString& tmpdir,
int
maxLocalFilesToKeep
= -1, QObject * parent = 0);
//maxLocalFilesToKeep<=2 means keep all.
32
//timeCutForNew: <0 : no time Cut;
33
// 0 : only newest is fresh
34
// >0 : time cut in seconds.
35
virtual
void
init
() = 0;
//Forbidden to do any real work before init is called (in particular emit signals!).
36
37
virtual
~VP1AvailEvents
();
38
39
//Next two returns ordered lists such that first means newer.
40
QList<VP1EventFile>
allLocalEvents
()
const
;
//All events copied to tmp directory
41
QList<VP1EventFile>
freshEvents
()
const
;
//Events that are considered "new", and which have not been investigated yet.
42
VP1EventFile
newestEvent
()
const
;
//The newest event. Might have been investigated.
43
44
void
setCurrentEvent
(
int
run
,
int
event);
//Call on every new event to update the history.
45
int
maxLocalFilesToKeep
()
const
;
46
47
protected
:
48
void
cleanupAndCheckForEventListChanges
();
//Call from derived classes to ensure proper emission of XXXEventsChanged() signals.
49
void
invalidateDirCache
(
const
QString& dir);
//Call from derived classes after making changes to files in directory.
50
bool
inHistory
(
int
run
,
int
event)
const
;
51
QList<VP1EventFile>
allEventFilesInDir
(
const
QString& dir)
const
;
52
QList<VP1EventFile>
freshEvents
(
VP1EventFile
newestEvt,
const
QList<VP1EventFile>&)
const
;
//Given timecut and newestEvt, trim down
53
//list so we only get the "fresh events" left.
54
const
QString&
tmpDir
()
const
;
55
QString
tmpLocalFileDir
()
const
;
56
QString
tmpActiveRetrievalDir
();
//attempts to create temporary subdirectory in tmpCopyDir which
57
//can be used for temporary files while downloading/copying, etc.
58
//returns an empty string in case of problems.
59
60
//Definition of fresh events:
61
int
timeCutForNew
()
const
;
62
bool
requireNewestRunNumber
()
const
{
return
false
;
/*fixme*/
}
63
//Convenience:
64
bool
isConsideredFresh
(
const
VP1EventFile
& evt,
const
VP1EventFile
& newestEvt )
const
;
65
66
void
messageDebug
(
const
QString&)
const
;
//Messages to appear on output.
67
signals:
68
void
allLocalEventsChanged
();
69
void
freshEventsChanged
();
70
void
message
(
const
QString&)
const
;
//Messages to appear in GUI.
71
72
private
Q_SLOTS:
73
void
actualCleanup
();
74
void
actualCheckForEventListChanges
();
75
76
private
:
77
78
class
Imp
;
79
Imp
*
m_d
;
80
81
};
82
83
#endif
VP1EventFile.h
VP1AvailEvents::Imp
Definition
VP1AvailEvents.cxx:27
VP1AvailEvents::allLocalEvents
QList< VP1EventFile > allLocalEvents() const
Definition
VP1AvailEvents.cxx:241
VP1AvailEvents::setCurrentEvent
void setCurrentEvent(int run, int event)
Definition
VP1AvailEvents.cxx:144
VP1AvailEvents::freshEvents
QList< VP1EventFile > freshEvents() const
Definition
VP1AvailEvents.cxx:129
VP1AvailEvents::m_d
Imp * m_d
Definition
VP1AvailEvents.h:79
VP1AvailEvents::~VP1AvailEvents
virtual ~VP1AvailEvents()
Definition
VP1AvailEvents.cxx:81
VP1AvailEvents::messageDebug
void messageDebug(const QString &) const
Definition
VP1AvailEvents.cxx:351
VP1AvailEvents::tmpLocalFileDir
QString tmpLocalFileDir() const
Definition
VP1AvailEvents.cxx:283
VP1AvailEvents::message
void message(const QString &) const
VP1AvailEvents::VP1AvailEvents
VP1AvailEvents(int timeCutForNew, const QString &tmpdir, int maxLocalFilesToKeep=-1, QObject *parent=0)
Definition
VP1AvailEvents.cxx:71
VP1AvailEvents::tmpDir
const QString & tmpDir() const
Definition
VP1AvailEvents.cxx:104
VP1AvailEvents::allLocalEventsChanged
void allLocalEventsChanged()
VP1AvailEvents::requireNewestRunNumber
bool requireNewestRunNumber() const
Definition
VP1AvailEvents.h:62
VP1AvailEvents::timeCutForNew
int timeCutForNew() const
Definition
VP1AvailEvents.cxx:92
VP1AvailEvents::inHistory
bool inHistory(int run, int event) const
Definition
VP1AvailEvents.cxx:187
VP1AvailEvents::allEventFilesInDir
QList< VP1EventFile > allEventFilesInDir(const QString &dir) const
Definition
VP1AvailEvents.cxx:202
VP1AvailEvents::newestEvent
VP1EventFile newestEvent() const
Definition
VP1AvailEvents.cxx:135
VP1AvailEvents::maxLocalFilesToKeep
int maxLocalFilesToKeep() const
Definition
VP1AvailEvents.cxx:98
VP1AvailEvents::actualCheckForEventListChanges
void actualCheckForEventListChanges()
Definition
VP1AvailEvents.cxx:161
VP1AvailEvents::invalidateDirCache
void invalidateDirCache(const QString &dir)
Definition
VP1AvailEvents.cxx:194
VP1AvailEvents::init
virtual void init()=0
VP1AvailEvents::isConsideredFresh
bool isConsideredFresh(const VP1EventFile &evt, const VP1EventFile &newestEvt) const
Definition
VP1AvailEvents.cxx:336
VP1AvailEvents::cleanupAndCheckForEventListChanges
void cleanupAndCheckForEventListChanges()
Definition
VP1AvailEvents.cxx:176
VP1AvailEvents::freshEventsChanged
void freshEventsChanged()
VP1AvailEvents::tmpActiveRetrievalDir
QString tmpActiveRetrievalDir()
Definition
VP1AvailEvents.cxx:277
VP1AvailEvents::actualCleanup
void actualCleanup()
Definition
VP1AvailEvents.cxx:151
VP1EventFile
Definition
VP1EventFile.h:23
run
int run(int argc, char *argv[])
Definition
ttree2hdf5.cxx:28
Generated on
for ATLAS Offline Software by
1.17.0