ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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()

VP1AvailableToolsHelper::Imp::Imp ( )
inline

Definition at line 27 of file VP1AvailableToolsHelper.cxx.

27 : theclass(0), toolsvc(0), timerid(0), updateinterval(5000), silent(false) {}

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 }

◆ 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  }

◆ 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

◆ 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:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
VP1HelperClassBase::messageVerbose
void messageVerbose(const QString &) const
Definition: VP1HelperClassBase.cxx:78
skel.it
it
Definition: skel.GENtoEVGEN.py:396
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1AvailableToolsHelper::Imp::monitoredTypes
QStringList monitoredTypes
Definition: VP1AvailableToolsHelper.cxx:31
VP1AvailableToolsHelper::Imp::ignoreList
QStringList ignoreList(const QString &type)
Definition: VP1AvailableToolsHelper.cxx:33
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
DiTauMassTools::ignore
void ignore(T &&)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:58
VP1AvailableToolsHelper::Imp::silent
bool silent
Definition: VP1AvailableToolsHelper.cxx:60
lumiFormat.i
int i
Definition: lumiFormat.py:85
VP1AvailableToolsHelper::Imp::timerid
int timerid
Definition: VP1AvailableToolsHelper.cxx:48
VP1AvailableToolsHelper::Imp::monitoredTypeToIgnoreList
std::map< QString, QStringList > monitoredTypeToIgnoreList
Definition: VP1AvailableToolsHelper.cxx:32
VP1AvailableToolsHelper::Imp::toolsvc
IToolSvc * toolsvc
Definition: VP1AvailableToolsHelper.cxx:29
python.selection.number
number
Definition: selection.py:20
VP1AvailableToolsHelper::Imp::killTimer
void killTimer()
Definition: VP1AvailableToolsHelper.cxx:49
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
VP1Msg::verbose
static bool verbose()
Definition: VP1Msg.h:31
VP1AvailableToolsHelper::Imp::theclass
VP1AvailableToolsHelper * theclass
Definition: VP1AvailableToolsHelper.cxx:28
VP1AvailableToolsHelper::Imp::updateinterval
const int updateinterval
Definition: VP1AvailableToolsHelper.cxx:59