ArchiveSort.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/ArchiveSort.h
10 
11 #ifndef __Pulsar_ArchiveSort_h
12 #define __Pulsar_ArchiveSort_h
13 
14 #include "MJD.h"
15 
16 #include <list>
17 #include <iostream>
18 
19 namespace Pulsar {
20 
21  class Archive;
22 
24  class ArchiveSort {
25 
26  public:
27 
29  static bool verbose;
30 
32  ArchiveSort ();
33 
35  ArchiveSort (std::istream& input);
36 
38  std::string filename;
39 
41  std::string source;
42 
44  double centre_frequency;
45 
47  MJD epoch;
49  double length;
50 
52  static void load (std::istream& input, std::list<ArchiveSort>& entries);
53 
55  static bool read_length;
56 
58  static bool compare_frequencies;
59 
61  static bool compare_sources;
62  };
63 
65  bool operator < (const ArchiveSort& a, const ArchiveSort& b);
66 
67 }
68 
69 #endif
double length
The length of the observation.
Definition: ArchiveSort.h:54
static void load(std::istream &input, std::list< ArchiveSort > &entries)
Load a list of ArchiveSort instances and sort them.
Definition: ArchiveSort.C:80
std::string filename
The filename of the archive.
Definition: ArchiveSort.h:43
Used in sorting archives by source name, frequency, and epoch.
Definition: ArchiveSort.h:29
MJD epoch
The epoch of the observation.
Definition: ArchiveSort.h:52
double centre_frequency
The centre frequency of the observation.
Definition: ArchiveSort.h:49
std::string source
The name of the observed source.
Definition: ArchiveSort.h:46
ArchiveSort()
Default constructor.
Definition: ArchiveSort.C:17
const std::string get_message() const
static bool verbose
Verbosity flag.
Definition: ArchiveSort.h:34
Defines the PSRCHIVE library.
Definition: CalSource.h:17
static bool compare_frequencies
Set to false when you want to join bands into a single session.
Definition: ArchiveSort.h:63
static bool read_length
Enable the new ArchiveSort behaviour (in new psrpl pipelines)
Definition: ArchiveSort.h:60
static bool compare_sources
Set to false when you want to join sources (e.g. HYDRA_[ONS])
Definition: ArchiveSort.h:66
bool operator<(const ArchiveSort &a, const ArchiveSort &b)
Comparison operator.
Definition: ArchiveSort.C:33

Generated using doxygen 1.8.17