From 932bd5fe4922a059cd22dd23b1e476d8e815e4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20P=C3=A9tr=C3=A9?= <laurent.petre@cern.ch> Date: Mon, 25 Jan 2021 18:18:35 +0100 Subject: [PATCH 1/3] Prune the gemexpert version file --- gemexpert/src/version.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gemexpert/src/version.cpp b/gemexpert/src/version.cpp index c6cb36b9..1866d1dd 100644 --- a/gemexpert/src/version.cpp +++ b/gemexpert/src/version.cpp @@ -10,9 +10,9 @@ namespace expert { const std::string project = "cmsgemos"; const std::string package = "gem::expert"; const std::string versions = PACKAGE_VERSION_STRING(0, 0, 0); - const std::string summary = "gem-expert tools"; + const std::string summary = ""; const std::string description = ""; - const std::string authors = "GEM Online Systems Group"; + const std::string authors = ""; const std::string link = ""; config::PackageInfo getPackageInfo(); -- GitLab From 3fd551e611d982ec79e29aa396c7da6a5961e562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20P=C3=A9tr=C3=A9?= <laurent.petre@cern.ch> Date: Mon, 25 Jan 2021 18:30:47 +0100 Subject: [PATCH 2/3] Redefine the ID and instance numbers including the monitoring --- doc/examples/xml/gem904daq04.xml | 46 +++++++++++++++++++------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/doc/examples/xml/gem904daq04.xml b/doc/examples/xml/gem904daq04.xml index 79c4eac8..cbfedfdf 100644 --- a/doc/examples/xml/gem904daq04.xml +++ b/doc/examples/xml/gem904daq04.xml @@ -4,10 +4,11 @@ xmlns:xc="http://xdaq.web.cern.ch/xdaq/xsd/2004/XMLConfiguration-30"> <xc:Context url="http://gem904daq04:20100"> + <!-- ID namespace: 1... --> <xc:Module>${CMSGEMOS_LIBDIR}/libgemsupervisor.so</xc:Module> - <!-- ID: 10; instance: 0 --> - <xc:Application class="gem::supervisor::GEMSupervisor" id="10" instance="0" network="local"> + <!-- ID: 1000, instance: 0 --> + <xc:Application class="gem::supervisor::GEMSupervisor" id="1000" instance="0" network="local"> <properties xmlns="urn:xdaq-application:gem::supervisor::GEMSupervisor" xsi:type="soapenc:Struct"> <UseLocalReadout xsi:type="xsd:boolean">true</UseLocalReadout> <UseFedKitReadout xsi:type="xsd:boolean">false</UseFedKitReadout> @@ -24,27 +25,30 @@ </properties> </xc:Application> + <!-- ID namespace: 2... --> <xc:Module>${CMSGEMOS_LIBDIR}/libgemcalibration.so</xc:Module> - <!-- ID: 20; instance: 0 --> - <xc:Application class="gem::calibration::Calibration" id="20" instance="0" network="local"> + <!-- ID: 2000, instance: 0 --> + <xc:Application class="gem::calibration::Calibration" id="2000" instance="0" network="local"> <properties xmlns="urn:xdaq-application:gem::calibration::Calibration" xsi:type="soapenc:Struct"> <nShelves xsi:type="xsd:integer">1</nShelves> </properties> </xc:Application> + <!-- ID namspace: 3... --> <xc:Module>${CMSGEMOS_LIBDIR}/libgemexpert.so</xc:Module> - <!-- ID: 30; instance: 0 --> - <xc:Application class="gem::expert::Expert" id="30" instance="0" network="local"> + <!-- ID: 3000, instance: 0 --> + <xc:Application class="gem::expert::Expert" id="3000" instance="0" network="local"> <properties xmlns="urn:xdaq-application:gem::expert::Expert" xsi:type="soapenc:Struct"> </properties> </xc:Application> + <!-- ID namespace: 4... --> <xc:Module>${CMSGEMOS_LIBDIR}/libgemhardware_managers.so</xc:Module> - <!-- ID: xyy, x = shelf, yy = slot; instance: 12*shelf+slot --> - <xc:Application class="gem::hardware::AMCManager" id="102" instance="14" network="local"> + <!-- ID: 4xyy, instance: xyy, x = shelf, yy = slot --> + <xc:Application class="gem::hardware::AMCManager" id="4102" instance="102" network="local"> <properties xmlns="urn:xdaq-application:gem::hardware::AMCManager" xsi:type="soapenc:Struct"> <!-- Hardware description --> <crate xsi:type="xsd:unsignedInt">1</crate> @@ -57,8 +61,8 @@ </properties> </xc:Application> - <!-- ID: x13, x = shelf; instance: shelf --> - <xc:Application class="gem::hardware::AMC13Manager" id="113" instance="1" network="local"> + <!-- ID: 4x13, instance: x13, x = shelf --> + <xc:Application class="gem::hardware::AMC13Manager" id="4113" instance="113" network="local"> <properties xmlns="urn:xdaq-application:gem::hardware::AMC13Manager" xsi:type="soapenc:Struct"> <amc13ConfigParams xsi:type="soapenc:Struct"> <ConnectionFile xsi:type="xsd:string">connections.xml</ConnectionFile> @@ -120,10 +124,11 @@ </properties> </xc:Application> + <!-- ID namespace: 5... --> <xc:Module>${CMSGEMOS_LIBDIR}/libgemreadout.so</xc:Module> - <!-- ID: x14, x = shelf; instance: shelf --> - <xc:Application class="gem::readout::AMC13Readout" id="114" instance="1" network="local"> + <!-- ID: 5x13, instance: x13, x = shelf --> + <xc:Application class="gem::readout::AMC13Readout" id="5113" instance="113" network="local"> <properties xmlns="urn:xdaq-application:gem::readout::AMC13Readout" xsi:type="soapenc:Struct"> <ConnectionFile xsi:type="xsd:string">connections.xml</ConnectionFile> <CardName xsi:type="xsd:string">gem.shelf01.amc13</CardName> @@ -140,20 +145,23 @@ </properties> </xc:Application> + <!-- ID namespace: 6... --> <xc:Module>${CMSGEMOS_LIBDIR}/libgemmonitor.so</xc:Module> - <!--################################################################--> - <!-- !!!NOTE!!! --> - <!-- Shelf must be added after the AMCMonitors for the code to work --> - <!--################################################################--> - <xc:Application class="gem::monitor::AMCMonitor" id="912" instance="1" network="local"> + <!--###############################################################--> + <!-- !!!NOTE!!! --> + <!-- the ShelfMonitor must be added after all the devices monitors --> + <!--###############################################################--> + + <!-- ID: 6xyy, instance: xyy, x = shelf, yy = slot --> + <xc:Application class="gem::monitor::AMCMonitor" id="6102" instance="102" network="local"> <properties xmlns="urn:xdaq-application:gem::monitor::AMCMonitor" xsi:type="soapenc:Struct"> <crate xsi:type="xsd:unsignedInt">1</crate> <slot xsi:type="xsd:unsignedInt">2</slot> </properties> </xc:Application> - - <xc:Application class="gem::monitor::ShelfMonitor" id="100" instance="1" network="local"> + <!-- ID: 600x, instance: x, x = shelf --> + <xc:Application class="gem::monitor::ShelfMonitor" id="6001" instance="1" network="local"> <properties xmlns="urn:xdaq-application:gem::monitor::ShelfMonitor" xsi:type="soapenc:Struct"> <shelfID xsi:type="xsd:integer">1</shelfID> <doWriteLog xsi:type="xsd:boolean">false</doWriteLog> -- GitLab From 0a759faac217fa3b4da03f21cd16b814513cc5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20P=C3=A9tr=C3=A9?= <laurent.petre@cern.ch> Date: Mon, 25 Jan 2021 18:45:07 +0100 Subject: [PATCH 3/3] Rename shelfID to crate in the ShelfMonitor --- doc/examples/xml/gem904daq04.xml | 11 +++++++---- gemmonitor/interface/ShelfMonitor.h | 2 +- gemmonitor/src/ShelfMonitor.cpp | 10 +++++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/examples/xml/gem904daq04.xml b/doc/examples/xml/gem904daq04.xml index cbfedfdf..35c65079 100644 --- a/doc/examples/xml/gem904daq04.xml +++ b/doc/examples/xml/gem904daq04.xml @@ -155,6 +155,7 @@ <!-- ID: 6xyy, instance: xyy, x = shelf, yy = slot --> <xc:Application class="gem::monitor::AMCMonitor" id="6102" instance="102" network="local"> <properties xmlns="urn:xdaq-application:gem::monitor::AMCMonitor" xsi:type="soapenc:Struct"> + <!-- Hardware description --> <crate xsi:type="xsd:unsignedInt">1</crate> <slot xsi:type="xsd:unsignedInt">2</slot> </properties> @@ -163,11 +164,13 @@ <!-- ID: 600x, instance: x, x = shelf --> <xc:Application class="gem::monitor::ShelfMonitor" id="6001" instance="1" network="local"> <properties xmlns="urn:xdaq-application:gem::monitor::ShelfMonitor" xsi:type="soapenc:Struct"> - <shelfID xsi:type="xsd:integer">1</shelfID> - <doWriteLog xsi:type="xsd:boolean">false</doWriteLog> - <logPath xsi:type="xsd:string">/var/log/gemdaq/</logPath> + <!-- Hardware description --> + <crate xsi:type="xsd:integer">1</crate> + + <doWriteLog xsi:type="xsd:boolean">false</doWriteLog> + <logPath xsi:type="xsd:string">/var/log/gemdaq/</logPath> <!-- log interval is in roughly 0.5 second per increments --> - <logUpdateInterval xsi:type="xsd:integer">100</logUpdateInterval> + <logUpdateInterval xsi:type="xsd:integer">100</logUpdateInterval> </properties> </xc:Application> diff --git a/gemmonitor/interface/ShelfMonitor.h b/gemmonitor/interface/ShelfMonitor.h index 50cdf556..e8b7bc8f 100644 --- a/gemmonitor/interface/ShelfMonitor.h +++ b/gemmonitor/interface/ShelfMonitor.h @@ -50,7 +50,7 @@ namespace monitor { /// @param classname is the class to check to see whether it is a GEMApplication inherited application /// @throws bool isAMCInShelf(const xdaq::ApplicationDescriptor* app) const; - xdata::Integer m_shelfID; + xdata::Integer m_crate; log4cplus::Logger m_logger; //FIXME should be removed! std::string m_state; diff --git a/gemmonitor/src/ShelfMonitor.cpp b/gemmonitor/src/ShelfMonitor.cpp index 6f6de162..d8b19d7d 100644 --- a/gemmonitor/src/ShelfMonitor.cpp +++ b/gemmonitor/src/ShelfMonitor.cpp @@ -28,14 +28,14 @@ XDAQ_INSTANTIATOR_IMPL(gem::monitor::ShelfMonitor); gem::monitor::ShelfMonitor::ShelfMonitor(xdaq::ApplicationStub* stub) : gem::base::GEMApplication(stub) - , m_shelfID(-1) + , m_crate(-1) { CMSGEMOS_DEBUG("gem::monitor::ShelfMonitor : Creating the ShelfMonitorWeb interface"); p_gemWebInterface = new gem::monitor::ShelfMonitorWeb(this); CMSGEMOS_DEBUG("gem::monitor::ShelfMonitor : Retrieving configuration"); - p_appInfoSpace->fireItemAvailable("shelfID", &m_shelfID); - p_appInfoSpace->addItemRetrieveListener("shelfID", this); - p_appInfoSpace->addItemChangedListener("shelfID", this); + p_appInfoSpace->fireItemAvailable("crate", &m_crate); + p_appInfoSpace->addItemRetrieveListener("crate", this); + p_appInfoSpace->addItemChangedListener("crate", this); CMSGEMOS_DEBUG("gem::monitor::ShelfMonitor : configuration retrieved"); xgi::bind(this, &ShelfMonitor::stopAction, "stopAction"); xgi::bind(this, &ShelfMonitor::resumeAction, "resumeAction"); @@ -109,7 +109,7 @@ bool gem::monitor::ShelfMonitor::isAMCInShelf(const xdaq::ApplicationDescriptor* xdata::InfoSpace* is = xdata::getInfoSpaceFactory()->get(app->getURN()); xdata::Serializable* s = is->find("crate"); xdata::UnsignedInteger32* i = dynamic_cast<xdata::UnsignedInteger32*>(s); - return i->value_ == m_shelfID.value_; + return i->value_ == m_crate.value_; } return false; -- GitLab