Isis 3 Programmer Reference
HiLab.cpp
1 
20 #include "HiLab.h"
21 #include "IException.h"
22 
23 using namespace std;
24 
25 namespace Isis {
30  HiLab::HiLab(Cube *cube) {
31  PvlGroup group = cube->group("Instrument");
32  p_cpmmNumber = group["CpmmNumber"];
33  p_channel = group["ChannelNumber"];
34 
35  if(group.hasKeyword("Summing")) {
36  p_bin = group["Summing"];
37  }
38  else {
39  std::string msg = "Cannot find required Summing keyword in label";
40  throw IException(IException::Io, msg, _FILEINFO_);
41  }
42 
43  if(group.hasKeyword("Tdi")) {
44  p_tdi = group["Tdi"];
45  }
46  else {
47  std::string msg = "Cannot find required Tdi keyword in label";
48  throw IException(IException::Io, msg, _FILEINFO_);
49  }
50  }
51 
52  int HiLab::getCcd() {
53  const int cpmm2ccd[] = {0, 1, 2, 3, 12, 4, 10, 11, 5, 13, 6, 7, 8, 9};
54  return cpmm2ccd[p_cpmmNumber];
55  }
56 }
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Namespace for the standard library.
PvlGroup & group(const QString &group) const
Read a group from the cube into a Label.
Definition: Cube.cpp:1636
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
Isis exception class.
Definition: IException.h:107
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
IO Handler for Isis Cubes.
Definition: Cube.h:170