Changeset 15338


Ignore:
Timestamp:
04/15/13 10:54:06 (12 years ago)
Author:
lyard
Message:
Fixed discrepency between logger code and Time.cc code related to sunRise
File:
1 edited

Legend:

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

    r15163 r15338  
    245245    int infoCallback(const EventImp& evt, unsigned int infoIndex);
    246246
    247     Time GetSunRise(const Time &time=Time());
     247//    Time GetSunRise(const Time &time=Time());
    248248
    249249    /***************************************************
     
    866866        CreateDirectory(str.str());
    867867
    868     str << '/' << CompileFileName(service, extension, fCurrentDay);
     868    str << '/' << CompileFileName(service, extension, ftime);//fCurrentDay);
    869869
    870870    return str.str();
     
    928928    //the next closing time is 30 minutes after upcoming sunrise.
    929929    //If we are within 30 minutes after sunrise, closing time is soon
    930     fCurrentDay = GetSunRise(Time()-boost::posix_time::minutes(30)) + boost::posix_time::minutes(30);//(int)(nowMinusTwelve.Mjd());//nowMinusTwelve.M()*31 + nowMinusTwelve.D();//assume 31 days per month. we do not really care, only want unique number per day of the year
     930    fCurrentDay = Time().GetNextSunRise();//GetSunRise(Time()-boost::posix_time::minutes(30)) + boost::posix_time::minutes(30);//(int)(nowMinusTwelve.Mjd());//nowMinusTwelve.M()*31 + nowMinusTwelve.D();//assume 31 days per month. we do not really care, only want unique number per day of the year
    931931    lastFlush = Time();
    932932
     
    11331133        fAutoStarted = true;
    11341134        SetCurrentState(Start());
     1135//        SetCurrentState(NightlyToWaitRun());
    11351136    }
    11361137    else
     
    12711272//! Used to know when to close and reopen files
    12721273//!
     1274/*
    12731275Time DataLogger::GetSunRise(const Time &time)
    12741276{
     
    13031305#endif
    13041306}
    1305 
     1307*/
    13061308// --------------------------------------------------------------------------
    13071309//
     
    13571359    {
    13581360        //set the next closing time. If we are here, we have passed 30 minutes after sunrise.
    1359         fCurrentDay = GetSunRise(timeNow-boost::posix_time::minutes(30))+boost::posix_time::minutes(30);
     1361        fCurrentDay = timeNow.GetNextSunRise();//GetSunRise(timeNow-boost::posix_time::minutes(30))+boost::posix_time::minutes(30);
    13601362        //crawl through the subcriptions and close any open nightly file
    13611363        SubscriptionsListType::iterator x;
Note: See TracChangeset for help on using the changeset viewer.