00001 #include <Riostream.h>
00002 #include "TFndHdt.h"
00003
00004 void GetRunInfo(TString runtype,Int_t runnum){
00005
00006 TString run_path;
00007
00008 if (runnum>=7000){
00009 run_path.Form("%s/%s.hdt.root",ExpandPathName("$FND_HDT").Data(),
00010 FROOT::BuildRunName(runtype,runnum, kTRUE).Data());
00011 } else {
00012 run_path.Form("%s_v9.0/%s.hdt.root",ExpandPathName("$FND_HDT").Data(),
00013 FROOT::BuildRunName(runtype,runnum, kFALSE).Data());
00014 }
00015 TFile *hdt_file = new TFile(run_path);
00016 if (!hdt_file) return;
00017
00018
00019 TFndGenInfo *geninfo = (TFndGenInfo *)hdt_file->Get("TFndGenInfo");
00020
00021
00022
00023 TDatime d = geninfo->GetDateTime();
00024
00025 TThread::Printf("\n\n Selected run: \"%s\" %d ===> UNIX TIME: %u",
00026 runtype.Data(),
00027 runnum,
00028 d.Convert()
00029 );
00030
00031 TThread::Printf(" Day: %d - Month: %d - Year: %d",
00032 d.GetDay(),
00033 d.GetMonth(),
00034 d.GetYear()
00035 );
00036
00037 TThread::Printf(" Hour: %d - Minuts: %d - Seconds: %d\n\n",
00038 d.GetHour(),
00039 d.GetMinute(),
00040 d.GetSecond()
00041 );
00042
00043 d.Print();
00044
00045 }