DigitiserCounts.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2007 by David Smith
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Base/Extensions/Pulsar/DigitiserCounts.h
10 
11 
12 
13 #ifndef __Pulsar_DigitiserCounts_h
14 #define __Pulsar_DigitiserCounts_h
15 
16 #include "Pulsar/ArchiveExtension.h"
17 
18 using std::string;
19 using std::vector;
20 
21 namespace Pulsar
22 {
23 
26  {
27  public:
28 
29  //Default constructor
30  DigitiserCounts ();
31 
32  // Copy constructor
33  DigitiserCounts (const Pulsar::DigitiserCounts& extension);
34 
35  // Operator =
36  const DigitiserCounts& operator= (const DigitiserCounts& extension);
37 
38  // Destructor
39  ~DigitiserCounts ();
40 
41  class FrequencyAppend;
42 
44  void Append( const DigitiserCounts &src );
45 
47  void Accumulate( const DigitiserCounts &src );
48 
50  void frequency_append (Archive* to, const Archive* from);
51 
53  DigitiserCounts* clone () const { return new DigitiserCounts( *this ); }
54 
56  void CombineSubints(const unsigned subint, const unsigned start,
57  const unsigned stop);
58 
61  class Interface;
62 
65  {
66  public:
67  SubintCounts() {};
68  ~SubintCounts() {};
69 
70  vector<long> data;
71  };
72  vector<SubintCounts> subints;
73 
75  void resize (unsigned nsubint,
76  unsigned npol = 0,
77  unsigned nchan = 0,
78  unsigned nbin = 0);
79 
81  void insert (unsigned isub);
82 
83  void set_dig_mode( string s_dig_mode ) { dig_mode = s_dig_mode; }
84  void set_nlev( int s_nlev ) { nlev = s_nlev; }
85  void set_npthist( int s_npthist ) { npthist = s_npthist; }
86  void set_diglev( string s_diglev ) { diglev = s_diglev; }
87  void set_ndigr(int s_ndigr ) { ndigr = s_ndigr; }
88  void set_dyn_levt( float s_dyn_levt ) { dyn_levt = s_dyn_levt; }
89 
90  string get_dig_mode( void ) const { return dig_mode; }
91  int get_nlev( void ) const { return nlev; }
92  int get_npthist( void ) const { return npthist; }
93  string get_diglev( void ) const { return diglev; }
94  int get_ndigr( void ) const { return ndigr; }
95  float get_dyn_levt( void ) const { return dyn_levt; }
96  private:
97  string dig_mode;
98  int nlev;
99  int npthist;
100  int ndigr;
101  string diglev;
102  float dyn_levt;
103  };
104 
105 }
106 
107 #endif
108 
109 
void CombineSubints(const unsigned subint, const unsigned start, const unsigned stop)
Combine, by adding, multiple subints into one.
Definition: DigitiserCounts.C:141
void Append(const DigitiserCounts &src)
Append the counts from another DigitiserCounts to this one.
Definition: DigitiserCounts.C:83
Algorithms that combine Integration data.
Definition: FrequencyAppend.h:28
The primary interface to pulsar observational data.
Definition: Archive.h:45
void insert(unsigned isub)
Insert a new zeroed subint at the given location.
Definition: DigitiserCounts.C:180
void resize(unsigned nsubint, unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
Resize the extension.
Definition: DigitiserCounts.C:175
const ExtensionType * get() const
Template method searches for an Extension of the specified type.
Able & operator=(const Able &)
Stores digitizer histograms.
Definition: DigitiserCounts.h:25
DigitiserCounts * clone() const
Clone method.
Definition: DigitiserCounts.h:53
static unsigned verbose
A verbosity flag that can be set for debugging purposes.
Definition: IntegrationManager.h:38
Class representing an array of digitiser counts for a subint.
Definition: DigitiserCounts.h:64
void Accumulate(const DigitiserCounts &src)
Accumulate the counts from another DigitiserCounts onto this one.
Definition: DigitiserCounts.C:115
Definition: ArchiveExtension.h:28
void frequency_append(Archive *to, const Archive *from)
Accumulate DigitiserCounts from another archive.
Definition: DigitiserCounts.C:188
Defines the PSRCHIVE library.
Definition: CalSource.h:17
TextInterface::Parser * get_interface()
Get the text interface.
Definition: DigitiserCounts.C:69

Generated using doxygen 1.8.17