Skip to content

Commit

Permalink
removing mss
Browse files Browse the repository at this point in the history
  • Loading branch information
smorovic committed May 16, 2024
1 parent d376eb3 commit c0bc1da
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 28 deletions.
4 changes: 2 additions & 2 deletions DQMServices/FileIO/plugins/DQMFileSaverPB.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void DQMFileSaverPB::saveLumi(const FileParameters& fp) const {
std::string openHistoFilePathName;
std::string histoFilePathName;

evf::FastMonitoringService* fms = nullptr;
evf::FastMonitoringService * fms = nullptr;
edm::Service<DQMStore> store;

// create the files names
Expand Down Expand Up @@ -104,7 +104,7 @@ void DQMFileSaverPB::saveLumi(const FileParameters& fp) const {
edm::Service<evf::EvFDaqDirector>()->getOpenProtocolBufferHistogramFilePath(fp.lumi_, streamLabel_);
histoFilePathName = edm::Service<evf::EvFDaqDirector>()->getProtocolBufferHistogramFilePath(fp.lumi_, streamLabel_);

fms = (evf::FastMonitoringService*)(edm::Service<evf::MicroStateService>().operator->());
fms = edm::Service<evf::FastMonitoringService>().operator->();
}

bool abortFlag = false;
Expand Down
9 changes: 3 additions & 6 deletions EventFilter/Utilities/interface/FastMonitoringService.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <filesystem>

#include "EventFilter/Utilities/interface/MicroStateService.h"
#include "EventFilter/Utilities/interface/FastMonitoringService.h"

#include <string>
#include <vector>
Expand All @@ -33,9 +33,6 @@
At snapshot time only (every few seconds) we do the map lookup to produce snapshot.
The general counters and status variables (event number, number of processed events, number of passed and stored
events, luminosity section etc.) are also monitored here.
N.B. MicroStateService is referenced by a common base class which is now trivial.
It's complete removal will be completed in the future commit.
*/

class FedRawDataInputSource;
Expand Down Expand Up @@ -164,15 +161,15 @@ namespace evf {
//reserve output module space
constexpr int nReservedModules = 128;

class FastMonitoringService : public MicroStateService {
class FastMonitoringService {
public:
// the names of the states - some of them are never reached in an online app
static const edm::ModuleDescription specialMicroStateNames[FastMonState::mCOUNT];
static const std::string macroStateNames[FastMonState::MCOUNT];
static const std::string inputStateNames[FastMonState::inCOUNT];
// Reserved names for microstates
FastMonitoringService(const edm::ParameterSet&, edm::ActivityRegistry&);
~FastMonitoringService() override;
~FastMonitoringService();
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

std::string makeModuleLegendaJson();
Expand Down
2 changes: 1 addition & 1 deletion EventFilter/Utilities/plugins/GlobalEvFOutputModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ namespace evf {
//create JSD
GlobalEvFOutputJSONDef(streamLabel_, true);

fms_ = (evf::FastMonitoringService*)(edm::Service<evf::MicroStateService>().operator->());
fms_ = (evf::FastMonitoringService*)(edm::Service<evf::FastMonitoringService>().operator->());
}

GlobalEvFOutputModule::~GlobalEvFOutputModule() {}
Expand Down
4 changes: 1 addition & 3 deletions EventFilter/Utilities/plugins/modules.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
using namespace edm::serviceregistry;
using namespace evf;

typedef edm::serviceregistry::AllArgsMaker<MicroStateService, FastMonitoringService> FastMonitoringServiceMaker;
DEFINE_FWK_SERVICE_MAKER(FastMonitoringService, FastMonitoringServiceMaker);

typedef RawEventOutputModuleForBU<RawEventFileWriterForBU> RawStreamFileWriterForBU;
DEFINE_FWK_MODULE(RawStreamFileWriterForBU);
DEFINE_FWK_MODULE(FRDOutputModule);
DEFINE_FWK_SERVICE(EvFBuildingThrottle);
DEFINE_FWK_SERVICE(EvFDaqDirector);
DEFINE_FWK_SERVICE(FastMonitoringService);
DEFINE_FWK_MODULE(ExceptionGenerator);
DEFINE_FWK_MODULE(EvFFEDSelector);
DEFINE_FWK_MODULE(EvFFEDExcluder);
Expand Down
4 changes: 2 additions & 2 deletions EventFilter/Utilities/src/DAQSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ DAQSource::DAQSource(edm::ParameterSet const& pset, edm::InputSourceDescription
//get handles to DaqDirector and FastMonitoringService because getting them isn't possible in readSupervisor thread
if (fileListMode_) {
try {
fms_ = static_cast<evf::FastMonitoringService*>(edm::Service<evf::MicroStateService>().operator->());
fms_ = static_cast<evf::FastMonitoringService*>(edm::Service<evf::FastMonitoringService>().operator->());
} catch (cms::Exception const&) {
edm::LogInfo("DAQSource") << "No FastMonitoringService found in the configuration";
}
} else {
fms_ = static_cast<evf::FastMonitoringService*>(edm::Service<evf::MicroStateService>().operator->());
fms_ = static_cast<evf::FastMonitoringService*>(edm::Service<evf::FastMonitoringService>().operator->());
if (!fms_) {
throw cms::Exception("DAQSource") << "FastMonitoringService not found";
}
Expand Down
2 changes: 1 addition & 1 deletion EventFilter/Utilities/src/EvFDaqDirector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ namespace evf {
bool& setExceptionState) {
if (previousFileSize_ != 0) {
if (!fms_) {
fms_ = (FastMonitoringService*)(edm::Service<evf::MicroStateService>().operator->());
fms_ = (FastMonitoringService*)(edm::Service<evf::FastMonitoringService>().operator->());
}
if (fms_)
fms_->accumulateFileSize(ls, previousFileSize_);
Expand Down
8 changes: 1 addition & 7 deletions EventFilter/Utilities/src/FastMonitoringService.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ namespace evf {
};

FastMonitoringService::FastMonitoringService(const edm::ParameterSet& iPS, edm::ActivityRegistry& reg)
: MicroStateService(iPS, reg),
fmt_(new FastMonitoringThread()),
: fmt_(new FastMonitoringThread()),
tbbMonitoringMode_(iPS.getUntrackedParameter<bool>("tbbMonitoringMode", true)),
tbbConcurrencyTracker_(iPS.getUntrackedParameter<bool>("tbbConcurrencyTracker", true) && tbbMonitoringMode_),
sleepTime_(iPS.getUntrackedParameter<int>("sleepTime", 1)),
Expand Down Expand Up @@ -1047,9 +1046,4 @@ namespace evf {
fmt_->jsonMonitor_->snap(ls);
}

//compatibility
MicroStateService::MicroStateService(const edm::ParameterSet& iPS, edm::ActivityRegistry& reg) {}

MicroStateService::~MicroStateService() {}

} //end namespace evf
4 changes: 2 additions & 2 deletions EventFilter/Utilities/src/FedRawDataInputSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ FedRawDataInputSource::FedRawDataInputSource(edm::ParameterSet const& pset, edm:
//get handles to DaqDirector and FastMonitoringService because getting them isn't possible in readSupervisor thread
if (fileListMode_) {
try {
fms_ = static_cast<evf::FastMonitoringService*>(edm::Service<evf::MicroStateService>().operator->());
fms_ = static_cast<evf::FastMonitoringService*>(edm::Service<evf::FastMonitoringService>().operator->());
} catch (cms::Exception const&) {
edm::LogInfo("FedRawDataInputSource") << "No FastMonitoringService found in the configuration";
}
} else {
fms_ = static_cast<evf::FastMonitoringService*>(edm::Service<evf::MicroStateService>().operator->());
fms_ = static_cast<evf::FastMonitoringService*>(edm::Service<evf::FastMonitoringService>().operator->());
if (!fms_) {
throw cms::Exception("FedRawDataInputSource") << "FastMonitoringService not found";
}
Expand Down
4 changes: 2 additions & 2 deletions HLTrigger/JSONMonitoring/plugins/HLTriggerJSONMonitoring.cc
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,9 @@ void HLTriggerJSONMonitoring::globalEndLuminosityBlockSummary(edm::LuminosityBlo
unsigned int run = lumi.run();

bool writeFiles = true;
if (edm::Service<evf::MicroStateService>().isAvailable()) {
if (edm::Service<evf::FastMonitoringService*>().isAvailable()) {
evf::FastMonitoringService* fms =
(evf::FastMonitoringService*)(edm::Service<evf::MicroStateService>().operator->());
(evf::FastMonitoringService*)(edm::Service<evf::FastMonitoringService*>().operator->());
if (fms)
writeFiles = fms->shouldWriteFiles(ls);
}
Expand Down
4 changes: 2 additions & 2 deletions HLTrigger/JSONMonitoring/plugins/L1TriggerJSONMonitoring.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ void L1TriggerJSONMonitoring::globalEndLuminosityBlockSummary(edm::LuminosityBlo
unsigned int run = lumi.run();

bool writeFiles = true;
if (edm::Service<evf::MicroStateService>().isAvailable()) {
if (edm::Service<evf::FastMonitoringService>().isAvailable()) {
evf::FastMonitoringService* fms =
(evf::FastMonitoringService*)(edm::Service<evf::MicroStateService>().operator->());
(evf::FastMonitoringService*)(edm::Service<evf::FastMonitoringService>().operator->());
if (fms)
writeFiles = fms->shouldWriteFiles(ls);
}
Expand Down

0 comments on commit c0bc1da

Please sign in to comment.