| The Gaudi Framework v32r1 (f65d50dc)

P2D.h
Go to the documentation of this file.
1 #ifndef GAUDICOMMONSVC_P2D_H
2 #define GAUDICOMMONSVC_P2D_H
3
4 #include "Generic2D.h"
5 #include <AIDA/IProfile1D.h>
6 #include <GaudiKernel/DataObject.h>
7 #include <TProfile2D.h>
8
9 namespace Gaudi {
10
17 class GAUDI_API Profile2D : public DataObject, public Generic2D<AIDA::IProfile2D, TProfile2D> {
18 public:
20 Profile2D() : Base( new TProfile2D() ) {
21 m_classType = "IProfile2D";
22 m_rep->SetErrorOption( "s" );
23 m_rep->SetDirectory( nullptr );
24 }
26 Profile2D( TProfile2D* rep );
27
29 bool fill( double x, double y, double z, double weight ) override {
30 // avoid race conditions when filling the profile
31 std::lock_guard<std::mutex> guard( m_fillSerialization );
32 m_rep->Fill( x, y, z, weight );
33 return true;
34 }
36 const CLID& clID() const override { return classID(); }
37 static const CLID& classID() { return CLID_ProfileH2; }
38
39 private:
40 std::mutex m_fillSerialization;
41 };
42 } // namespace Gaudi
43
44 #endif
Gaudi::Profile2D
AIDA implementation for 2 D profiles using ROOT TProfile2D.
Definition: P2D.h:17
std::mutex
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
Gaudi::Profile2D::m_fillSerialization
std::mutex m_fillSerialization
Definition: P2D.h:40
std::lock_guard
Generic2D.h
Gaudi::Profile2D::clID
const CLID & clID() const override
Retrieve reference to class defininition identifier.
Definition: P2D.h:36
Gaudi::Profile2D::classID
static const CLID & classID()
Definition: P2D.h:37
Gaudi::Profile2D::Profile2D
Profile2D()
Default Constructor.
Definition: P2D.h:20
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
Gaudi::Profile2D::fill
bool fill(double x, double y, double z, double weight) override
Fill bin content.
Definition: P2D.h:29
DataObject.h
Gaudi::Generic2D
Common AIDA implementation stuff for histograms and profiles using ROOT implementations.
Definition: Generic2D.h:35