Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TLeafI.h
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Rene Brun 12/01/96
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TLeafI
13 #define ROOT_TLeafI
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TLeafI //
19 // //
20 // A TLeaf for an Integer data type. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 
25 #include "TLeaf.h"
26 
27 class TLeafI : public TLeaf {
28 
29 protected:
30  Int_t fMinimum; ///< Minimum value if leaf range is specified
31  Int_t fMaximum; ///< Maximum value if leaf range is specified
32  Int_t *fValue; ///<! Pointer to data buffer
33  Int_t **fPointer; ///<! Address of pointer to data buffer
34 
35 public:
36  TLeafI();
37  TLeafI(TBranch *parent, const char *name, const char *type);
38  virtual ~TLeafI();
39 
40  virtual void Export(TClonesArray *list, Int_t n);
41  virtual void FillBasket(TBuffer &b);
42  virtual DeserializeType GetDeserializeType() const { return DeserializeType::kInPlace; }
43  const char *GetTypeName() const;
44  virtual Int_t GetMaximum() const { return fMaximum; }
45  virtual Int_t GetMinimum() const { return fMinimum; }
46  Double_t GetValue(Int_t i=0) const;
47  virtual void *GetValuePointer() const { return fValue; }
48  virtual Bool_t IncludeRange(TLeaf *);
49  virtual void Import(TClonesArray *list, Int_t n);
50  virtual void PrintValue(Int_t i=0) const;
51  virtual void ReadBasket(TBuffer &b);
52  virtual void ReadBasketExport(TBuffer &b, TClonesArray *list, Int_t n);
53  virtual bool ReadBasketFast(TBuffer&, Long64_t);
54  virtual bool ReadBasketSerialized(TBuffer&, Long64_t) { return GetDeserializeType() == DeserializeType::kInPlace; }
55  virtual void ReadValue(std::istream& s, Char_t delim = ' ');
56  virtual void SetAddress(void *add=0);
57  virtual void SetMaximum(Int_t max) {fMaximum = max;}
58  virtual void SetMinimum(Int_t min) {fMinimum = min;}
59 
60  ClassDef(TLeafI,1); //A TLeaf for an Integer data type.
61 };
62 
63 #endif