ATLAS Offline Software
Classes | Namespaces | Macros | Functions
rootspy.cxx File Reference
#include "dlfcn.h"
#include <execinfo.h>
#include <cstring>
#include <map>
#include <iostream>
Include dependency graph for rootspy.cxx:

Go to the source code of this file.

Classes

struct  RootSpy::logitem
 
class  TH1
 
class  TH1K
 
class  TH1F
 
class  TH1I
 
class  TH1D
 
class  TH1C
 
class  TH1S
 
class  TH2
 
class  TH2C
 
class  TH2S
 
class  TH2I
 
class  TH2F
 
class  TH2D
 
class  TH3
 
class  TH3C
 
class  TH3S
 
class  TH3I
 
class  TH3F
 
class  TH3D
 
class  TProfile
 
class  TProfile2D
 
class  TProfile3D
 

Namespaces

 RootSpy
 

Macros

#define LOGCALL   static void * realaddr=0;++RootSpy::loglvl;RootSpy::logcall(this,realaddr);
 
#define LOGCALLC   static const void * realaddr=0;++RootSpy::loglvl;RootSpy::logcall(this,realaddr);
 

Functions

unsigned roothiststatGetSize (TH1 *h)
 
const std::pair< std::string, std::string > & RootSpy::getSymbol (const void *address)
 
bool RootSpy::endsWith (const std::string &s, const char *pat, size_t npat)
 
bool RootSpy::ignoreLib (const std::string &libname)
 
const char * RootSpy::getROOTName (void *tobject)
 
const char * RootSpy::getROOTClass (void *tobject)
 
void RootSpy::logcall (const void *cthisptr, void *&realaddr, bool indirect=false)
 
void RootSpy::logcall (const void *cthisptr, const void *&realaddr)
 
const std::pair< std::string, std::string > & RootSpy::getUserSymbol (const logitem &item)
 
void RootSpy::reportcall (const logitem &item, unsigned ncalls)
 
void RootSpy::reporthist (const logitem &item, unsigned thesize)
 
void RootSpy::producereport ()
 
template<typename T >
ret (T t)
 
void ret (void)
 

Macro Definition Documentation

◆ LOGCALL

#define LOGCALL   static void * realaddr=0;++RootSpy::loglvl;RootSpy::logcall(this,realaddr);

Definition at line 247 of file rootspy.cxx.

◆ LOGCALLC

#define LOGCALLC   static const void * realaddr=0;++RootSpy::loglvl;RootSpy::logcall(this,realaddr);

Definition at line 248 of file rootspy.cxx.

Function Documentation

◆ ret() [1/2]

template<typename T >
T ret ( t)

Definition at line 260 of file rootspy.cxx.

260  {
261  --RootSpy::loglvl;
262  return t;
263 }

◆ ret() [2/2]

void ret ( void  )

Definition at line 264 of file rootspy.cxx.

264  {
265  --RootSpy::loglvl;
266 }

◆ roothiststatGetSize()

unsigned roothiststatGetSize ( TH1 h)

Definition at line 225 of file rootspy.cxx.

226 {
227  if (!h)
228  return 0;
229  //Since we are not linking with ROOT in this little spy lib, this
230  //particular method has to be implemented elsewhere (but if it is
231  //not, we simply return 0):
232  static bool needsinit = true;
233  static unsigned (*real)(TH1*) = 0;
234  if (needsinit) {
235  needsinit=false;
236  //Find our own signature:
237  void *array[1];
238  backtrace(array, 1);
239  real = (unsigned (*)(TH1*))dlsym(RTLD_NEXT,RootSpy::getSymbol(array[0]).second.c_str());
240  if (!real)
241  std::cout<<"ROOTSPY WARNING: Could not find roothiststatGetSize(..) symbol. Reduced functionality"<<std::endl;
242  }
243  return real ? real(h) : 0;
244 }
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
lumiFormat.array
array
Definition: lumiFormat.py:98
RootSpy::getSymbol
const std::pair< std::string, std::string > & getSymbol(const void *address)
Definition: rootspy.cxx:48
h
TH1
Definition: rootspy.cxx:268
check_log.backtrace
backtrace
Definition: check_log.py:58