Changeset 10693 for trunk/FACT++/src


Ignore:
Timestamp:
05/13/11 11:24:35 (14 years ago)
Author:
tbretz
Message:
Implemented support for compilation without fits.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/dataLogger.cc

    r10688 r10693  
    6666#include <sys/stat.h>
    6767
    68 #define HAS_FITS
    6968//#define ONE_RUN_FITS_ONLY
    7069
     
    7978#include <boost/thread.hpp>
    8079
    81 #ifdef HAS_FITS
     80#ifdef HAVE_FITS
    8281#include "Fits.h"
    8382#endif
     
    177176        struct SubscriptionType
    178177        {
    179 #ifdef HAS_FITS
     178#ifdef HAVE_FITS
    180179                ///Nightly FITS output file
    181180                Fits    nightlyFile;
     
    192191                void operator = (const SubscriptionType& other)
    193192                {
    194 #ifdef HAS_FITS
     193#ifdef HAVE_FITS
    195194                        nightlyFile = other.nightlyFile;
    196195                        runFile = other.runFile;
     
    203202                SubscriptionType(const SubscriptionType& other)
    204203                {
    205 #ifdef HAS_FITS
     204#ifdef HAVE_FITS
    206205                        nightlyFile = other.nightlyFile;
    207206                        runFile = other.runFile;
     
    233232                                if (dimInfo)
    234233                                delete dimInfo;
    235 #ifdef HAS_FITS
     234#ifdef HAVE_FITS
    236235                                if (nightlyFile.IsOpen())
    237236                                        nightlyFile.Close();
     
    277276        ///from NightlyOpen to waiting transition
    278277        int NightlyToWaitRunPlease();
    279 #ifdef HAS_FITS
     278#ifdef HAVE_FITS
    280279        ///Open fits files
    281280        void OpenFITSFilesPlease(SubscriptionType& sub);
     
    342341void DataLogger::calculateTotalSizeWritten(DataLoggerStats& statVar, bool& shouldWarn, bool isPrinting)
    343342{
    344 #ifdef HAS_FITS
     343#ifdef HAVE_FITS
    345344        if (isPrinting)
    346345        {
     
    473472                        //update the fits files sizes
    474473                        calculateTotalSizeWritten(statVar, statWarning, false);/*
    475 #ifdef HAS_FITS
     474#ifdef HAVE_FITS
    476475                        SubscriptionsListType::iterator x;
    477476                        std::map<std::string, SubscriptionType>::iterator y;
     
    576575                fRunNumber = -1;
    577576                fPreviousRunNumber = fRunNumber;
    578 #ifdef HAS_FITS
     577#ifdef HAVE_FITS
    579578#ifdef ONE_RUN_FITS_ONLY
    580579                fRunFitsFile = NULL;
     
    869868        delete fNumSubAndFits;
    870869//TODO notify that all files were closed
    871 #ifdef HAS_FITS
     870#ifdef HAVE_FITS
    872871#ifdef ONE_RUN_FITS_ONLY
    873872        if (fRunFitsFile != NULL)
     
    11271126        }
    11281127
    1129 #ifdef HAS_FITS
     1128#ifdef HAVE_FITS
    11301129        if (isItaReport)
    11311130        {
     
    12931292        DataLoggerStats statVar;
    12941293        calculateTotalSizeWritten(statVar, statWarning, false);/*
    1295 #ifdef HAS_FITS
     1294#ifdef HAVE_FITS
    12961295        str.str("");
    12971296        str << "There are " << fNumSubAndFitsData.numOpenFits << " FITS files open:";
     
    16631662}
    16641663
    1665 #ifdef HAS_FITS
     1664#ifdef HAVE_FITS
    16661665// --------------------------------------------------------------------------
    16671666//
     
    19951994        if (fRunReportFile.is_open())
    19961995                fRunReportFile.close();
    1997 #ifdef HAS_FITS
     1996#ifdef HAVE_FITS
    19981997        for (SubscriptionsListType::iterator i = fServiceSubscriptions.begin(); i != fServiceSubscriptions.end(); i++)
    19991998                for (std::map<std::string, SubscriptionType>::iterator j = i->second.begin(); j != i->second.end(); j++)
     
    20392038                fRunReportFile.close();
    20402039               
    2041 #ifdef HAS_FITS
     2040#ifdef HAVE_FITS
    20422041        for (SubscriptionsListType::iterator i = fServiceSubscriptions.begin(); i != fServiceSubscriptions.end(); i++)
    20432042                for (std::map<std::string, SubscriptionType>::iterator j = i->second.begin(); j != i->second.end(); j++)
Note: See TracChangeset for help on using the changeset viewer.