ROOT
6.16/01
Reference Guide
tree
treeplayer
inc
TTreeFormulaManager.h
Go to the documentation of this file.
1
// @(#)root/treeplayer:$Id$
2
// Author: Philippe Canal 20/03/02
3
4
/*************************************************************************
5
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers and al. *
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_TTreeFormulaManager
13
#define ROOT_TTreeFormulaManager
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TTreeFormulaManager //
19
// //
20
// A class coordinating several TTreeFormula objects. //
21
// //
22
//////////////////////////////////////////////////////////////////////////
23
24
25
#include "
TObjArray.h
"
26
27
#include "
TTreeFormula.h
"
28
29
class
TArrayI
;
30
31
32
class
TTreeFormulaManager
:
public
TObject
{
33
private
:
34
TObjArray
fFormulas
;
35
Int_t
fMultiplicity
;
// Indicator of the variability of the formula
36
Bool_t
fMultiVarDim
;
// True if one of the variable has 2 variable size dimensions.
37
Int_t
fNdata
;
//! Last value calculated by GetNdata
38
39
//the next line should be: mutable Int_t fCumulUsedSizes[kMAXFORMDIM+1]; See GetNdata()
40
Int_t
fCumulUsedSizes
[
kMAXFORMDIM
+1];
//Accumulated size of lower dimensions as seen for this entry
41
TArrayI
*
fCumulUsedVarDims
;
//fCumulUsedSizes(1) for multi variable dimensions case
42
//the next line should be: mutable Int_t fUsedSizes[kMAXFORMDIM+1]; See GetNdata()
43
Int_t
fUsedSizes
[
kMAXFORMDIM
+1];
//Actual size of the dimensions as seen for this entry.
44
TArrayI
*
fVarDims
[
kMAXFORMDIM
+1];
//List of variable sizes dimensions.
45
Int_t
fVirtUsedSizes
[
kMAXFORMDIM
+1];
//Virtual size of lower dimensions as seen for this formula
46
47
Bool_t
fNeedSync
;
// Indicate whether a new formula has been added since the last synchronization
48
49
friend
class
TTreeFormula
;
50
51
private
:
52
// Not implemented yet
53
TTreeFormulaManager
(
const
TTreeFormulaManager
&);
54
TTreeFormulaManager
&
operator=
(
const
TTreeFormulaManager
&);
55
56
protected
:
57
58
virtual
void
AddVarDims
(
Int_t
virt_dim);
59
virtual
void
CancelDimension
(
Int_t
virt_dim);
60
virtual
void
EnableMultiVarDims
();
61
virtual
void
UpdateUsedSize
(
Int_t
&virt_dim,
Int_t
vsize);
62
63
public
:
64
TTreeFormulaManager
();
65
~TTreeFormulaManager
();
66
67
virtual
void
Add
(
TTreeFormula
*);
68
virtual
Int_t
GetMultiplicity
()
const
{
return
fMultiplicity
;}
69
virtual
Int_t
GetNdata
(
Bool_t
forceLoadDim =
kFALSE
);
70
virtual
Bool_t
Notify
() {
UpdateFormulaLeaves
();
return
kTRUE
; }
71
virtual
void
Remove
(
TTreeFormula
*);
72
virtual
Bool_t
Sync
();
73
virtual
void
UpdateFormulaLeaves
();
74
75
ClassDef
(
TTreeFormulaManager
,0)
// A class coordinating several TTreeFormula objects.
76
};
77
78
79
#endif
// ROOT_TTreeFormulaManager
80
Int_t
int Int_t
Definition:
RtypesCore.h:41
kFALSE
const Bool_t kFALSE
Definition:
RtypesCore.h:88
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
kTRUE
const Bool_t kTRUE
Definition:
RtypesCore.h:87
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:324
TObjArray.h
TTreeFormula.h
kMAXFORMDIM
const Int_t kMAXFORMDIM
Definition:
TTreeFormula.h:43
TArrayI
Array of integers (32 bits per element).
Definition:
TArrayI.h:27
TObjArray
An array of TObjects.
Definition:
TObjArray.h:37
TObject
Mother of all ROOT objects.
Definition:
TObject.h:37
TTreeFormulaManager
Used to coordinate one or more TTreeFormula objects.
Definition:
TTreeFormulaManager.h:32
TTreeFormulaManager::UpdateUsedSize
virtual void UpdateUsedSize(Int_t &virt_dim, Int_t vsize)
Reload the array sizes.
Definition:
TTreeFormulaManager.cxx:309
TTreeFormulaManager::fVirtUsedSizes
Int_t fVirtUsedSizes[kMAXFORMDIM+1]
Definition:
TTreeFormulaManager.h:45
TTreeFormulaManager::fNdata
Int_t fNdata
Definition:
TTreeFormulaManager.h:37
TTreeFormulaManager::UpdateFormulaLeaves
virtual void UpdateFormulaLeaves()
This function could be called TTreePlayer::UpdateFormulaLeaves, itself called by TChain::LoadTree whe...
Definition:
TTreeFormulaManager.cxx:292
TTreeFormulaManager::fCumulUsedVarDims
TArrayI * fCumulUsedVarDims
Definition:
TTreeFormulaManager.h:41
TTreeFormulaManager::fVarDims
TArrayI * fVarDims[kMAXFORMDIM+1]
Definition:
TTreeFormulaManager.h:44
TTreeFormulaManager::fFormulas
TObjArray fFormulas
Definition:
TTreeFormulaManager.h:34
TTreeFormulaManager::EnableMultiVarDims
virtual void EnableMultiVarDims()
Set the manager as handling a formula with multiple variable dimensions.
Definition:
TTreeFormulaManager.cxx:114
TTreeFormulaManager::fMultiplicity
Int_t fMultiplicity
Definition:
TTreeFormulaManager.h:35
TTreeFormulaManager::fMultiVarDim
Bool_t fMultiVarDim
Definition:
TTreeFormulaManager.h:36
TTreeFormulaManager::operator=
TTreeFormulaManager & operator=(const TTreeFormulaManager &)
TTreeFormulaManager::TTreeFormulaManager
TTreeFormulaManager(const TTreeFormulaManager &)
TTreeFormulaManager::GetNdata
virtual Int_t GetNdata(Bool_t forceLoadDim=kFALSE)
Return number of available instances in the formulas.
Definition:
TTreeFormulaManager.cxx:123
TTreeFormulaManager::CancelDimension
virtual void CancelDimension(Int_t virt_dim)
Cancel a dimension.
Definition:
TTreeFormulaManager.cxx:106
TTreeFormulaManager::~TTreeFormulaManager
~TTreeFormulaManager()
Tree FormulaManager default destructor.
Definition:
TTreeFormulaManager.cxx:50
TTreeFormulaManager::fCumulUsedSizes
Int_t fCumulUsedSizes[kMAXFORMDIM+1]
Last value calculated by GetNdata.
Definition:
TTreeFormulaManager.h:40
TTreeFormulaManager::fUsedSizes
Int_t fUsedSizes[kMAXFORMDIM+1]
Definition:
TTreeFormulaManager.h:43
TTreeFormulaManager::Sync
virtual Bool_t Sync()
Synchronize all the formulae.
Definition:
TTreeFormulaManager.cxx:220
TTreeFormulaManager::Add
virtual void Add(TTreeFormula *)
Add a new formula to the list of formulas managed The manager of the formula will be changed and the ...
Definition:
TTreeFormulaManager.cxx:72
TTreeFormulaManager::AddVarDims
virtual void AddVarDims(Int_t virt_dim)
Add a variable dimension.
Definition:
TTreeFormulaManager.cxx:97
TTreeFormulaManager::Remove
virtual void Remove(TTreeFormula *)
Remove a formula from this manager.
Definition:
TTreeFormulaManager.cxx:62
TTreeFormulaManager::GetMultiplicity
virtual Int_t GetMultiplicity() const
Definition:
TTreeFormulaManager.h:68
TTreeFormulaManager::fNeedSync
Bool_t fNeedSync
Definition:
TTreeFormulaManager.h:47
TTreeFormulaManager::TTreeFormulaManager
TTreeFormulaManager()
Tree FormulaManger default constructor.
Definition:
TTreeFormulaManager.cxx:30
TTreeFormulaManager::Notify
virtual Bool_t Notify()
This method must be overridden to handle object notification.
Definition:
TTreeFormulaManager.h:70
TTreeFormula
Used to pass a selection expression to the Tree drawing routine.
Definition:
TTreeFormula.h:58