ATLAS Offline Software
Loading...
Searching...
No Matches
dqm_algorithms::GraphPrint Class Reference

#include <GraphPrint.h>

Inheritance diagram for dqm_algorithms::GraphPrint:
Collaboration diagram for dqm_algorithms::GraphPrint:

Public Member Functions

 GraphPrint ()
virtual GraphPrintclone ()
virtual dqm_core::Result * execute (const std::string &, const TObject &obj, const dqm_core::AlgorithmConfig &conf)
virtual ~GraphPrint ()
void printDescription (std::ostream &out)

Detailed Description

Definition at line 17 of file GraphPrint.h.

Constructor & Destructor Documentation

◆ GraphPrint()

dqm_algorithms::GraphPrint::GraphPrint ( )

Definition at line 21 of file GraphPrint.cxx.

21 {
22 dqm_core::AlgorithmManager::instance().registerAlgorithm("GraphPrint",this);
23}

◆ ~GraphPrint()

dqm_algorithms::GraphPrint::~GraphPrint ( )
virtual

Definition at line 25 of file GraphPrint.cxx.

25{}

Member Function Documentation

◆ clone()

dqm_algorithms::GraphPrint * dqm_algorithms::GraphPrint::clone ( )
virtual

Definition at line 27 of file GraphPrint.cxx.

27 {
28 return new GraphPrint();
29}

◆ execute()

dqm_core::Result * dqm_algorithms::GraphPrint::execute ( const std::string & name,
const TObject & obj,
const dqm_core::AlgorithmConfig & conf )
virtual

Definition at line 31 of file GraphPrint.cxx.

34{
35 const TGraph* graph;
36 if ( obj.IsA()->InheritsFrom("TGraph") )
37 {
38 ERS_DEBUG(2,"Got TGraph called: "<<obj.GetName()<<" of type:"<<obj.IsA()->GetName());
39 graph = static_cast<const TGraph*>(&obj);
40 }
41 else
42 {
43 throw dqm_core::BadConfig(ERS_HERE,name,"Object is not a TGraph ");
44 }
45 Int_t npoints = graph->GetN();
46
47 // Everything is now configured correctly, we can start
48 dqm_core::Result* result = new dqm_core::Result;
49 for ( Int_t bin = 0 ; bin < npoints ; ++bin) //Loop on all points
50 {
51 Double_t x = 0, y = 0;
52 graph->GetPoint(bin,x,y);
53 // Check point error bars
54 ERS_DEBUG(3,"Looking at point "<<bin<< " and I see x = " << x << " and y = " << y);
55 std::string binname = Form("Candidate %d in LB %.0f, Event", bin, x);
56 //std::string binname = Form("Candidate %d LB %d Event:", bin, int(x));
57 result->tags_[binname.c_str()] = y;
58 }
59
60 result->status_=dqm_core::Result::Green;
61 return result;
62}
#define y
#define x

◆ printDescription()

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

Definition at line 65 of file GraphPrint.cxx.

66{
67 out << " Just dump all the bin contents of a TGraph!" << std::endl;
68}

The documentation for this class was generated from the following files: