ATLAS Offline Software
Loading...
Searching...
No Matches
VP1HelperClassBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7// //
8// Header file for class VP1HelperClassBase //
9// //
10// Description: Class that VP1 helper classes can derive //
11// from in order to get proper message() and //
12// messagedebug() protected methods (for //
13// consistent output to messagebox/stdout, and //
14// for making copy/assignment forbidden. Also //
15// provides system pointer if applicable //
16// //
17// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
18// Initial version: February 2008 //
19// //
21
22#ifndef VP1HELPERCLASSBASE_H
23#define VP1HELPERCLASSBASE_H
24
25#include "VP1Base/VP1String.h"
26class IVP1System;
27
29public:
30 virtual ~VP1HelperClassBase();
31
32 static bool verbose() { return s_vp1verbose; } // Returns true if env var VP1_VERBOSE_OUTPUT=1
33
35
36 //Both of the following will show up in stdout. The former will also show up in the VP1 gui if m_system!=0.
37 void message(const QString&) const;
38 void messageDebug(const QString&) const;
39 //If verbose() is true, this outputs to stdout:
40 void messageVerbose(const QString&) const;
41
42 //Overloaded convenience methods, for outputting several lines:
43 void message(const QStringList&, const QString& addtoend = "" ) const;
44 void messageDebug(const QStringList&, const QString& addtoend = "") const;
45 void messageVerbose(const QStringList&, const QString& addtoend = "") const;
46 void message(const QString& addtostart, const QStringList&, const QString& addtoend = "" ) const;
47 void messageDebug(const QString& addtostart, const QStringList&, const QString& addtoend = "") const;
48 void messageVerbose(const QString& addtostart, const QStringList&, const QString& addtoend = "") const;
49
50 IVP1System * systemBase() const { return m_system; }
51 const QString& helperClassName() const { return m_helpername; }
52
53 //Called by the framework at shutdown - cheap mem. leak check (in verbose mode):
54 static void warnUndeletedInstances();
55
56protected:
57
58 VP1HelperClassBase(IVP1System * sys = 0, QString helpername = "");
59 void setHelperClassName(const QString& n) { m_helpername = n; }
60
61private:
62
63 // It is illegal to copy/assign a VP1HelperClassBase:
66
67 QString m_helpername;
69 static const bool s_vp1verbose;
70};
71
72#endif
VP1HelperClassBase(const VP1HelperClassBase &)
static const bool s_vp1verbose
VP1HelperClassBase(IVP1System *sys=0, QString helpername="")
void messageVerbose(const QString &) const
const QString & helperClassName() const
static void warnUndeletedInstances()
VP1HelperClassBase & operator=(const VP1HelperClassBase &)
void message(const QString &) const
IVP1System * systemBase() const
void setSystemBasePointer(IVP1System *sys)
void messageDebug(const QString &) const
void setHelperClassName(const QString &n)