 |
ATLAS Offline Software
|
#include <ITkPixelDataRateMonTool.h>
|
| | ITkPixelDataRateMonTool (const std::string &type, const std::string &name, const IInterface *parent) |
| |
| virtual | ~ITkPixelDataRateMonTool ()=default |
| |
| virtual StatusCode | initialize () override |
| |
| void | fill (const uint32_t offlineID, const std::vector< unsigned int > &encodedstream, const ITkPixLayout< uint16_t > &hitMap) const |
| |
| ServiceHandle< StoreGateSvc > & | evtStore () |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | evtStore () const |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
| | The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| virtual StatusCode | sysInitialize () override |
| | Perform system initialization for an algorithm. More...
|
| |
| virtual StatusCode | sysStart () override |
| | Handle START transition. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| | Return this algorithm's input handles. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| | Return this algorithm's output handles. More...
|
| |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| | Declare a new Gaudi property. More...
|
| |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| |
| MsgStream & | msg () const |
| |
| MsgStream & | msg (const MSG::Level lvl) const |
| |
| bool | msgLvl (const MSG::Level lvl) const |
| |
|
| StatusCode | bookHistograms (const std::vector< std::vector< float >> &barrel_z, const std::vector< std::vector< float >> &endcap_z) |
| |
| void | fillExpertPlots (const uint32_t offlineID, const ITkPixLayout< uint16_t > &hitMap) const |
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
|
| Gaudi::Property< std::string > | m_path { this, "MonitoringPath", "/DataRateMon/", "Name of directory for plots" } |
| |
| Gaudi::Property< bool > | m_doExpertPlots { this, "DoExpertPlots", false, "Enable expert plots" } |
| |
| ServiceHandle< ITHistSvc > | m_thistSvc {this, "HistSvc", "THistSvc", "The histogram service"} |
| |
| ServiceHandle< InDetDD::IPixelReadoutManager > | m_pixelReadout {this, "PixelReadoutManager", "ITkPixelReadoutManager", "Pixel readout manager" } |
| |
| const InDetDD::PixelDetectorManager * | m_detManager = nullptr |
| |
| const PixelID * | m_pixIdHelper = nullptr |
| |
| std::map< int, std::string > | m_regionLabels |
| |
| std::map< int, std::string > | m_sideLabels |
| |
| TH1 *m_encoded_streamLength | ATLAS_THREAD_SAFE = nullptr |
| |
| TH2 *m_h2_chip_hitmap[N_LAYERS][N_REGIONS] | ATLAS_THREAD_SAFE = {} |
| |
| TH2 *m_h2_chip_totmap[N_LAYERS][N_REGIONS] | ATLAS_THREAD_SAFE = {} |
| |
| TProfile *m_p_streamLength[N_LAYERS][N_REGIONS][N_SIDES] | ATLAS_THREAD_SAFE = {} |
| |
| TH2 *m_h2_streamLength[N_LAYERS][N_REGIONS][N_SIDES] | ATLAS_THREAD_SAFE = {} |
| |
| TProfile *m_p_dataRate[N_LAYERS][N_REGIONS][N_SIDES] | ATLAS_THREAD_SAFE = {} |
| |
| TH2 *m_h2_dataRate[N_LAYERS][N_REGIONS][N_SIDES] | ATLAS_THREAD_SAFE = {} |
| |
| TProfile *m_p_hits[N_LAYERS][N_REGIONS][N_SIDES] | ATLAS_THREAD_SAFE = {} |
| |
| TH2 *m_h2_hits[N_LAYERS][N_REGIONS][N_SIDES] | ATLAS_THREAD_SAFE = {} |
| |
| StoreGateSvc_t | m_evtStore |
| | Pointer to StoreGate (event store by default) More...
|
| |
| StoreGateSvc_t | m_detStore |
| | Pointer to StoreGate (detector store by default) More...
|
| |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| |
| bool | m_varHandleArraysDeclared |
| |
Definition at line 36 of file ITkPixelDataRateMonTool.h.
◆ StoreGateSvc_t
◆ Region
◆ Side
◆ ITkPixelDataRateMonTool()
| ITkPixelDataRateMonTool::ITkPixelDataRateMonTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~ITkPixelDataRateMonTool()
| virtual ITkPixelDataRateMonTool::~ITkPixelDataRateMonTool |
( |
| ) |
|
|
virtualdefault |
◆ bookHistograms()
| StatusCode ITkPixelDataRateMonTool::bookHistograms |
( |
const std::vector< std::vector< float >> & |
barrel_z, |
|
|
const std::vector< std::vector< float >> & |
endcap_z |
|
) |
| |
|
private |
Definition at line 150 of file ITkPixelDataRateMonTool.cxx.
154 m_encoded_streamLength =
new TH1F(
"m_encoded_streamLength",
"Encoded Stream Length in bits", 2000, 0, 2000);
155 if ((
m_thistSvc->regHist(
m_path + m_encoded_streamLength->GetName(), m_encoded_streamLength)).isFailure())
156 return StatusCode::FAILURE;
158 ATH_MSG_DEBUG(
"Histogram " << m_encoded_streamLength->GetName() <<
" successfully registered.");
162 std::array<std::vector<std::vector<double>>,
N_REGIONS>
bins;
168 for (
unsigned int z_bin = 0; z_bin<(barrel_z[
layer].size()-1); z_bin++) {
170 float interModulePoint = 0.5 * ( barrel_z[
layer].at(z_bin) + barrel_z[
layer].at(z_bin+1) );
176 double last_value = 2.*barrel_z[
layer].back() - barrel_z[
layer].at( barrel_z[
layer].
size() - 2 );
181 for (
unsigned int z_bin = 0; z_bin<(endcap_z[
layer].size()-1); z_bin++) {
183 float interModulePoint = 0.5 * ( endcap_z[
layer].at(z_bin) + endcap_z[
layer].at(z_bin+1) );
185 float initialValue = 2.*endcap_z[
layer].at(z_bin)-interModulePoint;
191 double last_value = 2.*endcap_z[
layer].back() - endcap_z[
layer].at( endcap_z[
layer].
size() - 2);
196 for (
unsigned int region=0; region<
N_REGIONS; region++) {
208 return StatusCode::FAILURE;
209 ATH_MSG_DEBUG(
"Histogram " << m_h2_chip_hitmap[
layer][region]->GetName() <<
" successfully registered.");
215 return StatusCode::FAILURE;
216 ATH_MSG_DEBUG(
"Histogram " << m_h2_chip_totmap[
layer][region]->GetName() <<
" successfully registered.");
225 m_p_streamLength[
layer][region][
side] =
new TProfile((
"m_p_streamLength_" + name_base).c_str(),
226 (title_base +
" Stream Length; z[mm]; <stream length> [bits]").c_str(),
229 return StatusCode::FAILURE;
230 ATH_MSG_DEBUG(
"Histogram " << m_p_streamLength[
layer][region][
side]->GetName() <<
" successfully registered.");
232 m_h2_streamLength[
layer][region][
side] =
new TH2F((
"m_h2_streamLength_" + name_base).c_str(),
233 (title_base +
" Stream Length; z[mm]; <stream length> [bits]").c_str(),
237 return StatusCode::FAILURE;
238 ATH_MSG_DEBUG(
"Histogram " << m_h2_streamLength[
layer][region][
side]->GetName() <<
" successfully registered.");
243 m_p_dataRate[
layer][region][
side] =
new TProfile((
"m_p_dataRate_" + name_base).c_str(),
244 (title_base +
" Data rate per chip; z[mm]; <data rate per chip> [b/s]").c_str(),
247 return StatusCode::FAILURE;
248 ATH_MSG_DEBUG(
"Histogram " << m_p_dataRate[
layer][region][
side]->GetName() <<
" successfully registered.");
250 m_h2_dataRate[
layer][region][
side] =
new TH2F((
"m_h2_dataRate_" + name_base).c_str(),
251 (title_base +
" Data rate per chip; z[mm]; <data rate per chip> [b/s]").c_str(),
255 return StatusCode::FAILURE;
256 ATH_MSG_DEBUG(
"Histogram " << m_h2_dataRate[
layer][region][
side]->GetName() <<
" successfully registered.");
260 (title_base +
" Hits per chip; z[mm]; <hits/chip>").c_str(),
263 return StatusCode::FAILURE;
266 m_h2_hits[
layer][region][
side] =
new TH2F((
"m_h2_hits_" + name_base).c_str(),
267 (title_base +
" Hits per chip; z[mm]; <hits/chip>").c_str(),
271 return StatusCode::FAILURE;
277 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation string for the property. |
This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ fill()
| void ITkPixelDataRateMonTool::fill |
( |
const uint32_t |
offlineID, |
|
|
const std::vector< unsigned int > & |
encodedstream, |
|
|
const ITkPixLayout< uint16_t > & |
hitMap |
|
) |
| const |
Definition at line 84 of file ITkPixelDataRateMonTool.cxx.
90 const float streamLength = encodedstream.size() *
s_bitsPerPack;
95 m_encoded_streamLength->Fill(streamLength);
108 m_p_streamLength[pixelLayerDisk][region][
side]->Fill(
z, streamLength);
109 m_h2_streamLength[pixelLayerDisk][region][
side]->Fill(
z, streamLength);
112 m_p_dataRate[pixelLayerDisk][region][
side]->Fill(
z, data_rate);
113 m_h2_dataRate[pixelLayerDisk][region][
side]->Fill(
z, data_rate);
116 m_p_hits[pixelLayerDisk][region][
side]->Fill(
z, hitMap.
nHits());
117 m_h2_hits[pixelLayerDisk][region][
side]->Fill(
z, hitMap.
nHits());
◆ fillExpertPlots()
| void ITkPixelDataRateMonTool::fillExpertPlots |
( |
const uint32_t |
offlineID, |
|
|
const ITkPixLayout< uint16_t > & |
hitMap |
|
) |
| const |
|
private |
Definition at line 124 of file ITkPixelDataRateMonTool.cxx.
140 if (hitMap(col,
row) > 0){
141 m_h2_chip_hitmap[pixelLayerDisk][region]->Fill(
row, col, 1);
142 m_h2_chip_totmap[pixelLayerDisk][region]->Fill(
row, col, hitMap(col,
row));
◆ initialize()
| StatusCode ITkPixelDataRateMonTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 20 of file ITkPixelDataRateMonTool.cxx.
37 std::vector<std::vector<float>> barrel_module_z(10);
38 std::vector<std::vector<float>> endcap_module_z(10);
45 ATH_MSG_ERROR(
"Problems with pointer to Detector Element !!!");
46 return StatusCode::FAILURE;
58 if (pixelBarrelEndcap<0 or pixelPhiModule > 0 or (pixelBarrelEndcap == 0 and pixelEtaModule<0))
62 throw std::runtime_error(
"Pointer to PixelModuleDesign object is null");
69 float module_z = element->
center().z();
70 ATH_MSG_DEBUG(
"Modules BarrelEndcap LayerDisk Phi Eta z : " << pixelBarrelEndcap <<
" " << pixelLayerDisk <<
" " << pixelPhiModule <<
" " << pixelEtaModule <<
" " << module_z <<
" | nb chips : " << chips <<
" rows-cols: " << moduleDesign->
rowsPerCircuit() <<
"-" << moduleDesign->
columnsPerCircuit() <<
" thickness:" << moduleDesign->
thickness());
72 element->
isBarrel() ? barrel_module_z.at(pixelLayerDisk).push_back(module_z) : endcap_module_z.at(pixelLayerDisk).push_back(module_z);
80 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ ATLAS_THREAD_SAFE [1/9]
| TH1* m_encoded_streamLength ITkPixelDataRateMonTool::ATLAS_THREAD_SAFE = nullptr |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [2/9]
| TH2* m_h2_chip_hitmap [N_LAYERS][N_REGIONS] ITkPixelDataRateMonTool::ATLAS_THREAD_SAFE = {} |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [3/9]
| TH2* m_h2_chip_totmap [N_LAYERS][N_REGIONS] ITkPixelDataRateMonTool::ATLAS_THREAD_SAFE = {} |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [4/9]
◆ ATLAS_THREAD_SAFE [5/9]
◆ ATLAS_THREAD_SAFE [6/9]
◆ ATLAS_THREAD_SAFE [7/9]
◆ ATLAS_THREAD_SAFE [8/9]
◆ ATLAS_THREAD_SAFE [9/9]
◆ m_detManager
◆ m_detStore
◆ m_doExpertPlots
| Gaudi::Property< bool > ITkPixelDataRateMonTool::m_doExpertPlots { this, "DoExpertPlots", false, "Enable expert plots" } |
|
private |
◆ m_evtStore
◆ m_path
| Gaudi::Property< std::string > ITkPixelDataRateMonTool::m_path { this, "MonitoringPath", "/DataRateMon/", "Name of directory for plots" } |
|
private |
◆ m_pixelReadout
◆ m_pixIdHelper
| const PixelID* ITkPixelDataRateMonTool::m_pixIdHelper = nullptr |
|
private |
◆ m_regionLabels
| std::map<int, std::string > ITkPixelDataRateMonTool::m_regionLabels |
|
private |
◆ m_sideLabels
| std::map<int, std::string > ITkPixelDataRateMonTool::m_sideLabels |
|
private |
◆ m_thistSvc
| ServiceHandle<ITHistSvc> ITkPixelDataRateMonTool::m_thistSvc {this, "HistSvc", "THistSvc", "The histogram service"} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ N_LAYERS
| const int ITkPixelDataRateMonTool::N_LAYERS =9 |
|
staticprivate |
◆ s_bitsPerPack
| const int ITkPixelDataRateMonTool::s_bitsPerPack = 32 |
|
staticprivate |
◆ s_chipReadoutFrequency
| const int ITkPixelDataRateMonTool::s_chipReadoutFrequency = 1000000 |
|
staticprivate |
◆ s_col_chip
| const int ITkPixelDataRateMonTool::s_col_chip = 400 |
|
staticprivate |
◆ s_row_chip
| const int ITkPixelDataRateMonTool::s_row_chip = 384 |
|
staticprivate |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
double thickness() const
Method which returns thickness of the silicon wafer.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::string to_string(const SectorProjector proj)
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
def TProfile(*args, **kwargs)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
int numberOfCircuits() const
Total number of circuits:
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
int layer_disk(const Identifier &id) const
int eta_module(const Identifier &id) const
bool empty() const noexcept
int rowsPerCircuit() const
Number of cell rows per circuit:
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
int phi_module(const Identifier &id) const
int columnsPerCircuit() const
Number of cell columns per circuit:
virtual Identifier identify() const override final
identifier of this detector element (inline)