Skip to content
Snippets Groups Projects
Commit 61e478ca authored by Marcin Nowak's avatar Marcin Nowak :radioactive:
Browse files

Removal of RootUtils::ClearCINTMessageCallback

This class was used for ROOT5 and CINT.
I am removing it as part of Cintex cleanup in master.
parent fe27a779
No related branches found
No related tags found
No related merge requests found
// This file's extension implies that it's C, but it's really -*- C++ -*-.
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: ClearCINTMessageCallback.h,v 1.2 2007-10-30 16:49:30 ssnyder Exp $
/**
* @file RootUtils/ClearCINTMessageCallback.h
* @author scott snyder
* @date Oct 2007
* @brief Clear Cint's error message callback.
*/
#ifndef ROOTUTILS_CLEARCINTMESSAGECALLBACK_H
#define ROOTUTILS_CLEARCINTMESSAGECALLBACK_H
namespace RootUtils {
/**
* @brief Clear Cint's error message callback.
*
* PyROOT sets up a callback to intercept Cint's error messages
* and turn them into Python errors. That's fine if you're using
* Python as a shell. But if you're using Cint as a shell
* (and calling python through TPython), then this will result
* in Cint's error messages being lost.
*
* Now, PyROOT itself is smart enough to only install the callback
* if python is actually being used as a shell. However, PyCintex
* installs the callback unconditionally. This function can be
* used to undo the damage.
*/
class ClearCINTMessageCallback
{
public:
/**
* @brief Clear Cint's error message callback.
*
* This could (almost) just as well be a free function.
* The only reason to put it inside a class is that Root doesn't
* auto-load functions, only classes.
*/
static void initialize();
};
} // namespace RootUtils
#endif // not ROOTUTILS_CLEARCINTMESSAGECALLBACK_H
......@@ -27,6 +27,5 @@ struct TreeTest
#include "RootUtils/InitHist.h"
#include "RootUtils/StdHackGenerator.h"
#include "RootUtils/ScanForAbstract.h"
#include "RootUtils/ClearCINTMessageCallback.h"
#include "RootUtils/ILogger.h"
#include "RootUtils/ScatterH2.h"
......@@ -11,7 +11,6 @@
<class name="RootUtils::InitHist" />
<class name="RootUtils::StdHackGenerator" />
<class name="RootUtils::ScanForAbstract" />
<class name="RootUtils::ClearCINTMessageCallback" />
<class name="RootUtils::ILogger" />
<class name="RootUtils::ScatterH2" />
<class name="RootUtils::ScatterH2::Pair" />
......
......@@ -15,9 +15,6 @@ system).
Here's a brief list of what's here.
- RootUtils::ClearCINTMessageCallback: Work around an issue where importing
PyCintex will disable error messages if you're using CINT as a shell.
- RootUtils::DataVectorConvert: Provide backwards compatibility for
reading DataVector classes for which inheritance relations have changed.
......
personal_ws-1.1 en 371
structs
ClearCINTMessageCallback
sie
histo
PyMethodDef
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: ClearCINTMessageCallback.cxx,v 1.1 2007-10-19 21:03:00 ssnyder Exp $
/**
* @file RootUtils/src/ClearCINTMessageCallback.cxx
* @author scott snyder
* @date Oct 2007
* @brief Clear Cint's error message callback.
*/
#include "RootUtils/ClearCINTMessageCallback.h"
#include "RVersion.h"
#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
#include "Api.h"
#endif
namespace RootUtils {
/**
* @brief Clear Cint's error message callback.
*/
void ClearCINTMessageCallback::initialize()
{
// Doesn't do anything in root 6 (no cint!).
#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
G__set_errmsgcallback (0);
#endif
}
} // namespace RootUtils
......@@ -1019,19 +1019,6 @@ ROOT.RootUtils.StdHackGenerator.initialize()
if ROOT.gApplication.GetName() != "TRint":
ROOT.RootUtils.InitHist.initialize()
# PyROOT sets up a callback to intercept Cint's error messages
# and turn them into Python errors. That's fine if you're using
# Python as a shell. But if you're using Cint as a shell
# (and calling python through TPython), then this will result
# in Cint's error messages being lost.
#
# Now, PyROOT itself is smart enough to only install the callback
# if python is actually being used as a shell. However, PyCintex
# installs the callback unconditionally. This function can be
# used to undo the damage.
if ROOT.gApplication.GetName() != "PyROOT::TPyROOTApplication":
ROOT.RootUtils.ClearCINTMessageCallback.initialize()
# Set up RootConversions converters.
#reg=ROOT.TConverterRegistry.Instance()
#reg.AddConverter ("TauJetContainer_p1_old_cnv")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment