start transition
Implements the Start transition. Concatenates the given path for the Nightly file and the filename itself (based on the day), and tries to open it.
- Returns
- kSM_NightlyOpen if success, kSM_BadFolder if failure
Definition at line 1818 of file datalogger.cc.
References CompileFileNameWithPath(), data, MessageImp::Debug(), MessageImp::Error(), SubscriptionType::fConv, DimWriteStatistics::FileOpened(), SubscriptionType::fitsBufferAllocated, GetDescription(), GoToNightlyWriteErrorState(), GoToRunWriteErrorState(), i, SubscriptionType::increment, MessageImp::Info(), kSM_BadFolder, kSM_NightlyOpen, NotifyOpenedFile(), NumSubAndFitsType::numOpenFits, OpenTextFile(), RemoveService(), SubscriptionType::server, SubscriptionType::service, str, and DimDescribedService::Update().
Referenced by DataLogger(), infoCallback(), and NightlyToWaitRun().
1822 Debug(
"Starting...");
1828 if (!nightlyLogOpen)
DimWriteStatistics fFilesStats
the folder specified for Nightly logging does not exist or has bad permissions
void NotifyOpenedFile(const string &name, int type, DimDescribedService *service)
int Debug(const std::string &str)
ofstream fNightlyLogFile
ofstream for the NightlyLogfile
bool fDebugIsOn
configuration flags
string fFilePath
ofstream for the Nightly report file
bool FileOpened(const std::string &fileName)
DimDescribedService * fOpenedNightlyFiles
Service for opened files.
bool OpenTextFile(ofstream &stream, const string &name)
Subscribe to a given server and service.
Nightly file openned and writing.
map< string, vector< string > > fOpenedNightlyFits
vectors to keep track of opened Fits files, for grouping purposes.
string fFullNightlyLogFileName
full name of the nightly log file
string CompileFileNameWithPath(const string &path, const string &service, const string &extension)
Get the digits of year, month and day for filenames and paths.