ATLAS Offline Software
VP1ChannelManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Header file for class VP1ChannelManager //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial version: April 2007 //
12 // //
14 
15 #ifndef VP1CHANNELMANAGER_H
16 #define VP1CHANNELMANAGER_H
17 
18 // channel manager - manages channel plugins, and knows which are
19 // available. (also creates/deletes/clones channels, + manages channels ids.)
20 
21 class IVP1ChannelWidget;
23 class VP1MainWindow;
24 #include <QObject>
25 #include <QStringList>
26 
27 class VP1ChannelManager : public QObject {
28 
29  Q_OBJECT
30 
31 public:
34 
35  QString loadPluginFile(QString filename);
36  //This does not actually instantiate any channel widgets - it merely
37  //instantiates the widget factory from the plugin file (if possible,
38  //otherwise it returns an error messages), and notices which
39  //channels are provided by this factor (if 0 channels are provided,
40  //it also returns an error message). If an empty string was
41  //returned, there were no errors.
42  bool unloadPluginFile(QString filename);
43 
44  QStringList currentPluginFiles() const;
45 
46  QStringList channelsInPluginFile(QString filename) const;//An empty returned stringlist is probably because 'filename' never was loaded succesfully.
47 
48  QStringList basename2UniqueNames(QString basename) const;
49 
50  bool deleteChannel(QString channeluniquename);
51 
52  IVP1ChannelWidget * getChannel( QString channelbasename, QString& err );//returns 0 if unsuccesful. Otherwise, 'err' contains an error message.
53  unsigned nActive( QString channelbasename ) const;
54 
55  IVP1ChannelWidget* uniqueName2Channel(QString uniquename) const;
56 
57  bool hasRefreshingSystem(const QString& uniquename) const;
58 
59  QStringList uniquenames() const;
60 
61  bool uniqueNameExists(QString) const;
62  bool baseNameExists(QString) const;
63  bool channelWithBasenameIsLoaded(QString basename) const;
64 
65  QStringList serializePluginInfo() const;
66 
68 
69  QString getIconLocation(const QString& channelname, const bool& isbasename=true);//Returns empty string if channelname is not recognised.
70 
71  QStringList availableChannelList();
72 
73 signals:
74  void uniquename_channelListChanged(QStringList);//gives a list of channel unique_name's.
75  void availableChannelListChanged(QStringList);//gives a list of channel base_name's.
76  void availableUnusedChannelListChanged(QStringList);//gives a list of channel base_name's (only the one's that dont appear anywhere).
79 
80 private:
81  class Imp;
82  Imp * m_d;
83 };
84 
85 #endif
86 
VP1ChannelManager::uniquenames
QStringList uniquenames() const
Definition: VP1ChannelManager.cxx:472
VP1ChannelManager::newChannelCreated
void newChannelCreated(IVP1ChannelWidget *)
VP1ChannelManager::unloadPluginFile
bool unloadPluginFile(QString filename)
Definition: VP1ChannelManager.cxx:184
VP1ChannelManager::uniquename_channelListChanged
void uniquename_channelListChanged(QStringList)
VP1ChannelManager::getIconLocation
QString getIconLocation(const QString &channelname, const bool &isbasename=true)
Definition: VP1ChannelManager.cxx:588
VP1ChannelManager::channelWithBasenameIsLoaded
bool channelWithBasenameIsLoaded(QString basename) const
Definition: VP1ChannelManager.cxx:562
VP1ChannelManager::nActive
unsigned nActive(QString channelbasename) const
Definition: VP1ChannelManager.cxx:446
VP1ChannelManager::availableChannelList
QStringList availableChannelList()
Definition: VP1ChannelManager.cxx:498
VP1ChannelManager::currentPluginFiles
QStringList currentPluginFiles() const
Definition: VP1ChannelManager.cxx:535
VP1ChannelManager
Definition: VP1ChannelManager.h:27
VP1ChannelManager::serializePluginInfo
QStringList serializePluginInfo() const
Definition: VP1ChannelManager.cxx:523
VP1ChannelManager::availableChannelListChanged
void availableChannelListChanged(QStringList)
VP1ChannelManager::getChannel
IVP1ChannelWidget * getChannel(QString channelbasename, QString &err)
Definition: VP1ChannelManager.cxx:403
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:193
VP1ChannelManager::channelsInPluginFile
QStringList channelsInPluginFile(QString filename) const
Definition: VP1ChannelManager.cxx:358
VP1ChannelManager::VP1ChannelManager
VP1ChannelManager(VP1ExecutionScheduler *, VP1MainWindow *)
Definition: VP1ChannelManager.cxx:108
VP1ChannelManager::m_d
Imp * m_d
Definition: VP1ChannelManager.h:81
VP1ChannelManager::basename2UniqueNames
QStringList basename2UniqueNames(QString basename) const
Definition: VP1ChannelManager.cxx:546
VP1ChannelManager::loadPluginFile
QString loadPluginFile(QString filename)
Definition: VP1ChannelManager.cxx:229
python.L1.Config.LegacyTopoMergerMap.signals
signals
Definition: LegacyTopoMergerMap.py:13
IVP1ChannelWidget
Definition: IVP1ChannelWidget.h:34
VP1ExecutionScheduler
Definition: VP1ExecutionScheduler.h:42
VP1ChannelManager::availableUnusedChannelListChanged
void availableUnusedChannelListChanged(QStringList)
VP1ChannelManager::channelUncreated
void channelUncreated(IVP1ChannelWidget *)
VP1ChannelManager::deleteChannel
bool deleteChannel(QString channeluniquename)
Definition: VP1ChannelManager.cxx:132
VP1ChannelManager::uniqueName2Channel
IVP1ChannelWidget * uniqueName2Channel(QString uniquename) const
Definition: VP1ChannelManager.cxx:455
VP1ChannelManager::getController
QWidget * getController(IVP1ChannelWidget *)
Definition: VP1ChannelManager.cxx:440
VP1ChannelManager::Imp
Definition: VP1ChannelManager.cxx:73
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
VP1ChannelManager::~VP1ChannelManager
~VP1ChannelManager()
Definition: VP1ChannelManager.cxx:116
VP1ChannelManager::uniqueNameExists
bool uniqueNameExists(QString) const
Definition: VP1ChannelManager.cxx:462
VP1MainWindow
Definition: VP1MainWindow.h:82
VP1ChannelManager::baseNameExists
bool baseNameExists(QString) const
Definition: VP1ChannelManager.cxx:467
VP1ChannelManager::hasRefreshingSystem
bool hasRefreshingSystem(const QString &uniquename) const
Definition: VP1ChannelManager.cxx:581
beamspotman.basename
basename
Definition: beamspotman.py:640