ROOT
master
Reference Guide
Loading...
Searching...
No Matches
FITS_tutorial6.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_FITS
3
/// \notebook
4
/// Open a FITS file whose primary array represents
5
/// a spectrum table (flux vs wavelength) and dump its columns
6
///
7
/// \macro_code
8
/// \macro_output
9
///
10
/// \author Claudi Martinez
11
12
void
FITS_tutorial6
()
13
{
14
// We open a table from a FITS file
15
// and dump its columns.
16
17
TString
dir =
gROOT
->GetTutorialDir();
18
19
//Open the table
20
TFITSHDU
hdu
(dir +
"/io/fitsio/sample4.fits[1]"
);
21
22
// Show columns
23
const
auto
nColumns
=
hdu
.GetTabNColumns();
24
printf
(
"The table has %d columns:\n"
,
nColumns
);
25
for
(
auto
i :
ROOT
::
TSeqI
(
nColumns
)) {
26
printf
(
" - Column %d: %s\n"
, i,
hdu
.GetColumnName(i).Data());
27
}
28
}
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
gROOT
#define gROOT
Definition
TROOT.h:406
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TFITSHDU
FITS file interface class.
Definition
TFITS.h:35
TString
Basic string class.
Definition
TString.h:139
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition
EExecutionPolicy.hxx:4
ROOT::TSeqI
TSeq< int > TSeqI
Definition
TSeq.hxx:203
tutorials
io
fitsio
FITS_tutorial6.C
ROOT master - Reference Guide Generated on Fri Jan 24 2025 04:37:19 (GVA Time) using Doxygen 1.10.0