HOPS
HOPS class reference
MHO_MK4ChanId.hh
Go to the documentation of this file.
1 #ifndef MHO_MK4ChanId_HH__
2 #define MHO_MK4ChanId_HH__
3 
4 #include <iomanip>
5 #include <sstream>
6 #include <string>
7 
8 namespace hops
9 {
10 
27 {
28  public:
29  static std::string Make(const std::string& band, int chidx, const std::string& sideband, char pol)
30  {
31  std::ostringstream ss;
32  ss << band << std::setfill('0') << std::setw(2) << chidx << sideband << pol;
33  return ss.str();
34  }
35 
36  static std::string Make(const std::string& band, int chidx, const std::string& sideband, const std::string& pol)
37  {
38  return Make(band, chidx, sideband, pol.empty() ? '-' : pol[0]);
39  }
40 };
41 
42 } // namespace hops
43 
44 #endif
Definition: MHO_MK4ChanId.hh:27
static std::string Make(const std::string &band, int chidx, const std::string &sideband, char pol)
Definition: MHO_MK4ChanId.hh:29
static std::string Make(const std::string &band, int chidx, const std::string &sideband, const std::string &pol)
Definition: MHO_MK4ChanId.hh:36
Definition: MHO_AdhocFlagging.hh:18