ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
dqm_algorithms::BasicGraphCheck Struct Reference

#include <BasicGraphCheck.h>

Inheritance diagram for dqm_algorithms::BasicGraphCheck:
Collaboration diagram for dqm_algorithms::BasicGraphCheck:

Public Member Functions

 BasicGraphCheck (const std::string &name)
 
BasicGraphCheckclone ()
 
dqm_core::Resultexecute (const std::string &, const TObject &, const dqm_core::AlgorithmConfig &)
 
void printDescription (std::ostream &out)
 

Private Attributes

std::string m_name
 

Detailed Description

Definition at line 18 of file BasicGraphCheck.h.

Constructor & Destructor Documentation

◆ BasicGraphCheck()

dqm_algorithms::BasicGraphCheck::BasicGraphCheck ( const std::string &  name)

Definition at line 26 of file BasicGraphCheck.cxx.

27  : m_name( name )
28 {
29  dqm_core::AlgorithmManager::instance().registerAlgorithm(name, this);
30 }

Member Function Documentation

◆ clone()

dqm_algorithms::BasicGraphCheck * dqm_algorithms::BasicGraphCheck::clone ( )

Definition at line 33 of file BasicGraphCheck.cxx.

34 {
35 
36  return new BasicGraphCheck( m_name );
37 }

◆ execute()

dqm_core::Result * dqm_algorithms::BasicGraphCheck::execute ( const std::string &  name,
const TObject &  object,
const dqm_core::AlgorithmConfig &  config 
)

Definition at line 41 of file BasicGraphCheck.cxx.

44 {
45  const TGraph * graph;
46 
47  if( object.IsA()->InheritsFrom( "TGraph" ) ) {
48  graph = static_cast<const TGraph*>(&object);
49  } else {
50  throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TGraph" );
51  }
52 
53  double minstat = dqm_algorithms::tools::GetFirstFromMap( "MinStat", config.getParameters(), -1 );
54 
55  if (graph->GetN() < minstat ) {
57  result->tags_["InsufficientN"] = graph->GetN();
58  return result;
59  }
60 
61  if (m_name == "Graph_Not_Empty") {
62  if (graph->GetN() != 0) {
63  ERS_DEBUG(1, "Graph " <<graph->GetName()<<" is Not Empty");
65  }else {
66  ERS_DEBUG(1, "Graph " <<graph->GetName()<<" is Empty");
68  }
69  } else if (m_name == "Graph_Empty") {
70  if (graph->GetN() == 0) {
71  ERS_DEBUG(1, "Graph " <<graph->GetName()<<" is Empty");
73  }else {
74  ERS_DEBUG(1, "Graph " <<graph->GetName()<<" is Not Empty");
76  }
77  } else {
78  return new dqm_core::Result();
79  }
80 
81 
82 }

◆ printDescription()

void dqm_algorithms::BasicGraphCheck::printDescription ( std::ostream &  out)

Definition at line 85 of file BasicGraphCheck.cxx.

86 {
87  if ( m_name == "Graph_Not_Empty"){
88  out<<"Graph_Not_Empty: Checks that graph is not empty\n"<<std::endl;
89  } else if ( m_name == "Graph_Empty"){
90  out<<"Graph_Empty: Checks that graph is empty\n"<<std::endl;
91  }
92 
93  out<<"Optional Parameter: MinStat: Minimum graph statistics needed to perform Algorithm\n"<<std::endl;
94 }

Member Data Documentation

◆ m_name

std::string dqm_algorithms::BasicGraphCheck::m_name
private

Definition at line 29 of file BasicGraphCheck.h.


The documentation for this struct was generated from the following files:
dqm_algorithms::BasicGraphCheck::BasicGraphCheck
BasicGraphCheck(const std::string &name)
Definition: BasicGraphCheck.cxx:26
Undefined
@ Undefined
Definition: MaterialTypes.h:8
get_generator_info.result
result
Definition: get_generator_info.py:21
IsA
#define IsA
Declare the TObject style functions.
Definition: xAODTEventBranch.h:59
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
Result
ICscStripFitter::Result Result
Definition: CalibCscStripFitter.cxx:13
python.handimod.Green
int Green
Definition: handimod.py:524
dqm_algorithms::BasicGraphCheck::m_name
std::string m_name
Definition: BasicGraphCheck.h:29
python.handimod.Red
Red
Definition: handimod.py:551
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
pickleTool.object
object
Definition: pickleTool.py:30
dqm_algorithms::tools::GetFirstFromMap
double GetFirstFromMap(const std::string &paramName, const std::map< std::string, double > &params)
Definition: AlgorithmHelper.cxx:339