Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

DataFileCtrl.cc

Go to the documentation of this file.
00001 #ifndef _DataFileCtrl_CC_
00002 #define _DataFileCtrl_CC_
00003 
00004 #include "../includes/Header.hh"
00005 using namespace std;
00009 void FormalizeFile(ofstream *DATA,char *FileName,char *Start){
00010   char date[40];
00011   char StartTime[40];
00012   std::cout<<"in formalize start "<<Start<<std::endl;
00013   sscanf(Start,"%s %s",&date ,&StartTime);
00014   std::cout<<"date "<<date<<std::endl;
00015   std::cout<<"StartTime "<<StartTime<<std::endl;
00016   (*DATA).open(FileName);
00017   //  (*DATA)<<"Run started at";//
00018   (*DATA) << "\"Run started at\",#" << date ;
00019   (*DATA) << "#,#1899-12-30 "<< StartTime <<"#" <<endl;
00020 }
00021 
00022 void FinalizeFile(ofstream *DATA,char *End){
00023   char date[40];
00024   char EndTime[40];
00025   std::cout << "in FinalizeFile End " << End <<std::endl;
00026   sscanf(End, "%s %s", &date, &EndTime);
00027   std::cout << "date " << date << std::endl;
00028   std::cout << "EndTime " << EndTime << std::endl;
00029 
00030   (*DATA) << -999 << endl
00031           << param_ptr->nEvent + param_ptr->nOverFlow << endl
00032           << "\"Run ended at\",#" << date
00033           << "#,#" << date << " " << EndTime <<"#" <<endl;
00034   (*DATA).close();
00035 
00036 
00037 }
00038 #endif

Generated on Sun Dec 14 23:32:46 2008 by doxygen 1.3.5