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 <string>
5 #include <vector>
6 #include "MHO_Message.hh"
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 
63  //flag which indicates if this file set has all the necessary bits to be converted
69  bool IsComplete() const
70  {
71  //fFlagFile and fV2DFile are optional
72  if(fScanName == ""){return false;}
73  if(fInputBaseDirectory == ""){return false;}
74  if(fOutputBaseDirectory == ""){return false;}
75  if(fScanDirectory == ""){return false;}
76  if(fInputFile == ""){return false;}
77  if(fIMFile == ""){return false;}
78  if(fCalcFile == ""){return false;}
79  if(fVexFile == ""){return false;}
80  if(fVisibilityFileList.size() == 0){return false;}
81  if(fPCALFileList.size() == 0){return false;}
82  return true;
83  }
84 
88  void PrintSummary() const
89  {
90  msg_debug("difx_interface", "scan summary: "<< eol);
91  msg_debug("difx_interface", "index: "<< fIndex << eol);
92  msg_debug("difx_interface", "name: "<< fScanName << eol);
93  msg_debug("difx_interface", ".input file: "<< fInputFile << eol);
94  msg_debug("difx_interface", ".im file: "<< fIMFile << eol);
95  msg_debug("difx_interface", ".calc file: "<< fCalcFile << eol);
96  msg_debug("difx_interface", ".flag file: "<< fFlagFile << eol);
97  msg_debug("difx_interface", ".v2d file: "<< fV2DFile << eol);
98  msg_debug("difx_interface", ".vex file: "<< fVexFile << eol);
99  for(std::size_t i=0 ;i<fVisibilityFileList.size(); i++)
100  {
101  msg_debug("difx_interface", "visibility file # "<<i<<" : "<< fVisibilityFileList[i] << eol);
102  }
103  for(std::size_t i=0 ;i<fPCALFileList.size(); i++)
104  {
105  msg_debug("difx_interface", "pcal file # "<<i<<" : "<< fPCALFileList[i] << eol);
106  }
107  msg_debug("difx_interface", eom);
108  }
109 };
110 
111 } // namespace hops
112 
113 #endif
#define msg_debug(xKEY, xCONTENT)
Definition: MHO_Message.hh:297
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:88
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:69
Definition: MHO_ChannelLabeler.hh:17