|
ROOT
Reference Guide |
|
Go to the documentation of this file.
54 SetName(
"DefaultMessageHandler");
85 if (
fSize <= 0)
return;
96 gROOT->GetListOfMessageHandlers()->Add(
this);
110 if (
fSize <= 0)
return 0;
122 if (
fSize <= 0)
return 0;
140 if (obj->IsA() !=
fClass)
return;
158 for (i = 0; i <
fSize; i++) {
168 for (i = 0; i <
fSize-1; i++) {
169 newCnts[i] =
fCnts[i];
203 if (
fSize <= 0)
return;
216 while ((cl = (
TClass*)next())) {
220 if (!cl) cl =
gROOT->IsA();
222 printf(
" Class: %-20s WARNINGs has %d counts\n",cl->
GetName(),
fCnts[i]);
226 printf(
" Class: %-20s ERRORs has %d counts\n",cl->
GetName(),
fCnts[i]);
229 printf(
" Class: %-20s MessID = %5ld has %d counts\n",cl->
GetName(),
id,
fCnts[i]);
239 gROOT->GetListOfMessageHandlers()->Remove(
this);
Handle messages that might be generated by the system.
virtual ~TMessageHandler()
Clean up the message handler.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual Int_t GetMessageCount(Long_t messId) const
Return counter for message with ID=messid.
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
TMessageHandler(const TClass *cl, Bool_t derived=kTRUE)
Create a new message handler for class cl and add it to the list of message handlers.
R__EXTERN TVirtualMutex * gROOTMutex
#define R__LOCKGUARD(mutex)
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual Bool_t Notify()
This method must be overridden to handle object notification.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Mother of all ROOT objects.
virtual Int_t GetTotalMessageCount() const
Return total number of messages.
virtual void Print(Option_t *option="") const
Print statistics for this message handler.
virtual const char * GetName() const
Returns name of object.
virtual void Add()
Add this message handler to the list of messages handlers.
virtual void Remove()
Remove this message handler from the list of messages handlers.
virtual void HandleMessage(Long_t id, const TObject *obj)
Store message origin, keep statistics and call Notify().