HOPS
HOPS class reference
MHO_DiFXScanFileSet.hh
Go to the documentation of this file.
1 #ifndef MHO_DiFXScanFileSet_HH__
2 #define MHO_DiFXScanFileSet_HH__
3 
4 #include "MHO_Message.hh"
5 #include <string>
6 #include <vector>
7 
8 namespace hops
9 {
10 
23 {
24  public:
26  {
27  //direct public access since all we are doing is get/set anyways
28  fIndex = 0;
29  fLocalIndex = 0;
30  fScanName = "";
33  fScanDirectory = "";
34  fInputFile = "";
35  fIMFile = "";
36  fCalcFile = "";
37  fFlagFile = "";
38  fV2DFile = "";
39  fVexFile = "";
40  fVisibilityFileList.clear();
41  fPCALFileList.clear();
42  };
43 
44  virtual ~MHO_DiFXScanFileSet(){};
45 
46  //direct public access since all we are doing is get/set anyways
47  std::size_t fIndex; //numerical index
48  std::size_t fLocalIndex;
49  std::string fScanName; //difx scan name
50  std::string fInputBaseDirectory; //root input directory for this experiment
51  std::string fOutputBaseDirectory; //root output directory for this experiment
52  std::string fScanDirectory; //.difx directory
53  std::string fInputFile; //.input file associated with this scan
54  std::string fIMFile; //.im file associated with this scan
55  std::string fCalcFile; //.calc file associated with this scan
56  std::string fFlagFile; //.flag file associated with this scan
57  std::string fV2DFile; //.v2d file for this experiment
58  std::string fVexFile; //.vex file for this experiment
59  std::vector< std::string > fVisibilityFileList; //list of all DIFX_ files under the .difx directory
60  std::vector< std::string > fPCALFileList; //list of all PCAL_ files under the .difx directory
61 
62  //flag which indicates if this file set has all the necessary bits to be converted
68  bool IsComplete() const
69  {
70  //fFlagFile and fV2DFile are optional
71  if(fScanName == "")
72  {
73  return false;
74  }
75  if(fInputBaseDirectory == "")
76  {
77  return false;
78  }
79  if(fOutputBaseDirectory == "")
80  {
81  return false;
82  }
83  if(fScanDirectory == "")
84  {
85  return false;
86  }
87  if(fInputFile == "")
88  {
89  return false;
90  }
91  if(fIMFile == "")
92  {
93  return false;
94  }
95  if(fCalcFile == "")
96  {
97  return false;
98  }
99  if(fVexFile == "")
100  {
101  return false;
102  }
103  if(fVisibilityFileList.size() == 0)
104  {
105  return false;
106  }
107  if(fPCALFileList.size() == 0)
108  {
109  return false;
110  }
111  return true;
112  }
113 
117  void PrintSummary() const
118  {
119  msg_debug("difx_interface", "scan summary: " << eol);
120  msg_debug("difx_interface", "index: " << fIndex << eol);
121  msg_debug("difx_interface", "name: " << fScanName << eol);
122  msg_debug("difx_interface", ".input file: " << fInputFile << eol);
123  msg_debug("difx_interface", ".im file: " << fIMFile << eol);
124  msg_debug("difx_interface", ".calc file: " << fCalcFile << eol);
125  msg_debug("difx_interface", ".flag file: " << fFlagFile << eol);
126  msg_debug("difx_interface", ".v2d file: " << fV2DFile << eol);
127  msg_debug("difx_interface", ".vex file: " << fVexFile << eol);
128  for(std::size_t i = 0; i < fVisibilityFileList.size(); i++)
129  {
130  msg_debug("difx_interface", "visibility file # " << i << " : " << fVisibilityFileList[i] << eol);
131  }
132  for(std::size_t i = 0; i < fPCALFileList.size(); i++)
133  {
134  msg_debug("difx_interface", "pcal file # " << i << " : " << fPCALFileList[i] << eol);
135  }
136  msg_debug("difx_interface", eom);
137  }
138 };
139 
140 } // namespace hops
141 
142 #endif
#define msg_debug(xKEY, xCONTENT)
Definition: MHO_Message.hh:291
Class MHO_DiFXScanFileSet.
Definition: MHO_DiFXScanFileSet.hh:23
std::string fCalcFile
Definition: MHO_DiFXScanFileSet.hh:55
std::string fIMFile
Definition: MHO_DiFXScanFileSet.hh:54
std::string fOutputBaseDirectory
Definition: MHO_DiFXScanFileSet.hh:51
std::vector< std::string > fVisibilityFileList
Definition: MHO_DiFXScanFileSet.hh:59
std::vector< std::string > fPCALFileList
Definition: MHO_DiFXScanFileSet.hh:60
std::string fScanDirectory
Definition: MHO_DiFXScanFileSet.hh:52
std::string fInputBaseDirectory
Definition: MHO_DiFXScanFileSet.hh:50
std::string fFlagFile
Definition: MHO_DiFXScanFileSet.hh:56
std::string fV2DFile
Definition: MHO_DiFXScanFileSet.hh:57
std::size_t fLocalIndex
Definition: MHO_DiFXScanFileSet.hh:48
std::string fScanName
Definition: MHO_DiFXScanFileSet.hh:49
void PrintSummary() const
Function PrintSummary.
Definition: MHO_DiFXScanFileSet.hh:117
std::string fInputFile
Definition: MHO_DiFXScanFileSet.hh:53
std::size_t fIndex
Definition: MHO_DiFXScanFileSet.hh:44
std::string fVexFile
Definition: MHO_DiFXScanFileSet.hh:58
MHO_DiFXScanFileSet()
Definition: MHO_DiFXScanFileSet.hh:25
virtual ~MHO_DiFXScanFileSet()
Definition: MHO_DiFXScanFileSet.hh:44
bool IsComplete() const
Checks if all necessary files and directories are set for conversion.
Definition: MHO_DiFXScanFileSet.hh:68
Definition: MHO_AdhocFlagging.hh:18