ATLAS Offline Software
LWHistControls.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Header file for class LWHistControls //
9 // //
10 // Description: Static methods for controlling and //
11 // monitoring various aspects related to the //
12 // light-weight histograms (in particular //
13 // memory management. Typical clients should //
14 // not worry about these. //
15 // //
16 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
17 // Initial version: April 2009 //
18 // //
20 
21 #ifndef LWHISTCONTROLS_H
22 #define LWHISTCONTROLS_H
23 
25 public:
26 
27  //Whether or not calls to the various ::getROOTHist..() should
28  //trigger a cleanup of the internal data structures apart from the
29  //held ROOT histogram (i.e. effectively disallow further usage of
30  //the LW histogram itself). Default is true:
31  static bool cleanupOnGetROOT();
32  static void setCleanupOnGetROOT(bool);
33 
34  //As absurd as it is to use ROOT histograms as the backend of LW
35  //histograms, this is exactly what we will have to do when running
36  //in the online environment (in that case getROOTHist will return
37  //the backend - which is only deleted along with the LW histogram):
38  static bool hasROOTBackend();
39  static void setROOTBackend(bool);
40 
41  //For statistics (bytes):
42  static long long getTotalPoolMemAllocated();//Obsolete! Use LWHistStats method instead
43  static long long getTotalPoolMemUsed();//Obsolete! Use LWHistStats method instead
44  //Not more info, but for convenience:
45  static long long getMemUnusedButAllocatedInPools();//Obsolete! Use LWHistStats method instead
46  static double poolWasteFraction();//0: perfect, 1: very bad//Obsolete! Use LWHistStats method instead
47 
48  //Call at the end of the job for a happy valgrind:
49  static void releaseAllHeldMemory();
50 
51 private:
54  class Imp;
55 
56 };
57 
58 #endif
LWHistControls::setROOTBackend
static void setROOTBackend(bool)
Definition: LWHistControls.cxx:53
LWHistControls::hasROOTBackend
static bool hasROOTBackend()
Definition: LWHistControls.cxx:47
LWHistControls::cleanupOnGetROOT
static bool cleanupOnGetROOT()
Definition: LWHistControls.cxx:35
LWHistControls::releaseAllHeldMemory
static void releaseAllHeldMemory()
Definition: LWHistControls.cxx:41
LWHistControls::getMemUnusedButAllocatedInPools
static long long getMemUnusedButAllocatedInPools()
Definition: LWHistControls.cxx:71
LWHistControls::LWHistControls
LWHistControls()
Definition: LWHistControls.h:52
LWHistControls::getTotalPoolMemUsed
static long long getTotalPoolMemUsed()
Definition: LWHistControls.cxx:65
LWHistControls::poolWasteFraction
static double poolWasteFraction()
Definition: LWHistControls.cxx:77
LWHistControls
Definition: LWHistControls.h:24
LWHistControls::getTotalPoolMemAllocated
static long long getTotalPoolMemAllocated()
Definition: LWHistControls.cxx:59
LWHistControls::setCleanupOnGetROOT
static void setCleanupOnGetROOT(bool)
Definition: LWHistControls.cxx:29
LWHistControls::~LWHistControls
~LWHistControls()
Definition: LWHistControls.h:53