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

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 (const 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 (const std::string &, unsigned int, unsigned int, std::atomic< bool > &, const boost::regex &) const
 The actual publication Task.
void publish (const std::string &appName, const std::string &histID) const
 Publish one histogram.
void publishAll (const boost::regex &nameSelect) const
 Final publication after stop.
void syncPublish (long int, const boost::posix_time::ptime &) const
 Sync the publication to a multiple of the interval.
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_appName
 Application name.
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< unsigned int > m_numSlots {this, "NumSlots", 8, "Number of slots for the main monitoring task"}
Gaudi::Property< unsigned int > m_numSlotsFast {this, "NumSlotsFast", 1, "Number of slots for the fast monitoring task"}
Gaudi::Property< unsigned int > m_intervalSeconds {this, "IntervalSeconds", 80, "Interval between histogram publications periods in seconds"}
Gaudi::Property< unsigned 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 47 of file WebdaqHistSvc.h.

Constructor & Destructor Documentation

◆ ~WebdaqHistSvc()

virtual WebdaqHistSvc::~WebdaqHistSvc ( )
inlineoverridevirtualnoexcept

Definition at line 51 of file WebdaqHistSvc.h.

51{}

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

virtual StatusCode initialize WebdaqHistSvc::ATLAS_NOT_THREAD_SAFE ( )
overridevirtual

◆ deReg() [1/2]

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

Definition at line 321 of file WebdaqHistSvc.cxx.

322{
323 tbb::concurrent_hash_map<std::string, THistID>::accessor accessor;
324 if (m_hists.find(accessor, id)) {
325 //Delete the histogram
326 accessor->second.obj->Delete();
327 m_hists.erase(accessor);
328 m_histoMapUpdated = true;
330 ATH_MSG_DEBUG("Deregistration of " << id << " done");
331 return StatusCode::SUCCESS;
332 }
333 ATH_MSG_ERROR("Deregistration failed: histogram with id \"" << id << "\" not found");
334 return StatusCode::FAILURE;
335}
#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 305 of file WebdaqHistSvc.cxx.

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

◆ exists()

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

Definition at line 83 of file WebdaqHistSvc.h.

83{ 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 125 of file WebdaqHistSvc.h.

125{ NOSUPPORT(WARNING, "TEfficiency"); }
#define NOSUPPORT(lvl, what)
Helper to mark unsupported interfaces.

◆ existsGraph()

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

Definition at line 124 of file WebdaqHistSvc.h.

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

◆ existsHist()

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

Definition at line 441 of file WebdaqHistSvc.cxx.

442{
443 return (getHist_i<TH1>(name, 0, true) != nullptr);
444}
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 123 of file WebdaqHistSvc.h.

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

◆ finalize()

StatusCode WebdaqHistSvc::finalize ( )
overridevirtual

Definition at line 146 of file WebdaqHistSvc.cxx.

147{
148 ATH_MSG_INFO("finalize");
149 // Reset OH mutex
151
152 return StatusCode::SUCCESS;
153}
#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 108 of file WebdaqHistSvc.h.

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

◆ getEfficiency()

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

Definition at line 107 of file WebdaqHistSvc.h.

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

◆ getGraph()

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

Definition at line 102 of file WebdaqHistSvc.h.

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

◆ getGraphs()

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

Definition at line 101 of file WebdaqHistSvc.h.

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

◆ getHist() [1/3]

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

Definition at line 472 of file WebdaqHistSvc.cxx.

473{
474 hist = getHist_i<TH1>(id, ind);
475 return (hist != nullptr ? StatusCode::SUCCESS : StatusCode::FAILURE);
476}

◆ getHist() [2/3]

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

Definition at line 478 of file WebdaqHistSvc.cxx.

479{
480 hist = getHist_i<TH2>(id, ind);
481 return (hist != nullptr ? StatusCode::SUCCESS : StatusCode::FAILURE);
482}

◆ getHist() [3/3]

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

Definition at line 484 of file WebdaqHistSvc.cxx.

485{
486 hist = getHist_i<TH3>(id, ind);
487 return (hist != nullptr ? StatusCode::SUCCESS : StatusCode::FAILURE);
488}

◆ 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 239 of file WebdaqHistSvc.cxx.

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

◆ getHists()

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

Definition at line 339 of file WebdaqHistSvc.cxx.

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

◆ getSet()

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

Definition at line 351 of file WebdaqHistSvc.cxx.

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

◆ getShared() [1/5]

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

Definition at line 118 of file WebdaqHistSvc.h.

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

◆ getShared() [2/5]

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

Definition at line 116 of file WebdaqHistSvc.h.

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

◆ getShared() [3/5]

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

Definition at line 545 of file WebdaqHistSvc.cxx.

546{
547 lh = getShared_i<TH1>(id);
548 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
549}
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 551 of file WebdaqHistSvc.cxx.

552{
553 lh = getShared_i<TH2>(id);
554 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
555}

◆ getShared() [5/5]

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

Definition at line 557 of file WebdaqHistSvc.cxx.

558{
559 lh = getShared_i<TH3>(id);
560 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
561}

◆ getShared_i()

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

Definition at line 276 of file WebdaqHistSvc.cxx.

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

◆ getTEfficiencies() [1/4]

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

Definition at line 111 of file WebdaqHistSvc.h.

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

◆ getTEfficiencies() [2/4]

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

Definition at line 113 of file WebdaqHistSvc.h.

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

◆ getTEfficiencies() [3/4]

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

Definition at line 110 of file WebdaqHistSvc.h.

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

◆ getTEfficiencies() [4/4]

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

Definition at line 112 of file WebdaqHistSvc.h.

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

◆ getTHists() [1/4]

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

Definition at line 498 of file WebdaqHistSvc.cxx.

499{
500 if (recurse) ATH_MSG_DEBUG("Recursive flag is not supported in this implementation");
501 return getTHists_i(dir, tl);
502}
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 512 of file WebdaqHistSvc.cxx.

513{
514 if (recurse || reg)
515 ATH_MSG_DEBUG("Recursive flag and automatic registration flag is not "
516 "supported in this implementation");
517 return getTHists_i(dir, tl);
518}

◆ getTHists() [3/4]

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

Definition at line 492 of file WebdaqHistSvc.cxx.

493{
494 if (recurse) ATH_MSG_DEBUG("Recursive flag is not supported in this implementation");
495 return getTHists_i(std::string(td->GetPath()), tl);
496}

◆ getTHists() [4/4]

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

Definition at line 504 of file WebdaqHistSvc.cxx.

505{
506 if (recurse || reg)
507 ATH_MSG_DEBUG("Recursive flag and automatic registration flag is not "
508 "supported in this implementation");
509 return getTHists_i(std::string(td->GetPath()), tl);
510}

◆ getTHists_i()

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

Get TList of registered histograms.

Definition at line 261 of file WebdaqHistSvc.cxx.

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

◆ getTree()

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

Definition at line 90 of file WebdaqHistSvc.h.

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

◆ getTrees()

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

Definition at line 92 of file WebdaqHistSvc.h.

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

◆ getTTrees() [1/4]

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

Definition at line 94 of file WebdaqHistSvc.h.

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

◆ getTTrees() [2/4]

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

Definition at line 96 of file WebdaqHistSvc.h.

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

◆ getTTrees() [3/4]

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

Definition at line 93 of file WebdaqHistSvc.h.

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

◆ getTTrees() [4/4]

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

Definition at line 95 of file WebdaqHistSvc.h.

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

◆ handle()

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

Definition at line 94 of file WebdaqHistSvc.cxx.

95{
96 if (incident.type() == AthenaInterprocess::UpdateAfterFork::type()) {
97 ATH_MSG_INFO("Going to initialize the monitoring thread");
98
100
101 // OH doesn't allow multiple providers for a given server.
102 // Need to modify the path for one of the threads to avoid the issue.
104 }
105}
static const std::string & type()
Incident type.
Definition Incidents.h:49
boost::regex m_fastPublicationIncludeNameRegex
Gaudi::Property< unsigned int > m_intervalSeconds
std::thread m_threadFast
void monitoringTask(const std::string &, unsigned int, unsigned int, std::atomic< bool > &, const boost::regex &) const
The actual publication Task.
boost::regex m_PublicationIncludeNameRegex
std::thread m_thread
Publication thread.
std::string m_appName
Application name.
Gaudi::Property< unsigned int > m_intervalSecondsFast
Gaudi::Property< unsigned int > m_numSlots
Gaudi::Property< unsigned 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 412 of file WebdaqHistSvc.cxx.

413{
414 boost::cmatch what;
415
416 if (not boost::regex_match(o->ClassName(), what, m_includeTypeRegex)) {
417 ATH_MSG_WARNING("Object " << path << " of type " << o->ClassName()
418 << " does NOT match IncludeType \"" << m_includeType << "\"");
419 return false;
420 }
421
422 if (boost::regex_match(o->ClassName(), what, m_excludeTypeRegex)) {
423 ATH_MSG_WARNING("Object " << path << " of type " << o->ClassName() << " matches ExcludeType \""
424 << m_excludeType << "\"");
425 return false;
426 }
427
428 if (not boost::regex_match(path.c_str(), what, m_includeNameRegex)) {
429 ATH_MSG_WARNING("Object " << path << " does NOT match IncludeName \"" << m_includeName << "\"");
430 return false;
431 }
432
433 if (boost::regex_match(path.c_str(), what, m_excludeNameRegex)) {
434 ATH_MSG_WARNING("Object " << path << " matches ExcludeName \"" << m_excludeName << "\"");
435 return false;
436 }
437
438 return true;
439}
#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 120 of file WebdaqHistSvc.h.

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

◆ merge() [2/2]

virtual StatusCode WebdaqHistSvc::merge ( TObject * )
inlineoverridevirtual

Definition at line 121 of file WebdaqHistSvc.h.

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

◆ monitoringTask()

void WebdaqHistSvc::monitoringTask ( const std::string & appName,
unsigned int numSlots,
unsigned int intervalSeconds,
std::atomic< bool > & histoMapUpdated,
const boost::regex & nameSelect ) const
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
appNameProvider name for publication
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 576 of file WebdaqHistSvc.cxx.

577{
578 ATH_MSG_INFO("Started monitoring task for partition: " << m_partition << "and regex: " << nameSelect.str());
579
580 // Set the publication period
581 const boost::posix_time::time_duration interval{boost::posix_time::seconds(intervalSeconds)};
582 ATH_MSG_DEBUG("Interval set to " << interval.total_seconds() << " seconds");
583 const int interval_ms = interval.total_milliseconds();
584
585 if (numSlots == 0) numSlots = 1;
586 // Sleep duration between slots (plus an extra slot for allowing a last sleep cycle)
587 const boost::posix_time::time_duration slotSleepDuration = interval / (numSlots + 1);
588
589 // Create the Set of the histograms keys to order the histograms publication and reset the histoMapUpdated flag
590 std::set<std::string> HistoSet = getSet(nameSelect);
591 histoMapUpdated = false;
592
593 // Sync the publication to the period
594 const boost::posix_time::ptime epoch(boost::gregorian::date(2024,1,1));
595 syncPublish(interval_ms, epoch);
596 ATH_MSG_DEBUG("Monitoring task synced");
597
598 // Publication loop
599 while (!m_stopFlag)
600 {
601 // Check if the histograms map has been updated, and if so update the Set
602 if (histoMapUpdated)
603 {
604 ATH_MSG_DEBUG("Histo map updated, updating the Set");
605 HistoSet = getSet(nameSelect);
606 histoMapUpdated = false;
607 }
608
609 // Divide the histograms in batches
610 const size_t totalHists = HistoSet.size();
611 const size_t batchSize = (totalHists + numSlots - 1) / numSlots; // Ceiling division
612 ATH_MSG_DEBUG("Num of hists: " << totalHists << ", Num of slots:" << numSlots <<
613 ", Interval_ms " << interval_ms << " milliseconds, Batch size: " << batchSize);
614
615 const boost::posix_time::ptime start_time = boost::posix_time::microsec_clock::universal_time();
616 int counter = 0;
617 int BatchCounter = 0;
618 auto it = HistoSet.begin();
619 while(it != HistoSet.end())
620 {
621 const boost::posix_time::ptime slot_start_time = boost::posix_time::microsec_clock::universal_time();
622 ATH_MSG_DEBUG("Batch publication number " << BatchCounter << " starting.");
623 for(size_t j = 0; j < batchSize; ++j)
624 {
625 if(it == HistoSet.end())
626 {
627 break;
628 }
629 publish(appName, *it);
630 ++it;
631 ++counter;
632 }
633 ATH_MSG_DEBUG("Batch publication completed, " << counter << " histograms published");
634 // Sleep for slotSleepDuration - slot publication time, unless it's the last slot
635 if (it != HistoSet.end()) {
636 boost::posix_time::ptime slot_end_time = boost::posix_time::microsec_clock::universal_time();
637 int slot_sleep_time = slotSleepDuration.total_milliseconds() - (slot_end_time-slot_start_time).total_milliseconds();
638 if (slot_sleep_time > 0) {
639 ATH_MSG_DEBUG("Sleeping for " << slot_sleep_time << " seconds before publishing the next batch");
640 TrigServices::conditionedSleep(std::chrono::milliseconds(slot_sleep_time), m_stopFlag);
641 }
642 }
643 ++BatchCounter;
644 }
645
646 //check if we exceeded the publication period
647 const boost::posix_time::ptime end_time = boost::posix_time::microsec_clock::universal_time();
648 if (boost::posix_time::time_duration(end_time-start_time) > interval) {
649 ATH_MSG_WARNING("Publication deadline missed, cycle exceeded the interval.. Total publication time "
650 << boost::posix_time::to_simple_string(end_time-start_time));
651 }
652 ATH_MSG_DEBUG("Completed the publication of " << counter << " histograms. "
653 "Publication time: " << boost::posix_time::to_simple_string(end_time-start_time));
654
655 //sleep till the next cycle
656 const boost::posix_time::ptime now = boost::posix_time::microsec_clock::universal_time();
657 const int nowMs = (now-epoch).total_milliseconds();
658 const boost::posix_time::time_duration next_cycle(boost::posix_time::milliseconds(interval_ms - (nowMs % interval_ms)));
659 ATH_MSG_DEBUG("epoch " << epoch <<", interval_ms" << interval_ms << ", now_ms " << nowMs
660 << "sleeping for " << next_cycle.total_milliseconds() << " milliseconds till the next cycle");
661 TrigServices::conditionedSleep(std::chrono::milliseconds(next_cycle.total_milliseconds()), m_stopFlag);
662 }
663 ATH_MSG_INFO("Monitoring task stopped");
664}
std::atomic< bool > m_stopFlag
Flag to stop the monitoring task.
std::set< std::string > getSet(const boost::regex &) const
void publish(const std::string &appName, const std::string &histID) const
Publish one histogram.
std::string m_partition
The partition to publish to.
void syncPublish(long int, const boost::posix_time::ptime &) const
Sync the publication to a multiple of the interval.
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
void conditionedSleep(std::chrono::milliseconds duration, const std::atomic< bool > &stopFlag)
Sleep for duration or until stopFlag is set, whichever comes first.

◆ publish()

void WebdaqHistSvc::publish ( const std::string & appName,
const std::string & histID ) const
private

Publish one histogram.

Definition at line 365 of file WebdaqHistSvc.cxx.

365 {
366
367 const std::string path = appName + '.' + histID;
368
369 ATH_MSG_DEBUG("Publishing to " << m_partition << " Histogram " << path << " to the OH server " << m_tdaqOHServerName);
370 tbb::concurrent_hash_map<std::string, THistID>::const_accessor accessor;
371 if (!m_hists.find(accessor, histID)) {
372 ATH_MSG_WARNING("Histogram with name " << histID << " not found in histogram map (probably deregistered).");
373 return;
374 }
375
376 ATH_MSG_DEBUG("Histogram found in map, going to lock mutex and then publish it");
377 //Here we clone the histogram to avoid locking the OH mutex during the whole publication
378 std::unique_ptr<TObject> obj;
379 {
380 //Locking the OH mutex before touching the Histogram
381 oh_scoped_lock_histogram lock;
382 //accessor is implicitly valid
383 //coverity[FORWARD_NULL]
384 obj.reset(accessor->second.obj->Clone());
385 }
386 if (obj == nullptr) {
387 ATH_MSG_ERROR("Failed to clone histogram " << histID);
388 return;
389 }
390 if (!webdaq::oh::put(m_partition, m_tdaqOHServerName, path, obj.get())) {
391 ATH_MSG_ERROR("Histogram publishing for " << histID << " failed");
392 }
393}
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
std::string m_tdaqOHServerName
The OH server name (TDAQ_OH_SERVER if defined, m_OHServerName otherwise).

◆ publishAll()

void WebdaqHistSvc::publishAll ( const boost::regex & nameSelect) const
private

Final publication after stop.

Definition at line 399 of file WebdaqHistSvc.cxx.

400{
401 std::set<std::string> HistoSet = getSet(nameSelect);
402 ATH_MSG_DEBUG("Final publication of " << HistoSet.size()
403 << " histograms for provider " << m_appName);
404
405 for (const std::string& id : HistoSet) {
406 publish(m_appName, id);
407 }
408}

◆ regEfficiency() [1/3]

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

Definition at line 104 of file WebdaqHistSvc.h.

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

◆ regEfficiency() [2/3]

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

Definition at line 105 of file WebdaqHistSvc.h.

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

◆ regEfficiency() [3/3]

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

Definition at line 106 of file WebdaqHistSvc.h.

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

◆ regGraph() [1/3]

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

Definition at line 98 of file WebdaqHistSvc.h.

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

◆ regGraph() [2/3]

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

Definition at line 99 of file WebdaqHistSvc.h.

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

◆ regGraph() [3/3]

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

Definition at line 100 of file WebdaqHistSvc.h.

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

◆ regHist() [1/3]

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

Definition at line 450 of file WebdaqHistSvc.cxx.

451{
452 std::unique_ptr<TH1> hist = nullptr;
453 THistID* hid = nullptr;
454 return regHist_i(std::move(hist), id, false, hid);
455}
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 457 of file WebdaqHistSvc.cxx.

458{
459 THistID* hid = nullptr;
460 return regHist_i(std::move(hist), id, false, hid);
461}

◆ regHist() [3/3]

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

Definition at line 463 of file WebdaqHistSvc.cxx.

464{
465 THistID* hid = nullptr;
466 std::unique_ptr<TH1> hist(hist_ptr);
467 return regHist_i(std::move(hist), id, false, hid);
468}

◆ 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 158 of file WebdaqHistSvc.cxx.

160{
161 ATH_MSG_DEBUG("Registering histogram " << id);
162
163 phid = nullptr;
164 if (not isObjectAllowed(id, hist_unique.get())) {
165 return StatusCode::FAILURE;
166 }
167
168 if (hist_unique->Class()->InheritsFrom(TH1::Class())) {
169
170 tbb::concurrent_hash_map<std::string, THistID>::accessor accessor;
171 if (m_hists.find(accessor, id)) {
172 ATH_MSG_ERROR("Histogram with name " << id << " already registered");
173 return StatusCode::FAILURE;
174 }
175 // Element not found, attempt to insert
176 if (!m_hists.insert(accessor, id)) {
177 ATH_MSG_ERROR("Failed to insert histogram with name " << id);
178 return StatusCode::FAILURE;
179 }
180 T* hist = hist_unique.release();
181 m_histoMapUpdated = true;
183 accessor->second = THistID(id, hist);
184 //finished
185 if (shared) accessor->second.mutex = std::make_unique<std::mutex>();
186 phid = &accessor->second;
187 ATH_MSG_DEBUG((shared ? "Shared histogram " : "Histogram ")
188 << hist->GetName() << " registered under " << id << " " << name());
189 } else {
190 ATH_MSG_ERROR("Cannot register " << hist_unique->ClassName()
191 << " because it does not inherit from TH1");
192 return StatusCode::FAILURE;
193 }
194 return StatusCode::SUCCESS;
195}
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 117 of file WebdaqHistSvc.h.

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

◆ regShared() [2/5]

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

Definition at line 115 of file WebdaqHistSvc.h.

115{ 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 522 of file WebdaqHistSvc.cxx.

524{
525 lh = regShared_i<TH1>(id, std::move(hist));
526 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
527}
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 529 of file WebdaqHistSvc.cxx.

531{
532 lh = regShared_i<TH2>(id, std::move(hist));
533 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
534}

◆ regShared() [5/5]

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

Definition at line 536 of file WebdaqHistSvc.cxx.

538{
539 lh = regShared_i<TH3>(id, std::move(hist));
540 return (lh ? StatusCode::SUCCESS : StatusCode::FAILURE);
541}

◆ regShared_i()

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

Definition at line 200 of file WebdaqHistSvc.cxx.

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

◆ regTree() [1/3]

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

Definition at line 87 of file WebdaqHistSvc.h.

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

◆ regTree() [2/3]

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

Definition at line 88 of file WebdaqHistSvc.h.

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

◆ regTree() [3/3]

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

Definition at line 89 of file WebdaqHistSvc.h.

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

◆ stop()

StatusCode WebdaqHistSvc::stop ( )
overridevirtual

Set the stop flag for the task thread to true

Definition at line 109 of file WebdaqHistSvc.cxx.

110{
112 ATH_MSG_DEBUG("Stopping monitoring task");
113 m_stopFlag = true;
114 // Wait for the task to finish
115 if (m_thread.joinable()) {
116 ATH_MSG_DEBUG("Going to join the monitoring thread");
117 try {
118 m_thread.join();
119 }
120 catch (const std::exception& e) {
121 ATH_MSG_ERROR("Failed to join the monitoring thread: " << e.what());
122 return StatusCode::FAILURE;
123 }
124 }
125 if (m_threadFast.joinable()) {
126 ATH_MSG_DEBUG("Going to join the fast monitoring thread");
127 try {
128 m_threadFast.join();
129 }
130 catch (const std::exception& e) {
131 ATH_MSG_ERROR("Failed to join the fast monitoring thread: " << e.what());
132 return StatusCode::FAILURE;
133 }
134 }
135 ATH_MSG_INFO("Performing final histogram publication before stop");
137 ATH_MSG_DEBUG("Clearing list of histograms");
138 m_hists.clear();
139 m_histoMapUpdated = true;
141 return StatusCode::SUCCESS;
142}
void publishAll(const boost::regex &nameSelect) const
Final publication after stop.

◆ syncPublish()

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

Sync the publication to a multiple of the interval.

Definition at line 668 of file WebdaqHistSvc.cxx.

669{
670 //Sync the publication to a multple of the interval
671 //Code taken from TDAQ monsvc https://gitlab.cern.ch/atlas-tdaq-software/monsvc/-/blob/master/src/PeriodicScheduler.cxx?ref_type=heads#L163
672 const boost::posix_time::ptime now = boost::posix_time::microsec_clock::universal_time();
673 const int now_ms = (now-epoch).total_milliseconds();
674 //If now_ms % interval_ms == 0 we skip a cycle. Too bad.
675 const boost::posix_time::time_duration sync(boost::posix_time::milliseconds(interval_ms - (now_ms % interval_ms)));
676 //Do not sync if we are below 50 ms
677 if (sync.total_milliseconds() > 50){
678 std::this_thread::sleep_for(std::chrono::milliseconds(sync.total_milliseconds()));
679 }
680}

Member Data Documentation

◆ m_appName

std::string WebdaqHistSvc::m_appName
private

Application name.

Definition at line 153 of file WebdaqHistSvc.h.

◆ m_autoFlush

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

Definition at line 199 of file WebdaqHistSvc.h.

199{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 198 of file WebdaqHistSvc.h.

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

◆ m_excludeName

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

Definition at line 184 of file WebdaqHistSvc.h.

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

◆ m_excludeNameRegex

boost::regex WebdaqHistSvc::m_excludeNameRegex
private

Definition at line 208 of file WebdaqHistSvc.h.

◆ m_excludeType

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

Definition at line 182 of file WebdaqHistSvc.h.

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

◆ m_excludeTypeRegex

boost::regex WebdaqHistSvc::m_excludeTypeRegex
private

Definition at line 206 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 195 of file WebdaqHistSvc.h.

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

◆ m_fastPublicationIncludeNameRegex

boost::regex WebdaqHistSvc::m_fastPublicationIncludeNameRegex
private

Definition at line 211 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 159 of file WebdaqHistSvc.h.

159{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 161 of file WebdaqHistSvc.h.

161{false};

◆ m_hists

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

Map of the registered histograms.

Definition at line 167 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 185 of file WebdaqHistSvc.h.

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

◆ m_includeNameRegex

boost::regex WebdaqHistSvc::m_includeNameRegex
private

Definition at line 209 of file WebdaqHistSvc.h.

◆ m_includeType

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

Definition at line 183 of file WebdaqHistSvc.h.

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

◆ m_includeTypeRegex

boost::regex WebdaqHistSvc::m_includeTypeRegex
private

Definition at line 207 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 203 of file WebdaqHistSvc.h.

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

◆ m_intervalSeconds

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

Definition at line 191 of file WebdaqHistSvc.h.

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

◆ m_intervalSecondsFast

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

Definition at line 192 of file WebdaqHistSvc.h.

192{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 164 of file WebdaqHistSvc.h.

164{this, "JobOptionsSvc", "JobOptionsSvc"};

◆ m_maxFileSize

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

Definition at line 201 of file WebdaqHistSvc.h.

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

◆ m_numSlots

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

Definition at line 189 of file WebdaqHistSvc.h.

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

◆ m_numSlotsFast

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

Definition at line 190 of file WebdaqHistSvc.h.

190{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 193 of file WebdaqHistSvc.h.

193{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 202 of file WebdaqHistSvc.h.

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

◆ m_partition

std::string WebdaqHistSvc::m_partition
private

The partition to publish to.

Definition at line 151 of file WebdaqHistSvc.h.

◆ m_print

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

Definition at line 200 of file WebdaqHistSvc.h.

200{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 194 of file WebdaqHistSvc.h.

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

◆ m_PublicationIncludeNameRegex

boost::regex WebdaqHistSvc::m_PublicationIncludeNameRegex
private

Definition at line 210 of file WebdaqHistSvc.h.

◆ m_stopFlag

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

Flag to stop the monitoring task.

Definition at line 138 of file WebdaqHistSvc.h.

138{false};

◆ m_tdaqOHServerName

std::string WebdaqHistSvc::m_tdaqOHServerName
private

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

Definition at line 157 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 155 of file WebdaqHistSvc.h.

◆ m_thread

std::thread WebdaqHistSvc::m_thread
private

Publication thread.

Definition at line 148 of file WebdaqHistSvc.h.

◆ m_threadFast

std::thread WebdaqHistSvc::m_threadFast
private

Definition at line 149 of file WebdaqHistSvc.h.


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