HOPS
HOPS class reference
Public Member Functions | List of all members
hops::MHO_ScanDataStore Class Reference

Class to catalog and organize data files that are associated with a single scan, and handle retrieval for specific baselilnes. More...

#include <MHO_ScanDataStore.hh>

Public Member Functions

 MHO_ScanDataStore ()
 
virtual ~MHO_ScanDataStore ()
 
void Clear ()
 
std::string GetBaselineFilename (std::string baseline) const
 Getter for baseline filename. More...
 
std::vector< std::string > GetBaselinesPresent () const
 Getter for baselines present. More...
 
std::string GetFringeFilename (std::string fringe_basename) const
 
std::vector< std::string > GetFringesPresent () const
 Getter for fringes present. More...
 
std::size_t GetNBaselines ()
 Getter for number of baselines. More...
 
std::size_t GetNFringes ()
 Getter for number of fringes. More...
 
std::size_t GetNStations ()
 Getter for number of stations. More...
 
std::string GetRootFileBasename ()
 Getter for root file basename. More...
 
mho_json GetRootFileData () const
 Getter for root file data (as json) More...
 
std::string GetStationFilename (std::string station) const
 Getter for station filename. More...
 
std::vector< std::string > GetStationsPresent () const
 Getter for stations present. More...
 
bool Initialize ()
 Initializes data store by clearing, reading directory files, mapping stations and fringes, and determining root file. More...
 
bool IsBaselinePresent (std::string bl) const
 Checks if a baseline code is present in the internal list. More...
 
bool IsFringePresent (std::string basename) const
 Checks if a fringe file is present for a given using its basename. More...
 
bool IsStationPresent (std::string st) const
 Checks if a station is present in the list of station codes. More...
 
bool IsValid ()
 Checks if root file and baseline/station files exist for valid data processing. More...
 
bool LoadBaseline (std::string baseline, MHO_ContainerStore *store)
 Loads baseline data into a store from a file mapped to the given baseline. More...
 
bool LoadFringe (std::string fringe_basename, MHO_ContainerStore *store)
 
bool LoadStation (std::string station, MHO_ContainerStore *store)
 Loads station data into a container store if found in the map. More...
 
void SetDirectory (std::string dir)
 Setter for (scan) directory. More...
 

Detailed Description

Class to catalog and organize data files that are associated with a single scan, and handle retrieval for specific baselilnes.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Fri Jan 27 16:41:52 2023 -0500

Constructor & Destructor Documentation

◆ MHO_ScanDataStore()

hops::MHO_ScanDataStore::MHO_ScanDataStore ( )

◆ ~MHO_ScanDataStore()

hops::MHO_ScanDataStore::~MHO_ScanDataStore ( )
virtual

Member Function Documentation

◆ Clear()

void hops::MHO_ScanDataStore::Clear ( )

◆ GetBaselineFilename()

std::string hops::MHO_ScanDataStore::GetBaselineFilename ( std::string  baseline) const

Getter for baseline filename.

Parameters
baselineInput baseline string used to lookup its corresponding filename.
Returns
The filename associated with the input baseline or an empty string if not found.

◆ GetBaselinesPresent()

std::vector< std::string > hops::MHO_ScanDataStore::GetBaselinesPresent ( ) const
inline

Getter for baselines present.

Returns
std::string containing baseline codes

◆ GetFringeFilename()

std::string hops::MHO_ScanDataStore::GetFringeFilename ( std::string  fringe_basename) const

◆ GetFringesPresent()

std::vector< std::string > hops::MHO_ScanDataStore::GetFringesPresent ( ) const
inline

Getter for fringes present.

Returns
std::string containing the fringe codes.

◆ GetNBaselines()

std::size_t hops::MHO_ScanDataStore::GetNBaselines ( )
inline

Getter for number of baselines.

Returns
Size of fBaselineCodes vector

◆ GetNFringes()

std::size_t hops::MHO_ScanDataStore::GetNFringes ( )
inline

Getter for number of fringes.

Returns
Size of fringe codes vector as std::size_t

◆ GetNStations()

std::size_t hops::MHO_ScanDataStore::GetNStations ( )
inline

Getter for number of stations.

Returns
Number of stations as std::size_t.

◆ GetRootFileBasename()

std::string hops::MHO_ScanDataStore::GetRootFileBasename ( )
inline

Getter for root file basename.

Returns
std::string containing the basename of the root file

◆ GetRootFileData()

mho_json hops::MHO_ScanDataStore::GetRootFileData ( ) const

Getter for root file data (as json)

Returns
JSON object containing root file data

◆ GetStationFilename()

std::string hops::MHO_ScanDataStore::GetStationFilename ( std::string  station) const

Getter for station filename.

Parameters
stationThe station name to search for in the internal map.
Returns
The corresponding filename if found, otherwise an empty string.

◆ GetStationsPresent()

std::vector< std::string > hops::MHO_ScanDataStore::GetStationsPresent ( ) const
inline

Getter for stations present.

Returns
std::string containing station codes

◆ Initialize()

bool hops::MHO_ScanDataStore::Initialize ( )

Initializes data store by clearing, reading directory files, mapping stations and fringes, and determining root file.

Returns
True if initialization is successful, false otherwise.

◆ IsBaselinePresent()

bool hops::MHO_ScanDataStore::IsBaselinePresent ( std::string  bl) const

Checks if a baseline code is present in the internal list.

Parameters
blThe baseline code to search for.
Returns
True if the baseline code is found, false otherwise.

◆ IsFringePresent()

bool hops::MHO_ScanDataStore::IsFringePresent ( std::string  basename) const

Checks if a fringe file is present for a given using its basename.

Parameters
basenameInput basename string to search for in fringe codes
Returns
Boolean indicating whether the fringe with the given basename is present

◆ IsStationPresent()

bool hops::MHO_ScanDataStore::IsStationPresent ( std::string  st) const

Checks if a station is present in the list of station codes.

Parameters
stThe station name to search for.
Returns
True if the station is found, false otherwise.

◆ IsValid()

bool hops::MHO_ScanDataStore::IsValid ( )

Checks if root file and baseline/station files exist for valid data processing.

Returns
True if all required files are present, false otherwise.

◆ LoadBaseline()

bool hops::MHO_ScanDataStore::LoadBaseline ( std::string  baseline,
MHO_ContainerStore store 
)

Loads baseline data into a store from a file mapped to the given baseline.

Parameters
baselineInput baseline string used to lookup the corresponding file
store(MHO_ContainerStore*)
Returns
True if loaded successfully, false otherwise

◆ LoadFringe()

bool hops::MHO_ScanDataStore::LoadFringe ( std::string  fringe_basename,
MHO_ContainerStore store 
)

◆ LoadStation()

bool hops::MHO_ScanDataStore::LoadStation ( std::string  station,
MHO_ContainerStore store 
)

Loads station data into a container store if found in the map.

Parameters
stationStation name to load data for.
storeContainer store to populate with loaded data.
Returns
True if loaded successfully, false otherwise.

◆ SetDirectory()

void hops::MHO_ScanDataStore::SetDirectory ( std::string  dir)
inline

Setter for (scan) directory.

Parameters
dirNew directory path as std::string

The documentation for this class was generated from the following files: