00001 #include "SctNames.h" 00002 00003 #include <mrs/message.h> 00004 #include <cstdlib> 00005 00006 using namespace std; 00007 00008 namespace Sct { 00009 00010 string SctNames::getPartitionName() throw() { 00011 return "SCT"; 00012 } 00013 00014 string SctNames::getEventDataName() throw() { 00015 return "EventData"; 00016 } 00017 00018 string SctNames::getFittedDataName() throw() { 00019 return "FittedData"; 00020 } 00021 00022 string SctNames::getDcsServerName() throw() { 00023 return "SCTDCS_Data"; 00024 } 00025 00026 string SctNames::getTestDataName() throw() { 00027 return "TestData"; 00028 } 00029 00030 string SctNames::getControlDataName() throw() { 00031 return "ControlData"; 00032 } 00033 00034 string SctNames::getRetrievedDataName() throw() { 00035 return "RetrievedData"; 00036 } 00037 00038 string SctNames::getTempDir() throw() { 00039 static std::string dir = getenv("SCT_SCRATCH_DIR") ? getenv("SCT_SCRATCH_DIR") : "/tmp"; 00040 return dir; 00041 } 00042 00043 std::string SctNames::getPersistentDir() throw(){ 00044 static std::string dir = getenv("SCT_PERSISTENT_DIR") ? getenv ("SCT_PERSISTENT_DIR") : "/tmp"; 00045 return dir; 00046 } 00047 00048 std::string SctNames::getLogDir() throw(){ 00049 static std::string dir = getenv("TDAQ_LOGS_PATH") ? getenv ("TDAQ_LOGS_PATH") : "/tmp"; 00050 return dir; 00051 } 00052 00053 string SctNames::getLocation() throw() { 00054 return "Oxford"; 00055 } 00056 00057 string SctNames::getUser() throw() { 00058 return "daquser"; 00059 } 00060 00061 IPCPartition& SctNames::getPartition() throw() { 00062 static IPCPartition partition (getPartitionName()); 00063 return partition; 00064 } 00065 00066 ISInfoDictionary& SctNames::getISDictionary() throw() { 00067 static ISInfoDictionary dictionary(getPartition()); 00068 return dictionary; 00069 } 00070 00071 MRSStream& SctNames::Mrs() { 00072 static MRSStream mrs(getPartition()); 00073 return mrs; 00074 } 00075 00076 00077 }