ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
VP1
VP1Gui
VP1Gui
VP1ExecutionScheduler.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// //
7
// Header file for class VP1ExecutionScheduler //
8
// //
9
// Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10
// //
11
// Initial version: April 2007 //
12
// //
14
15
#ifndef VP1EXECUTIONSCHEDULER_H
16
#define VP1EXECUTIONSCHEDULER_H
17
18
// include C++
19
//#include <stddef.h> // this to fix the 'ptrdiff_t' does not name a type error with Qt (http://qt-project.org/forums/viewthread/16992)
20
21
// include VP1
22
#include "
VP1Gui/VP1QtApplication.h
"
23
24
// include Qt
25
#include <QObject>
26
#include <QStringList>
27
28
#ifdef BUILDVP1LIGHT
29
#include <TTree.h>
30
#include "
xAODBase/IParticle.h
"
31
#endif
// BUILDVP1LIGHT
32
33
34
class
IVP1System
;
35
class
IVP1ChannelWidget
;
36
37
class
StoreGateSvc
;
38
class
IToolSvc;
39
class
ISvcLocator;
40
class
VP1AvailEvents
;
41
42
class
VP1ExecutionScheduler
:
public
QObject {
43
44
Q_OBJECT
45
46
public
:
47
48
//Cruise mode:
49
enum
CruiseMode
{
NONE
,
50
TAB
,
//Cycles to a new tab at a fixed interval (when it is loaded - gives soonvisible bonus)
51
EVENT
,
//Proceeds to a new event at a fixed interval (counting from when all visible channels are refreshed)
52
BOTH
};
//Cycles through all tabs and loads next event when they have all been shown.
53
54
55
void
setCruiseMode
(
const
CruiseMode
&);
56
57
//Fixme: Need shortcut keys for the cruise modes as well as next/prev. tab (for full screen).
58
59
60
//init/cleanup:
61
static
VP1ExecutionScheduler
*
init
(
StoreGateSvc
* eventStore,
62
StoreGateSvc
* detStore,
63
ISvcLocator* svcLocator,
64
IToolSvc*toolSvc,
65
const
QStringList& joboptions,
66
QString initialCruiseMode =
"NONE"
,
67
unsigned
initialCruiseSeconds = 10,
68
const
QString& singleEventSource =
""
,
69
const
QString& singleEventLocalTmpDir =
""
,
70
unsigned
localFileCacheLimit = 10,
71
const
QStringList& availableLocalInputDirectories = QStringList() );
72
static
void
cleanup
(
VP1ExecutionScheduler
*);
73
74
//Call when new event data are available (returns false when the user closes the program)
75
bool
executeNewEvent
(
const
int
&
runnumber
,
const
unsigned
long
long
& eventnumber,
const
unsigned
& triggerType = 0,
const
unsigned
& time = 0);
//
76
77
VP1ExecutionScheduler
(QObject * parent,
78
StoreGateSvc
*eventStore,
StoreGateSvc
*detStore,
79
ISvcLocator* svcLocator,IToolSvc*toolSvc,
80
VP1AvailEvents
* availEvents);
81
virtual
~VP1ExecutionScheduler
();
82
83
void
bringFromConstructedToReady
(
IVP1ChannelWidget
*);
84
void
uncreateAndDelete
(
IVP1ChannelWidget
*);
85
86
bool
isRefreshing
()
const
;
87
88
bool
hasAllActiveSystemsRefreshed
(
IVP1ChannelWidget
*)
const
;
89
90
//For VP1Gui:
91
const
QString&
nextRequestedEventFile
()
const
;
92
93
//For use by whatever logic wants to determine the next event file
94
//(probably VP1MainWindow):
95
void
setNextRequestedEventFile
(
const
QString&);
96
97
QStringList
userRequestedFiles
();
98
99
QString
saveSnaphsotToFile
(
IVP1System
* s,
bool
batch =
false
);
100
101
102
#if defined BUILDVP1LIGHT
103
void
loadEvent();
104
QString
split
(
const
std::string& input,
const
std::string& regex);
105
int
getEvtNr(){
return
m_evtNr; };
106
void
setEvtNr(
int
evtNr){ m_evtNr = evtNr; };
107
int
getTotEvtNr(){
return
m_totEvtNr; };
108
#endif
// BUILDVP1LIGHT
109
110
signals:
111
void
refreshingStatusChanged
(
bool
);
112
113
114
115
private
:
116
class
Imp
;
117
Imp
*
m_d
;
118
void
refreshSystem
(
IVP1System
*);
119
void
eraseSystem
(
IVP1System
*);
120
void
actualUncreateAndDelete
(
IVP1ChannelWidget
*);
121
122
#if defined BUILDVP1LIGHT
123
xAOD::TEvent
* m_event;
124
::TFile* m_ifile;
125
QList<QStringList> m_list;
126
int
m_evtNr = 0;
127
int
m_totEvtNr = -1;
128
bool
m_goBackFlag =
false
;
129
bool
firstlaunch =
true
;
130
#endif
// BUILDVP1LIGHT
131
132
private
Q_SLOTS:
133
void
processSystemForRefresh
();
134
void
updateProgressBarDuringRefresh
();
135
void
channelCreated
(
IVP1ChannelWidget
*);
136
void
channelUncreated
(
IVP1ChannelWidget
*);
137
void
startRefreshQueueIfAppropriate
();
138
void
systemNeedErase
();
139
140
void
performCruise
();
141
//OPVASK: void abortCruise();
142
//Start
143
144
#if defined BUILDVP1LIGHT
145
void
passEvent(
IVP1System
*);
146
#endif
// BUILDVP1LIGHT
147
};
148
149
#endif
IParticle.h
VP1QtApplication.h
IVP1ChannelWidget
Definition
IVP1ChannelWidget.h:34
IVP1System
Definition
IVP1System.h:36
StoreGateSvc
The Athena Transient Store API.
Definition
StoreGateSvc.h:120
VP1AvailEvents
Definition
VP1AvailEvents.h:25
VP1ExecutionScheduler::Imp
Definition
VP1ExecutionScheduler.cxx:129
VP1ExecutionScheduler
Definition
VP1ExecutionScheduler.h:42
VP1ExecutionScheduler::m_d
Imp * m_d
Definition
VP1ExecutionScheduler.h:117
VP1ExecutionScheduler::nextRequestedEventFile
const QString & nextRequestedEventFile() const
Definition
VP1ExecutionScheduler.cxx:578
VP1ExecutionScheduler::init
static VP1ExecutionScheduler * init(StoreGateSvc *eventStore, StoreGateSvc *detStore, ISvcLocator *svcLocator, IToolSvc *toolSvc, const QStringList &joboptions, QString initialCruiseMode="NONE", unsigned initialCruiseSeconds=10, const QString &singleEventSource="", const QString &singleEventLocalTmpDir="", unsigned localFileCacheLimit=10, const QStringList &availableLocalInputDirectories=QStringList())
Definition
VP1ExecutionScheduler.cxx:350
VP1ExecutionScheduler::updateProgressBarDuringRefresh
void updateProgressBarDuringRefresh()
Definition
VP1ExecutionScheduler.cxx:566
VP1ExecutionScheduler::bringFromConstructedToReady
void bringFromConstructedToReady(IVP1ChannelWidget *)
Definition
VP1ExecutionScheduler.cxx:1071
VP1ExecutionScheduler::executeNewEvent
bool executeNewEvent(const int &runnumber, const unsigned long long &eventnumber, const unsigned &triggerType=0, const unsigned &time=0)
Definition
VP1ExecutionScheduler.cxx:590
VP1ExecutionScheduler::setCruiseMode
void setCruiseMode(const CruiseMode &)
Definition
VP1ExecutionScheduler.cxx:1314
VP1ExecutionScheduler::systemNeedErase
void systemNeedErase()
Definition
VP1ExecutionScheduler.cxx:734
VP1ExecutionScheduler::performCruise
void performCruise()
Definition
VP1ExecutionScheduler.cxx:1329
VP1ExecutionScheduler::saveSnaphsotToFile
QString saveSnaphsotToFile(IVP1System *s, bool batch=false)
Definition
VP1ExecutionScheduler.cxx:944
VP1ExecutionScheduler::refreshSystem
void refreshSystem(IVP1System *)
Definition
VP1ExecutionScheduler.cxx:804
VP1ExecutionScheduler::actualUncreateAndDelete
void actualUncreateAndDelete(IVP1ChannelWidget *)
Definition
VP1ExecutionScheduler.cxx:1112
VP1ExecutionScheduler::refreshingStatusChanged
void refreshingStatusChanged(bool)
VP1ExecutionScheduler::processSystemForRefresh
void processSystemForRefresh()
Definition
VP1ExecutionScheduler.cxx:747
VP1ExecutionScheduler::channelUncreated
void channelUncreated(IVP1ChannelWidget *)
Definition
VP1ExecutionScheduler.cxx:783
VP1ExecutionScheduler::hasAllActiveSystemsRefreshed
bool hasAllActiveSystemsRefreshed(IVP1ChannelWidget *) const
Definition
VP1ExecutionScheduler.cxx:1188
VP1ExecutionScheduler::eraseSystem
void eraseSystem(IVP1System *)
Definition
VP1ExecutionScheduler.cxx:713
VP1ExecutionScheduler::channelCreated
void channelCreated(IVP1ChannelWidget *)
Definition
VP1ExecutionScheduler.cxx:767
VP1ExecutionScheduler::~VP1ExecutionScheduler
virtual ~VP1ExecutionScheduler()
Definition
VP1ExecutionScheduler.cxx:339
VP1ExecutionScheduler::startRefreshQueueIfAppropriate
void startRefreshQueueIfAppropriate()
Definition
VP1ExecutionScheduler.cxx:791
VP1ExecutionScheduler::CruiseMode
CruiseMode
Definition
VP1ExecutionScheduler.h:49
VP1ExecutionScheduler::EVENT
@ EVENT
Definition
VP1ExecutionScheduler.h:51
VP1ExecutionScheduler::NONE
@ NONE
Definition
VP1ExecutionScheduler.h:49
VP1ExecutionScheduler::BOTH
@ BOTH
Definition
VP1ExecutionScheduler.h:52
VP1ExecutionScheduler::TAB
@ TAB
Definition
VP1ExecutionScheduler.h:50
VP1ExecutionScheduler::VP1ExecutionScheduler
VP1ExecutionScheduler(QObject *parent, StoreGateSvc *eventStore, StoreGateSvc *detStore, ISvcLocator *svcLocator, IToolSvc *toolSvc, VP1AvailEvents *availEvents)
Definition
VP1ExecutionScheduler.cxx:233
VP1ExecutionScheduler::cleanup
static void cleanup(VP1ExecutionScheduler *)
Definition
VP1ExecutionScheduler.cxx:506
VP1ExecutionScheduler::setNextRequestedEventFile
void setNextRequestedEventFile(const QString &)
Definition
VP1ExecutionScheduler.cxx:584
VP1ExecutionScheduler::userRequestedFiles
QStringList userRequestedFiles()
Definition
VP1ExecutionScheduler.cxx:1373
VP1ExecutionScheduler::uncreateAndDelete
void uncreateAndDelete(IVP1ChannelWidget *)
Definition
VP1ExecutionScheduler.cxx:1100
VP1ExecutionScheduler::isRefreshing
bool isRefreshing() const
Definition
VP1ExecutionScheduler.cxx:798
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:59
split
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition
hcg.cxx:179
runnumber
static std::vector< uint32_t > runnumber
Definition
iLumiCalc.h:37
Generated on
for ATLAS Offline Software by
1.17.0