4 #pragma warning(disable:2259) 10 #pragma warning(disable:4996) 16 #include "TProfile2D.h" 32 m_classType =
"IProfile2D";
33 m_rep->SetErrorOption(
"s");
34 m_rep->SetDirectory(
nullptr);
41 bool fill(
double x,
double y,
double z,
double weight)
override {
42 m_rep->Fill(x,y,z,weight);
46 const CLID&
clID()
const override {
return classID(); }
54 if (className ==
"AIDA::IProfile2D")
55 return const_cast<AIDA::IProfile2D*
>((AIDA::IProfile2D*)
this);
56 else if (className ==
"AIDA::IProfile")
57 return const_cast<AIDA::IProfile*
>((AIDA::IProfile*)
this);
58 else if (className ==
"AIDA::IBaseHistogram")
59 return const_cast<AIDA::IBaseHistogram*
>((AIDA::IBaseHistogram*)
this);
65 int rBin = m_rep->GetBin(rIndexX(idX),rIndexY(idY));
66 return int(m_rep->GetBinEntries(rBin)+0.5);
71 TProfile2D* imp =
dynamic_cast<TProfile2D*
>(rep);
74 m_xAxis.initialize(m_rep->GetXaxis(),
true);
75 m_yAxis.initialize(m_rep->GetYaxis(),
true);
76 setTitle(m_rep->GetTitle());
82 auto p =
new Profile2D(
new TProfile2D(title.
c_str(),title.
c_str(),eX.size()-1,&eX.front(), eY.size()-1,&eY.front()));
88 auto p =
new Profile2D(
new TProfile2D(title.
c_str(),title.
c_str(),binsX,xlow,xup,binsY,ylow,yup,zlow,zup));
93 auto h = getRepresentation<AIDA::IProfile2D,TProfile2D>(hist);
94 auto n = (
h ?
new Profile2D(
new TProfile2D(*
h)) : nullptr );
99 m_classType =
"IProfile2D";
100 rep->SetDirectory(
nullptr);
101 adoptRepresentation(rep);
AIDA implementation for 2 D profiles using ROOT TProfile2D.
std::vector< double > Edges
#define DECLARE_DATAOBJECT_FACTORY(x)
std::pair< DataObject *, AIDA::IProfile2D * > createProf2D(const AIDA::IProfile2D &hist)
Copy constructor.
void adoptRepresentation(TObject *rep) override
Adopt ROOT histogram representation.
int binEntries(int indexX, int indexY) const override
The number of entries (ie the number of times fill was called for this bin).
unsigned int CLID
Class ID definition.
void * cast(const std::string &className) const override
Introspection method.
const CLID & clID() const override
Retrieve reference to class defininition identifier.
static const CLID & classID()
Profile2D()
Default Constructor.
A DataObject is the base class of any identifiable object on any data store.
Helper functions to set/get the application return code.
bool fill(double x, double y, double z, double weight) override
Fill bin content.
Common AIDA implementation stuff for histograms and profiles using ROOT implementations.