HasArchive.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2020 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/HasArchive.h
10 
11 #ifndef __Pulsar_HasArchive_h
12 #define __Pulsar_HasArchive_h
13 
14 #include "Pulsar/Index.h"
15 #include "Reference.h"
16 
17 namespace Pulsar {
18 
19  class Archive;
20  class Integration;
21  class Profile;
22 
24  class HasArchive
25  {
26 
27  public:
28 
30  HasArchive ();
31 
33  ~HasArchive ();
34 
36  virtual void set_Archive (const Archive*);
37 
39  const Archive* get_Archive () const;
40 
42  void set_subint (Index _isubint);
43  Index get_subint () const;
44 
46  void set_chan (Index _ichan);
47  Index get_chan () const;
48 
50  void set_pol (Index _ipol);
51  Index get_pol () const;
52 
54  class Interface;
55 
57  const Profile* get_Profile () const;
58 
60  const Integration* get_Integration () const;
61 
62  protected:
63 
65  Index isubint;
66  Index ichan;
67  Index ipol;
68 
70 
71  mutable Reference::To<const Integration, false> integration;
72 
74  bool is_current () const;
75 
76  };
77 
78 }
79 
80 #endif
81 
virtual void set_Archive(const Archive *)
Set the instance.
Definition: HasArchive.C:25
Combines an index value and integrate flag.
Definition: Index.h:24
const Integration * get_Integration(const Archive *data, Index subint)
Return the requested profile, cloning and integrating when needed.
Definition: Index.C:118
const Profile * get_Profile() const
Get the profile defined by the current indeces.
Definition: HasArchive.C:54
bool is_current() const
Returns true when mutable profile and integration attributes are current.
Definition: HasArchive.C:125
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
The primary interface to pulsar observational data.
Definition: Archive.h:45
void set_chan(Index _ichan)
Set the frequency channel.
Definition: HasArchive.C:84
const Archive * get_Archive() const
Get the instance.
Definition: HasArchive.C:42
~HasArchive()
Desctructor.
Definition: HasArchive.C:21
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
void set_pol(Index _ipol)
Set the polarization.
Definition: HasArchive.C:105
void set_subint(Index _isubint)
Set the sub-integration.
Definition: HasArchive.C:62
Defines the PSRCHIVE library.
Definition: CalSource.h:17
const Integration * get_Integration() const
Get the sub-integration defined by the current indeces.
Definition: HasArchive.C:47
const Profile * get_Profile(const Archive *data, Index subint, Index pol, Index chan)
Return the requested profile, cloning and integrating when needed.
Definition: Index.C:24
HasArchive()
Default constructor.
Definition: HasArchive.C:17

Generated using doxygen 1.8.17