SatAndLight  2.2.2-hubble
Simulation toolkit for space telescopes
SatelliteRead.h
Go to the documentation of this file.
1 #ifndef __SatelliteRead__
2 #define __SatelliteRead__
3 
10 #include "TelescopeRead.h"
11 
12 using namespace std;
13 
20 class SatelliteRead: public TChain {
21 
22  public:
23 
30 
35  SatelliteRead(const string aFilePattern);
36 
38 
41  virtual ~SatelliteRead(void);
47 
50  inline int GetNtelescopes(void){ return (int)sat_tel.size(); };
51 
53 
59  inline long long int GetPictureIndex(const UInt_t aTelescopeIndex){
60  if(aTelescopeIndex>=(int)sat_tel.size()) return -1;
61  return sat_tel[aTelescopeIndex]->TChain::GetReadEntry();
62  };
63 
65 
71  inline TH2S* GetPicture(const UInt_t aTelescopeIndex){
72  if(aTelescopeIndex>=(int)sat_tel.size()) return NULL;
73  return sat_tel[aTelescopeIndex]->CameraRead::GetMap(pixamplitude);
74  };
75 
77 
81  void Init(void);
82 
84 
92  bool SetTime(const ULong64_t aTime);
93 
95 
99  inline string GetTelescopeName(const UInt_t aTelescopeIndex){
100  if(aTelescopeIndex>=(int)sat_tel.size()) return "";
101  return sat_tel[aTelescopeIndex]->GetName();
102  };
103 
105 
108  inline int GetNfiles(void){
109  if(!sat_tel.size()) return 0;
110  return sat_tel[0]->GetNtrees();
111  };
112 
114 
118  ULong64_t GetTimeStart(void);
119 
121 
125  UInt_t GetTimeDuration(void);
126 
128 
133  inline TelescopeRead* GetTelescope(const UInt_t aTelescopeIndex){
134  if(aTelescopeIndex>=(UInt_t)sat_tel.size()) return NULL;
135  return sat_tel[aTelescopeIndex];
136  };
137 
139 
151  int GetFlightSequence(const UInt_t aTelescopeIndex,
152  TGraph **aAlpha, TGraph **aBeta, TGraph **aGamma);
153 
154 
155  private:
156 
157  vector <TelescopeRead*> sat_tel;
158 
159  ClassDef(SatelliteRead,0)
160 };
161 
162 #endif
163 
164 
@ pixamplitude
raw amplitude map.
Definition: CameraConfig.h:26
This module is used to read a Telescope structure.
Read a Satellite sequence.
Definition: SatelliteRead.h:20
long long int GetPictureIndex(const UInt_t aTelescopeIndex)
Returns the current picture index of a given telescope.
Definition: SatelliteRead.h:59
SatelliteRead(const string aFilePattern)
SatelliteRead class constuctor.
string GetTelescopeName(const UInt_t aTelescopeIndex)
Returns the name of a given telescope.
Definition: SatelliteRead.h:99
vector< TelescopeRead * > sat_tel
Vector of telescopes.
Definition: SatelliteRead.h:157
int GetNtelescopes(void)
Returns the number of telescopes.
Definition: SatelliteRead.h:50
TelescopeRead * GetTelescope(const UInt_t aTelescopeIndex)
Returns a pointer to a given telescope.
Definition: SatelliteRead.h:133
TH2S * GetPicture(const UInt_t aTelescopeIndex)
Returns the current picture of a given telescope.
Definition: SatelliteRead.h:71
int GetNfiles(void)
Returns the number of input files.
Definition: SatelliteRead.h:108
Read a Telescope object.
Definition: TelescopeRead.h:26