This file is indexed.

/usr/include/root/TObjectTable.h is in libroot-core-dev 5.34.30-0ubuntu8.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// @(#)root/cont:$Id$
// Author: Fons Rademakers   11/08/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TObjectTable
#define ROOT_TObjectTable


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TObjectTable                                                         //
//                                                                      //
// This class registers all instances of TObject and its derived        //
// classes in a hash table. The Add() and Remove() members are called   //
// from the TObject ctor and dtor, repectively. Using the Print()       //
// member one can see all currently active objects in the system.       //
// Using the runtime flag: Root.ObjectStat one can toggle this feature  //
// on or off.                                                           //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TObject
#include "TObject.h"
#endif

class TClass;


class TObjectTable : public TObject {

private:
   TObject  **fTable;
   Int_t      fSize;
   Int_t      fTally;

   Bool_t     HighWaterMark();
   void       Expand(Int_t newsize);
   Int_t      FindElement(TObject *obj);
   void       FixCollisions(Int_t index);

private:
   TObjectTable(const TObjectTable&);             // not implemented
   TObjectTable& operator=(const TObjectTable&);  // not implemented

public:
   TObjectTable(Int_t tableSize = 100);
   ~TObjectTable();

   void      Add(TObject *obj);
   void     *CheckPtrAndWarn(const char *msg, void *vp);
   void      Delete(Option_t *opt = "");
   Int_t     GetSize() const { return fSize; }
   Int_t     Instances() const { return fTally; }
   void      InstanceStatistics() const;
   void      Print(Option_t *option="") const;
   Bool_t    PtrIsValid(TObject *obj);
   void      Remove(TObject *obj);
   void      RemoveQuietly(TObject *obj);
   void      Statistics() { Print(); }
   void      Terminate();
   void      UpdateInstCount() const;

   static void AddObj(TObject *obj);

   ClassDef(TObjectTable,0)  //Table of active objects
};


inline Bool_t TObjectTable::HighWaterMark()
   { return (Bool_t) (fTally >= ((3*fSize)/4)); }

inline Bool_t TObjectTable::PtrIsValid(TObject *op)
   { return fTable[FindElement(op)] != 0; }


R__EXTERN TObjectTable *gObjectTable;

#endif