Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TChainElement.cxx
Go to the documentation of this file.
1// @(#)root/tree:$Id$
2// Author: Rene Brun 11/02/97
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/** \class TChainElement
13\ingroup tree
14
15A TChainElement describes a component of a TChain.
16*/
17
18#include "TChainElement.h"
19#include "TTree.h"
20#include "TROOT.h"
21#include <iostream>
22
24
25////////////////////////////////////////////////////////////////////////////////
26/// Default constructor for a chain element.
27
28TChainElement::TChainElement() : TNamed(),fBaddress(0),fBaddressType(0),
29 fBaddressIsPtr(kFALSE), fDecomposedObj(kFALSE), fCheckedType(kFALSE), fBranchPtr(0), fLoadResult(0)
30{
31 fNPackets = 0;
32 fPackets = 0;
33 fEntries = 0;
34 fPacketSize = 100;
35 fStatus = -1;
37}
38
39////////////////////////////////////////////////////////////////////////////////
40/// Create a chain element.
41
42TChainElement::TChainElement(const char *name, const char *title)
43 :TNamed(name,title),fBaddress(0),fBaddressType(0),
44 fBaddressIsPtr(kFALSE), fDecomposedObj(kFALSE), fCheckedType(kFALSE), fBranchPtr(0), fLoadResult(0)
45{
46 fNPackets = 0;
47 fPackets = 0;
48 fEntries = 0;
49 fPacketSize = 100;
50 fStatus = -1;
52}
53
54////////////////////////////////////////////////////////////////////////////////
55/// Default destructor for a chain element.
56
58{
59 delete [] fPackets;
60}
61
62////////////////////////////////////////////////////////////////////////////////
63/// Initialize the packet descriptor string.
64
66{
68 delete [] fPackets;
69 fPackets = new char[fNPackets+1];
70 for (Int_t i=0;i<fNPackets;i++) fPackets[i] = ' ';
72
73}
74
75////////////////////////////////////////////////////////////////////////////////
76/// List files in the chain.
77
79{
81 std::cout << GetTitle() << "tree:" << GetName() << " entries=";
83 std::cout << "<not calculated>";
84 else
85 std::cout << fEntries;
86 std::cout << '\n';
87}
88
89////////////////////////////////////////////////////////////////////////////////
90/// Set number of entries per packet for parallel root.
91
93{
95}
96
97////////////////////////////////////////////////////////////////////////////////
98/// Set/Reset the looked-up bit
99
101{
102 if (y)
104 else
106}
107
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Definition RtypesCore.h:45
const Bool_t kFALSE
Definition RtypesCore.h:101
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:364
char name[80]
Definition TGX11.cxx:110
A TChainElement describes a component of a TChain.
virtual ~TChainElement()
Default destructor for a chain element.
Long64_t fEntries
Number of entries in the tree of this chain element.
Int_t fPacketSize
Number of events in one packet for parallel root.
virtual void SetLookedUp(Bool_t y=kTRUE)
Set/Reset the looked-up bit.
virtual void SetPacketSize(Int_t size=100)
Set number of entries per packet for parallel root.
Int_t fNPackets
Number of packets.
char * fPackets
! Packet descriptor string
Int_t fStatus
branch status when used as a branch
TChainElement()
Default constructor for a chain element.
virtual void CreatePackets()
Initialize the packet descriptor string.
virtual void ls(Option_t *option="") const
List files in the chain.
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual const char * GetTitle() const
Returns title of object.
Definition TNamed.h:48
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:766
void ResetBit(UInt_t f)
Definition TObject.h:200
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Definition TROOT.cxx:2819
static constexpr Long64_t kMaxEntries
Definition TTree.h:226
Double_t y[n]
Definition legend1.C:17