Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef WEBDAQHISTSVC_THISTSVC_H
6 #define WEBDAQHISTSVC_THISTSVC_H
8 #include "GaudiKernel/ITHistSvc.h"
9 #include "GaudiKernel/IIncidentListener.h"
10 #include "Gaudi/Interfaces/IOptionsSvc.h"
27 #include <boost/regex.hpp>
28 #include <boost/date_time/posix_time/posix_time_types.hpp>
29 #include <tbb/concurrent_hash_map.h>
32 #define NOSUPPORT(lvl, what) \
34 ATH_MSG_LVL(MSG::lvl, what << "is not supported by this implementation"); \
52 class WebdaqHistSvc:
public extends<AthService, ITHistSvc, IIncidentListener>
59 virtual void handle(
const Incident& incident )
override;
73 virtual std::vector<std::string>
getHists()
const override;
76 virtual StatusCode regShared(
const std::string&, std::unique_ptr<TH1>, LockedHandle<TH1>& )
override;
77 virtual StatusCode regShared(
const std::string&, std::unique_ptr<TH2>, LockedHandle<TH2>& )
override;
78 virtual StatusCode regShared(
const std::string&, std::unique_ptr<TH3>, LockedHandle<TH3>& )
override;
148 void syncPublish(
long int, boost::posix_time::ptime);
169 tbb::concurrent_hash_map<std::string, THistID>
m_hists;
179 template <
typename T>
T*
getHist_i(
const std::string&
id,
const size_t& ind,
bool quiet =
false)
const;
180 template <
typename T> LockedHandle<T>
regShared_i(
const std::string&
id, std::unique_ptr<T>
hist);
181 template <
typename T> LockedHandle<T>
getShared_i(
const std::string&
id )
const;
188 "^/((run_[0-9]+/lb_[0-9]+/LB)|(SHIFT)|(EXPERT)|(DEBUG)|(EXPRESS)|(RUNSTAT))/.+/.+"};
191 Gaudi::Property<int>
m_numSlots{
this,
"NumSlots", 8,
"Number of slots for the main monitoring task"};
192 Gaudi::Property<int>
m_numSlotsFast{
this,
"NumSlotsFast", 1,
"Number of slots for the fast monitoring task"};
193 Gaudi::Property<int>
m_intervalSeconds{
this,
"IntervalSeconds", 80,
"Interval between histogram publications periods in seconds"};
194 Gaudi::Property<int>
m_intervalSecondsFast{
this,
"IntervalSecondsFast", 10,
"Interval between histogram publications periods in seconds for the fast publication"};
195 Gaudi::Property<std::string>
m_OHServerName{
this,
"OHServerName",
"Histogramming",
"Name of the OH server to publish histograms into"};
196 Gaudi::Property<std::string>
m_PublicationIncludeName{
this,
"PublicationIncludeName",
".*",
"Regex to select histograms for publication"};
197 Gaudi::Property<std::string>
m_fastPublicationIncludeName{
this,
"FastPublicationIncludeName",
"^.EXPERT.HLTFramework.TrigSignatureMoni.*",
"Regex to select histograms for fast publication"};
200 Gaudi::Property<int>
m_autoSave{
this,
"AutoSave", 0,
"Not supported by WebdaqHistSvc"};
201 Gaudi::Property<int>
m_autoFlush{
this,
"AutoFlush", 0,
"Not supported by WebdaqHistSvc"};
202 Gaudi::Property<bool>
m_print{
this,
"PrintAll",
false,
"Not supported by WebdaqHistSvc"};
203 Gaudi::Property<int>
m_maxFileSize{
this,
"MaxFileSize", 10240,
"Not supported by WebdaqHistSvc"};
204 Gaudi::Property<std::vector<std::string>>
m_outputfile{
this,
"Output", {},
"Not supported by WebdaqHistSvc"};
205 Gaudi::Property<std::vector<std::string>>
m_inputfile{
this,
"Input", {},
"Not supported by WebdaqHistSvc"};
217 #endif // WEBDAQHISTSVC_THISTSVC_H
virtual StatusCode getTEfficiencies(const std::string &, TList &, bool, bool) override
T * getHist_i(const std::string &id, const size_t &ind, bool quiet=false) const
virtual StatusCode getShared(const std::string &, LockedHandle< TGraph > &) const override
virtual StatusCode getTTrees(const std::string &, TList &, bool) const override
virtual StatusCode regShared(const std::string &, std::unique_ptr< TGraph >, LockedHandle< TGraph > &) override
#define NOSUPPORT(lvl, what)
virtual bool existsTree(const std::string &) const override
Gaudi::Property< std::string > m_includeType
virtual StatusCode regEfficiency(const std::string &, std::unique_ptr< TEfficiency >) override
path
python interpreter configuration --------------------------------------—
virtual void handle(const Incident &incident) override
virtual StatusCode getTEfficiencies(const std::string &, TList &, bool) const override
virtual ~WebdaqHistSvc() noexcept override
virtual StatusCode regTree(const std::string &, TTree *) override
virtual StatusCode regGraph(const std::string &) override
Gaudi::Property< std::string > m_fastPublicationIncludeName
virtual StatusCode regTree(const std::string &) override
std::set< std::string > getSet(boost::regex) const
virtual StatusCode regHist(const std::string &name) override
virtual StatusCode getShared(const std::string &, LockedHandle< TH1 > &) const override
virtual StatusCode finalize() override
virtual bool existsHist(const std::string &name) const override
virtual StatusCode stop() override
Gaudi::Property< int > m_intervalSeconds
virtual StatusCode regGraph(const std::string &, TGraph *) override
Gaudi::Property< std::vector< std::string > > m_inputfile
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_jobOptionsSvc
joboptions service
HLT online histogram service.
Gaudi::Property< std::string > m_includeName
virtual bool existsGraph(const std::string &) const override
std::atomic< bool > m_stopFlag
Flag to stop the monitoring task.
def recurse(rdir, dqregion, ignorepath, reffile=None)
Gaudi::Property< std::string > m_OHServerName
Helper struct that bundles the histogram, name and mutex.
virtual bool exists(const std::string &name) const override
std::thread m_thread
Publication thread.
THistID(const std::string &s, TObject *o)
std::string m_tdaqOHServerName
The OH server name (TDAQ_OH_SERVER if defined, m_OHServerName otherwise)
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE() override
LockedHandle< T > getShared_i(const std::string &id) const
boost::regex m_includeTypeRegex
virtual StatusCode getTTrees(TDirectory *, TList &, bool, bool) override
StatusCode getTHists_i(const std::string &name, TList &) const
Get TList of registered histograms.
Gaudi::Property< int > m_maxFileSize
virtual std::vector< std::string > getGraphs() const override
virtual StatusCode merge(const std::string &) override
boost::regex m_fastPublicationIncludeNameRegex
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string m_tdaqWebdaqBase
Webdaq configuration variable, see https://gitlab.cern.ch/atlas-tdaq-software/webdaq.
virtual StatusCode getHist(const std::string &id, TH1 *&hist, size_t ind) const override
AthROOTErrorHandlerSvc * svc
LockedHandle< T > regShared_i(const std::string &id, std::unique_ptr< T > hist)
virtual StatusCode getTEfficiencies(TDirectory *, TList &, bool) const override
virtual StatusCode regShared(const std::string &, std::unique_ptr< TEfficiency >, LockedHandle< TEfficiency > &) override
StatusCode regHist_i(std::unique_ptr< T > hist, const std::string &name, bool shared, THistID *&phid)
void monitoringTask(int, int, std::atomic< bool > &, boost::regex)
The actual publication Task.
boost::regex m_PublicationIncludeNameRegex
Gaudi::Property< std::string > m_excludeName
virtual StatusCode regGraph(const std::string &, std::unique_ptr< TGraph >) override
boost::regex m_excludeNameRegex
virtual bool existsEfficiency(const std::string &) const override
virtual StatusCode getEfficiency(const std::string &, TEfficiency *&) const override
boost::regex m_excludeTypeRegex
virtual StatusCode getTEfficiencies(TDirectory *, TList &, bool, bool) override
virtual std::vector< std::string > getHists() const override
virtual StatusCode merge(TObject *) override
virtual StatusCode deReg(TObject *obj) override
Gaudi::Property< bool > m_print
virtual StatusCode getTree(const std::string &, TTree *&) const override
virtual StatusCode regEfficiency(const std::string &) override
std::atomic< bool > m_histoMapUpdated
Flag to indicate when the histogram map is updated.
virtual StatusCode regShared(const std::string &, std::unique_ptr< TH1 >, LockedHandle< TH1 > &) override
tbb::concurrent_hash_map< std::string, THistID > m_hists
Map of the registered histograms.
virtual StatusCode getTHists(TDirectory *td, TList &, bool recurse=false) const override
Gaudi::Property< std::string > m_excludeType
std::atomic< bool > m_histoMapUpdatedFast
Flag to indicate when the histogram map is updated for the fast publication
Gaudi::Property< int > m_intervalSecondsFast
void syncPublish(long int, boost::posix_time::ptime)
Sync the publication to a multiple of the interval.
virtual StatusCode getTTrees(const std::string &, TList &, bool, bool) override
virtual StatusCode getTTrees(TDirectory *, TList &, bool) const override
boost::regex m_includeNameRegex
Gaudi::Property< std::vector< std::string > > m_outputfile
virtual StatusCode regTree(const std::string &, std::unique_ptr< TTree >) override
virtual StatusCode getShared(const std::string &, LockedHandle< TEfficiency > &) const override
Gaudi::Property< int > m_autoSave
WebdaqHistSvc(const std::string &name, ISvcLocator *svc)
Gaudi::Property< int > m_autoFlush
Gaudi::Property< int > m_numSlots
Define macros for attributes used to control the static checker.
void conditionedSleep(std::chrono::milliseconds, const std::atomic< bool > &)
Sleep for a duration or until the stop flag is set.
Gaudi::Property< int > m_numSlotsFast
std::string m_partition
The partition to publish to.
virtual std::vector< std::string > getEfficiencies() const override
virtual std::vector< std::string > getTrees() const override
virtual StatusCode regEfficiency(const std::string &, TEfficiency *) override
bool isObjectAllowed(const std::string &path, const TObject *o) const
Does the histogram follow the naming rules ?
virtual StatusCode getGraph(const std::string &, TGraph *&) const override
Gaudi::Property< std::string > m_PublicationIncludeName