00001 /* @version $Revision: 1566 $ * @modifiedby $Author: jacquem $ * @lastmodified $Date: 2012-03-08 14:00:10 +0100 (Thu, 08 Mar 2012) $ */ 00002 00003 #include "event/Run.hh" 00004 #include "event/Event.hh" 00005 #include "geometry/Detector.hh" 00006 #include "tools/Log.hh" 00007 #include <iostream> 00008 00009 #include "mTypes.h" 00010 00011 using namespace std; 00012 std::ostream& operator <<(std::ostream& out, const Run& x) { 00013 return(x.operator <<(out)); 00014 } 00015 00016 //-------------------------------------------------------- 00017 Run::Run(Detector &aDetector) : detector(aDetector) 00018 { 00019 00020 name = ""; 00021 id = 0; 00022 time(&reconstructionDate); 00023 calibrationRun = false; 00024 difSynchro = false; 00025 svnrev = "$Revision: 1566 $"; 00026 00027 // calibration run only 00028 injectedCharge = 0; 00029 widthCtest = 0; 00030 periodCtest = 0; 00031 delayCtest = 0; 00032 dataFormat = 0; 00033 daqSoftware = 0; 00034 cccFirmware = 0; 00035 } 00036 00037 00038 //-------------------------------------------------------- 00039 Run::~Run(){ 00040 //FILE_LOG(logDEBUG) << "----Run destructor"<< endl; 00041 } 00042 00043 00044 //-------------------------------------------------------- 00045 ostream& Run::operator <<(ostream &out) const { 00046 string calib = ", is a production run"; 00047 if ( calibrationRun) 00048 { 00049 calib = ", is a calibration run"; 00050 } 00051 out << " Run " << name << ", id:" << id << ", date:" << date << calib << ". ------ " << svnrev; 00052 00053 return(out); 00054 } // operator < 00055 00056 //-------------------------------------------------------- 00057 std::string Run::getSvnrev()const 00058 { 00059 string without = svnrev.substr(11); 00060 size_t len = without.length(); 00061 return without.substr(0,len-2); 00062 } 00063 00064