/usr/include/root/TClonesArray.h is in libroot-core-dev 5.34.19+dfsg-1.2.
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 87 88 89 90 91 92 93 94 95 | // @(#)root/cont:$Id$
// Author: Rene Brun 11/02/96
/*************************************************************************
* 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_TClonesArray
#define ROOT_TClonesArray
//////////////////////////////////////////////////////////////////////////
// //
// TClonesArray //
// //
// An array of clone TObjects. The array expands automatically when //
// adding elements (shrinking can be done explicitly). //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObjArray
#include "TObjArray.h"
#endif
class TClass;
class TClonesArray : public TObjArray {
protected:
TClass *fClass; //!Pointer to the class
TObjArray *fKeep; //!Saved copies of pointers to objects
public:
enum {
kForgetBits = BIT(0), // Do not create branches for fBits, fUniqueID
kNoSplit = BIT(1), // Array not split by TTree::Branch
kBypassStreamer = BIT(12) // Class Streamer not called (default)
};
TClonesArray();
TClonesArray(const char *classname, Int_t size = 1000, Bool_t call_dtor = kFALSE);
TClonesArray(const TClass *cl, Int_t size = 1000, Bool_t call_dtor = kFALSE);
TClonesArray(const TClonesArray& tc);
virtual ~TClonesArray();
TClonesArray& operator=(const TClonesArray& tc);
virtual void Compress();
virtual void Clear(Option_t *option="");
virtual void Delete(Option_t *option="");
virtual void Expand(Int_t newSize);
virtual void ExpandCreate(Int_t n);
virtual void ExpandCreateFast(Int_t n);
TClass *GetClass() const { return fClass; }
virtual void SetOwner(Bool_t enable = kTRUE);
void AddFirst(TObject *) { MayNotUse("AddFirst"); }
void AddLast(TObject *) { MayNotUse("AddLast"); }
void AddAt(TObject *, Int_t) { MayNotUse("AddAt"); }
void AddAtAndExpand(TObject *, Int_t) { MayNotUse("AddAtAndExpand"); }
Int_t AddAtFree(TObject *) { MayNotUse("AddAtFree"); return 0; }
void AddAfter(const TObject *, TObject *) { MayNotUse("AddAfter"); }
void AddBefore(const TObject *, TObject *) { MayNotUse("AddBefore"); }
void BypassStreamer(Bool_t bypass=kTRUE);
Bool_t CanBypassStreamer() const { return TestBit(kBypassStreamer); }
TObject *ConstructedAt(Int_t idx);
TObject *ConstructedAt(Int_t idx, Option_t *clear_options);
void SetClass(const char *classname,Int_t size=1000);
void SetClass(const TClass *cl,Int_t size=1000);
void AbsorbObjects(TClonesArray *tc);
void AbsorbObjects(TClonesArray *tc, Int_t idx1, Int_t idx2);
void MultiSort(Int_t nTCs, TClonesArray** tcs, Int_t upto = kMaxInt);
virtual TObject *RemoveAt(Int_t idx);
virtual TObject *Remove(TObject *obj);
virtual void RemoveRange(Int_t idx1, Int_t idx2);
virtual void Sort(Int_t upto = kMaxInt);
TObject *New(Int_t idx);
TObject *AddrAt(Int_t idx);
TObject *&operator[](Int_t idx);
TObject *operator[](Int_t idx) const;
ClassDef(TClonesArray,4) //An array of clone objects
};
inline TObject *TClonesArray::AddrAt(Int_t idx)
{
return operator[](idx);
}
#endif
|