casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
casa::sdfiller::DataAccumulator Class Reference

#include <DataAccumulator.h>

Classes

struct  DataAccumulatorKey
 

Public Member Functions

 DataAccumulator ()
 
virtual ~DataAccumulator ()
 
size_t getNumberOfChunks () const
 
size_t getNumberOfActiveChunks () const
 
bool queryForGet (DataRecord const &record) const
 
bool queryForGet (casacore::Double const &time) const
 
void clear ()
 
bool get (size_t ichunk, MSDataRecord &record)
 
bool accumulate (DataRecord const &record)
 
casacore::String getPolType (size_t ichunk) const
 
casacore::uInt getNumPol (size_t ichunk) const
 

Private Member Functions

bool isValidRecord (DataRecord const &record)
 

Private Attributes

std::vector< DataChunk * > pool_
 
std::vector< casacore::Intantenna_id_
 
std::vector< casacore::Intspw_id_
 
std::vector< casacore::Intfield_id_
 
std::vector< casacore::Intfeed_id_
 
std::vector< casacore::Intscan_
 
std::vector< casacore::Intsubscan_
 
std::vector< casacore::Stringintent_
 
std::vector< casacore::Matrix
< casacore::Double > > 
direction_
 
std::vector< casacore::Doubleinterval_
 
std::vector< casacore::Floattemperature_
 
std::vector< casacore::Floatpressure_
 
std::vector< casacore::Floatrel_humidity_
 
std::vector< casacore::Floatwind_speed_
 
std::vector< casacore::Floatwind_direction_
 
std::map< DataAccumulatorKey,
casacore::uInt,
DataAccumulatorKey
indexer_
 
casacore::Double time_
 
std::vector< bool > is_free_
 

Detailed Description

Definition at line 785 of file DataAccumulator.h.

Constructor & Destructor Documentation

casa::sdfiller::DataAccumulator::DataAccumulator ( )
inline

Definition at line 819 of file DataAccumulator.h.

virtual casa::sdfiller::DataAccumulator::~DataAccumulator ( )
inlinevirtual

Definition at line 824 of file DataAccumulator.h.

References POST_END, and POST_START.

Member Function Documentation

bool casa::sdfiller::DataAccumulator::accumulate ( DataRecord const &  record)
inline

std::cout << "record is not a valid one" << std::endl;

std::cout << "timestamp mismatch" << std::endl;

std::cout << "(ant, spw, pol, pol_type, field, feed, intent) = (" << key.antenna_id << ", " << key.spw_id << ", " << record.pol<< ", " << key.pol_type << ", " << key.field_id << ", " << key.feed_id << ", " << key.intent << ", " << std::endl;

std::cout << "status = " << status << std::endl; std::cout << "key (a" << key.antenna_id << ",f" << key.field_id << ",s" << key.spw_id << ",i" << key.intent << ",p" << key.pol_type << ",d" << key.feed_id << "(index " << indexer_[key] << "): TIME=" << time_ << " INTERVAL=" << interval << " polno=" << record.pol << std::endl;

Definition at line 898 of file DataAccumulator.h.

References casa::sdfiller::DataRecord::antenna_id, casa::sdfiller::DataAccumulator::DataAccumulatorKey::antenna_id, casacore::String::assign(), casa::sdfiller::DataRecord::direction, casa::sdfiller::DataRecord::feed_id, casa::sdfiller::DataAccumulator::DataAccumulatorKey::feed_id, casa::sdfiller::DataRecord::field_id, casa::sdfiller::DataAccumulator::DataAccumulatorKey::field_id, casa::sdfiller::DataRecord::intent, casa::sdfiller::DataAccumulator::DataAccumulatorKey::intent, casa::sdfiller::DataRecord::interval, casa::isValidRecord(), casa::sdfiller::DataRecord::pol_type, casa::sdfiller::DataAccumulator::DataAccumulatorKey::pol_type, POST_END, POST_START, casa::sdfiller::DataRecord::pressure, casa::sdfiller::DataRecord::rel_humidity, casa::sdfiller::DataRecord::scan, casacore::String::size(), casa::sdfiller::DataRecord::spw_id, casa::sdfiller::DataAccumulator::DataAccumulatorKey::spw_id, casa::sdfiller::DataRecord::subscan, casa::sdfiller::DataRecord::temperature, casa::time, casa::sdfiller::DataRecord::time, casa::sdfiller::DataRecord::wind_direction, and casa::sdfiller::DataRecord::wind_speed.

void casa::sdfiller::DataAccumulator::clear ( )
inline

Definition at line 856 of file DataAccumulator.h.

bool casa::sdfiller::DataAccumulator::get ( size_t  ichunk,
MSDataRecord record 
)
inline
size_t casa::sdfiller::DataAccumulator::getNumberOfActiveChunks ( ) const
inline

Definition at line 838 of file DataAccumulator.h.

References casacore::C::c.

size_t casa::sdfiller::DataAccumulator::getNumberOfChunks ( ) const
inline

Definition at line 834 of file DataAccumulator.h.

casacore::uInt casa::sdfiller::DataAccumulator::getNumPol ( size_t  ichunk) const
inline

Definition at line 1012 of file DataAccumulator.h.

casacore::String casa::sdfiller::DataAccumulator::getPolType ( size_t  ichunk) const
inline

Definition at line 1007 of file DataAccumulator.h.

bool casa::sdfiller::DataAccumulator::isValidRecord ( DataRecord const &  record)
inlineprivate

std::cout << record.time << " " << record.interval << " " << record.antenna_id << " " << record.field_id << " " << record.feed_id << " " << record.spw_id << " " << record.scan << " " << record.subscan << " " << record.direction << std::endl;

Definition at line 1018 of file DataAccumulator.h.

References casa::sdfiller::DataRecord::antenna_id, casa::sdfiller::DataRecord::direction, casacore::ArrayBase::empty(), casa::sdfiller::DataRecord::feed_id, casa::sdfiller::DataRecord::field_id, casa::sdfiller::DataRecord::interval, casa::sdfiller::DataRecord::scan, casa::sdfiller::DataRecord::spw_id, casa::sdfiller::DataRecord::subscan, and casa::sdfiller::DataRecord::time.

bool casa::sdfiller::DataAccumulator::queryForGet ( DataRecord const &  record) const
inline

Definition at line 845 of file DataAccumulator.h.

References casa::time, and casa::sdfiller::DataRecord::time.

bool casa::sdfiller::DataAccumulator::queryForGet ( casacore::Double const &  time) const
inline

Definition at line 851 of file DataAccumulator.h.

Member Data Documentation

std::vector<casacore::Int> casa::sdfiller::DataAccumulator::antenna_id_
private

Definition at line 1030 of file DataAccumulator.h.

std::vector<casacore::Matrix<casacore::Double> > casa::sdfiller::DataAccumulator::direction_
private

Definition at line 1037 of file DataAccumulator.h.

std::vector<casacore::Int> casa::sdfiller::DataAccumulator::feed_id_
private

Definition at line 1033 of file DataAccumulator.h.

std::vector<casacore::Int> casa::sdfiller::DataAccumulator::field_id_
private

Definition at line 1032 of file DataAccumulator.h.

std::map<DataAccumulatorKey, casacore::uInt, DataAccumulatorKey> casa::sdfiller::DataAccumulator::indexer_
private

Definition at line 1044 of file DataAccumulator.h.

std::vector<casacore::String> casa::sdfiller::DataAccumulator::intent_
private

Definition at line 1036 of file DataAccumulator.h.

std::vector<casacore::Double> casa::sdfiller::DataAccumulator::interval_
private

Definition at line 1038 of file DataAccumulator.h.

std::vector<bool> casa::sdfiller::DataAccumulator::is_free_
private

Definition at line 1046 of file DataAccumulator.h.

std::vector<DataChunk *> casa::sdfiller::DataAccumulator::pool_
private

Definition at line 1029 of file DataAccumulator.h.

std::vector<casacore::Float> casa::sdfiller::DataAccumulator::pressure_
private

Definition at line 1040 of file DataAccumulator.h.

std::vector<casacore::Float> casa::sdfiller::DataAccumulator::rel_humidity_
private

Definition at line 1041 of file DataAccumulator.h.

std::vector<casacore::Int> casa::sdfiller::DataAccumulator::scan_
private

Definition at line 1034 of file DataAccumulator.h.

std::vector<casacore::Int> casa::sdfiller::DataAccumulator::spw_id_
private

Definition at line 1031 of file DataAccumulator.h.

std::vector<casacore::Int> casa::sdfiller::DataAccumulator::subscan_
private

Definition at line 1035 of file DataAccumulator.h.

std::vector<casacore::Float> casa::sdfiller::DataAccumulator::temperature_
private

Definition at line 1039 of file DataAccumulator.h.

casacore::Double casa::sdfiller::DataAccumulator::time_
private

Definition at line 1045 of file DataAccumulator.h.

std::vector<casacore::Float> casa::sdfiller::DataAccumulator::wind_direction_
private

Definition at line 1043 of file DataAccumulator.h.

std::vector<casacore::Float> casa::sdfiller::DataAccumulator::wind_speed_
private

Definition at line 1042 of file DataAccumulator.h.


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