ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_DCS_ConditionsSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRT_DCS_CONDITIONSSVC_H
6#define TRT_DCS_CONDITIONSSVC_H
7
13#include <vector>
18#include "GaudiKernel/ToolHandle.h"
19#include "GaudiKernel/ServiceHandle.h"
20#include "GaudiKernel/ICondSvc.h"
22#include "GaudiKernel/ThreadLocalContext.h"
26
27class StoreGateSvc;
28class TRT_ID;
29class Identifier;
30class TH1D;
31
33class TRT_DCS_ConditionsSvc : public extends<AthService,
34 ITRT_ConditionsSvc,
35 ITRT_DCS_ConditionsSvc>
36 {
37
38 public:
39
40 TRT_DCS_ConditionsSvc( const std::string& name, ISvcLocator* pSvcLocator );
42
43 virtual StatusCode initialize();
44 virtual StatusCode finalize();
45
47 InDet::TRT_DCS_StatusFlag getFlag( const Identifier );
48
50
52 StatusCode getValue( const Identifier, const InDet::TRT_DCS_DataType,
53 InDet::TRT_DCS_ValueType& );
54
56
58 StatusCode getValue( const std::string & fname, const std::string & chanName, InDet::TRT_DCS_ValueType& value);
59
61
63 StatusCode getValue( const std::string & fname, const int chanNum, InDet::TRT_DCS_ValueType& value);
64
65 const CondAttrListCollection* getCollection( const std::string & collName);
66
67 void monitorBarrel();
68 void monitorEndcapA();
69 void monitorEndcapC();
70
71
73
74
76
80 InDet::TRT_CondFlag condSummaryStatus( const Identifier& );
81
83
84 private:
85
86 // jobOptions properties
96 SG::ReadHandleKey<xAOD::EventInfo> m_EventInfoKey{this,"EventInfoKey","EventInfo","RHK for EventInfo"};
97 // Conditions access
99 SG::ReadCondHandleKey<CondAttrListCollection> m_barrelReadKey{this,"BarrelKeyName","in","HV Barrel in-key"};
100 SG::ReadCondHandleKey<CondAttrListCollection> m_EAReadKey{this,"EAKeyName","in","HV EA in-key"};
101 SG::ReadCondHandleKey<CondAttrListCollection> m_ECReadKey{this,"ECKeyName","in","HV EC in-key"};
102 mutable std::vector<const CondAttrListCollection*> m_Barrel_HV_COOLCont ATLAS_THREAD_SAFE; // Guarded by m_cacheMutex
103 mutable std::vector<const CondAttrListCollection*> m_EndcapA_HV_COOLCont ATLAS_THREAD_SAFE; // Guarded by m_cacheMutex
104 mutable std::vector<const CondAttrListCollection*> m_EndcapC_HV_COOLCont ATLAS_THREAD_SAFE; // Guarded by m_cacheMutex
105 mutable std::mutex m_cacheMutex;
106 mutable std::vector<EventContext::ContextEvt_t> m_evtBA ATLAS_THREAD_SAFE; // Guarded by m_cacheMutex
107 mutable std::vector<EventContext::ContextEvt_t> m_evtEA ATLAS_THREAD_SAFE; // Guarded by m_cacheMutex
108 mutable std::vector<EventContext::ContextEvt_t> m_evtEC ATLAS_THREAD_SAFE; // Guarded by m_cacheMutex
109
113
114
115 // Straw Helpers
117
119
122
123
124
125 // Other private variables
127
128 // Monitoring histograms
136 TH1D* m_h_Barrel_HVvalAvg; // don't forget to divide by nEvts at end!
137 TH1D* m_h_EndcapA_HVvalAvg; // don't forget to divide by nEvts at end!
138 TH1D* m_h_EndcapC_HVvalAvg; // don't forget to divide by nEvts at end!
142};
143
144#endif // TRT_DCS_CONDITIONSSVC_H
Interface to read DCS conditions data from COOL author Denver Whittington Denver.Whittington@cern....
Property holding a SG store/key/clid from which a ReadHandle is made.
Define macros for attributes used to control the static checker.
This class is a collection of AttributeLists where each one is associated with a channel number.
Property holding a SG store/key/clid from which a ReadHandle is made.
The Athena Transient Store API.
ServiceHandle< ICondSvc > m_condSvc
TRT_DCS_ConditionsSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor //.
SG::ReadCondHandleKey< CondAttrListCollection > m_barrelReadKey
ServiceHandle< ITRT_HWMappingSvc > m_mapSvc
ServiceHandle< StoreGateSvc > m_evtStore
virtual ~TRT_DCS_ConditionsSvc()
Destructor //.
InDet::TRT_DCS_StatusFlag getFlag(const Identifier)
Returns the DCS conditions StatusFlag for a given identifier.
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
SG::ReadCondHandleKey< CondAttrListCollection > m_ECReadKey
InDet::TRT_CondFlag condSummaryStatus(const Identifier &)
Evaluation for TRT_ConditionsSummarySvc.
ServiceHandle< StoreGateSvc > m_detStore
void monitorBarrel()
Monitor barrel HV //.
virtual StatusCode finalize()
Finalize //.
const CondAttrListCollection * getCollection(const std::string &collName)
get pointer
SG::ReadCondHandleKey< CondAttrListCollection > m_EAReadKey
void monitorEndcapA()
Monitor EndcapA HV //.
StatusCode getValue(const Identifier, const InDet::TRT_DCS_DataType, InDet::TRT_DCS_ValueType &)
Returns the value for a given identifier and data type.
virtual StatusCode initialize()
Initialize //.
void monitorEndcapC()
Monitor EndcapC HV //.
std::vector< const CondAttrListCollection * > m_Barrel_HV_COOLCont ATLAS_THREAD_SAFE
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82