ATLAS Offline Software
Loading...
Searching...
No Matches
WebdaqHistSvc Class Reference

HLT online histogram service. More...

#include <WebdaqHistSvc.h>

Inheritance diagram for WebdaqHistSvc:
Collaboration diagram for WebdaqHistSvc:

Classes

struct  THistID
 Helper struct that bundles the histogram, name and mutex. More...

Public Member Functions

 WebdaqHistSvc (const std::string &name, ISvcLocator *svc)
virtual ~WebdaqHistSvc () noexcept override
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE () override
virtual void handle (const Incident &incident) override
virtual StatusCode stop () override
virtual StatusCode finalize () override
virtual StatusCode regHist (const std::string &name) override
virtual StatusCode regHist (const std::string &name, std::unique_ptr< TH1 > hist) override
virtual StatusCode regHist (const std::string &name, TH1 *) override
virtual StatusCode getHist (const std::string &id, TH1 *&hist, size_t ind) const override
virtual StatusCode getHist (const std::string &id, TH2 *&hist, size_t ind) const override
virtual StatusCode getHist (const std::string &id, TH3 *&hist, size_t ind) const override
virtual StatusCode deReg (TObject *obj) override
virtual StatusCode deReg (const std::string &name) override
virtual std::vector< std::string > getHists () const override
std::set< std::string > getSet (boost::regex) const
virtual StatusCode regShared (const std::string &, std::unique_ptr< TH1 >, LockedHandle< TH1 > &) override
virtual StatusCode regShared (const std::string &, std::unique_ptr< TH2 >, LockedHandle< TH2 > &) override
virtual StatusCode regShared (const std::string &, std::unique_ptr< TH3 >, LockedHandle< TH3 > &) override
virtual StatusCode getShared (const std::string &, LockedHandle< TH1 > &) const override
virtual StatusCode getShared (const std::string &, LockedHandle< TH2 > &) const override
virtual StatusCode getShared (const std::string &, LockedHandle< TH3 > &) const override
virtual StatusCode getTHists (TDirectory *td, TList &, bool recurse=false) const override
virtual StatusCode getTHists (const std::string &name, TList &, bool recurse=false) const override
virtual StatusCode getTHists (TDirectory *td, TList &tl, bool recurse=false, bool reg=false) override
virtual StatusCode getTHists (const std::string &name, TList &tl, bool recurse=false, bool reg=false) override
virtual bool exists (const std::string &name) const override
virtual bool existsHist (const std::string &name) const override
virtual StatusCode regTree (const std::string &) override
virtual StatusCode regTree (const std::string &, std::unique_ptr< TTree >) override
virtual StatusCode regTree (const std::string &, TTree *) override
virtual StatusCode getTree (const std::string &, TTree *&) const override
virtual std::vector< std::string > getTrees () const override
virtual StatusCode getTTrees (TDirectory *, TList &, bool) const override
virtual StatusCode getTTrees (const std::string &, TList &, bool) const override
virtual StatusCode getTTrees (TDirectory *, TList &, bool, bool) override
virtual StatusCode getTTrees (const std::string &, TList &, bool, bool) override
virtual StatusCode regGraph (const std::string &) override
virtual StatusCode regGraph (const std::string &, std::unique_ptr< TGraph >) override
virtual StatusCode regGraph (const std::string &, TGraph *) override
virtual std::vector< std::string > getGraphs () const override
virtual StatusCode getGraph (const std::string &, TGraph *&) const override
virtual StatusCode regEfficiency (const std::string &) override
virtual StatusCode regEfficiency (const std::string &, std::unique_ptr< TEfficiency >) override
virtual StatusCode regEfficiency (const std::string &, TEfficiency *) override
virtual StatusCode getEfficiency (const std::string &, TEfficiency *&) const override
virtual std::vector< std::string > getEfficiencies () const override
virtual StatusCode getTEfficiencies (TDirectory *, TList &, bool) const override
virtual StatusCode getTEfficiencies (const std::string &, TList &, bool) const override
virtual StatusCode getTEfficiencies (TDirectory *, TList &, bool, bool) override
virtual StatusCode getTEfficiencies (const std::string &, TList &, bool, bool) override
virtual StatusCode regShared (const std::string &, std::unique_ptr< TGraph >, LockedHandle< TGraph > &) override
virtual StatusCode getShared (const std::string &, LockedHandle< TGraph > &) const override
virtual StatusCode regShared (const std::string &, std::unique_ptr< TEfficiency >, LockedHandle< TEfficiency > &) override
virtual StatusCode getShared (const std::string &, LockedHandle< TEfficiency > &) const override
virtual StatusCode merge (const std::string &) override
virtual StatusCode merge (TObject *) override
virtual bool existsTree (const std::string &) const override
virtual bool existsGraph (const std::string &) const override
virtual bool existsEfficiency (const std::string &) const override

Private Member Functions

void monitoringTask (int, int, std::atomic< bool > &, boost::regex)
 The actual publication Task.
void syncPublish (long int, boost::posix_time::ptime)
 Sync the publication to a multiple of the interval.
void conditionedSleep (std::chrono::milliseconds, const std::atomic< bool > &)
 Sleep for a duration or until the stop flag is set.
bool isObjectAllowed (const std::string &path, const TObject *o) const
 Does the histogram follow the naming rules ?
StatusCode getTHists_i (const std::string &name, TList &) const
 Get TList of registered histograms.
template<typename T>
StatusCode regHist_i (std::unique_ptr< T > hist, const std::string &name, bool shared, THistID *&phid)
template<typename T>
T * getHist_i (const std::string &id, const size_t &ind, bool quiet=false) const
template<typename T>
LockedHandle< T > regShared_i (const std::string &id, std::unique_ptr< T > hist)
template<typename T>
LockedHandle< T > getShared_i (const std::string &id) const

Private Attributes

std::atomic< bool > m_stopFlag {false}
 Flag to stop the monitoring task.
std::thread m_thread
 Publication thread.
std::thread m_threadFast
std::string m_partition
 The partition to publish to.
std::string m_tdaqWebdaqBase
 Webdaq configuration variable, see https://gitlab.cern.ch/atlas-tdaq-software/webdaq.
std::string m_tdaqOHServerName
 The OH server name (TDAQ_OH_SERVER if defined, m_OHServerName otherwise).
std::atomic< bool > m_histoMapUpdated {false}
 Flag to indicate when the histogram map is updated.
std::atomic< bool > m_histoMapUpdatedFast {false}
 Flag to indicate when the histogram map is updated for the fast publication.
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_jobOptionsSvc {this, "JobOptionsSvc", "JobOptionsSvc"}
 joboptions service
tbb::concurrent_hash_map< std::string, THistIDm_hists
 Map of the registered histograms.
Gaudi::Property< std::string > m_excludeType {this, "ExcludeType", "()"}
Gaudi::Property< std::string > m_includeType {this, "IncludeType", ".+"}
Gaudi::Property< std::string > m_excludeName {this, "ExcludeName", ".*\\..*"}
Gaudi::Property< std::string > m_includeName
Gaudi::Property< int > m_numSlots {this, "NumSlots", 8, "Number of slots for the main monitoring task"}
Gaudi::Property< int > m_numSlotsFast {this, "NumSlotsFast", 1, "Number of slots for the fast monitoring task"}
Gaudi::Property< int > m_intervalSeconds {this, "IntervalSeconds", 80, "Interval between histogram publications periods in seconds"}
Gaudi::Property< int > m_intervalSecondsFast {this, "IntervalSecondsFast", 10, "Interval between histogram publications periods in seconds for the fast publication"}
Gaudi::Property< std::string > m_OHServerName {this, "OHServerName", "Histogramming", "Name of the OH server to publish histograms into"}
Gaudi::Property< std::string > m_PublicationIncludeName {this, "PublicationIncludeName",".*","Regex to select histograms for publication"}
Gaudi::Property< std::string > m_fastPublicationIncludeName {this, "FastPublicationIncludeName","^.EXPERT.HLTFramework.TrigSignatureMoni.*","Regex to select histograms for fast publication"}
Gaudi::Property< int > m_autoSave {this, "AutoSave", 0, "Not supported by WebdaqHistSvc"}
Gaudi::Property< int > m_autoFlush {this, "AutoFlush", 0, "Not supported by WebdaqHistSvc"}
Gaudi::Property< bool > m_print {this, "PrintAll", false, "Not supported by WebdaqHistSvc"}
Gaudi::Property< int > m_maxFileSize {this, "MaxFileSize", 10240, "Not supported by WebdaqHistSvc"}
Gaudi::Property< std::vector< std::string > > m_outputfile {this, "Output", {}, "Not supported by WebdaqHistSvc"}
Gaudi::Property< std::vector< std::string > > m_inputfile {this, "Input", {}, "Not supported by WebdaqHistSvc"}
boost::regex m_excludeTypeRegex
boost::regex m_includeTypeRegex
boost::regex m_excludeNameRegex
boost::regex m_includeNameRegex
boost::regex m_PublicationIncludeNameRegex
boost::regex m_fastPublicationIncludeNameRegex

Detailed Description

HLT online histogram service.

The main difference to the offline THistSvc are:

  • do not write any output ROOT files
  • support start/stop
  • only supports one histogram instance per name
  • publish histograms via webdaq The following environment variables are required:
  • TDAQ_WEBDAQ_BASE: should contain the protocol, hostname and, if required, the port number of webis_server to access. Example: http://localhost:8080
  • TDAQ_PARTITION: the partition to publish to

Definition at line 53 of file WebdaqHistSvc.h.

Constructor & Destructor Documentation

◆ WebdaqHistSvc()

WebdaqHistSvc::WebdaqHistSvc ( const std::string & name,
ISvcLocator * svc )

Definition at line 34 of file WebdaqHistSvc.cxx.

34 : base_class(name, svc)
35{}

◆ ~WebdaqHistSvc()

virtual WebdaqHistSvc::~WebdaqHistSvc ( )
inlineoverridevirtualnoexcept

Definition at line 57 of file WebdaqHistSvc.h.

57{}

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

virtual StatusCode initialize WebdaqHistSvc::ATLAS_NOT_THREAD_SAFE ( )
overridevirtual

◆ conditionedSleep()

void WebdaqHistSvc::conditionedSleep ( std::chrono::milliseconds duration,
const std::atomic< bool > & stopFlag )
private

Sleep for a duration or until the stop flag is set.

Definition at line 671 of file WebdaqHistSvc.cxx.

671 {
672 auto start = std::chrono::steady_clock::now();
673 while (true) {
674 if (stopFlag.load()) {
675 return;
676 }
677 auto elapsed = std::chrono::steady_clock::now() - start;
678 if (elapsed >= duration) {
679 break;
680 }
681 auto remaining = duration - std::chrono::duration_cast<std::chrono::milliseconds>(elapsed);
682 std::this_thread::sleep_for(std::min(std::chrono::milliseconds(500), remaining));
683 }
684}

◆ deReg() [1/2]

StatusCode WebdaqHistSvc::deReg ( const std::string & name)
overridevirtual

Definition at line 318 of file WebdaqHistSvc.cxx.

319{
320 tbb::concurrent_hash_map<std::string, THistID>::accessor accessor;
321 if (m_hists.find(accessor, id)) {
322 //Delete the histogram
323 accessor->second.obj->Delete();
324 m_hists.erase(accessor);
325 m_histoMapUpdated = true;
327 ATH_MSG_DEBUG("Deregistration of " << id << " done");
328 return StatusCode::SUCCESS;
329 }
330 ATH_MSG_ERROR("Deregistration failed: histogram with id \"" << id << "\" not found");
331 return StatusCode::FAILURE;
332}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
std::atomic< bool > m_histoMapUpdatedFast
Flag to indicate when the histogram map is updated for the fast publication.
tbb::concurrent_hash_map< std::string, THistID > m_hists
Map of the registered histograms.
std::atomic< bool > m_histoMapUpdated
Flag to indicate when the histogram map is updated.
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.

◆ deReg() [2/2]

StatusCode WebdaqHistSvc::deReg ( TObject * obj)
overridevirtual

Definition at line 302 of file WebdaqHistSvc.cxx.

303{
304 // Find the relevant histogram and deregister it
305 for (auto it = m_hists.begin(); it != m_hists.end(); ++it) {
306 if (it->second.obj == optr) {
307 ATH_MSG_DEBUG("Found histogram " << optr << " booked under " << it->first
308 << " and will deregister it");
309 return deReg(it->first);
310 }
311 }
312 ATH_MSG_ERROR("Histogram with pointer " << optr << " not found in the histogram map");
313 return StatusCode::FAILURE;
314}
virtual StatusCode deReg(TObject *obj) override

◆ exists()

virtual bool WebdaqHistSvc::exists ( const std::string & name) const
inlineoverridevirtual

Definition at line 89 of file WebdaqHistSvc.h.

89{ return existsHist(name); }
virtual bool existsHist(const std::string &name) const override

◆ existsEfficiency()

virtual bool WebdaqHistSvc::existsEfficiency ( const std::string & ) const
inlineoverridevirtual

Definition at line 131 of file WebdaqHistSvc.h.

131{ NOSUPPORT(WARNING, "TEfficiency"); }
#define NOSUPPORT(lvl, what)

◆ existsGraph()

virtual bool WebdaqHistSvc::existsGraph ( const std::string & ) const
inlineoverridevirtual

Definition at line 130 of file WebdaqHistSvc.h.

130{ NOSUPPORT(WARNING, "TGraph"); }

◆ existsHist()

bool WebdaqHistSvc::existsHist ( const std::string & name) const
overridevirtual

Definition at line 393 of file WebdaqHistSvc.cxx.

394{
395 return (getHist_i<TH1>(name, 0, true) != nullptr);
396}
T * getHist_i(const std::string &id, const size_t &ind, bool quiet=false) const

◆ existsTree()

virtual bool WebdaqHistSvc::existsTree ( const std::string & ) const
inlineoverridevirtual

Definition at line 129 of file WebdaqHistSvc.h.

129{ NOSUPPORT(DEBUG, "TTree"); }
#define DEBUG
Definition page_access.h:11

◆ finalize()

StatusCode WebdaqHistSvc::finalize ( )
overridevirtual

Definition at line 143 of file WebdaqHistSvc.cxx.

144{
145 ATH_MSG_INFO("finalize");
146 // Reset OH mutex
148
149 return StatusCode::SUCCESS;
150}
#define ATH_MSG_INFO(x)
static void reset_histogram_mutex()
Reset (disable) histogram mutex.

◆ getEfficiencies()

virtual std::vector< std::string > WebdaqHistSvc::getEfficiencies ( ) const
inlineoverridevirtual

Definition at line 114 of file WebdaqHistSvc.h.

114{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ getEfficiency()

virtual StatusCode WebdaqHistSvc::getEfficiency ( const std::string & ,
TEfficiency *&  ) const
inlineoverridevirtual

Definition at line 113 of file WebdaqHistSvc.h.

113{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ getGraph()

virtual StatusCode WebdaqHistSvc::getGraph ( const std::string & ,
TGraph *&  ) const
inlineoverridevirtual

Definition at line 108 of file WebdaqHistSvc.h.

108{ NOSUPPORT(DEBUG, "TGraph"); }

◆ getGraphs()

virtual std::vector< std::string > WebdaqHistSvc::getGraphs ( ) const
inlineoverridevirtual

Definition at line 107 of file WebdaqHistSvc.h.

107{ NOSUPPORT(DEBUG, "TGraph"); }

◆ getHist() [1/3]

StatusCode WebdaqHistSvc::getHist ( const std::string & id,
TH1 *& hist,
size_t ind ) const
overridevirtual

Definition at line 424 of file WebdaqHistSvc.cxx.

425{
426 hist = getHist_i<TH1>(id, ind);
427 return (hist != nullptr ? StatusCode::SUCCESS : StatusCode::FAILURE);
428}

◆ getHist() [2/3]

StatusCode WebdaqHistSvc::getHist ( const std::string & id,
TH2 *& hist,
size_t ind ) const
overridevirtual

Definition at line 430 of file WebdaqHistSvc.cxx.

431{
432 hist = getHist_i<TH2>(id, ind);
433 return (hist != nullptr ? StatusCode::SUCCESS : StatusCode::FAILURE);
434}

◆ getHist() [3/3]

StatusCode WebdaqHistSvc::getHist ( const std::string & id,
TH3 *& hist,
size_t ind ) const
overridevirtual

Definition at line 436 of file WebdaqHistSvc.cxx.

437{
438 hist = getHist_i<TH3>(id, ind);
439 return (hist != nullptr ? StatusCode::SUCCESS : StatusCode::FAILURE);
440}

◆ getHist_i()

template<typename T>
T * WebdaqHistSvc::getHist_i ( const std::string & id,
const size_t & ind,
bool quiet = false ) const
private

Definition at line 236 of file WebdaqHistSvc.cxx.

237{
238 ATH_MSG_DEBUG("Getting histogram " << id);
239
240 tbb::concurrent_hash_map<std::string, THistID>::const_accessor accessor;
241 if (!m_hists.find(accessor, id) or accessor.empty()) {
242 if (!quiet) ATH_MSG_ERROR("could not locate Hist with id \"" << id << "\"");
243 return nullptr;
244 }
245
246 T* phist = dynamic_cast<T*>(accessor->second.obj);
247 if (phist == nullptr) {
248 ATH_MSG_ERROR("getHist: unable to dcast retrieved shared hist \""
249 << id << "\" of type " << accessor->second.obj->IsA()->GetName() << " to requested type "
250 << System::typeinfoName(typeid(T)));
251 return nullptr;
252 }
253 return phist;
254}
unsigned long long T

◆ getHists()

std::vector< std::string > WebdaqHistSvc::getHists ( ) const
overridevirtual

Definition at line 336 of file WebdaqHistSvc.cxx.

337{
338 std::vector<std::string> l;
339 l.reserve(m_hists.size());
340 for (auto it = m_hists.begin(); it != m_hists.end(); ++it) {
341 l.push_back(it->first);
342 }
343 return l;
344}
l
Printing final latex table to .tex output file.

◆ getSet()

std::set< std::string > WebdaqHistSvc::getSet ( boost::regex nameSelect) const

Definition at line 348 of file WebdaqHistSvc.cxx.

349{
350 std::vector<std::string> l;
351 l.reserve(m_hists.size());
352 for (auto it = m_hists.begin(); it != m_hists.end(); ++it) {
353 if (boost::regex_match(it->first, nameSelect)) {
354 l.push_back(it->first);
355 }
356 }
357 ATH_MSG_DEBUG("Number of histograms matched: " << l.size());
358 std::set<std::string> HistoSet(l.begin(), l.end());
359 return HistoSet;
360}

◆ getShared() [1/5]

virtual StatusCode WebdaqHistSvc::getShared ( const std::string & ,
LockedHandle< TEfficiency > &  ) const
inlineoverridevirtual

Definition at line 124 of file WebdaqHistSvc.h.

124{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ getShared() [2/5]

virtual StatusCode WebdaqHistSvc::getShared ( const std::string & ,
LockedHandle< TGraph > &  ) const
inlineoverridevirtual

Definition at line 122 of file WebdaqHistSvc.h.

122{ NOSUPPORT(WARNING, "TGraph"); }

◆ getShared() [3/5]

StatusCode WebdaqHistSvc::getShared ( const std::string & id,
LockedHandle< TH1 > & lh ) const
overridevirtual

Definition at line 497 of file WebdaqHistSvc.cxx.

498{
499 lh = getShared_i<TH1>(id);
500 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
501}
LockedHandle< T > getShared_i(const std::string &id) const

◆ getShared() [4/5]

StatusCode WebdaqHistSvc::getShared ( const std::string & id,
LockedHandle< TH2 > & lh ) const
overridevirtual

Definition at line 503 of file WebdaqHistSvc.cxx.

504{
505 lh = getShared_i<TH2>(id);
506 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
507}

◆ getShared() [5/5]

StatusCode WebdaqHistSvc::getShared ( const std::string & id,
LockedHandle< TH3 > & lh ) const
overridevirtual

Definition at line 509 of file WebdaqHistSvc.cxx.

510{
511 lh = getShared_i<TH3>(id);
512 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
513}

◆ getShared_i()

template<typename T>
LockedHandle< T > WebdaqHistSvc::getShared_i ( const std::string & id) const
private

Definition at line 273 of file WebdaqHistSvc.cxx.

274{
275 tbb::concurrent_hash_map<std::string, THistID>::const_accessor accessor;
276 if (m_hists.find(accessor, id)) {
277 //coverity[FORWARD_NULL]
278 auto * obj = accessor->second.obj;
279 //accessor is implicitly valid
280 //coverity[FORWARD_NULL]
281 if (accessor->second.mutex == nullptr) {
282 ATH_MSG_ERROR("getShared: found Hist with id \"" << id
283 << "\", but it's not marked as shared");
284 return {};
285 }
286 T* phist = dynamic_cast<T*>(obj);
287 if (phist == nullptr) {
288 const char* gotType = obj ? obj->IsA()->GetName() : "<null>";
289 ATH_MSG_ERROR("getShared: unable to dcast retrieved shared hist \""
290 << id << "\" of type " << gotType
291 << " to requested type " << System::typeinfoName(typeid(T)));
292 return {};
293 }
294 return LockedHandle<T>(phist, accessor->second.mutex.get());
295 }
296 ATH_MSG_ERROR("getShared: cannot find histogram with id \"" << id << "\"");
297 return {};
298}

◆ getTEfficiencies() [1/4]

virtual StatusCode WebdaqHistSvc::getTEfficiencies ( const std::string & ,
TList & ,
bool  ) const
inlineoverridevirtual

Definition at line 117 of file WebdaqHistSvc.h.

117{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ getTEfficiencies() [2/4]

virtual StatusCode WebdaqHistSvc::getTEfficiencies ( const std::string & ,
TList & ,
bool ,
bool  )
inlineoverridevirtual

Definition at line 119 of file WebdaqHistSvc.h.

119{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ getTEfficiencies() [3/4]

virtual StatusCode WebdaqHistSvc::getTEfficiencies ( TDirectory * ,
TList & ,
bool  ) const
inlineoverridevirtual

Definition at line 116 of file WebdaqHistSvc.h.

116{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ getTEfficiencies() [4/4]

virtual StatusCode WebdaqHistSvc::getTEfficiencies ( TDirectory * ,
TList & ,
bool ,
bool  )
inlineoverridevirtual

Definition at line 118 of file WebdaqHistSvc.h.

118{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ getTHists() [1/4]

StatusCode WebdaqHistSvc::getTHists ( const std::string & name,
TList & tl,
bool recurse = false ) const
overridevirtual

Definition at line 450 of file WebdaqHistSvc.cxx.

451{
452 if (recurse) ATH_MSG_DEBUG("Recursive flag is not supported in this implementation");
453 return getTHists_i(dir, tl);
454}
StatusCode getTHists_i(const std::string &name, TList &) const
Get TList of registered histograms.

◆ getTHists() [2/4]

StatusCode WebdaqHistSvc::getTHists ( const std::string & name,
TList & tl,
bool recurse = false,
bool reg = false )
overridevirtual

Definition at line 464 of file WebdaqHistSvc.cxx.

465{
466 if (recurse || reg)
467 ATH_MSG_DEBUG("Recursive flag and automatic registration flag is not "
468 "supported in this implementation");
469 return getTHists_i(dir, tl);
470}

◆ getTHists() [3/4]

StatusCode WebdaqHistSvc::getTHists ( TDirectory * td,
TList & tl,
bool recurse = false ) const
overridevirtual

Definition at line 444 of file WebdaqHistSvc.cxx.

445{
446 if (recurse) ATH_MSG_DEBUG("Recursive flag is not supported in this implementation");
447 return getTHists_i(std::string(td->GetPath()), tl);
448}

◆ getTHists() [4/4]

StatusCode WebdaqHistSvc::getTHists ( TDirectory * td,
TList & tl,
bool recurse = false,
bool reg = false )
overridevirtual

Definition at line 456 of file WebdaqHistSvc.cxx.

457{
458 if (recurse || reg)
459 ATH_MSG_DEBUG("Recursive flag and automatic registration flag is not "
460 "supported in this implementation");
461 return getTHists_i(std::string(td->GetPath()), tl);
462}

◆ getTHists_i()

StatusCode WebdaqHistSvc::getTHists_i ( const std::string & name,
TList & tl ) const
private

Get TList of registered histograms.

Definition at line 258 of file WebdaqHistSvc.cxx.

259{
260 for (auto it = m_hists.begin(); it != m_hists.end(); ++it) {
261 const std::string& id = it->first;
262 const THistID& h = it->second;
263 if (id.starts_with(dir)) { // histogram booking path starts from the dir
264 tl.Add(h.obj);
265 }
266 }
267 return StatusCode::SUCCESS;
268}
Helper struct that bundles the histogram, name and mutex.

◆ getTree()

virtual StatusCode WebdaqHistSvc::getTree ( const std::string & ,
TTree *&  ) const
inlineoverridevirtual

Definition at line 96 of file WebdaqHistSvc.h.

96{ NOSUPPORT(WARNING, "TTree"); }

◆ getTrees()

virtual std::vector< std::string > WebdaqHistSvc::getTrees ( ) const
inlineoverridevirtual

Definition at line 98 of file WebdaqHistSvc.h.

98{ NOSUPPORT(DEBUG, "TTree"); }

◆ getTTrees() [1/4]

virtual StatusCode WebdaqHistSvc::getTTrees ( const std::string & ,
TList & ,
bool  ) const
inlineoverridevirtual

Definition at line 100 of file WebdaqHistSvc.h.

100{ NOSUPPORT(DEBUG, "TTree"); }

◆ getTTrees() [2/4]

virtual StatusCode WebdaqHistSvc::getTTrees ( const std::string & ,
TList & ,
bool ,
bool  )
inlineoverridevirtual

Definition at line 102 of file WebdaqHistSvc.h.

102{ NOSUPPORT(DEBUG, "TTree"); }

◆ getTTrees() [3/4]

virtual StatusCode WebdaqHistSvc::getTTrees ( TDirectory * ,
TList & ,
bool  ) const
inlineoverridevirtual

Definition at line 99 of file WebdaqHistSvc.h.

99{ NOSUPPORT(DEBUG, "TTree"); }

◆ getTTrees() [4/4]

virtual StatusCode WebdaqHistSvc::getTTrees ( TDirectory * ,
TList & ,
bool ,
bool  )
inlineoverridevirtual

Definition at line 101 of file WebdaqHistSvc.h.

101{ NOSUPPORT(DEBUG, "TTree"); }

◆ handle()

void WebdaqHistSvc::handle ( const Incident & incident)
overridevirtual

Definition at line 97 of file WebdaqHistSvc.cxx.

98{
99 if (incident.type() == AthenaInterprocess::UpdateAfterFork::type()) {
100 ATH_MSG_INFO("Going to initialize the monitoring Thread");
103 }
104}
static const std::string & type()
Incident type.
Definition Incidents.h:49
boost::regex m_fastPublicationIncludeNameRegex
std::thread m_threadFast
boost::regex m_PublicationIncludeNameRegex
std::thread m_thread
Publication thread.
Gaudi::Property< int > m_numSlots
Gaudi::Property< int > m_intervalSecondsFast
Gaudi::Property< int > m_intervalSeconds
void monitoringTask(int, int, std::atomic< bool > &, boost::regex)
The actual publication Task.
Gaudi::Property< int > m_numSlotsFast

◆ isObjectAllowed()

bool WebdaqHistSvc::isObjectAllowed ( const std::string & path,
const TObject * o ) const
private

Does the histogram follow the naming rules ?

Definition at line 364 of file WebdaqHistSvc.cxx.

365{
366 boost::cmatch what;
367
368 if (not boost::regex_match(o->ClassName(), what, m_includeTypeRegex)) {
369 ATH_MSG_WARNING("Object " << path << " of type " << o->ClassName()
370 << " does NOT match IncludeType \"" << m_includeType << "\"");
371 return false;
372 }
373
374 if (boost::regex_match(o->ClassName(), what, m_excludeTypeRegex)) {
375 ATH_MSG_WARNING("Object " << path << " of type " << o->ClassName() << " matches ExcludeType \""
376 << m_excludeType << "\"");
377 return false;
378 }
379
380 if (not boost::regex_match(path.c_str(), what, m_includeNameRegex)) {
381 ATH_MSG_WARNING("Object " << path << " does NOT match IncludeName \"" << m_includeName << "\"");
382 return false;
383 }
384
385 if (boost::regex_match(path.c_str(), what, m_excludeNameRegex)) {
386 ATH_MSG_WARNING("Object " << path << " matches ExcludeName \"" << m_excludeName << "\"");
387 return false;
388 }
389
390 return true;
391}
#define ATH_MSG_WARNING(x)
Gaudi::Property< std::string > m_includeType
Gaudi::Property< std::string > m_excludeType
Gaudi::Property< std::string > m_excludeName
boost::regex m_includeTypeRegex
boost::regex m_excludeNameRegex
boost::regex m_includeNameRegex
boost::regex m_excludeTypeRegex
Gaudi::Property< std::string > m_includeName
path
python interpreter configuration --------------------------------------—
Definition athena.py:130

◆ merge() [1/2]

virtual StatusCode WebdaqHistSvc::merge ( const std::string & )
inlineoverridevirtual

Definition at line 126 of file WebdaqHistSvc.h.

126{ NOSUPPORT(WARNING, "merge"); }

◆ merge() [2/2]

virtual StatusCode WebdaqHistSvc::merge ( TObject * )
inlineoverridevirtual

Definition at line 127 of file WebdaqHistSvc.h.

127{ NOSUPPORT(WARNING, "merge"); }

◆ monitoringTask()

void WebdaqHistSvc::monitoringTask ( int numSlots,
int intervalSeconds,
std::atomic< bool > & histoMapUpdated,
boost::regex nameSelect )
private

The actual publication Task.

Histograms publication via WebDAQ.

It divides the histograms into batches and publishes them in slots. The method also handles synchronization to ensure that the publication happens at regular intervals.

Parameters
numSlotsNumber of slots to divide the histograms into for publication.
intervalSecondsInterval in seconds between each publication cycle.
histoMapUpdatedAtomic flag indicating if the histogram map has been updated.
nameSelectRegular expression to select histograms for publication.

Definition at line 527 of file WebdaqHistSvc.cxx.

528{
529 ATH_MSG_INFO("Started monitoring task for partition: " << m_partition << "and regex: " << nameSelect.str());
530 std::string appName = m_jobOptionsSvc->get("DataFlowConfig.DF_ApplicationName");
531 // OH doesn't allow multiple providers for a given server
532 // Need to modify the path for one of the threads to avoid the issue
533 if (nameSelect != boost::regex(".*"))
534 appName = appName + "_fast";
535
536 // Set the publication period
537 boost::posix_time::time_duration interval{boost::posix_time::seconds(intervalSeconds)};
538 ATH_MSG_DEBUG("Interval set to " << interval.total_seconds() << " seconds");
539 int interval_ms = interval.total_milliseconds();
540 if(numSlots == 0) numSlots = 1;
541 boost::posix_time::ptime epoch(boost::gregorian::date(2024,1,1));
542 // Sleep duration between slots (plus an extra slot for allowing a last sleep cycle)
543 boost::posix_time::time_duration slotSleepDuration = interval / (numSlots + 1);
544
545 // Create the Set of the histograms keys to order the histograms publication and reset the histoMapUpdated flag
546 std::set<std::string> HistoSet = getSet(nameSelect);
547 histoMapUpdated = false;
548
549 // Sync the publication to the period
550 syncPublish(interval_ms, epoch);
551 ATH_MSG_DEBUG("Monitoring task synched");
552
553 // Publication loop
554 while (!m_stopFlag)
555 {
556 // Check if the histograms map has been updated, and if so update the Set
557 if (histoMapUpdated)
558 {
559 ATH_MSG_DEBUG("Histo map updated, updating the Set");
560 HistoSet = getSet(nameSelect);
561 histoMapUpdated = false;
562 }
563 size_t totalHists = HistoSet.size();
564 ATH_MSG_DEBUG("Going to publish " << totalHists << " histograms");
565
566 // Divide the histograms in batches
567 size_t batchSize = (totalHists + numSlots - 1) / numSlots; // Ceiling division
568 ATH_MSG_DEBUG("Num of slots:" << numSlots << ", Interval_ms " << interval_ms << " milliseconds, Batch size: " << batchSize);
569
570 boost::posix_time::ptime start_time = boost::posix_time::microsec_clock::universal_time();
571 int counter = 0;
572 int BatchCounter = 0;
573 auto it = HistoSet.begin();
574 while(it != HistoSet.end())
575 {
576 boost::posix_time::ptime slot_start_time = boost::posix_time::microsec_clock::universal_time();
577 //Batch publication
578 ATH_MSG_DEBUG("Batch publication number " << BatchCounter << " starting.");
579 for(size_t j = 0; j < batchSize; ++j)
580 {
581 if(it == HistoSet.end())
582 {
583 break;
584 }
585 const std::string& id = *it;
586 std::string path = appName + '.' + id;
587 ATH_MSG_DEBUG("Publishing to " << m_partition << " Histogram " << path << " to the OH server " << m_tdaqOHServerName);
588 tbb::concurrent_hash_map<std::string, THistID>::const_accessor accessor;
589 if (!m_hists.find(accessor, id)) {
590 ATH_MSG_WARNING("Histogram with name " << id << " not found in histogram map (probably deregistered).");
591 it++;
592 continue;
593 }
594 else
595 {
596 ATH_MSG_DEBUG("Histogram found in map, going to lock mutex and then publish it");
597 //Here we clone the histogram to avoid locking the OH mutex during the whole publication
598 TObject* obj = nullptr;
599 {
600 //Locking the OH mutex before touching the Histogram
601 oh_scoped_lock_histogram lock;
602 //accessor is implicitly valid
603 //coverity[FORWARD_NULL]
604 obj = accessor->second.obj->Clone();
605 }
606 if (obj == nullptr) {
607 ATH_MSG_ERROR("Failed to clone histogram " << id);
608 it++;
609 continue;
610 }
611 if (!webdaq::oh::put(m_partition, m_tdaqOHServerName, path, obj)) {
612 ATH_MSG_ERROR("Histogram publishing failed !");
613 }
614 //Delete the cloned histogram. This was creating a memory leak
615 ATH_MSG_DEBUG("Deleting cloned histogram");
616 delete obj;
617 }
618 it++;
619 counter++;
620 }
621 ATH_MSG_DEBUG("Batch publication completed, " << counter << " histograms published");
622 // Sleep for slotSleepDuration - slot publication time, unless it's the last slot
623 if (it != HistoSet.end()) {
624 boost::posix_time::ptime slot_end_time = boost::posix_time::microsec_clock::universal_time();
625 int slot_sleep_time = slotSleepDuration.total_milliseconds() - (slot_end_time-slot_start_time).total_milliseconds();
626 if (slot_sleep_time > 0) {
627 ATH_MSG_DEBUG("Sleeping for " << slot_sleep_time << " seconds before publishing the next batch");
628 conditionedSleep(std::chrono::milliseconds(slot_sleep_time), m_stopFlag);
629 }
630 }
631 BatchCounter++;
632 }
633
634 //check if we exceeded the publication period
635 boost::posix_time::ptime end_time = boost::posix_time::microsec_clock::universal_time();
636 if (boost::posix_time::time_duration(end_time-start_time) > interval) {
637 ATH_MSG_WARNING("Publication deadline missed, cycle exceeded the interval.. Total publication time "
638 << boost::posix_time::to_simple_string(end_time-start_time));
639 }
640 ATH_MSG_DEBUG("Completed the publication of " << counter << " histograms. Publication time: " << boost::posix_time::to_simple_string(end_time-start_time));
641
642 //sleep till the next cycle
643 boost::posix_time::ptime now = boost::posix_time::microsec_clock::universal_time();
644 int nowMs = (now-epoch).total_milliseconds();
645 boost::posix_time::time_duration next_cycle(boost::posix_time::milliseconds(interval_ms - (nowMs % interval_ms)));
646 ATH_MSG_DEBUG("epoch " << epoch);
647 ATH_MSG_DEBUG("interval_ms" << interval_ms);
648 ATH_MSG_DEBUG("now_ms " << nowMs);
649 ATH_MSG_DEBUG("Sleeping for " << next_cycle.total_milliseconds() << " milliseconds till the next cycle");
650 conditionedSleep(std::chrono::milliseconds(next_cycle.total_milliseconds()), m_stopFlag);
651 }
652 ATH_MSG_INFO("Monitoring task stopped");
653}
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
std::set< std::string > getSet(boost::regex) const
std::atomic< bool > m_stopFlag
Flag to stop the monitoring task.
void conditionedSleep(std::chrono::milliseconds, const std::atomic< bool > &)
Sleep for a duration or until the stop flag is set.
void syncPublish(long int, boost::posix_time::ptime)
Sync the publication to a multiple of the interval.
std::string m_tdaqOHServerName
The OH server name (TDAQ_OH_SERVER if defined, m_OHServerName otherwise).
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_jobOptionsSvc
joboptions service
std::string m_partition
The partition to publish to.
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ regEfficiency() [1/3]

virtual StatusCode WebdaqHistSvc::regEfficiency ( const std::string & )
inlineoverridevirtual

Definition at line 110 of file WebdaqHistSvc.h.

110{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ regEfficiency() [2/3]

virtual StatusCode WebdaqHistSvc::regEfficiency ( const std::string & ,
std::unique_ptr< TEfficiency >  )
inlineoverridevirtual

Definition at line 111 of file WebdaqHistSvc.h.

111{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ regEfficiency() [3/3]

virtual StatusCode WebdaqHistSvc::regEfficiency ( const std::string & ,
TEfficiency *  )
inlineoverridevirtual

Definition at line 112 of file WebdaqHistSvc.h.

112{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ regGraph() [1/3]

virtual StatusCode WebdaqHistSvc::regGraph ( const std::string & )
inlineoverridevirtual

Definition at line 104 of file WebdaqHistSvc.h.

104{ NOSUPPORT(WARNING, "TGraph"); }

◆ regGraph() [2/3]

virtual StatusCode WebdaqHistSvc::regGraph ( const std::string & ,
std::unique_ptr< TGraph >  )
inlineoverridevirtual

Definition at line 105 of file WebdaqHistSvc.h.

105{ NOSUPPORT(WARNING, "TGraph"); }

◆ regGraph() [3/3]

virtual StatusCode WebdaqHistSvc::regGraph ( const std::string & ,
TGraph *  )
inlineoverridevirtual

Definition at line 106 of file WebdaqHistSvc.h.

106{ NOSUPPORT(WARNING, "TGraph"); }

◆ regHist() [1/3]

StatusCode WebdaqHistSvc::regHist ( const std::string & name)
overridevirtual

Definition at line 402 of file WebdaqHistSvc.cxx.

403{
404 std::unique_ptr<TH1> hist = nullptr;
405 THistID* hid = nullptr;
406 return regHist_i(std::move(hist), id, false, hid);
407}
StatusCode regHist_i(std::unique_ptr< T > hist, const std::string &name, bool shared, THistID *&phid)

◆ regHist() [2/3]

StatusCode WebdaqHistSvc::regHist ( const std::string & name,
std::unique_ptr< TH1 > hist )
overridevirtual

Definition at line 409 of file WebdaqHistSvc.cxx.

410{
411 THistID* hid = nullptr;
412 return regHist_i(std::move(hist), id, false, hid);
413}

◆ regHist() [3/3]

StatusCode WebdaqHistSvc::regHist ( const std::string & name,
TH1 * hist_ptr )
overridevirtual

Definition at line 415 of file WebdaqHistSvc.cxx.

416{
417 THistID* hid = nullptr;
418 std::unique_ptr<TH1> hist(hist_ptr);
419 return regHist_i(std::move(hist), id, false, hid);
420}

◆ regHist_i()

template<typename T>
StatusCode WebdaqHistSvc::regHist_i ( std::unique_ptr< T > hist,
const std::string & name,
bool shared,
THistID *& phid )
private

Definition at line 155 of file WebdaqHistSvc.cxx.

157{
158 ATH_MSG_DEBUG("Registering histogram " << id);
159
160 phid = nullptr;
161 if (not isObjectAllowed(id, hist_unique.get())) {
162 return StatusCode::FAILURE;
163 }
164
165 if (hist_unique->Class()->InheritsFrom(TH1::Class())) {
166
167 tbb::concurrent_hash_map<std::string, THistID>::accessor accessor;
168 if (m_hists.find(accessor, id)) {
169 ATH_MSG_ERROR("Histogram with name " << id << " already registered");
170 return StatusCode::FAILURE;
171 }
172 // Element not found, attempt to insert
173 if (!m_hists.insert(accessor, id)) {
174 ATH_MSG_ERROR("Failed to insert histogram with name " << id);
175 return StatusCode::FAILURE;
176 }
177 T* hist = hist_unique.release();
178 m_histoMapUpdated = true;
180 accessor->second = THistID(id, hist);
181 //finished
182 if (shared) accessor->second.mutex = std::make_unique<std::mutex>();
183 phid = &accessor->second;
184 ATH_MSG_DEBUG((shared ? "Shared histogram " : "Histogram ")
185 << hist->GetName() << " registered under " << id << " " << name());
186 } else {
187 ATH_MSG_ERROR("Cannot register " << hist_unique->ClassName()
188 << " because it does not inherit from TH1");
189 return StatusCode::FAILURE;
190 }
191 return StatusCode::SUCCESS;
192}
bool isObjectAllowed(const std::string &path, const TObject *o) const
Does the histogram follow the naming rules ?

◆ regShared() [1/5]

virtual StatusCode WebdaqHistSvc::regShared ( const std::string & ,
std::unique_ptr< TEfficiency > ,
LockedHandle< TEfficiency > &  )
inlineoverridevirtual

Definition at line 123 of file WebdaqHistSvc.h.

123{ NOSUPPORT(WARNING, "TEfficiency"); }

◆ regShared() [2/5]

virtual StatusCode WebdaqHistSvc::regShared ( const std::string & ,
std::unique_ptr< TGraph > ,
LockedHandle< TGraph > &  )
inlineoverridevirtual

Definition at line 121 of file WebdaqHistSvc.h.

121{ NOSUPPORT(WARNING, "TGraph"); }

◆ regShared() [3/5]

StatusCode WebdaqHistSvc::regShared ( const std::string & id,
std::unique_ptr< TH1 > hist,
LockedHandle< TH1 > & lh )
overridevirtual

Definition at line 474 of file WebdaqHistSvc.cxx.

476{
477 lh = regShared_i<TH1>(id, std::move(hist));
478 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
479}
LockedHandle< T > regShared_i(const std::string &id, std::unique_ptr< T > hist)

◆ regShared() [4/5]

StatusCode WebdaqHistSvc::regShared ( const std::string & id,
std::unique_ptr< TH2 > hist,
LockedHandle< TH2 > & lh )
overridevirtual

Definition at line 481 of file WebdaqHistSvc.cxx.

483{
484 lh = regShared_i<TH2>(id, std::move(hist));
485 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
486}

◆ regShared() [5/5]

StatusCode WebdaqHistSvc::regShared ( const std::string & id,
std::unique_ptr< TH3 > hist,
LockedHandle< TH3 > & lh )
overridevirtual

Definition at line 488 of file WebdaqHistSvc.cxx.

490{
491 lh = regShared_i<TH3>(id, std::move(hist));
492 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
493}

◆ regShared_i()

template<typename T>
LockedHandle< T > WebdaqHistSvc::regShared_i ( const std::string & id,
std::unique_ptr< T > hist )
private

Definition at line 197 of file WebdaqHistSvc.cxx.

198{
199 LockedHandle<T> lh(nullptr, nullptr);
200
201 tbb::concurrent_hash_map<std::string, THistID>::accessor accessor;
202 // Check if the histogram is already registered
203 if (!m_hists.find(accessor, id)) {
204 // No histogram under that id yet
205 T* phist = hist.get();
206 THistID* phid = nullptr;
207 if (regHist_i(std::move(hist), id, true, phid).isSuccess()) {
208 if (phid) lh.set(phist, phid->mutex.get());
209 }
210 }
211 else
212 {
213 // Histogram already registered under that id
214 if (accessor->second.mutex == nullptr) {
215 ATH_MSG_ERROR("regShared: previously registered histogram \"" << id
216 << "\" was not marked shared");
217 }
218 T* phist = dynamic_cast<T*>(accessor->second.obj);
219 if (phist == nullptr) {
220 ATH_MSG_ERROR("regShared: unable to dcast retrieved shared hist \""
221 << id << "\" of type " << accessor->second.obj->IsA()->GetName()
222 << " to requested type " << System::typeinfoName(typeid(T)));
223 }
224 else {
225 lh.set(phist, accessor->second.mutex.get());
226 //hist is automatically deleted at end of method
227 }
228 }
229 return lh;
230}

◆ regTree() [1/3]

virtual StatusCode WebdaqHistSvc::regTree ( const std::string & )
inlineoverridevirtual

Definition at line 93 of file WebdaqHistSvc.h.

93{ NOSUPPORT(WARNING, "TTree"); }

◆ regTree() [2/3]

virtual StatusCode WebdaqHistSvc::regTree ( const std::string & ,
std::unique_ptr< TTree >  )
inlineoverridevirtual

Definition at line 94 of file WebdaqHistSvc.h.

94{ NOSUPPORT(WARNING, "TTree"); }

◆ regTree() [3/3]

virtual StatusCode WebdaqHistSvc::regTree ( const std::string & ,
TTree *  )
inlineoverridevirtual

Definition at line 95 of file WebdaqHistSvc.h.

95{ NOSUPPORT(WARNING, "TTree"); }

◆ stop()

StatusCode WebdaqHistSvc::stop ( )
overridevirtual

Set the stop flag for the task thread to true

Definition at line 108 of file WebdaqHistSvc.cxx.

109{
111 ATH_MSG_DEBUG("Stopping monitoring task");
112 m_stopFlag = true;
113 // Wait for the task to finish
114 if (m_thread.joinable()) {
115 ATH_MSG_DEBUG("Going to join the monitoring thread");
116 try {
117 m_thread.join();
118 }
119 catch (const std::exception& e) {
120 ATH_MSG_ERROR("Failed to join the monitoring thread: " << e.what());
121 return StatusCode::FAILURE;
122 }
123 }
124 if (m_threadFast.joinable()) {
125 ATH_MSG_DEBUG("Going to join the fast monitoring thread");
126 try {
127 m_threadFast.join();
128 }
129 catch (const std::exception& e) {
130 ATH_MSG_ERROR("Failed to join the fast monitoring thread: " << e.what());
131 return StatusCode::FAILURE;
132 }
133 }
134 ATH_MSG_DEBUG("Clearing list of histograms");
135 m_hists.clear();
136 m_histoMapUpdated = true;
138 return StatusCode::SUCCESS;
139}

◆ syncPublish()

void WebdaqHistSvc::syncPublish ( long int interval_ms,
boost::posix_time::ptime epoch )
private

Sync the publication to a multiple of the interval.

Definition at line 657 of file WebdaqHistSvc.cxx.

658{
659 //Sync the publication to a multple of the interval
660 //Code taken from TDAQ monsvc https://gitlab.cern.ch/atlas-tdaq-software/monsvc/-/blob/master/src/PeriodicScheduler.cxx?ref_type=heads#L163
661 boost::posix_time::ptime now = boost::posix_time::microsec_clock::universal_time();
662 int now_ms = (now-epoch).total_milliseconds();
663 //If now_ms % interval_ms == 0 we skip a cycle. Too bad.
664 boost::posix_time::time_duration sync(boost::posix_time::milliseconds(interval_ms - (now_ms % interval_ms)));
665 //Do not sync if we are below 50 ms
666 if (sync.total_milliseconds() > 50){
667 std::this_thread::sleep_for(std::chrono::milliseconds(sync.total_milliseconds()));
668 }
669}

Member Data Documentation

◆ m_autoFlush

Gaudi::Property<int> WebdaqHistSvc::m_autoFlush {this, "AutoFlush", 0, "Not supported by WebdaqHistSvc"}
private

Definition at line 201 of file WebdaqHistSvc.h.

201{this, "AutoFlush", 0, "Not supported by WebdaqHistSvc"};

◆ m_autoSave

Gaudi::Property<int> WebdaqHistSvc::m_autoSave {this, "AutoSave", 0, "Not supported by WebdaqHistSvc"}
private

Definition at line 200 of file WebdaqHistSvc.h.

200{this, "AutoSave", 0, "Not supported by WebdaqHistSvc"};

◆ m_excludeName

Gaudi::Property<std::string> WebdaqHistSvc::m_excludeName {this, "ExcludeName", ".*\\..*"}
private

Definition at line 186 of file WebdaqHistSvc.h.

186{this, "ExcludeName", ".*\\..*"};

◆ m_excludeNameRegex

boost::regex WebdaqHistSvc::m_excludeNameRegex
private

Definition at line 210 of file WebdaqHistSvc.h.

◆ m_excludeType

Gaudi::Property<std::string> WebdaqHistSvc::m_excludeType {this, "ExcludeType", "()"}
private

Definition at line 184 of file WebdaqHistSvc.h.

184{this, "ExcludeType", "()"};

◆ m_excludeTypeRegex

boost::regex WebdaqHistSvc::m_excludeTypeRegex
private

Definition at line 208 of file WebdaqHistSvc.h.

◆ m_fastPublicationIncludeName

Gaudi::Property<std::string> WebdaqHistSvc::m_fastPublicationIncludeName {this, "FastPublicationIncludeName","^.EXPERT.HLTFramework.TrigSignatureMoni.*","Regex to select histograms for fast publication"}
private

Definition at line 197 of file WebdaqHistSvc.h.

197{this, "FastPublicationIncludeName","^.EXPERT.HLTFramework.TrigSignatureMoni.*","Regex to select histograms for fast publication"};

◆ m_fastPublicationIncludeNameRegex

boost::regex WebdaqHistSvc::m_fastPublicationIncludeNameRegex
private

Definition at line 213 of file WebdaqHistSvc.h.

◆ m_histoMapUpdated

std::atomic<bool> WebdaqHistSvc::m_histoMapUpdated {false}
private

Flag to indicate when the histogram map is updated.

Definition at line 161 of file WebdaqHistSvc.h.

161{false};

◆ m_histoMapUpdatedFast

std::atomic<bool> WebdaqHistSvc::m_histoMapUpdatedFast {false}
private

Flag to indicate when the histogram map is updated for the fast publication.

Definition at line 163 of file WebdaqHistSvc.h.

163{false};

◆ m_hists

tbb::concurrent_hash_map<std::string, THistID> WebdaqHistSvc::m_hists
private

Map of the registered histograms.

Definition at line 169 of file WebdaqHistSvc.h.

◆ m_includeName

Gaudi::Property<std::string> WebdaqHistSvc::m_includeName
private
Initial value:
{this, "IncludeName",
"^/((run_[0-9]+/lb_[0-9]+/LB)|(SHIFT)|(EXPERT)|(DEBUG)|(EXPRESS)|(RUNSTAT))/.+/.+"}

Definition at line 187 of file WebdaqHistSvc.h.

187 {this, "IncludeName",
188 "^/((run_[0-9]+/lb_[0-9]+/LB)|(SHIFT)|(EXPERT)|(DEBUG)|(EXPRESS)|(RUNSTAT))/.+/.+"};

◆ m_includeNameRegex

boost::regex WebdaqHistSvc::m_includeNameRegex
private

Definition at line 211 of file WebdaqHistSvc.h.

◆ m_includeType

Gaudi::Property<std::string> WebdaqHistSvc::m_includeType {this, "IncludeType", ".+"}
private

Definition at line 185 of file WebdaqHistSvc.h.

185{this, "IncludeType", ".+"};

◆ m_includeTypeRegex

boost::regex WebdaqHistSvc::m_includeTypeRegex
private

Definition at line 209 of file WebdaqHistSvc.h.

◆ m_inputfile

Gaudi::Property<std::vector<std::string> > WebdaqHistSvc::m_inputfile {this, "Input", {}, "Not supported by WebdaqHistSvc"}
private

Definition at line 205 of file WebdaqHistSvc.h.

205{this, "Input", {}, "Not supported by WebdaqHistSvc"};

◆ m_intervalSeconds

Gaudi::Property<int> WebdaqHistSvc::m_intervalSeconds {this, "IntervalSeconds", 80, "Interval between histogram publications periods in seconds"}
private

Definition at line 193 of file WebdaqHistSvc.h.

193{this, "IntervalSeconds", 80, "Interval between histogram publications periods in seconds"};

◆ m_intervalSecondsFast

Gaudi::Property<int> WebdaqHistSvc::m_intervalSecondsFast {this, "IntervalSecondsFast", 10, "Interval between histogram publications periods in seconds for the fast publication"}
private

Definition at line 194 of file WebdaqHistSvc.h.

194{this, "IntervalSecondsFast", 10, "Interval between histogram publications periods in seconds for the fast publication"};

◆ m_jobOptionsSvc

ServiceHandle<Gaudi::Interfaces::IOptionsSvc> WebdaqHistSvc::m_jobOptionsSvc {this, "JobOptionsSvc", "JobOptionsSvc"}
private

joboptions service

Definition at line 166 of file WebdaqHistSvc.h.

166{this, "JobOptionsSvc", "JobOptionsSvc"};

◆ m_maxFileSize

Gaudi::Property<int> WebdaqHistSvc::m_maxFileSize {this, "MaxFileSize", 10240, "Not supported by WebdaqHistSvc"}
private

Definition at line 203 of file WebdaqHistSvc.h.

203{this, "MaxFileSize", 10240, "Not supported by WebdaqHistSvc"};

◆ m_numSlots

Gaudi::Property<int> WebdaqHistSvc::m_numSlots {this, "NumSlots", 8, "Number of slots for the main monitoring task"}
private

Definition at line 191 of file WebdaqHistSvc.h.

191{this, "NumSlots", 8, "Number of slots for the main monitoring task"};

◆ m_numSlotsFast

Gaudi::Property<int> WebdaqHistSvc::m_numSlotsFast {this, "NumSlotsFast", 1, "Number of slots for the fast monitoring task"}
private

Definition at line 192 of file WebdaqHistSvc.h.

192{this, "NumSlotsFast", 1, "Number of slots for the fast monitoring task"};

◆ m_OHServerName

Gaudi::Property<std::string> WebdaqHistSvc::m_OHServerName {this, "OHServerName", "Histogramming", "Name of the OH server to publish histograms into"}
private

Definition at line 195 of file WebdaqHistSvc.h.

195{this, "OHServerName", "Histogramming", "Name of the OH server to publish histograms into"};

◆ m_outputfile

Gaudi::Property<std::vector<std::string> > WebdaqHistSvc::m_outputfile {this, "Output", {}, "Not supported by WebdaqHistSvc"}
private

Definition at line 204 of file WebdaqHistSvc.h.

204{this, "Output", {}, "Not supported by WebdaqHistSvc"};

◆ m_partition

std::string WebdaqHistSvc::m_partition
private

The partition to publish to.

Definition at line 155 of file WebdaqHistSvc.h.

◆ m_print

Gaudi::Property<bool> WebdaqHistSvc::m_print {this, "PrintAll", false, "Not supported by WebdaqHistSvc"}
private

Definition at line 202 of file WebdaqHistSvc.h.

202{this, "PrintAll", false, "Not supported by WebdaqHistSvc"};

◆ m_PublicationIncludeName

Gaudi::Property<std::string> WebdaqHistSvc::m_PublicationIncludeName {this, "PublicationIncludeName",".*","Regex to select histograms for publication"}
private

Definition at line 196 of file WebdaqHistSvc.h.

196{this, "PublicationIncludeName",".*","Regex to select histograms for publication"};

◆ m_PublicationIncludeNameRegex

boost::regex WebdaqHistSvc::m_PublicationIncludeNameRegex
private

Definition at line 212 of file WebdaqHistSvc.h.

◆ m_stopFlag

std::atomic<bool> WebdaqHistSvc::m_stopFlag {false}
private

Flag to stop the monitoring task.

Definition at line 144 of file WebdaqHistSvc.h.

144{false};

◆ m_tdaqOHServerName

std::string WebdaqHistSvc::m_tdaqOHServerName
private

The OH server name (TDAQ_OH_SERVER if defined, m_OHServerName otherwise).

Definition at line 159 of file WebdaqHistSvc.h.

◆ m_tdaqWebdaqBase

std::string WebdaqHistSvc::m_tdaqWebdaqBase
private

Webdaq configuration variable, see https://gitlab.cern.ch/atlas-tdaq-software/webdaq.

Definition at line 157 of file WebdaqHistSvc.h.

◆ m_thread

std::thread WebdaqHistSvc::m_thread
private

Publication thread.

Definition at line 152 of file WebdaqHistSvc.h.

◆ m_threadFast

std::thread WebdaqHistSvc::m_threadFast
private

Definition at line 153 of file WebdaqHistSvc.h.


The documentation for this class was generated from the following files: