LSSTApplications  16.0+12,16.0+13,16.0-1-g16dcc35+1,16.0-1-g44ebaf5+1,16.0-1-g4515a79+10,16.0-1-g928b041+1,16.0-1-g943889d+1,16.0-1-g9884240+1,16.0-1-g98efed3+9,16.0-1-gce273f5+1,16.0-19-g2da375352+1,16.0-2-g568a347+8,16.0-2-g839ba83+2,16.0-2-g8827b2c+1,16.0-2-g934b51e+2,16.0-2-g9d5294e+1,16.0-3-g06ec41f+2,16.0-3-g30bbe86+2,16.0-3-g3806c63+1,16.0-3-g5dc86b7+2,16.0-3-gc6a11d1+2,16.0-4-g4dc7b79+2,16.0-4-g50d071e+1,16.0-4-gd6aeece+1,16.0-4-gedb2a3a+2,16.0-5-g0fa37f0+1,16.0-5-g188214f+1,16.0-5-g81851deb+3,16.0-5-gb866ac2+2,16.0-6-g44ca919+1,16.0-6-gce2b4a7+2,16.0-6-gf89f2d9+2,16.0-7-g1411911+2,16.0-7-g2664ab2+1,16.0-7-ge62bbd2a+2,16.0-8-g2ce35ff+2,16.0-8-g7a94e69+2,w.2018.29
LSSTDataManagementBasePackage
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 
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
T atoi(T... args)
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
A base class for image defects.
Definition: cameraGeom.dox:3
T strlen(T... args)
double getFlux() const
Definition: BaseStar.h:60
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
T strstr(T... args)