ATLAS Offline Software
Public Member Functions | List of all members
dqm_algorithms::BlackBin1D Struct Reference

#include <BlackBin1D.h>

Inheritance diagram for dqm_algorithms::BlackBin1D:
Collaboration diagram for dqm_algorithms::BlackBin1D:

Public Member Functions

 BlackBin1D ()
 
BlackBin1Dclone ()
 
dqm_core::Resultexecute (const std::string &, const TObject &, const dqm_core::AlgorithmConfig &)
 
void printDescription (std::ostream &out)
 

Detailed Description

Definition at line 18 of file BlackBin1D.h.

Constructor & Destructor Documentation

◆ BlackBin1D()

dqm_algorithms::BlackBin1D::BlackBin1D ( )

Definition at line 23 of file BlackBin1D.cxx.

25 {
26  dqm_core::AlgorithmManager::instance().registerAlgorithm("BlackBin1D", this);
27 }

Member Function Documentation

◆ clone()

dqm_algorithms::BlackBin1D * dqm_algorithms::BlackBin1D::clone ( )

Definition at line 30 of file BlackBin1D.cxx.

31 {
32 
33  return new BlackBin1D();
34 }

◆ execute()

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

Definition at line 38 of file BlackBin1D.cxx.

41 {
42  const TH1 * histogram;
43 
44  if( object.IsA()->InheritsFrom( "TH1" ) ) {
45  histogram = static_cast<const TH1*>(&object);
46  if (histogram->GetDimension() > 2 ){
47  throw dqm_core::BadConfig( ERS_HERE, name, "dimension > 2 " );
48  }
49  } else {
50  throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TH1" );
51  }
52 
53  //Unused so commented out:
54  //double bin_threshold;
55  //double gthreshold;
56  //double rthreshold;
57  int xbin;
58 
59  try {
60  xbin = (int)dqm_algorithms::tools::GetFirstFromMap( "XBin", config.getParameters());
61 
62  }
63  catch ( dqm_core::Exception & ex ) {
64  //out << "Some of the parameters are missing!" << std::endl;
65  throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex );
66  }
67 
68  //Get the bin content of the histogram
69  double binContents= histogram -> GetBinContent(xbin);
70 
72  result->tags_["BinContent"] = binContents;
73  if(binContents>0){
74  result->status_ = dqm_core::Result::Disabled;
75  }
76  else {
78  }
79 
80  return result;
81 }

◆ printDescription()

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

Definition at line 84 of file BlackBin1D.cxx.

85 {
86 
87  out<<"Black bin 1D: Returns status -1 (black) if bin has no contents\n" << std::endl;
88 
89  out<<"Mandatory parameter: XBin: The label of the X bin that you would like to check\n"<<std::endl;
90 
91 
92 }

The documentation for this struct was generated from the following files:
get_generator_info.result
result
Definition: get_generator_info.py:21
IsA
#define IsA
Declare the TObject style functions.
Definition: xAODTEventBranch.h:59
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
dqm_algorithms::BlackBin1D::BlackBin1D
BlackBin1D()
Definition: BlackBin1D.cxx:23
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TH1
Definition: rootspy.cxx:268
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
histogram
std::string histogram
Definition: chains.cxx:52