LCOV - code coverage report
Current view: top level - nrao/VLA - VLAArchiveInput.cc (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 10 15 66.7 %
Date: 2024-12-11 20:54:31 Functions: 3 6 50.0 %

          Line data    Source code
       1             : //# VLAArchiveInput.cc: This class reads and reconstructs VLA archive records
       2             : //# Copyright (C) 1995,1999,2000
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      11             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      18             : //#
      19             : //# Correspondence concerning AIPS++ should be addressed as follows:
      20             : //#        Internet email: casa-feedback@nrao.edu.
      21             : //#        Postal address: AIPS++ Project Office
      22             : //#                        National Radio Astronomy Observatory
      23             : //#                        520 Edgemont Road
      24             : //#                        Charlottesville, VA 22903-2475 USA
      25             : //#
      26             : //# $Id$
      27             : 
      28             : #include <nrao/VLA/VLAArchiveInput.h>
      29             : 
      30             : // These parameters define the fundamental physical data record
      31             : // characteristics.  I'd be surprised if they ever have to be changed.
      32             : const uInt VLAArchiveInput::BlockSize = 2048;
      33             : const uInt VLAArchiveInput::HeaderSize = 4;
      34             : const uInt VLAArchiveInput::MaxBlocksPerPhysicalRecord = 13;
      35             : 
      36          16 : VLAArchiveInput::~VLAArchiveInput() {
      37          16 : }
      38             : 
      39       20569 : ByteSource& VLAArchiveInput::logicalRecord() {
      40       20569 :   return itsRecord;
      41             : }
      42             : 
      43           0 : const ByteSource& VLAArchiveInput::logicalRecord() const {
      44           0 :   return itsRecord;
      45             : }
      46             : 
      47           0 : Bool VLAArchiveInput::hasData() const {
      48           0 :   MemoryIO *nonconstmemio = const_cast<MemoryIO *>(itsMemIO.get());
      49           0 :   return nonconstmemio->length() != 0 ? true: false;
      50             : }
      51             : 
      52          16 : VLAArchiveInput::VLAArchiveInput()
      53          16 :   :itsMemIO(std::make_shared<MemoryIO>(VLAArchiveInput::BlockSize, VLAArchiveInput::BlockSize)),
      54          16 :    itsModComp(std::make_shared<ModcompDataConversion>()),
      55          16 :    itsCtrIO(std::make_shared<ConversionIO>(itsModComp, itsMemIO, VLAArchiveInput::BlockSize)),
      56          32 :    itsRecord(itsCtrIO)
      57             : {
      58          16 : }
      59             : // Local Variables:
      60             : // compile-command: "gmake VLAArchiveInput"
      61             : // End:

Generated by: LCOV version 1.16