SatAndLight  2.2.2-hubble
Simulation toolkit for space telescopes
SatelliteRead Class Reference

Read a Satellite sequence. More...

#include <SatelliteRead.h>

Inheritance diagram for SatelliteRead:
Collaboration diagram for SatelliteRead:

Public Member Functions

int GetFlightSequence (const UInt_t aTelescopeIndex, TGraph **aAlpha, TGraph **aBeta, TGraph **aGamma)
 Returns the flight sequence for a given telescope. More...
 
int GetNfiles (void)
 Returns the number of input files. More...
 
int GetNtelescopes (void)
 Returns the number of telescopes. More...
 
TH2S * GetPicture (const UInt_t aTelescopeIndex)
 Returns the current picture of a given telescope. More...
 
long long int GetPictureIndex (const UInt_t aTelescopeIndex)
 Returns the current picture index of a given telescope. More...
 
TelescopeReadGetTelescope (const UInt_t aTelescopeIndex)
 Returns a pointer to a given telescope. More...
 
string GetTelescopeName (const UInt_t aTelescopeIndex)
 Returns the name of a given telescope. More...
 
UInt_t GetTimeDuration (void)
 Returns the sequence time duration \([\mathrm{ms}]\). More...
 
ULong64_t GetTimeStart (void)
 Returns the sequence start time \([\mathrm{ms}]\). More...
 
void Init (void)
 Inits the satellite sequence. More...
 
bool SetTime (const ULong64_t aTime)
 Sets the satellite time. More...
 
Constructors and destructors
 SatelliteRead (const string aFilePattern)
 SatelliteRead class constuctor. More...
 
virtual ~SatelliteRead (void)
 SatelliteRead class destructor. More...
 

Private Attributes

vector< TelescopeRead * > sat_tel
 Vector of telescopes. More...
 

Detailed Description

Read a Satellite sequence.

A satellite sequence generated with the Satellite class is saved in ROOT files. This sequence can then be loaded using this class.

Author
Florent Robinet

Constructor & Destructor Documentation

◆ SatelliteRead()

SatelliteRead::SatelliteRead ( const string  aFilePattern)

SatelliteRead class constuctor.

The Satellite sequence is loaded: the telescope sructures are automatically detected (using the first file in the pattern) and loaded.

Parameters
[in]aFilePatternROOT file pattern where the sequence is saved.

◆ ~SatelliteRead()

SatelliteRead::~SatelliteRead ( void  )
virtual

SatelliteRead class destructor.

Member Function Documentation

◆ GetFlightSequence()

int SatelliteRead::GetFlightSequence ( const UInt_t  aTelescopeIndex,
TGraph **  aAlpha,
TGraph **  aBeta,
TGraph **  aGamma 
)

Returns the flight sequence for a given telescope.

Three TGraph objects are returned. They described the three Euler angles, \((\alpha, \beta, \gamma)\), as a funtion of time for a given telescope. The time is taken in the middle of the time exposition.

Parameters
[in]aTelescopeIndexTelescope index.
[out]aAlphaEuler angle \(\alpha\) as a function of time.
[out]aBetaEuler angle \(\beta\) as a function of time.
[out]aGammaEuler angle \(\gamma\) as a function of time.
Precondition
Only empty pointers should be provided. This function allocates the memory for the TGraph objects. The user should delete the object after use.
Returns
The number of points in the TGraph.
-1 if the telescope index does not exist.
See also
TelescopeRead::GetSequenceAngle().

◆ GetNfiles()

int SatelliteRead::GetNfiles ( void  )
inline

Returns the number of input files.

◆ GetNtelescopes()

int SatelliteRead::GetNtelescopes ( void  )
inline

Returns the number of telescopes.

◆ GetPicture()

TH2S* SatelliteRead::GetPicture ( const UInt_t  aTelescopeIndex)
inline

Returns the current picture of a given telescope.

A pointer to the current CameraRead picture (amplitude map) is returned for a given telescope identified by its index.

Parameters
[in]aTelescopeIndexTelescope index.
Returns
The pointer to the camera amplitude map, NULL if the telescope index does not exist.

◆ GetPictureIndex()

long long int SatelliteRead::GetPictureIndex ( const UInt_t  aTelescopeIndex)
inline

Returns the current picture index of a given telescope.

The CameraRead TChain entry index is returned for a given telescope identified by its index.

Parameters
[in]aTelescopeIndexTelescope index.
Returns
The picture index, -1 if the telescope index does not exist.

◆ GetTelescope()

TelescopeRead* SatelliteRead::GetTelescope ( const UInt_t  aTelescopeIndex)
inline

Returns a pointer to a given telescope.

Parameters
[in]aTelescopeIndexTelescope index.
Returns
A pointer to a TelescopeRead object, a pointer to NULL if the telescope index is out of range.

◆ GetTelescopeName()

string SatelliteRead::GetTelescopeName ( const UInt_t  aTelescopeIndex)
inline

Returns the name of a given telescope.

Parameters
[in]aTelescopeIndexTelescope index.

◆ GetTimeDuration()

UInt_t SatelliteRead::GetTimeDuration ( void  )

Returns the sequence time duration \([\mathrm{ms}]\).

This is given by the maximum duration of all pictures considering all telescopes in the satellite.

◆ GetTimeStart()

ULong64_t SatelliteRead::GetTimeStart ( void  )

Returns the sequence start time \([\mathrm{ms}]\).

This is given by the minimum time of all pictures considering all telescopes in the satellite.

◆ Init()

void SatelliteRead::Init ( void  )

Inits the satellite sequence.

The satellite telescopes are initialized on the first picture: first entry of the CameraRead TChain (if any).

◆ SetTime()

bool SatelliteRead::SetTime ( const ULong64_t  aTime)

Sets the satellite time.

Each telescope is considered and the camera time is set to the input time (see CameraRead::SetTime()).

Warning
This function assumes that the telescope pictures are time sorted.
Parameters
[in]aTimeTime \([\mathrm{ms}]\) to select the camera entry.
Returns
true if all camera are set to the input time, false if one or more camera can not be set to the input time.

Member Data Documentation

◆ sat_tel

vector<TelescopeRead*> SatelliteRead::sat_tel
private

Vector of telescopes.


The documentation for this class was generated from the following files: