lsst.jointcal  master-g9041cab851+5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
BaseStar.cc
Go to the documentation of this file.
1 #include <assert.h>
2 #include <fstream>
3 #include <string.h> // strstr
4 
7 #include "lsst/pex/exceptions.h"
8 
9 namespace pexExcept = lsst::pex::exceptions;
10 
11 namespace lsst {
12 namespace jointcal {
13 
14 bool decreasingFlux(BaseStar const *star1, BaseStar const *star2) {
15  return (star1->getFlux() > star2->getFlux());
16 }
17 
18 bool increasingMag(BaseStar const *star1, BaseStar const *star2) {
19  return (star1->getFlux() < star2->getFlux());
20 }
21 
22 /**************** BaseStarList ******************/
23 
24 int decodeFormat(char const *formatLine, char const *starName) {
25  if (!formatLine || !starName) return 0;
26  const char *p = strstr(formatLine, starName);
27  if (!p) return 0;
28  return atoi(p + strlen(starName));
29 }
30 } // namespace jointcal
31 } // namespace lsst
int decodeFormat(char const *formatLine, char const *starName)
Definition: BaseStar.cc:24
The base class for handling stars. Used by all matching routines.
Definition: BaseStar.h:22
double getFlux() const
Definition: BaseStar.h:71
bool decreasingFlux(BaseStar const *star1, BaseStar const *star2)
enables to sort easily a starList (of anything that derives from BaseStar)
Definition: BaseStar.cc:14
bool increasingMag(BaseStar const *star1, BaseStar const *star2)
Definition: BaseStar.cc:18