GWOLLUM  4.2.0
Tools for gravitational-wave analyses
ffl.h
Go to the documentation of this file.
1 
6 #ifndef __ffl__
7 #define __ffl__
8 
9 #include "GwollumPlot.h"
10 #include "Segments.h"
11 #include <FrameL.h>
12 #include <FrVect.h>
13 
14 using namespace std;
15 
34 class ffl {
35 
36  public:
37 
50  ffl(const string aFrameFileList,
51  const string aPlotStyle="GWOLLUM",
52  const int aVerbosity=0);
53 
57  virtual ~ffl(void);
65  void Reset(void);
66 
71  void SetPlotName(const string aName);
72 
80  void DefineTmpDir(const string aTmpDirPath=".");
81 
85  inline string GetInputFfl(void){ return fInFrameFile; };
86 
94  inline void SetTrials(const unsigned int aNTrials, const unsigned int aNSleepSeconds){
95  ntrials = aNTrials; nsleepsec = aNSleepSeconds;
96  };
97 
104  string Convert2Ffl(void);
105 
116  bool ExtractChannels(const unsigned int aGps);
117 
129  bool LoadFrameFile(const unsigned int aGps=0);
130 
135  inline Segments* GetSegments(void){ return seg; }
136 
144  unsigned int GetChannelSampling(const string aChannelName, unsigned int &aChannelIndex);
145 
152  inline unsigned int GetChannelSampling(const string aChannelName){
153  unsigned int dummy;
154  return GetChannelSampling(aChannelName, dummy);
155  };
156 
162  inline bool PrintChannels(const unsigned int aGps=0){
163  bool res=LoadFrameFile(aGps);
164  for(unsigned int l=0; l<channels.size(); l++)
165  cout<<channels[l]<<" "<<sampling[l]<<endl;
166  return res;
167  };
168 
175  vector <string> GetChannelList(const string aFilter="");
176 
183  bool IsChannel(const string aChannelName);
184 
201  double* GetData(unsigned int &aSize, const string aChannelName,
202  const double aGpsStart, const double aGpsEnd,
203  const double aMissing=999.0);
204 
213  bool PrintData(const string aChannelName, const double aGpsStart, const double aGpsEnd, string aFileName);
214 
223  TGraph* PlotData(const string aChannelName, const double aGpsStart, const double aGpsEnd);
224 
225  private:
226 
227  bool status_OK;
228  string fInFrameFile;
229  string fWoFrameFile;
230  string fFormat;
231  unsigned int fVerbosity;
232  string srandint;
233  unsigned int ntrials;
234  unsigned int nsleepsec;
235 
236  vector<string> ffile;
238  FrFile *frfile;
239  vector <string> channels;
240  vector <unsigned int> sampling;
241 
242  // PLOTS
244  TGraph *G;
245 
246  ClassDef(ffl,0)
247 
248 };
249 
250 #endif
251 
252 
Interface to draw and print ROOT objects.
Time segment list management.
Interface to draw and print ROOT objects.
Definition: GwollumPlot.h:39
Manage time segment lists.
Definition: Segments.h:28
Load frame files and access data in frames.
Definition: ffl.h:34
unsigned int ntrials
Number of trials when accessing the data.
Definition: ffl.h:233
vector< string > channels
List of channels.
Definition: ffl.h:239
TGraph * G
Graph.
Definition: ffl.h:244
vector< string > ffile
List of files.
Definition: ffl.h:236
void SetTrials(const unsigned int aNTrials, const unsigned int aNSleepSeconds)
Sets the number of trials to load the frame file.
Definition: ffl.h:94
FrFile * frfile
Fr file.
Definition: ffl.h:238
bool status_OK
Class status.
Definition: ffl.h:227
ffl(const string aFrameFileList, const string aPlotStyle="GWOLLUM", const int aVerbosity=0)
Constructor of the ffl class.
string fInFrameFile
Path to input frame file list.
Definition: ffl.h:228
unsigned int GetChannelSampling(const string aChannelName)
Returns the sampling rate of a given channel [Hz].
Definition: ffl.h:152
GwollumPlot * GP
Plotting structure.
Definition: ffl.h:243
unsigned int nsleepsec
Number of seconds between trials.
Definition: ffl.h:234
unsigned int fVerbosity
Verbosity level.
Definition: ffl.h:231
vector< unsigned int > sampling
List of sampling frequencies.
Definition: ffl.h:240
string fWoFrameFile
Path to working frame file (always FFL).
Definition: ffl.h:229
string fFormat
Format frame file.
Definition: ffl.h:230
Segments * seg
Segments covered by the ffl file.
Definition: ffl.h:237
string GetInputFfl(void)
Returns the path to the input frame file list.
Definition: ffl.h:85
Segments * GetSegments(void)
Returns a pointer to the segments covered by the ffl.
Definition: ffl.h:135
bool PrintChannels(const unsigned int aGps=0)
Prints the list of channels at a given GPS time.
Definition: ffl.h:162
string srandint
Random integer string.
Definition: ffl.h:232