ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
dqm_algorithms::GatherData Class Reference

#include <GatherData.h>

Inheritance diagram for dqm_algorithms::GatherData:
Collaboration diagram for dqm_algorithms::GatherData:

Public Member Functions

 GatherData ()
 
virtual ~GatherData ()
 
virtual dqm_core::Algorithm * clone ()
 
virtual dqm_core::Resultexecute (const std::string &name, const TObject &data, const dqm_core::AlgorithmConfig &config)
 
virtual void printDescription (std::ostream &out)
 

Protected Attributes

std::string m_name
 

Detailed Description

Definition at line 16 of file GatherData.h.

Constructor & Destructor Documentation

◆ GatherData()

dqm_algorithms::GatherData::GatherData ( )

Definition at line 33 of file GatherData.cxx.

35  : m_name("GatherData")
36 {
37  dqm_core::AlgorithmManager::instance().registerAlgorithm( m_name, this );
38 }

◆ ~GatherData()

dqm_algorithms::GatherData::~GatherData ( )
virtual

Definition at line 41 of file GatherData.cxx.

43 {
44 }

Member Function Documentation

◆ clone()

dqm_core::Algorithm * dqm_algorithms::GatherData::clone ( )
virtual

Definition at line 48 of file GatherData.cxx.

50 {
51  return new GatherData(*this);
52 }

◆ execute()

dqm_core::Result * dqm_algorithms::GatherData::execute ( const std::string &  name,
const TObject &  data,
const dqm_core::AlgorithmConfig &  config 
)
virtual

Definition at line 56 of file GatherData.cxx.

58 {
60 
61  // Cast to the type of TObject to assess
62  const TH1* h = dynamic_cast<const TH1*>( &data );
63  const TGraph* g = dynamic_cast<const TGraph*>( &data );
64  const TEfficiency* e = dynamic_cast<const TEfficiency*>( &data );
65  if( h == 0 && g == 0 && e==0 ) {
66  throw dqm_core::BadConfig( ERS_HERE, name, "Cannot cast data to type TH1, TGraph, or TEfficiency" );
67  }
68 
69  std::map<std::string,double> tags;
70  if( h != 0 ) {
71  tags["Mean"] = h->GetMean();
72  tags["MeanError"] = h->GetMeanError();
73  tags["RMS"] = h->GetRMS();
74  tags["RMSError"] = h->GetRMSError();
75  }
76 
77  if( g != 0 ) {
78  tags["XMean"] = g->GetMean(1);
79  tags["YMean"] = g->GetMean(2);
80  tags["XRMS"] = g->GetRMS(1);
81  tags["YRMS"] = g->GetRMS(2);
82  }
83 
84  if ( e != 0 ) {
85  tags["Mean"] = e->GetCopyPassedHisto()->GetMean();
86  tags["MeanError"] = e->GetCopyPassedHisto()->GetMeanError();
87  tags["RMS"] = e->GetCopyPassedHisto()->GetRMS();
88  tags["RMSError"] = e->GetCopyPassedHisto()->GetRMSError();
89  }
90 
92  result->tags_ = tags;
93 
94  return result;
95 }

◆ printDescription()

void dqm_algorithms::GatherData::printDescription ( std::ostream &  out)
virtual

Definition at line 99 of file GatherData.cxx.

101 {
102  std::string message;
103  message += "\n";
104  message += "Algorithm: \"" + m_name + "\"\n";
105  message += "Description: Extracts data (ex., mean, RMS) from an object without performing\n";
106  message += " any assessment; the status is always \"Undefined\"\n";
107  message += "Parameters: none\n";
108  message += "Limits: none\n";
109  message += "\n";
110 
111  out << message;
112 }

Member Data Documentation

◆ m_name

std::string dqm_algorithms::GatherData::m_name
protected

Definition at line 30 of file GatherData.h.


The documentation for this class was generated from the following files:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
Undefined
@ Undefined
Definition: MaterialTypes.h:8
get_generator_info.result
result
Definition: get_generator_info.py:21
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
dqm_algorithms::GatherData::m_name
std::string m_name
Definition: GatherData.h:30
ReweightUtils.message
message
Definition: ReweightUtils.py:15
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
tags
std::vector< std::string > tags
Definition: hcg.cxx:102
dqm_algorithms::GatherData::GatherData
GatherData()
Definition: GatherData.cxx:34
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
Result
ICscStripFitter::Result Result
Definition: CalibCscStripFitter.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
h
Athena::Status
Status
Athena specific StatusCode values.
Definition: AthStatusCode.h:22
TH1
Definition: rootspy.cxx:268
merge.status
status
Definition: merge.py:17