75 LOG(info) <<
"Init options for CbmMqStarHistoServer.";
84 fviHistoZLArgs = fConfig->GetValue<std::vector<int>>(
"HistZlArgs");
94 LOG(info) <<
"Histograms publication frequency in TS: " <<
fuPublishFreqTs;
95 LOG(info) <<
"Histograms publication min. interval in s: " <<
fdMinPublishTime;
96 LOG(info) <<
"Histograms publication max. interval in s: " <<
fdMaxPublishTime;
108 int noChannel = fChannels.size();
109 LOG(info) <<
"Number of defined channels: " << noChannel;
110 for (
auto const& entry : fChannels) {
111 LOG(info) <<
"Channel name: " << entry.first;
120 LOG(error) << e.what();
145 LOG(info) <<
"Init parameter containers for CbmDeviceMonitorPsd.";
149 for (
int iparC = 0; iparC <
fParCList->GetEntries(); iparC++) {
150 FairParGenericSet* tempObj = (FairParGenericSet*) (
fParCList->At(iparC));
152 std::string paramName {tempObj->GetName()};
157 std::string message = paramName +
",111";
158 LOG(info) <<
"Requesting parameter container " << paramName <<
", sending message: " << message;
160 FairMQMessagePtr req(NewSimpleMessage(message));
161 FairMQMessagePtr rep(NewMessage());
163 FairParGenericSet* newObj =
nullptr;
165 if (Send(req,
"parameters") > 0) {
166 if (Receive(rep,
"parameters") >= 0) {
167 if (rep->GetSize() != 0) {
169 newObj =
static_cast<FairParGenericSet*
>(tmsg.ReadObject(tmsg.GetClass()));
170 LOG(info) <<
"Received unpack parameter from the server:";
174 LOG(error) <<
"Received empty reply. Parameter not available";
203 std::vector<std::pair<TNamed*, std::string>> vHistos =
fMonitorAlgo->GetHistoVector();
205 std::vector<std::pair<TCanvas*, std::string>> vCanvases =
fMonitorAlgo->GetCanvasVector();
211 for (UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto) {
216 std::pair<std::string, std::string> psHistoConfig(vHistos[uHisto].
first->GetName(), vHistos[uHisto].second);
220 FairMQMessagePtr messageHist(NewMessage());
222 BoostSerializer<std::pair<std::string, std::string>>().Serialize(*messageHist, psHistoConfig);
226 LOG(error) <<
"Problem sending histo config";
230 LOG(info) <<
"Config of hist " << psHistoConfig.first.data() <<
" in folder " << psHistoConfig.second.data();
236 for (UInt_t uCanv = 0; uCanv < vCanvases.size(); ++uCanv) {
239 std::string sCanvName = (vCanvases[uCanv].first)->GetName();
242 std::pair<std::string, std::string> psCanvConfig(sCanvName, sCanvConf);
247 FairMQMessagePtr messageCan(NewMessage());
249 BoostSerializer<std::pair<std::string, std::string>>().Serialize(*messageCan, psCanvConfig);
253 LOG(error) <<
"Problem sending canvas config";
257 LOG(info) <<
"Config string of Canvas " << psCanvConfig.first.data() <<
" is " << psCanvConfig.second.data();
268 LOG(debug) <<
"Received message number " <<
fulNumMessages <<
" with size " << msg->GetSize();
272 std::string msgStr(
static_cast<char*
>(msg->GetData()), msg->GetSize());
273 std::istringstream iss(msgStr);
274 boost::archive::binary_iarchive inputArchive(iss);
277 fles::StorableTimeslice component {0};
278 inputArchive >> component;
286 std::chrono::system_clock::time_point currentTime = std::chrono::system_clock::now();
287 std::chrono::duration<double_t> elapsedSeconds = currentTime -
fLastPublishTime;