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(nullptr),fBaddressType(0),
29 fBaddressIsPtr(false), fDecomposedObj(false), fCheckedType(false), fBranchPtr(nullptr), fLoadResult(0)
30{
31 fNPackets = 0;
32 fPackets = nullptr;
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(nullptr),fBaddressType(0),
44 fBaddressIsPtr(false), fDecomposedObj(false), fCheckedType(false), fBranchPtr(nullptr), fLoadResult(0)
45{
46 fNPackets = 0;
47 fPackets = nullptr;
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 char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:377
char name[80]
Definition TGX11.cxx:110
A TChainElement describes a component of a TChain.
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 SetPacketSize(Int_t size=100)
Set number of entries per packet for parallel root.
~TChainElement() override
Default destructor for a chain element.
Int_t fNPackets
Number of packets.
char * fPackets
! Packet descriptor string
virtual void SetLookedUp(bool y=true)
Set/Reset the looked-up bit.
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.
void ls(Option_t *option="") const override
List files in the chain.
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
const char * GetTitle() const override
Returns title of object.
Definition TNamed.h:48
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:780
void ResetBit(UInt_t f)
Definition TObject.h:198
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Definition TROOT.cxx:2891
static constexpr Long64_t kMaxEntries
Definition TTree.h:229
Double_t y[n]
Definition legend1.C:17