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
23
24////////////////////////////////////////////////////////////////////////////////
25/// Default constructor for a chain element.
26
27TChainElement::TChainElement() : TNamed(),fBaddress(nullptr),fBaddressType(0),
28 fBaddressIsPtr(false), fDecomposedObj(false), fCheckedType(false), fBranchPtr(nullptr), fLoadResult(0)
29{
30 fNPackets = 0;
31 fPackets = nullptr;
33 fPacketSize = 100;
34 fStatus = -1;
36}
37
38////////////////////////////////////////////////////////////////////////////////
39/// Create a chain element.
40
41TChainElement::TChainElement(const char *name, const char *title)
42 :TNamed(name,title),fBaddress(nullptr),fBaddressType(0),
43 fBaddressIsPtr(false), fDecomposedObj(false), fCheckedType(false), fBranchPtr(nullptr), fLoadResult(0)
44{
45 fNPackets = 0;
46 fPackets = nullptr;
48 fPacketSize = 100;
49 fStatus = -1;
51}
52
53////////////////////////////////////////////////////////////////////////////////
54/// Default destructor for a chain element.
55
60
61////////////////////////////////////////////////////////////////////////////////
62/// Initialize the packet descriptor string.
63
65{
67 delete [] fPackets;
68 fPackets = new char[fNPackets+1];
69 for (Int_t i=0;i<fNPackets;i++) fPackets[i] = ' ';
71
72}
73
74////////////////////////////////////////////////////////////////////////////////
75/// List files in the chain.
76
78{
80 std::cout << GetTitle() << "tree:" << GetName() << " entries=";
82 std::cout << "<not calculated>";
83 else
84 std::cout << fEntries;
85 std::cout << '\n';
86}
87
88////////////////////////////////////////////////////////////////////////////////
89/// Set number of entries per packet for parallel root.
90
95
96////////////////////////////////////////////////////////////////////////////////
97/// Set/Reset the looked-up bit
98
100{
101 if (y)
103 else
105}
106
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
char name[80]
Definition TGX11.cxx:110
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:49
const char * GetTitle() const override
Returns title of object.
Definition TNamed.h:50
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:864
void ResetBit(UInt_t f)
Definition TObject.h:201
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Definition TROOT.cxx:2898
static constexpr Long64_t kMaxEntries
Used as the max value for any TTree range operation.
Definition TTree.h:265
Double_t y[n]
Definition legend1.C:17