Idiosyncrasy.cxx

00001 
00002 #include "Idiosyncrasy.h"
00003 #include <sstream>
00004 
00005 namespace SctApi {
00006 
00007   Idiosyncrasy::Idiosyncrasy(const Sct::PartitionIdentifier p,
00008                  const Sct::CrateIdentifier c) :
00009     m_ucid(Sct::UCID(p,c)) {
00010   };
00011 
00012   Idiosyncrasy::Idiosyncrasy(const Sct::UCID & ucid) :
00013     m_ucid(ucid) {
00014   };
00015 
00016   const Sct::UCID & Idiosyncrasy::ucid() const {
00017     return m_ucid;
00018   };
00019 
00020   const std::string & Idiosyncrasy::uniqueName() const {
00021     if (m_uniqueName == "") {
00022       std::ostringstream os;
00023       os << "CrateServer_P"<<ucid().partition() << "_C" << ucid().crate(); // regrettably we can't just do 'os<<"CrateServer"<<m_ucid' as m_ucid has dots in it and you are not advised to put dots into an IS-name.
00024       m_uniqueName = os.str();
00025     };
00026     return m_uniqueName;
00027   };
00028   
00029   const std::string & Idiosyncrasy::infoServiceNameOfScanStatusObject() const {
00030     if (m_infoServiceNameOfScanStatusObject == "") {
00031       std::ostringstream os;
00032       os << "SCTAPIServer.scanning_" << uniqueName();
00033       m_infoServiceNameOfScanStatusObject = os.str();
00034     };
00035     return m_infoServiceNameOfScanStatusObject;
00036   };
00037 
00038   const std::string & Idiosyncrasy::ipcNameOfSctApiCrateServer() const {
00039     if (m_ipcNameOfSctApiCrateServer == "") {
00040       std::ostringstream os;
00041       os << "IpcObj_" << uniqueName();
00042       m_ipcNameOfSctApiCrateServer = os.str();
00043     };
00044     return m_ipcNameOfSctApiCrateServer;
00045   };
00046 
00047 }; // end of namespace SctApi
00048 

Generated on Mon Feb 6 14:01:21 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6