ATLAS Offline Software
Loading...
Searching...
No Matches
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
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
34class IVP1System;
36
37class StoreGateSvc;
38class IToolSvc;
39class ISvcLocator;
40class VP1AvailEvents;
41
42class VP1ExecutionScheduler : public QObject {
43
44 Q_OBJECT
45
46public:
47
48 //Cruise mode:
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
85
86 bool isRefreshing() const;
87
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
110signals:
112
113
114
115private:
116 class Imp;
119 void eraseSystem(IVP1System*);
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
132private Q_SLOTS:
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
The Athena Transient Store API.
const QString & nextRequestedEventFile() const
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())
void bringFromConstructedToReady(IVP1ChannelWidget *)
bool executeNewEvent(const int &runnumber, const unsigned long long &eventnumber, const unsigned &triggerType=0, const unsigned &time=0)
void setCruiseMode(const CruiseMode &)
QString saveSnaphsotToFile(IVP1System *s, bool batch=false)
void actualUncreateAndDelete(IVP1ChannelWidget *)
void refreshingStatusChanged(bool)
void channelUncreated(IVP1ChannelWidget *)
bool hasAllActiveSystemsRefreshed(IVP1ChannelWidget *) const
void channelCreated(IVP1ChannelWidget *)
VP1ExecutionScheduler(QObject *parent, StoreGateSvc *eventStore, StoreGateSvc *detStore, ISvcLocator *svcLocator, IToolSvc *toolSvc, VP1AvailEvents *availEvents)
static void cleanup(VP1ExecutionScheduler *)
void setNextRequestedEventFile(const QString &)
void uncreateAndDelete(IVP1ChannelWidget *)
Tool for accessing xAOD files outside of Athena.
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177
static std::vector< uint32_t > runnumber
Definition iLumiCalc.h:37