ATLAS Offline Software
PhysValCluster.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "PhysValCluster.h"
8 #include "GaudiKernel/EventContext.h"
9 
10 PhysValCluster::PhysValCluster (const std::string& type, const std::string& name, const IInterface* parent ) : ManagedMonitorToolBase( type, name, parent ) {
11 }
12 
17 }
18 
19 
21 
22  std::string theName = "TopoClusters/TopoClusters_JetETMiss/JetETMiss_"+m_clusterContainerName.key();
23 
25  m_clusterValidationPlots->setDetailLevel(100);
26  m_clusterValidationPlots->initialize();
27  std::vector<HistData> hists = m_clusterValidationPlots->retrieveBookedHistograms();
28 
29  for (auto hist : hists) {
30  ATH_CHECK(regHist(hist.first,hist.second,all));
31  }
32 
33  return StatusCode::SUCCESS;
34 
35 }
36 
38 
39  const EventContext& ctx = Gaudi::Hive::currentContext();
41  if(!evInfoHdl.isValid()){
42  ATH_MSG_ERROR("Do not have EventInfo with key " << m_eventInfoName.key());
43  return StatusCode::FAILURE;
44  }
45 
47 
48  if(clusHdl.isValid()){
49  for(auto cluster: *clusHdl) {
50  m_clusterValidationPlots->fill(*cluster,*evInfoHdl);
51  }
52  }
53  else ATH_MSG_WARNING(" Cluster container : " << m_clusterContainerName.key() << " not found");
54  return StatusCode::SUCCESS;
55 
56 }
57 
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:73
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
plotmaker.hist
hist
Definition: plotmaker.py:148
PhysValCluster::PhysValCluster
PhysValCluster(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
Definition: PhysValCluster.cxx:10
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
PhysValCluster::m_clusterValidationPlots
std::unique_ptr< ClusterValidationPlots > m_clusterValidationPlots
Pointer to class that defines which histogram blocks to fill.
Definition: PhysValCluster.h:36
PhysValCluster.h
ClusterValidationPlots
Definition: ClusterValidationPlots.h:17
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:617
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PhysValCluster::m_clusterContainerName
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerName
String that defines with Cluster container to use.
Definition: PhysValCluster.h:30
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
EventInfo.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PhysValCluster::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: PhysValCluster.cxx:20
ManagedMonitorToolBase::all
@ all
Definition: ManagedMonitorToolBase.h:115
CaloClusterContainer.h
PhysValCluster::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: PhysValCluster.cxx:37
ManagedMonitorToolBase::regHist
virtual StatusCode regHist(TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:1346
PhysValCluster::m_eventInfoName
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoName
Event info key.
Definition: PhysValCluster.h:32
PhysValCluster::initialize
virtual StatusCode initialize()
Standard AlgTool Functions.
Definition: PhysValCluster.cxx:13