ATLAS Offline Software
Loading...
Searching...
No Matches
VP1AvailableToolsHelper::Imp Class Reference
Collaboration diagram for VP1AvailableToolsHelper::Imp:

Public Member Functions

 Imp ()
QStringList ignoreList (const QString &type)
void removeIgnoreList (const QString &type)
QStringList actualCurrentlyAvailableTools ()
void killTimer ()
void restartTimer (int time)

Public Attributes

VP1AvailableToolsHelpertheclass
IToolSvc * toolsvc
QStringList monitoredTypes
std::map< QString, QStringList > monitoredTypeToIgnoreList
QStringList availableTools
QList< QComboBox * > handledComboBoxes
QList< QWidget * > handledWidgets
int timerid
const int updateinterval
bool silent

Detailed Description

Definition at line 25 of file VP1AvailableToolsHelper.cxx.

Constructor & Destructor Documentation

◆ Imp()

Member Function Documentation

◆ actualCurrentlyAvailableTools()

QStringList VP1AvailableToolsHelper::Imp::actualCurrentlyAvailableTools ( )

Definition at line 168 of file VP1AvailableToolsHelper.cxx.

169{
170 QStringList l;
171 if (toolsvc) {
172 for ( const QString& tooltype : monitoredTypes ) {
173 std::vector<std::string> instances;
174 instances = toolsvc->getInstances( tooltype.toStdString() );
175 if (!silent&&VP1Msg::verbose())
176 theclass->messageVerbose("Used toolsvc->getInstances(..) to find "+QString::number(instances.size())+" public tools of type "+tooltype );
177 for (unsigned i = 0; i < instances.size(); ++i ) {
178 QString instance(instances.at(i).c_str());
179 if (instance.startsWith("ToolSvc.",Qt::CaseInsensitive))
180 instance.remove(0,8);
181 //Check if we ignore this one:
182 QStringList ignorelist = ignoreList(tooltype);
183 if (!ignorelist.isEmpty()) {
184 bool ignore(false);
185 for (const QString& ignorepattern : ignorelist) {
186 if (QRegExp(ignorepattern,Qt::CaseSensitive,QRegExp::Wildcard).exactMatch(instance)) {
187 ignore = true;
188 break;
189 }
190 }
191 if (ignore) {
192 if (!silent&&VP1Msg::verbose())
193 theclass->messageVerbose(" --> Found but ignoring "+instance );
194 continue;
195 }
196 }
197 if (!silent&&VP1Msg::verbose())
198 theclass->messageVerbose(" --> Found "+instance );
199 l << tooltype+"/"+instance;
200 if (!silent&&VP1Msg::verbose())
201 theclass->messageVerbose(" --> Appended "+tooltype+"/"+instance+" to list" );
202 }
203 }
204 l.sort();
205 }
206 return l;
207}
std::map< std::string, double > instance
QStringList ignoreList(const QString &type)
static bool verbose()
Definition VP1Msg.h:31
l
Printing final latex table to .tex output file.

◆ ignoreList()

QStringList VP1AvailableToolsHelper::Imp::ignoreList ( const QString & type)
inline

Definition at line 33 of file VP1AvailableToolsHelper.cxx.

33 {
34 std::map<QString,QStringList>::const_iterator it = monitoredTypeToIgnoreList.find(type);
35 return it==monitoredTypeToIgnoreList.end() ? QStringList() : it->second;
36 }
std::map< QString, QStringList > monitoredTypeToIgnoreList

◆ killTimer()

void VP1AvailableToolsHelper::Imp::killTimer ( )
inline

Definition at line 49 of file VP1AvailableToolsHelper.cxx.

50 {
51 if (timerid)
52 theclass->killTimer(timerid);
53 }

◆ removeIgnoreList()

void VP1AvailableToolsHelper::Imp::removeIgnoreList ( const QString & type)
inline

Definition at line 37 of file VP1AvailableToolsHelper.cxx.

37 {
38 std::map<QString,QStringList>::iterator it = monitoredTypeToIgnoreList.find(type);
39 if (it!=monitoredTypeToIgnoreList.end())
41 }

◆ restartTimer()

void VP1AvailableToolsHelper::Imp::restartTimer ( int time)
inline

Definition at line 54 of file VP1AvailableToolsHelper.cxx.

55 {
56 killTimer();
57 timerid = theclass->startTimer(time);
58 }

Member Data Documentation

◆ availableTools

QStringList VP1AvailableToolsHelper::Imp::availableTools

Definition at line 42 of file VP1AvailableToolsHelper.cxx.

◆ handledComboBoxes

QList<QComboBox*> VP1AvailableToolsHelper::Imp::handledComboBoxes

Definition at line 45 of file VP1AvailableToolsHelper.cxx.

◆ handledWidgets

QList<QWidget*> VP1AvailableToolsHelper::Imp::handledWidgets

Definition at line 46 of file VP1AvailableToolsHelper.cxx.

◆ monitoredTypes

QStringList VP1AvailableToolsHelper::Imp::monitoredTypes

Definition at line 31 of file VP1AvailableToolsHelper.cxx.

◆ monitoredTypeToIgnoreList

std::map<QString,QStringList> VP1AvailableToolsHelper::Imp::monitoredTypeToIgnoreList

Definition at line 32 of file VP1AvailableToolsHelper.cxx.

◆ silent

bool VP1AvailableToolsHelper::Imp::silent

Definition at line 60 of file VP1AvailableToolsHelper.cxx.

◆ theclass

VP1AvailableToolsHelper* VP1AvailableToolsHelper::Imp::theclass

Definition at line 28 of file VP1AvailableToolsHelper.cxx.

◆ timerid

int VP1AvailableToolsHelper::Imp::timerid

Definition at line 48 of file VP1AvailableToolsHelper.cxx.

◆ toolsvc

IToolSvc* VP1AvailableToolsHelper::Imp::toolsvc

Definition at line 29 of file VP1AvailableToolsHelper.cxx.

◆ updateinterval

const int VP1AvailableToolsHelper::Imp::updateinterval

Definition at line 59 of file VP1AvailableToolsHelper.cxx.


The documentation for this class was generated from the following file: