59 LOG(info) <<
"Init options for CbmMqStarHistoServer.";
75 LOG(info) <<
"Histograms publication frequency in TS: " <<
fuPublishFreqTs;
76 LOG(info) <<
"Histograms publication min. interval in s: " <<
fdMinPublishTime;
77 LOG(info) <<
"Histograms publication max. interval in s: " <<
fdMaxPublishTime;
92 int noChannel = fChannels.size();
93 LOG(info) <<
"Number of defined channels: " << noChannel;
94 for (
auto const& entry : fChannels) {
95 LOG(info) <<
"Channel name: " << entry.first;
104 LOG(error) << e.what();
129 LOG(info) <<
"Init parameter containers for CbmDeviceMcbmMonitorPulser.";
130 Bool_t initOK = kTRUE;
167 fMonitorAlgo->SetIgnoreOverlapMs( fbIgnoreOverlapMs );
168 fMonitorAlgo->SetDebugMonitorMode( fbDebugMonitorMode );
169 fMonitorAlgo->SetIgnoreCriticalErrors( fbIgnoreCriticalErrors );
170 fMonitorAlgo->SetHistoryHistoSize( fuHistoryHistoSize );
171 fMonitorAlgo->SetPulserTotLimits( fuMinTotPulser, fuMaxTotPulser );
173 Bool_t initOK = fMonitorAlgo->InitContainers();
181 initOK &= fMonitorAlgo->CreateHistograms();
184 std::vector< std::pair< TNamed *, std::string > > vHistos = fMonitorAlgo->GetHistoVector();
186 std::vector< std::pair< TCanvas *, std::string > > vCanvases = fMonitorAlgo->GetCanvasVector();
192 for( UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto )
194// LOG(info) << "Registering " << vHistos[ uHisto ].first->GetName()
195// << " in " << vHistos[ uHisto ].second.data()
197 fArrayHisto.Add( vHistos[ uHisto ].first );
198 std::pair< std::string, std::string > psHistoConfig( vHistos[ uHisto ].first->GetName(),
199 vHistos[ uHisto ].second );
200 fvpsHistosFolder.push_back( psHistoConfig );
203 FairMQMessagePtr messageHist( NewMessage() );
204// Serialize< BoostSerializer < std::pair< std::string, std::string > > >( *messageHist, psHistoConfig );
205 BoostSerializer<std::pair<std::string, std::string>>().Serialize(*messageHist,psHistoConfig);
208 if( Send( messageHist, fsChannelNameHistosConfig ) < 0 )
210 LOG(error) << "Problem sending histo config";
212 } // if( Send( messageHist, fsChannelNameHistosConfig ) < 0 )
214 LOG(info) << "Config of hist " << psHistoConfig.first.data()
215 << " in folder " << psHistoConfig.second.data() ;
216 } // for( UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto )
221 for( UInt_t uCanv = 0; uCanv < vCanvases.size(); ++uCanv )
223// LOG(info) << "Registering " << vCanvases[ uCanv ].first->GetName()
224// << " in " << vCanvases[ uCanv ].second.data();
225 std::string sCanvName = (vCanvases[ uCanv ].first)->GetName();
226 std::string sCanvConf = GenerateCanvasConfigString( vCanvases[ uCanv ].first );
228 std::pair< std::string, std::string > psCanvConfig( sCanvName, sCanvConf );
230 fvpsCanvasConfig.push_back( psCanvConfig );
233 FairMQMessagePtr messageCan( NewMessage() );
234// Serialize< BoostSerializer < std::pair< std::string, std::string > > >( *messageCan, psCanvConfig );
235 BoostSerializer < std::pair< std::string, std::string > >().Serialize( *messageCan, psCanvConfig );
238 if( Send( messageCan, fsChannelNameCanvasConfig ) < 0 )
240 LOG(error) << "Problem sending canvas config";
242 } // if( Send( messageCan, fsChannelNameCanvasConfig ) < 0 )
244 LOG(info) << "Config string of Canvas " << psCanvConfig.first.data()
245 << " is " << psCanvConfig.second.data() ;
246 } // for( UInt_t uCanv = 0; uCanv < vCanvases.size(); ++uCanv )
257 LOG(debug) <<
"Received message " <<
fulNumMessages <<
" with " << parts.Size() <<
" parts"
258 <<
", size0: " << parts.At(0)->GetSize();
260 uint32_t uPartIdx = 0;
272 RootSerializer().Deserialize(*parts.At(uPartIdx),
fTsMetaData);
275 std::string msgStrBmon(
static_cast<char*
>(parts.At(uPartIdx)->GetData()), (parts.At(uPartIdx))->GetSize());
276 std::istringstream issBmon(msgStrBmon);
277 boost::archive::binary_iarchive inputArchiveBmon(issBmon);
281 std::string msgStrSts(
static_cast<char*
>(parts.At(uPartIdx)->GetData()), (parts.At(uPartIdx))->GetSize());
282 std::istringstream issSts(msgStrSts);
283 boost::archive::binary_iarchive inputArchiveSts(issSts);
287 std::string msgStrMuch(
static_cast<char*
>(parts.At(uPartIdx)->GetData()), (parts.At(uPartIdx))->GetSize());
288 std::istringstream issMuch(msgStrMuch);
289 boost::archive::binary_iarchive inputArchiveMuch(issMuch);
293 std::string msgStrTrd(
static_cast<char*
>(parts.At(uPartIdx)->GetData()), (parts.At(uPartIdx))->GetSize());
294 std::istringstream issTrd(msgStrTrd);
295 boost::archive::binary_iarchive inputArchiveTrd(issTrd);
299 std::string msgStrTof(
static_cast<char*
>(parts.At(uPartIdx)->GetData()), (parts.At(uPartIdx))->GetSize());
300 std::istringstream issTof(msgStrTof);
301 boost::archive::binary_iarchive inputArchiveTof(issTof);
305 std::string msgStrRich(
static_cast<char*
>(parts.At(uPartIdx)->GetData()), (parts.At(uPartIdx))->GetSize());
306 std::istringstream issRich(msgStrRich);
307 boost::archive::binary_iarchive inputArchiveRich(issRich);
311 std::string msgStrPsd(
static_cast<char*
>(parts.At(uPartIdx)->GetData()), (parts.At(uPartIdx))->GetSize());
312 std::istringstream issPsd(msgStrPsd);
313 boost::archive::binary_iarchive inputArchivePsd(issPsd);
341 fles::StorableTimeslice component{ 0 };
342 inputArchive >> component;
345 DoUnpack(component, 0);
350 std::chrono::system_clock::time_point currentTime = std::chrono::system_clock::now();
351 std::chrono::duration<double_t> elapsedSeconds = currentTime - fLastPublishTime;
352 if( ( fdMaxPublishTime < elapsedSeconds.count() ) ||
353 ( 0 == fulNumMessages % fuPublishFreqTs && fdMinPublishTime < elapsedSeconds.count() ) )
356 fLastPublishTime = std::chrono::system_clock::now();
357 } // if( ( fdMaxPublishTime < elapsedSeconds.count() ) || ( 0 == fulNumMessages % fuPublishFreqTs && fdMinPublishTime < elapsedSeconds.count() ) )