ResponseManager.h
1 #ifndef UCORRELATOR_RESPONSE_MANAGER_H
2 #define UCORRELATOR_RESPONSE_MANAGER_H
3 
4 /* This class does the dirty work of loading appopriate responses
5  * for each antenna. See README.response for more details.
6  *
7  *
8  * Cosmin Deaconu <cozzyd@kicp.uchicago.edu>
9  *
10  * */
11 
12 //#include "AnalysisConfig.h"
13 #include <vector>
14 #include "AnitaConventions.h"
15 
16 // namespace UCorrelator
17 // {
18 namespace AnitaResponse
19 {
20 
21 class AbstractResponse;
22 class DeconvolutionMethod;
24 {
25 
26  public:
27 
28  // ResponseManager(const UCorrelator::AnalysisConfig * cfg);
29  ResponseManager(const char * responseDir, int npad, const AnitaResponse::DeconvolutionMethod* methodPtr=NULL, unsigned int evTime = 0);
30 
31  const AbstractResponse * response(int pol, int iant) const { return responses[iant][pol]; }
32  const DeconvolutionMethod * getDeconvolutionMethod() const { return method; }
33 
34  // check time is used to change which response you are using for time dependent responses (such as the TUFF ones)
35  void checkTime(unsigned int evTime);
36 
37  virtual ~ResponseManager();
38 
39 
40  private:
41  int loadResponsesFromDir(const char * dir, int npad, unsigned int evTime = 0);
42 
43  const AbstractResponse* responses[NUM_SEAVEYS][2];
44  std::vector<AbstractResponse*> response_store;
45  const DeconvolutionMethod * method;
46  int lastTime;
47  const char* whichDir;
48  int savePad;
49  bool hasIndex;
50 
51 
52 };
53 
54 
55 }
56 
57 
58 #endif
59