Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TrigCaloClusterMonitor Class Reference

#include <TrigCaloClusterMonitor.h>

Inheritance diagram for TrigCaloClusterMonitor:
Collaboration diagram for TrigCaloClusterMonitor:

Public Member Functions

 TrigCaloClusterMonitor (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) 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 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 > &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
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

Gaudi::Property< bool > m_monitorCells {this, "MonitorCells", false, "Whether to monitor cells too."}
 
Gaudi::Property< bool > m_excludeTile {this, "ExcludeTileCells", true, "Whether to exclude TileCal cells from monitoring."}
 
Gaudi::Property< bool > m_useTwoGaussianNoise {this, "TwoGaussianNoise", false, "Use 2-gaussian noise description for TileCal."}
 
Gaudi::Property< float > m_monitoring1thr { this, "Thr1", 2, "First Threshold to pass for cell monitoring" }
 
Gaudi::Property< float > m_monitoring2thr { this, "Thr2", 4, "Second Threshold to pass for cell monitoring" }
 
Gaudi::Property< unsigned int > m_monitorInterval { this, "MonitoringInterval", 1, "Monitor just one every MonitoringInterval events, in case statistics are high enough." }
 
Gaudi::Property< unsigned int > m_monitorCellsInterval { this, "MonitoringCellInterval", 20, "Additional interval in which to monitor the cells, since this is a costlier monitoring." }
 
SG::ReadCondHandleKey< CaloNoisem_noiseCDOKey {this, "CaloNoiseKey", "totalNoise", "SG Key of CaloNoise data object"}
 
ToolHandle< GenericMonitoringToolm_moniTool { this, "MonitoringTool", "", "Monitoring tool" }
 Monitoring tool. More...
 
SG::ReadDecorHandleKey< xAOD::EventInfom_avgMuKey { this, "averageInteractionsPerCrossingKey", "EventInfo.averageInteractionsPerCrossing", "Decoration for Average Interaction Per Crossing" }
 Event input: To get <mu> from Event Info. More...
 
SG::ReadHandleKey< CaloCellContainerm_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"}
 vector of names of the cell containers to use as input. More...
 
SG::ReadHandleKey< xAOD::CaloClusterContainerm_clustersKey
 The name of the key in StoreGate for the CaloClusterContainer we want to monitor. More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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
 

Detailed Description

Definition at line 30 of file TrigCaloClusterMonitor.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigCaloClusterMonitor()

TrigCaloClusterMonitor::TrigCaloClusterMonitor ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 33 of file TrigCaloClusterMonitor.cxx.

34  : AthReentrantAlgorithm(name, pSvcLocator)
35 {
36 }

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode TrigCaloClusterMonitor::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 54 of file TrigCaloClusterMonitor.cxx.

55 {
56  const auto monitoring_number = ctx.eventID().event_number();
57 
58  if (monitoring_number % m_monitorInterval != 0)
59  {
60  return StatusCode::SUCCESS;
61  }
62 
63  const bool really_monitor_cells = m_monitorCells && (monitoring_number % (m_monitorInterval * m_monitorCellsInterval) == 0);
64 
65 
67 
68  const xAOD::CaloClusterContainer * cluster_collection_ptr = cluster_collection.ptr();
69 
70  if (!cluster_collection.isValid())
71  {
72  ATH_MSG_ERROR("Cannot retrieve CaloClusterContainer: " << m_clustersKey.key());
73  return StatusCode::FAILURE;
74  }
75 
76  std::vector<double> clus_phi;
77  std::vector<double> clus_eta;
78  std::vector<double> clus_n_bad_cells;
79  std::vector<double> clus_eng_frac_max;
80  std::vector<unsigned int> size_vec;
81  clus_phi.reserve(1024);
82  clus_eta.reserve(1024);
83  clus_n_bad_cells.reserve(1024);
84  clus_eng_frac_max.reserve(1024);
85  size_vec.reserve(1024);
86 
87  auto mon_clusEt = Monitored::Collection("Et", *cluster_collection_ptr, &xAOD::CaloCluster::et);
88  auto mon_clusSignalState = Monitored::Collection("signalState", *cluster_collection_ptr, &xAOD::CaloCluster::signalState);
89  auto mon_clusSize = Monitored::Collection("clusterSize", *cluster_collection_ptr, &xAOD::CaloCluster::clusterSize);
90  auto mon_clusPhi = Monitored::Collection("Phi", clus_phi);
91  auto mon_clusEta = Monitored::Collection("Eta", clus_eta);
92  auto mon_badCells = Monitored::Collection("N_BAD_CELLS", clus_n_bad_cells);
93  auto mon_engFrac = Monitored::Collection("ENG_FRAC_MAX", clus_eng_frac_max);
94  auto mon_size = Monitored::Collection("size", size_vec);
95  auto monmu = Monitored::Scalar("mu", -999.0);
96  auto mon_container_size = Monitored::Scalar("container_size", 0);
97  auto mon_container_size_by_mu = Monitored::Scalar("container_size_by_mu", 0.);
98 
99  mon_container_size = cluster_collection_ptr->size();
100 
101  for (const xAOD::CaloCluster * cl : *cluster_collection_ptr)
102  {
103  const CaloClusterCellLink * num_cell_links = cl->getCellLinks();
104  if (!num_cell_links)
105  {
106  size_vec.push_back(0);
107  }
108  else
109  {
110  size_vec.push_back(num_cell_links->size());
111  }
112  clus_phi.push_back(cl->phi());
113  clus_eta.push_back(cl->eta());
114  clus_n_bad_cells.push_back(cl->getMomentValue(xAOD::CaloCluster::N_BAD_CELLS));
115  clus_eng_frac_max.push_back(cl->getMomentValue(xAOD::CaloCluster::ENG_FRAC_MAX));
116  }
117 
118  float read_mu = 0;
119 
121  if (eventInfoDecor.isPresent())
122  {
123  read_mu = eventInfoDecor(0);
124  monmu = read_mu;
125  }
126  else
127  {
128  ATH_MSG_WARNING("EventInfo decoration not present: " << m_avgMuKey.key());
129  }
130 
131  int count_1thrsigma = 0, count_2thrsigma = 0;
132 
133  if (really_monitor_cells)
134  {
135  SG::ReadHandle<CaloCellContainer> cell_collection(m_cellsKey, ctx);
136  if ( !cell_collection.isValid() )
137  {
138  ATH_MSG_ERROR( " Cannot retrieve CaloCellContainer: " << cell_collection.name() );
139  return StatusCode::FAILURE;
140  }
141 
143  const CaloNoise * noisep = *noiseHdl;
144  for (const auto cell : *cell_collection)
145  {
146  const CaloDetDescrElement * cdde = cell->caloDDE();
147 
148  const bool is_tile = cdde->is_tile();
149 
150  if (m_excludeTile && is_tile)
151  {
152  continue;
153  }
154 
155  const float cell_energy = cell->energy();
156 
157  if (cell_energy < 0)
158  {
159  continue;
160  }
161 
162  const float thr = ( is_tile && m_useTwoGaussianNoise ?
163  noisep->getEffectiveSigma(cdde->identifyHash(), cell->gain(), cell_energy) :
164  noisep->getNoise(cdde->identifyHash(), cell->gain())
165  );
166 
167  if (cell_energy > m_monitoring1thr * thr)
168  {
169  count_1thrsigma += 1;
170  if (cell_energy > m_monitoring2thr * thr)
171  {
172  count_2thrsigma += 1;
173  }
174  }
175  }
176  }
177 
178 
179  if (really_monitor_cells)
180  {
181 
182  auto moncount_1thrsigma = Monitored::Scalar("count_1thrsigma", -999.0);
183  auto moncount_2thrsigma = Monitored::Scalar("count_2thrsigma", -999.0);
184  auto moncount_1thrsigma_by_mu2 = Monitored::Scalar("count_1thrsigma_by_mu2", -999.0);
185  auto moncount_2thrsigma_by_mu2 = Monitored::Scalar("count_2thrsigma_by_mu2", -999.0);
186 
187 
188  if (read_mu > 5)
189  {
190  const float rev_mu = 1.f / read_mu;
191  mon_container_size_by_mu = rev_mu * cluster_collection_ptr->size();
192  const float sqr_rev_mu = rev_mu * rev_mu;
193  moncount_1thrsigma_by_mu2 = sqr_rev_mu * count_1thrsigma;
194  moncount_2thrsigma_by_mu2 = sqr_rev_mu * count_2thrsigma;
195  }
196 
197  moncount_1thrsigma = count_1thrsigma;
198  moncount_2thrsigma = count_2thrsigma;
199 
200  auto monitorIt = Monitored::Group( m_moniTool, mon_container_size, mon_clusEt, mon_clusPhi, mon_clusEta,
201  mon_clusSignalState, mon_clusSize, mon_badCells, mon_engFrac, mon_size,
202  monmu, mon_container_size_by_mu, moncount_1thrsigma, moncount_2thrsigma,
203  moncount_1thrsigma_by_mu2, moncount_2thrsigma_by_mu2 );
204  }
205  else
206  {
207  if (read_mu > 5)
208  {
209  mon_container_size_by_mu = cluster_collection_ptr->size() / read_mu;
210  }
211  auto monitorIt = Monitored::Group( m_moniTool, mon_container_size, mon_clusEt, mon_clusPhi, mon_clusEta,
212  mon_clusSignalState, mon_clusSize, mon_badCells, mon_engFrac, mon_size,
213  monmu, mon_container_size_by_mu);
214  }
215 
216  return StatusCode::SUCCESS;
217 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ initialize()

StatusCode TrigCaloClusterMonitor::initialize ( )
overridevirtual

Definition at line 38 of file TrigCaloClusterMonitor.cxx.

39 {
40  if (!m_moniTool.empty()) {
41  ATH_CHECK(m_moniTool.retrieve());
42  }
44 
45  ATH_CHECK(m_avgMuKey.initialize());
46 
49 
50  return StatusCode::SUCCESS;
51 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ isClonable()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

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()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_avgMuKey

SG::ReadDecorHandleKey<xAOD::EventInfo> TrigCaloClusterMonitor::m_avgMuKey { this, "averageInteractionsPerCrossingKey", "EventInfo.averageInteractionsPerCrossing", "Decoration for Average Interaction Per Crossing" }
private

Event input: To get <mu> from Event Info.

Definition at line 73 of file TrigCaloClusterMonitor.h.

◆ m_cellsKey

SG::ReadHandleKey<CaloCellContainer> TrigCaloClusterMonitor::m_cellsKey {this, "CellsName", "", "Name(s) of Cell Containers"}
private

vector of names of the cell containers to use as input.

Definition at line 78 of file TrigCaloClusterMonitor.h.

◆ m_clustersKey

SG::ReadHandleKey<xAOD::CaloClusterContainer> TrigCaloClusterMonitor::m_clustersKey
private
Initial value:
{this, "ClustersName", "",
"The name of the key in StoreGate for the CaloClusterContainer we want to monitor."}

The name of the key in StoreGate for the CaloClusterContainer we want to monitor.

Definition at line 81 of file TrigCaloClusterMonitor.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_excludeTile

Gaudi::Property<bool> TrigCaloClusterMonitor::m_excludeTile {this, "ExcludeTileCells", true, "Whether to exclude TileCal cells from monitoring."}
private

Definition at line 54 of file TrigCaloClusterMonitor.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_moniTool

ToolHandle<GenericMonitoringTool> TrigCaloClusterMonitor::m_moniTool { this, "MonitoringTool", "", "Monitoring tool" }
private

Monitoring tool.

Definition at line 70 of file TrigCaloClusterMonitor.h.

◆ m_monitorCells

Gaudi::Property<bool> TrigCaloClusterMonitor::m_monitorCells {this, "MonitorCells", false, "Whether to monitor cells too."}
private

Definition at line 52 of file TrigCaloClusterMonitor.h.

◆ m_monitorCellsInterval

Gaudi::Property<unsigned int> TrigCaloClusterMonitor::m_monitorCellsInterval { this, "MonitoringCellInterval", 20, "Additional interval in which to monitor the cells, since this is a costlier monitoring." }
private

Definition at line 64 of file TrigCaloClusterMonitor.h.

◆ m_monitoring1thr

Gaudi::Property<float> TrigCaloClusterMonitor::m_monitoring1thr { this, "Thr1", 2, "First Threshold to pass for cell monitoring" }
private

Definition at line 58 of file TrigCaloClusterMonitor.h.

◆ m_monitoring2thr

Gaudi::Property<float> TrigCaloClusterMonitor::m_monitoring2thr { this, "Thr2", 4, "Second Threshold to pass for cell monitoring" }
private

Definition at line 59 of file TrigCaloClusterMonitor.h.

◆ m_monitorInterval

Gaudi::Property<unsigned int> TrigCaloClusterMonitor::m_monitorInterval { this, "MonitoringInterval", 1, "Monitor just one every MonitoringInterval events, in case statistics are high enough." }
private

Definition at line 62 of file TrigCaloClusterMonitor.h.

◆ m_noiseCDOKey

SG::ReadCondHandleKey<CaloNoise> TrigCaloClusterMonitor::m_noiseCDOKey {this, "CaloNoiseKey", "totalNoise", "SG Key of CaloNoise data object"}
private

Definition at line 66 of file TrigCaloClusterMonitor.h.

◆ m_useTwoGaussianNoise

Gaudi::Property<bool> TrigCaloClusterMonitor::m_useTwoGaussianNoise {this, "TwoGaussianNoise", false, "Use 2-gaussian noise description for TileCal."}
private

Definition at line 55 of file TrigCaloClusterMonitor.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
TrigCaloClusterMonitor::m_monitoring1thr
Gaudi::Property< float > m_monitoring1thr
Definition: TrigCaloClusterMonitor.h:58
CaloNoise::getEffectiveSigma
float getEffectiveSigma(const Identifier id, const int gain, const float energy) const
Definition: CaloNoise.h:55
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TrigCaloClusterMonitor::m_cellsKey
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
vector of names of the cell containers to use as input.
Definition: TrigCaloClusterMonitor.h:78
AthCommonDataStore::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::CaloCluster_v1::et
double et() const
Definition: CaloCluster_v1.h:859
xAOD::CaloCluster_v1::signalState
State signalState() const
Get the current signal state.
Definition: CaloCluster_v1.h:636
TrigCaloClusterMonitor::m_noiseCDOKey
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Definition: TrigCaloClusterMonitor.h:66
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
TrigCaloClusterMonitor::m_monitorInterval
Gaudi::Property< unsigned int > m_monitorInterval
Definition: TrigCaloClusterMonitor.h:62
xAOD::CaloCluster_v1::ENG_FRAC_MAX
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
Definition: CaloCluster_v1.h:143
CaloNoise::getNoise
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
Definition: CaloNoise.h:34
TrigCaloClusterMonitor::m_monitorCellsInterval
Gaudi::Property< unsigned int > m_monitorCellsInterval
Definition: TrigCaloClusterMonitor.h:64
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAOD::CaloCluster_v1::clusterSize
ClusterSize clusterSize() const
Get cluster size.
Definition: CaloCluster_v1.cxx:364
TrigCaloClusterMonitor::m_avgMuKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_avgMuKey
Event input: To get <mu> from Event Info.
Definition: TrigCaloClusterMonitor.h:73
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
TrigCaloClusterMonitor::m_useTwoGaussianNoise
Gaudi::Property< bool > m_useTwoGaussianNoise
Definition: TrigCaloClusterMonitor.h:55
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
TrigCaloClusterMonitor::m_monitoring2thr
Gaudi::Property< float > m_monitoring2thr
Definition: TrigCaloClusterMonitor.h:59
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TrigCaloClusterMonitor::m_moniTool
ToolHandle< GenericMonitoringTool > m_moniTool
Monitoring tool.
Definition: TrigCaloClusterMonitor.h:70
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CaloDetDescrElement::is_tile
bool is_tile() const
cell belongs to Tile
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:442
CaloNoise
Definition: CaloNoise.h:16
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
CaloDetDescrElement::identifyHash
IdentifierHash identifyHash() const override final
cell subcalo hash same as subcalo_hash(), but kept for backward compatibility
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:424
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TrigCaloClusterMonitor::m_clustersKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clustersKey
The name of the key in StoreGate for the CaloClusterContainer we want to monitor.
Definition: TrigCaloClusterMonitor.h:81
TrigCaloClusterMonitor::m_monitorCells
Gaudi::Property< bool > m_monitorCells
Definition: TrigCaloClusterMonitor.h:52
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
TrigCaloClusterMonitor::m_excludeTile
Gaudi::Property< bool > m_excludeTile
Definition: TrigCaloClusterMonitor.h:54
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::CaloCluster_v1::N_BAD_CELLS
@ N_BAD_CELLS
number of bad cells
Definition: CaloCluster_v1.h:152
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >