62#define PAWC_SIZE 4000000
69# define hcbits hcbits_
70# define hcbook hcbook_
84extern "C" int quest[100];
87extern "C" int rzcl[11];
107# define hlimit hlimit_
109# define hropen hropen_
112# define hnoent hnoent_
114# define hgiven hgiven_
115# define hgnpar hgnpar_
121# define hdcofl hdcofl_
122# define hmaxim hmaxim_
123# define hminim hminim_
124# define hdelet hdelet_
125# define hntvar2 hntvar2_
126# define hntvar3 hntvar3_
127# define hbname hbname_
128# define hbnamc hbnamc_
140# define DEFCHAR const char*
141# define PASSCHAR(string) string
148# define hlimit HLIMIT
150# define hropen HROPEN
153# define hnoent HNOENT
155# define hgiven HGIVEN
156# define hgnpar HGNPAR
162# define hdcofl HDCOFL
163# define hmaxim HMAXIM
164# define hminim HMINIM
165# define hdelet HDELET
166# define hntvar2 HNTVAR2
167# define hntvar3 HNTVAR3
168# define hbname HBNAME
169# define hbnamc HBNAMC
179# define type_of_call _stdcall
180# define DEFCHAR const char*, const int
181# define PASSCHAR(string) string, strlen(string)
191 const int&,
const int&);
202 const int&,
const float&,
const float&,
const int&,
const int&);
212 const float&,
const float&);
217extern "C" void type_of_call hntvar2(
const int&,
const int&,
DEFCHAR,
DEFCHAR,
DEFCHAR,
int&,
int&,
int&,
int&,
int&,
fortran_charlen_t,
fortran_charlen_t,
fortran_charlen_t);
284 for (i=0;i<10;i++)
fgLuns[i] = 0;
297 Error(
"THbookFile",
"Too many HbookFiles\n");
316 printf(
"Error cannot open input file: %s\n",
fname);
327 gROOT->GetListOfBrowsables()->Add(
this,
fname);
331 for (
Int_t key=1;key<1000000;key++) {
335 if (
quest[13] & 8)
continue;
360 b->Add(
fKeys,
"IDs on disk");
382 for (i=0;i<512;i++)
cdir[i] =
' ';
391 for (i=510;i>=0;i--) {
392 if (
cdir[i] !=
' ')
break;
409 gROOT->GetListOfBrowsables()->Remove(
this);
454 for (
Int_t key=1;key<1000000;key++) {
458 if (
quest[13] & 8)
continue;
460 if (
id ==
idd)
break;
462 if (
id == 0)
return nullptr;
464 printf(
"Error cannot find ID = %d\n",
idd);
474 printf(
"WARNING, previous ID=%d is replaced\n",
id);
481 printf(
"Error cannot read ID = %d\n",
id);
562 if (!formula)
return;
572 if (var == 1 && i ==
ncodes) last = 1;
595 std::int64_t
aadd =
reinterpret_cast<std::int64_t
>(add);
628 if (dot)
strcpy(dot+1,
"root");
633 char *
cmd =
new char[
nch+1];
644 if (
f->IsZombie()) {
delete f;
f =
nullptr;}
679 for (i=0;i<80;i++)
chtitl[i]=0;
695 for (i=80;i>0;i--) {
if (
chtitl[i] ==
' ')
chtitl[i] = 0; }
702 std::int64_t add =
reinterpret_cast<std::int64_t
>(&
bigbuf[0]);
712 for(i=0; i<nvar;i++) {
717 memset(fullname,
' ',
sizeof(fullname));
718 fullname[
sizeof(fullname)-1]=0;
720 hntvar2(
id,i+1,
PASSCHAR(
name),
PASSCHAR(fullname),
PASSCHAR(
block),
nsub,
itype,
isize,
nbits,
ielem,32,64,32);
736 if (fullname[
j] ==
' ') fullname[
j] = 0;
837 for (i=0;i<80;i++)
chtitl[i]=0;
845 for (i=80;i>0;i--) {
if (
chtitl[i] ==
' ')
chtitl[i] = 0; }
852 for(i=0; i<nvar;i++) {
866 if (
name[
j] !=
' ')
break;
902 hgive(
id,
chtitl,
ncx,
xmin,
xmax,
ncy,
ymin,
ymax,
nwt,
idb,80);
904 hgive(
id,
chtitl,80,
ncx,
xmin,
xmax,
ncy,
ymin,
ymax,
nwt,
idb);
917 for (i=1;i<=
ncx;i++) {
926 p->SetBinError(i,error);
941 hgive(
id,
chtitl,
ncx,
xmin,
xmax,
ncy,
ymin,
ymax,
nwt,
idb,80);
943 hgive(
id,
chtitl,80,
ncx,
xmin,
xmax,
ncy,
ymin,
ymax,
nwt,
idb);
951 for (i=0;i<=
ncx;i++) xbins[i] =
q[
lbins+i+1];
965 for (i=0;i<=
ncx+1;i++) {
993 hgive(
id,
chtitl,
ncx,
xmin,
xmax,
ncy,
ymin,
ymax,
nwt,
idb,80);
995 hgive(
id,
chtitl,80,
ncx,
xmin,
xmax,
ncy,
ymin,
ymax,
nwt,
idb);
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t nchar
R__EXTERN TSystem * gSystem
Using a TBrowser one can browse all ROOT objects.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
1-D histogram with a float per channel (see TH1 documentation)
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
virtual void SetMaximum(Double_t maximum=-1111)
virtual void SetBinError(Int_t bin, Double_t error)
Set the bin Error Note that this resets the bin eror option to be of Normal Type and for the non-empt...
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual void SetMinimum(Double_t minimum=-1111)
TList * GetListOfFunctions() const
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
virtual void SetEntries(Double_t n)
2-D histogram with a float per channel (see TH1 documentation)
Int_t Fill(Double_t) override
Invalid Fill method.
void InitLeaves(Int_t id, Int_t var, TTreeFormula *formula)
This function is called from the first entry in TTreePlayer::InitLoop It analyzes the list of variabl...
TObject * Get(Int_t id)
import Hbook object with identifier idd in memory
void DeleteID(Int_t id)
remove id from file and memory
Int_t GetEntryBranch(Int_t entry, Int_t id)
Read in memory only the branch bname.
virtual void Close(Option_t *option="")
Close the Hbook file.
void ls(const char *path="") const override
List contents of Hbook directory.
virtual void SetBranchAddress(Int_t id, const char *bname, void *add)
Set branch address.
virtual Bool_t cd(const char *dirname="")
change directory to dirname
~THbookFile() override
destructor
THbookFile()
the constructor
TObject * FindObject(const char *name) const override
return object with name in fList in memory
virtual TObject * Convert1D(Int_t id)
Convert an Hbook 1-d histogram into a Root TH1F.
virtual TObject * ConvertProfile(Int_t id)
Convert an Hbook profile histogram into a Root TProfile.
virtual TFile * Convert2root(const char *rootname="", Int_t lrecl=0, Option_t *option="")
Convert this Hbook file to a Root file with name rootname.
virtual Bool_t IsOpen() const
Returns kTRUE in case file is open and kFALSE if file is not open.
virtual TObject * Convert2D(Int_t id)
Convert an Hbook 2-d histogram into a Root TH2F.
virtual TObject * ConvertCWN(Int_t id)
Convert the Column-Wise-Ntuple id to a Root Tree.
void Browse(TBrowser *b) override
to be implemented
Int_t GetEntry(Int_t entry, Int_t id, Int_t atype, Float_t *x)
Read in memory all columns of entry number of ntuple id from the Hbook file.
virtual TObject * ConvertRWN(Int_t id)
Convert the Row-Wise-Ntuple id to a Root Tree.
A wrapper class supporting Hbook ntuples (CWN and RWN).
virtual void SetType(Int_t atype)
char * MakeX(Int_t nvars)
Long64_t SetEntries(Long64_t n=-1) override
Set the number of entries in the tree header and its branches.
virtual void SetHbookFile(THbookFile *file)
A TLeaf for an Integer data type.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Mother of all ROOT objects.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void ToLower()
Change string to lower-case.
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual TObjArray * GetListOfBranches()
Double_t Sqrt(Double_t x)
Returns the square root of x.