The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
HistogramSvc.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11// ============================================================================
12#pragma once
13// ============================================================================
14// Include Files
15// ============================================================================
16// GaudiKernel
17// ============================================================================
18#include <GaudiKernel/DataSvc.h>
23#include <GaudiKernel/System.h>
24// ============================================================================
25// AIDA
26// ============================================================================
28#include <AIDA/IAnnotation.h>
29#include <AIDA/IHistogramFactory.h>
30// ============================================================================
31// local (+PI)
32// ============================================================================
33#include "Axis.h"
34#include "HistogramUtility.h"
35#include <TH1.h>
36#include <TH2.h>
37#include <TH3.h>
38// ============================================================================
39namespace AIDA {
40 class ICloud1D;
41 class ICloud2D;
42 class ICloud3D;
43} // namespace AIDA
44
45namespace detail {
46 template <class T>
47 static DataObject* cast( T* p ) {
48 DataObject* q = dynamic_cast<DataObject*>( p );
49 if ( !q && p ) { throw std::runtime_error( "HistogramSvc: Unexpected object type." ); }
50 return q;
51 }
52} // namespace detail
53
54// ============================================================================
60class HistogramSvc : public extends<DataSvc, IHistogramSvc>, virtual public AIDA::IHistogramFactory {
61
62private:
63 void not_implemented() const { error() << "Sorry, not yet implemented..." << endmsg; }
64
65protected:
66 typedef AIDA::IHistogram3D H3D;
67 typedef AIDA::IProfile2D P2D;
68 typedef AIDA::IBaseHistogram Base;
69
70 struct Helper {
72 Helper( HistogramSvc* p ) : m_svc( p ) {}
73 template <class A1, class A3>
74 StatusCode retrieve( A1 a1, A3*& a3 ) {
75 DataObject* pObject = nullptr;
76 StatusCode sc = m_svc->retrieveObject( a1, pObject );
77 a3 = dynamic_cast<A3*>( pObject );
78 return sc;
79 }
80 template <class A1, class A2, class A3>
81 StatusCode retrieve( A1 a1, A2 a2, A3*& a3 ) {
82 DataObject* pObject = nullptr;
83 StatusCode sc = m_svc->retrieveObject( a1, a2, pObject );
84 a3 = dynamic_cast<A3*>( pObject );
85 return sc;
86 }
87 template <class A1, class A3>
88 StatusCode find( A1 a1, A3*& a3 ) {
89 DataObject* pObject = nullptr;
90 StatusCode sc = m_svc->findObject( a1, pObject );
91 a3 = dynamic_cast<A3*>( pObject );
92 return sc;
93 }
94 template <class A1, class A2, class A3>
95 StatusCode find( A1 a1, A2 a2, A3*& a3 ) {
96 DataObject* pObject = nullptr;
97 StatusCode sc = m_svc->findObject( a1, a2, pObject );
98 a3 = dynamic_cast<A3*>( pObject );
99 return sc;
100 }
101 template <class R, class S, class T1, class T2>
102 static R* act( R* res, const S& b, void ( T1::*pmf )( const T2*, Double_t ), Double_t scale ) {
103 auto h1 = Gaudi::getRepresentation<R, T1>( *res );
104 const auto h2 = Gaudi::getRepresentation<R, T2>( b );
105 if ( h1 && h2 ) {
106 ( h1->*pmf )( h2, scale );
107 return res;
108 }
109 return nullptr;
110 }
111 template <class R, class S, class T1, class T2>
112 static R* act( R* res, const S& b, Bool_t ( T1::*pmf )( const T2*, Double_t ), Double_t scale ) {
113 auto h1 = Gaudi::getRepresentation<R, T1>( *res );
114 const auto h2 = Gaudi::getRepresentation<R, T2>( b );
115 if ( h1 && h2 ) {
116 ( h1->*pmf )( h2, scale );
117 return res;
118 }
119 return nullptr;
120 }
121 template <class R, class S, class T1, class T2>
122 static R* act( R* res, const S& b, void ( T1::*pmf )( const T2* ) ) {
123 auto h1 = Gaudi::getRepresentation<R, T1>( *res );
124 const auto h2 = Gaudi::getRepresentation<R, T2>( b );
125 if ( h1 && h2 ) {
126 ( h1->*pmf )( h2 );
127 return res;
128 }
129 return nullptr;
130 }
131 template <class R, class S, class T1, class T2>
132 static R* act( R* res, const S& b, Bool_t ( T1::*pmf )( const T2* ) ) {
133 auto h1 = Gaudi::getRepresentation<R, T1>( *res );
134 const auto h2 = Gaudi::getRepresentation<R, T2>( b );
135 if ( h1 && h2 ) {
136 ( h1->*pmf )( h2 );
137 return res;
138 }
139 return nullptr;
140 }
141 };
142
143public:
144 using Edges = std::vector<double>;
145 using DBaseEntries = std::vector<std::string>;
146
151 HistogramSvc( const std::string& name, ISvcLocator* svc );
152
154 ~HistogramSvc() override;
155
161 std::pair<std::string, std::string> i_splitPath( const std::string& full );
162
166 StatusCode connectInput( const std::string& ident );
167
168 template <class T>
169 inline T* i_book( DataObject* pPar, const std::string& rel, const std::string& title,
170 const std::pair<DataObject*, T*>& o ) {
171 if ( o.first && registerObject( pPar, rel, (Base*)o.second ).isSuccess() ) return o.second;
172 delete o.first;
173 throw GaudiException( "Cannot book " + System::typeinfoName( typeid( T ) ) + " " + title, "HistogramSvc",
175 }
176
178 AIDA::IHistogram2D* i_project( const std::string& nameAndTitle, const AIDA::IHistogram3D& h, const std::string& dir );
179
180public:
182 StatusCode initialize() override;
184 StatusCode reinitialize() override;
186 StatusCode finalize() override;
187
189 AIDA::IHistogramFactory* histogramFactory() override { return this; }
190
191 // ==========================================================================
192 // Book 1D histogram with fix binning
193 // ==========================================================================
210 AIDA::IHistogram1D* book( const std::string& par, const std::string& rel, const std::string& title, int nx,
211 double lowx, double upx ) override;
212
213 AIDA::IHistogram1D* book( const std::string& par, int hID, const std::string& title, int nx, double lowx,
214 double upx ) override;
215
216 AIDA::IHistogram1D* book( DataObject* pPar, int hID, const std::string& title, int nx, double lowx,
217 double upx ) override;
218
219 AIDA::IHistogram1D* book( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
220 double upx ) override;
221
222 virtual AIDA::IHistogram1D* book( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
223 double lowx, double upx );
224
225 AIDA::IHistogram1D* book( const std::string& full, const std::string& title, int nx, double lowx,
226 double upx ) override;
227
228 // ==========================================================================
229 // Book 1D Profile histogram with fix binning
230 // ==========================================================================
247 AIDA::IProfile1D* bookProf( const std::string& par, const std::string& rel, const std::string& title, int nx,
248 double lowx, double upx, const std::string& opt ) override;
249
250 AIDA::IProfile1D* bookProf( const std::string& par, int hID, const std::string& title, int nx, double lowx,
251 double upx, const std::string& opt ) override;
252
253 AIDA::IProfile1D* bookProf( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
254 const std::string& opt ) override;
255
256 virtual AIDA::IProfile1D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
257 double lowx, double upx, const std::string& opt );
258
259 AIDA::IProfile1D* bookProf( const std::string& full, const std::string& title, int nx, double lowx, double upx,
260 const std::string& opt ) override;
261
262 AIDA::IProfile1D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
263 double upx, const std::string& opt ) override;
264
265 AIDA::IProfile1D* bookProf( const std::string& par, const std::string& rel, const std::string& title, int nx,
266 double lowx, double upx, double upper, double lower, const std::string& opt ) override;
267
268 AIDA::IProfile1D* bookProf( const std::string& par, int hID, const std::string& title, int nx, double lowx,
269 double upx, double upper, double lower, const std::string& opt ) override;
270
271 AIDA::IProfile1D* bookProf( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
272 double upper, double lower, const std::string& opt ) override;
273
274 virtual AIDA::IProfile1D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
275 double lowx, double upx, double upper, double lower, const std::string& opt );
276
277 AIDA::IProfile1D* bookProf( const std::string& full, const std::string& title, int nx, double lowx, double upx,
278 double upper, double lower, const std::string& opt ) override;
279
280 AIDA::IProfile1D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
281 double upx, double upper, double lower, const std::string& opt ) override;
282
283 // ==========================================================================
284 // Book 1D histogram with variable binning
285 // ==========================================================================
300 AIDA::IHistogram1D* book( const std::string& par, int hID, const std::string& title, Edges e ) override;
301
302 AIDA::IHistogram1D* book( DataObject* pPar, int hID, const std::string& title, Edges e ) override;
303
304 AIDA::IHistogram1D* book( const std::string& par, const std::string& rel, const std::string& title,
305 Edges e ) override;
306
307 virtual AIDA::IHistogram1D* book( const std::pair<std::string, std::string>& loc, const std::string& title, Edges e );
308
309 AIDA::IHistogram1D* book( const std::string& full, const std::string& title, Edges e ) override;
310
311 AIDA::IHistogram1D* book( DataObject* pPar, const std::string& rel, const std::string& title, Edges e ) override;
312
313 // ==========================================================================
314 // Book 1D profile histogram with variable binning
315 // ==========================================================================
330 AIDA::IProfile1D* bookProf( const std::string& full, const std::string& title, Edges e ) override;
331
332 AIDA::IProfile1D* bookProf( const std::string& par, const std::string& rel, const std::string& title,
333 Edges e ) override;
334
335 AIDA::IProfile1D* bookProf( const std::string& par, int hID, const std::string& title, Edges e ) override;
336
337 AIDA::IProfile1D* bookProf( DataObject* pPar, int hID, const std::string& title, Edges e ) override;
338
339 virtual AIDA::IProfile1D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title,
340 Edges e );
341
342 AIDA::IProfile1D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, Edges e ) override;
343
344 virtual AIDA::IProfile1D* bookProf( const std::string& full, const std::string& title, Edges e, double upper,
345 double lower );
346
347 virtual AIDA::IProfile1D* bookProf( const std::string& par, const std::string& rel, const std::string& title, Edges e,
348 double upper, double lower );
349
350 virtual AIDA::IProfile1D* bookProf( const std::string& par, int hID, const std::string& title, Edges e, double upper,
351 double lower );
352
353 virtual AIDA::IProfile1D* bookProf( DataObject* pPar, int hID, const std::string& title, Edges e, double upper,
354 double lower );
355
356 virtual AIDA::IProfile1D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, Edges e,
357 double upper, double lower );
358
359 virtual AIDA::IProfile1D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, Edges e,
360 double upper, double lower );
361
362 // ==========================================================================
363 // Book 2D histogram with fixed binning
364 // ==========================================================================
384 AIDA::IHistogram2D* book( const std::string& full, const std::string& title, int nx, double lowx, double upx, int ny,
385 double lowy, double upy ) override;
386
387 AIDA::IHistogram2D* book( const std::string& par, const std::string& rel, const std::string& title, int nx,
388 double lowx, double upx, int ny, double lowy, double upy ) override;
389
390 AIDA::IHistogram2D* book( const std::string& par, int hID, const std::string& title, int nx, double lowx, double upx,
391 int ny, double lowy, double upy ) override;
392
393 virtual AIDA::IHistogram2D* book( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
394 double lowx, double upx, int ny, double lowy, double upy );
395
396 AIDA::IHistogram2D* book( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
397 int ny, double lowy, double upy ) override;
398
399 AIDA::IHistogram2D* book( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
400 double upx, int ny, double lowy, double upy ) override;
401
402 // ==========================================================================
403 // Book 2D profile histogram with fixed binning
404 // ==========================================================================
424 virtual AIDA::IProfile2D* bookProf( const std::string& full, const std::string& title, int nx, double lowx,
425 double upx, int ny, double lowy, double upy, double upper, double lower );
426
427 virtual AIDA::IProfile2D* bookProf( const std::string& par, const std::string& rel, const std::string& title, int nx,
428 double lowx, double upx, int ny, double lowy, double upy, double upper,
429 double lower );
430
431 virtual AIDA::IProfile2D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
432 double lowx, double upx, int ny, double lowy, double upy, double upper,
433 double lower );
434
435 virtual AIDA::IProfile2D* bookProf( const std::string& par, int hID, const std::string& title, int nx, double lowx,
436 double upx, int ny, double lowy, double upy, double upper, double lower );
437
438 virtual AIDA::IProfile2D* bookProf( DataObject* pPar, int hID, const std::string& title, int nx, double lowx,
439 double upx, int ny, double lowy, double upy, double upper, double lower );
440
441 virtual AIDA::IProfile2D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, int nx,
442 double lowx, double upx, int ny, double lowy, double upy, double upper,
443 double lower );
444
445 AIDA::IProfile2D* bookProf( const std::string& full, const std::string& title, int nx, double lowx, double upx,
446 int ny, double lowy, double upy ) override;
447
448 AIDA::IProfile2D* bookProf( const std::string& par, const std::string& rel, const std::string& title, int nx,
449 double lowx, double upx, int ny, double lowy, double upy ) override;
450
451 virtual AIDA::IProfile2D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
452 double lowx, double upx, int ny, double lowy, double upy );
453
454 AIDA::IProfile2D* bookProf( const std::string& par, int hID, const std::string& title, int nx, double lowx,
455 double upx, int ny, double lowy, double upy ) override;
456
457 AIDA::IProfile2D* bookProf( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
458 int ny, double lowy, double upy ) override;
459
460 AIDA::IProfile2D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
461 double upx, int ny, double lowy, double upy ) override;
462
463 // ==========================================================================
464 // Book 2D histogram with variable binning
465 // ==========================================================================
480 AIDA::IHistogram2D* book( const std::string& full, const std::string& title, Edges x, Edges y ) override;
481
482 AIDA::IHistogram2D* book( const std::string& par, const std::string& rel, const std::string& title, Edges x,
483 Edges y ) override;
484
485 AIDA::IHistogram2D* book( const std::string& par, int hID, const std::string& title, Edges x, Edges y ) override;
486
487 virtual AIDA::IHistogram2D* book( const std::pair<std::string, std::string>& loc, const std::string& title, Edges x,
488 Edges y );
489
490 AIDA::IHistogram2D* book( DataObject* pPar, int hID, const std::string& title, Edges x, Edges y ) override;
491
492 AIDA::IHistogram2D* book( DataObject* pPar, const std::string& rel, const std::string& title, Edges x,
493 Edges y ) override;
494
495 // ==========================================================================
496 // Book 2D profile histogram with variable binning
497 // ==========================================================================
512 AIDA::IProfile2D* bookProf( const std::string& full, const std::string& title, Edges x, Edges y ) override;
513
514 AIDA::IProfile2D* bookProf( const std::string& par, const std::string& rel, const std::string& title, Edges x,
515 Edges y ) override;
516
517 AIDA::IProfile2D* bookProf( const std::string& par, int hID, const std::string& title, Edges x, Edges y ) override;
518
519 AIDA::IProfile2D* bookProf( DataObject* pPar, int hID, const std::string& title, Edges x, Edges y ) override;
520
521 virtual AIDA::IProfile2D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, Edges x,
522 Edges y );
523
524 AIDA::IProfile2D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, Edges x,
525 Edges y ) override;
526
527 virtual AIDA::IProfile2D* bookProf( const std::string& full, const std::string& title, Edges x, Edges y, double upper,
528 double lower );
529
530 virtual AIDA::IProfile2D* bookProf( const std::string& par, const std::string& rel, const std::string& title, Edges x,
531 Edges y, double upper, double lower );
532
533 virtual AIDA::IProfile2D* bookProf( const std::string& par, int hID, const std::string& title, Edges x, Edges y,
534 double upper, double lower );
535
536 virtual AIDA::IProfile2D* bookProf( DataObject* pPar, int hID, const std::string& title, Edges x, Edges y,
537 double upper, double lower );
538
539 virtual AIDA::IProfile2D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, Edges x,
540 Edges y, double upper, double lower );
541
542 virtual AIDA::IProfile2D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, Edges x,
543 Edges y, double upper, double lower );
544
545 // ==========================================================================
546 // Book 3D histogram with fixed binning
547 // ==========================================================================
564 AIDA::IHistogram3D* book( const std::string& full, const std::string& title, int nx, double lowx, double upx, int ny,
565 double lowy, double upy, int nz, double lowz, double upz ) override;
566
567 AIDA::IHistogram3D* book( const std::string& par, const std::string& rel, const std::string& title, int nx,
568 double lowx, double upx, int ny, double lowy, double upy, int nz, double lowz,
569 double upz ) override;
570
571 AIDA::IHistogram3D* book( const std::string& par, int hID, const std::string& title, int nx, double lowx, double upx,
572 int ny, double lowy, double upy, int nz, double lowz, double upz ) override;
573
574 AIDA::IHistogram3D* book( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
575 int ny, double lowy, double upy, int nz, double lowz, double upz ) override;
576
577 virtual AIDA::IHistogram3D* book( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
578 double lowx, double upx, int ny, double lowy, double upy, int nz, double lowz,
579 double upz );
580
581 AIDA::IHistogram3D* book( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
582 double upx, int ny, double lowy, double upy, int nz, double lowz, double upz ) override;
583
584 // ==========================================================================
585 // Book 3D histogram with variable binning
586 // ==========================================================================
603 AIDA::IHistogram3D* book( const std::string& full, const std::string& title, Edges x, Edges y, Edges z ) override;
604
605 AIDA::IHistogram3D* book( const std::string& par, const std::string& rel, const std::string& title, Edges x, Edges y,
606 Edges z ) override;
607
608 AIDA::IHistogram3D* book( const std::string& par, int hID, const std::string& title, Edges x, Edges y,
609 Edges z ) override;
610
611 AIDA::IHistogram3D* book( DataObject* pPar, int hID, const std::string& title, Edges x, Edges y, Edges z ) override;
612
613 virtual AIDA::IHistogram3D* book( const std::pair<std::string, std::string>& loc, const std::string& title, Edges x,
614 Edges y, Edges z );
615
616 AIDA::IHistogram3D* book( DataObject* pPar, const std::string& rel, const std::string& title, Edges x, Edges y,
617 Edges z ) override;
618
619 // ==========================================================================
620 // Register histogram with the data store
621 // ==========================================================================
623 StatusCode registerObject( const std::string& parent, const std::string& rel, Base* obj ) override;
624
625 StatusCode registerObject( Base* pPar, const std::string& rel, Base* obj ) override;
626
627 StatusCode registerObject( const std::string& full, Base* obj ) override;
628
629 StatusCode registerObject( DataObject* pPar, const std::string& rel, Base* obj ) override;
630
631 // ==========================================================================
632 // Unregister histogram from the data store
633 // ==========================================================================
634 StatusCode unregisterObject( Base* obj ) override;
635
636 StatusCode unregisterObject( Base* obj, const std::string& objectPath ) override;
637
638 StatusCode unregisterObject( Base* obj, int item ) override;
639
640 // ==========================================================================
641 // Retrieve histogram from data store
642 // ==========================================================================
643 StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram1D*& obj ) override;
644
645 StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IProfile1D*& obj ) override;
646
647 StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram2D*& obj ) override;
648
649 StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IProfile2D*& obj ) override;
650
651 StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram3D*& obj ) override;
652
653 StatusCode retrieveObject( const std::string& full, AIDA::IProfile1D*& obj ) override;
654
655 StatusCode retrieveObject( const std::string& full, AIDA::IProfile2D*& obj ) override;
656
657 StatusCode retrieveObject( const std::string& full, AIDA::IHistogram1D*& obj ) override;
658
659 StatusCode retrieveObject( const std::string& full, AIDA::IHistogram2D*& obj ) override;
660
661 StatusCode retrieveObject( const std::string& full, AIDA::IHistogram3D*& obj ) override;
662
663 StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IProfile1D*& obj ) override;
664
665 StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IProfile2D*& obj ) override;
666
667 StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IHistogram1D*& obj ) override;
668
669 StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IHistogram2D*& obj ) override;
670
671 StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IHistogram3D*& obj ) override;
672
673 StatusCode retrieveObject( const std::string& parent, int item, AIDA::IProfile1D*& obj ) override;
674
675 StatusCode retrieveObject( const std::string& parent, int item, AIDA::IProfile2D*& obj ) override;
676
677 StatusCode retrieveObject( const std::string& parent, int item, AIDA::IHistogram1D*& obj ) override;
678
679 StatusCode retrieveObject( const std::string& parent, int item, AIDA::IHistogram2D*& obj ) override;
680
681 StatusCode retrieveObject( const std::string& parent, int item, AIDA::IHistogram3D*& obj ) override;
682
683 StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IProfile1D*& obj ) override;
684
685 StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IProfile2D*& obj ) override;
686
687 StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IHistogram1D*& obj ) override;
688
689 StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IHistogram2D*& obj ) override;
690
691 StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IHistogram3D*& obj ) override;
692
693 StatusCode retrieveObject( DataObject* par, int item, AIDA::IProfile1D*& obj ) override;
694
695 StatusCode retrieveObject( DataObject* par, int item, AIDA::IProfile2D*& obj ) override;
696
697 StatusCode retrieveObject( DataObject* par, int item, AIDA::IHistogram1D*& obj ) override;
698
699 StatusCode retrieveObject( DataObject* par, int item, AIDA::IHistogram2D*& obj ) override;
700
701 StatusCode retrieveObject( DataObject* par, int item, AIDA::IHistogram3D*& obj ) override;
702
703 StatusCode retrieveObject( Base* par, int item, AIDA::IProfile1D*& obj ) override;
704
705 StatusCode retrieveObject( Base* par, int item, AIDA::IProfile2D*& obj ) override;
706
707 StatusCode retrieveObject( Base* par, int item, AIDA::IHistogram1D*& obj ) override;
708
709 StatusCode retrieveObject( Base* par, int item, AIDA::IHistogram2D*& obj ) override;
710
711 StatusCode retrieveObject( Base* par, int item, AIDA::IHistogram3D*& obj ) override;
712
713 StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IProfile1D*& obj ) override;
714
715 StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IProfile2D*& obj ) override;
716
717 StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IHistogram1D*& obj ) override;
718
719 StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IHistogram2D*& obj ) override;
720
721 StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IHistogram3D*& obj ) override;
722
723 // ==========================================================================
724 // Find histogram identified by its full path in the data store
725 // ==========================================================================
726 StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IProfile1D*& obj ) override;
727
728 StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IProfile2D*& obj ) override;
729
730 StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram1D*& obj ) override;
731
732 StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram2D*& obj ) override;
733
734 StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram3D*& obj ) override;
735
736 StatusCode findObject( const std::string& full, AIDA::IProfile1D*& obj ) override;
737
738 StatusCode findObject( const std::string& full, AIDA::IProfile2D*& obj ) override;
739
740 StatusCode findObject( const std::string& full, AIDA::IHistogram1D*& obj ) override;
741
742 StatusCode findObject( const std::string& full, AIDA::IHistogram2D*& obj ) override;
743
744 StatusCode findObject( const std::string& full, AIDA::IHistogram3D*& obj ) override;
745
746 StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IProfile1D*& obj ) override;
747
748 StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IProfile2D*& obj ) override;
749
750 StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IHistogram1D*& obj ) override;
751
752 StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IHistogram2D*& obj ) override;
753
754 StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IHistogram3D*& obj ) override;
755
756 StatusCode findObject( const std::string& par, int item, AIDA::IProfile1D*& obj ) override;
757
758 StatusCode findObject( const std::string& par, int item, AIDA::IProfile2D*& obj ) override;
759
760 StatusCode findObject( const std::string& par, int item, AIDA::IHistogram1D*& obj ) override;
761
762 StatusCode findObject( const std::string& par, int item, AIDA::IHistogram2D*& obj ) override;
763
764 StatusCode findObject( const std::string& par, int item, AIDA::IHistogram3D*& obj ) override;
765
766 StatusCode findObject( DataObject* par, int item, AIDA::IProfile1D*& obj ) override;
767
768 StatusCode findObject( DataObject* par, int item, AIDA::IProfile2D*& obj ) override;
769
770 StatusCode findObject( DataObject* par, int item, AIDA::IHistogram1D*& obj ) override;
771
772 StatusCode findObject( DataObject* par, int item, AIDA::IHistogram2D*& obj ) override;
773
774 StatusCode findObject( DataObject* par, int item, AIDA::IHistogram3D*& obj ) override;
775
776 StatusCode findObject( DataObject* par, const std::string& item, AIDA::IProfile1D*& obj ) override;
777
778 StatusCode findObject( DataObject* par, const std::string& item, AIDA::IProfile2D*& obj ) override;
779
780 StatusCode findObject( DataObject* par, const std::string& item, AIDA::IHistogram1D*& obj ) override;
781
782 StatusCode findObject( DataObject* par, const std::string& item, AIDA::IHistogram2D*& obj ) override;
783
784 StatusCode findObject( DataObject* par, const std::string& item, AIDA::IHistogram3D*& obj ) override;
785
786 StatusCode findObject( Base* par, int item, AIDA::IProfile1D*& obj ) override;
787
788 StatusCode findObject( Base* par, int item, AIDA::IProfile2D*& obj ) override;
789
790 StatusCode findObject( Base* par, int item, AIDA::IHistogram1D*& obj ) override;
791
792 StatusCode findObject( Base* par, int item, AIDA::IHistogram2D*& obj ) override;
793
794 StatusCode findObject( Base* par, int item, AIDA::IHistogram3D*& obj ) override;
795
796 StatusCode findObject( Base* par, const std::string& item, AIDA::IProfile1D*& obj ) override;
797
798 StatusCode findObject( Base* par, const std::string& item, AIDA::IProfile2D*& obj ) override;
799
800 StatusCode findObject( Base* par, const std::string& item, AIDA::IHistogram1D*& obj ) override;
801
802 StatusCode findObject( Base* par, const std::string& item, AIDA::IHistogram2D*& obj ) override;
803
804 StatusCode findObject( Base* par, const std::string& item, AIDA::IHistogram3D*& obj ) override;
805
806 // ==========================================================================
807 // Projections and slices.
808 // ==========================================================================
809 AIDA::IHistogram1D* projectionX( const std::string& name, const AIDA::IHistogram2D& h ) override;
810
811 AIDA::IHistogram1D* projectionY( const std::string& name, const AIDA::IHistogram2D& h ) override;
812
813 AIDA::IHistogram1D* sliceX( const std::string& name, const AIDA::IHistogram2D& h, int indexY ) override;
814
815 AIDA::IHistogram1D* sliceY( const std::string& name, const AIDA::IHistogram2D& h, int indexX ) override;
816
817 AIDA::IHistogram1D* sliceX( const std::string& name, const AIDA::IHistogram2D& h, int indexY1, int indexY2 ) override;
818
819 AIDA::IHistogram1D* sliceY( const std::string& name, const AIDA::IHistogram2D& h, int indexX1, int indexX2 ) override;
820
821 bool destroy( IBaseHistogram* hist ) override;
822
823 AIDA::IHistogram1D* add( const std::string& nameAndTitle, const AIDA::IHistogram1D& a,
824 const AIDA::IHistogram1D& b ) override;
825
826 AIDA::IHistogram1D* subtract( const std::string& nameAndTitle, const AIDA::IHistogram1D& a,
827 const AIDA::IHistogram1D& b ) override;
828
829 AIDA::IHistogram1D* multiply( const std::string& nameAndTitle, const AIDA::IHistogram1D& a,
830 const AIDA::IHistogram1D& b ) override;
831
832 AIDA::IHistogram1D* divide( const std::string& nameAndTitle, const AIDA::IHistogram1D& a,
833 const AIDA::IHistogram1D& b ) override;
834
835 AIDA::IHistogram2D* add( const std::string& nameAndTitle, const AIDA::IHistogram2D& a,
836 const AIDA::IHistogram2D& b ) override;
837
838 AIDA::IHistogram2D* subtract( const std::string& nameAndTitle, const AIDA::IHistogram2D& a,
839 const AIDA::IHistogram2D& b ) override;
840
841 AIDA::IHistogram2D* multiply( const std::string& nameAndTitle, const AIDA::IHistogram2D& a,
842 const AIDA::IHistogram2D& b ) override;
843
844 AIDA::IHistogram2D* divide( const std::string& nameAndTitle, const AIDA::IHistogram2D& a,
845 const AIDA::IHistogram2D& b ) override;
846
847 AIDA::IHistogram3D* add( const std::string& nameAndTitle, const AIDA::IHistogram3D& a,
848 const AIDA::IHistogram3D& b ) override;
849
850 AIDA::IHistogram3D* subtract( const std::string& nameAndTitle, const AIDA::IHistogram3D& a,
851 const AIDA::IHistogram3D& b ) override;
852
853 AIDA::IHistogram3D* multiply( const std::string& nameAndTitle, const AIDA::IHistogram3D& a,
854 const AIDA::IHistogram3D& b ) override;
855
856 AIDA::IHistogram3D* divide( const std::string& nameAndTitle, const AIDA::IHistogram3D& a,
857 const AIDA::IHistogram3D& b ) override;
858
859 AIDA::IHistogram2D* projectionXY( const std::string& nameAndTitle, const AIDA::IHistogram3D& h ) override;
860
861 AIDA::IHistogram2D* projectionXZ( const std::string& nameAndTitle, const AIDA::IHistogram3D& h ) override;
862
863 AIDA::IHistogram2D* projectionYZ( const std::string& nameAndTitle, const AIDA::IHistogram3D& h ) override;
864
865 AIDA::IHistogram2D* sliceXY( const std::string& /* nameAndTitle */, const AIDA::IHistogram3D& /* h */, int /* low */,
866 int /* high */ ) override {
868 return nullptr;
869 }
870
871 AIDA::IHistogram2D* sliceXZ( const std::string& /* nameAndTitle */, const AIDA::IHistogram3D& /* h */, int /* low */,
872 int /* high */ ) override {
874 return nullptr;
875 }
876
877 AIDA::IHistogram2D* sliceYZ( const std::string& /* nameAndTitle */, const AIDA::IHistogram3D& /* h */, int /* low */,
878 int /* high */ ) override {
880 return nullptr;
881 }
882
883 AIDA::IHistogram1D* createHistogram1D( const std::string& name, const std::string& title, int nx, double lowx,
884 double upx );
885
886 AIDA::IHistogram1D* createHistogram1D( const std::string& name, const std::string& title, int nx, double lowx,
887 double upx, const std::string& /*opt*/ ) override;
888
889 AIDA::IHistogram1D* createHistogram1D( const std::string& name, const std::string& title, const Edges& x,
890 const std::string& /*opt*/ ) override;
891
892 AIDA::IHistogram1D* createHistogram1D( const std::string& nameAndTitle, int nx, double lowx, double upx ) override;
893
894 AIDA::IHistogram1D* createCopy( const std::string& full, const AIDA::IHistogram1D& h ) override;
895
896 AIDA::IHistogram1D* createCopy( const std::string& par, const std::string& rel, const AIDA::IHistogram1D& h );
897
898 AIDA::IHistogram1D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IHistogram1D& h );
899
900 AIDA::IHistogram1D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IHistogram1D& h );
901
902 AIDA::IHistogram2D* createHistogram2D( const std::string& name, const std::string& title, int nx, double lowx,
903 double upx, int ny, double lowy, double upy );
904
905 AIDA::IHistogram2D* createHistogram2D( const std::string& name, const std::string& title, int nx, double lowx,
906 double upx, int ny, double lowy, double upy,
907 const std::string& /*opt*/ ) override;
908
909 AIDA::IHistogram2D* createHistogram2D( const std::string& name, const std::string& title, const Edges& x,
910 const Edges& y, const std::string& /*opt*/ ) override;
911
912 AIDA::IHistogram2D* createHistogram2D( const std::string& nameAndTitle, int nx, double lowx, double upx, int ny,
913 double lowy, double upy ) override;
914
915 AIDA::IHistogram2D* createCopy( const std::string& full, const AIDA::IHistogram2D& h ) override;
916
917 AIDA::IHistogram2D* createCopy( const std::string& par, const std::string& rel, const AIDA::IHistogram2D& h );
918
919 AIDA::IHistogram2D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IHistogram2D& h );
920
921 AIDA::IHistogram2D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IHistogram2D& h );
922
923 AIDA::IHistogram3D* createHistogram3D( const std::string& name, const std::string& title, int nx, double lowx,
924 double upx, int ny, double lowy, double upy, int nz, double lowz, double upz );
925
926 AIDA::IHistogram3D* createHistogram3D( const std::string& name, const std::string& title, int nx, double lowx,
927 double upx, int ny, double lowy, double upy, int nz, double lowz, double upz,
928 const std::string& /*opt*/ ) override;
929
930 AIDA::IHistogram3D* createHistogram3D( const std::string& name, const std::string& title, const Edges& x,
931 const Edges& y, const Edges& z, const std::string& /*opt*/ ) override;
932
933 AIDA::IHistogram3D* createHistogram3D( const std::string& nameAndTitle, int nx, double lowx, double upx, int ny,
934 double lowy, double upy, int nz, double lowz, double upz ) override;
935
936 AIDA::IHistogram3D* createCopy( const std::string& full, const AIDA::IHistogram3D& h ) override;
937
938 AIDA::IHistogram3D* createCopy( const std::string& par, const std::string& rel, const AIDA::IHistogram3D& h );
939
940 AIDA::IHistogram3D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IHistogram3D& h );
941
942 AIDA::IHistogram3D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IHistogram3D& h );
943
944 AIDA::IProfile1D* createProfile1D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
945 const std::string& opt ) override;
946
947 AIDA::IProfile1D* createProfile1D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
948 double upper, double lower, const std::string& opt ) override;
949
950 AIDA::IProfile1D* createProfile1D( const std::string& name, const std::string& title, const Edges& x,
951 const std::string& /* opt */ ) override;
952
953 AIDA::IProfile1D* createProfile1D( const std::string& name, const std::string& title, const Edges& x, double upper,
954 double lower, const std::string& /* opt */ ) override;
955
956 AIDA::IProfile1D* createProfile1D( const std::string& nametit, int nx, double lowx, double upx ) override;
957
958 AIDA::IProfile1D* createProfile1D( const std::string& nametit, int nx, double lowx, double upx, double upper,
959 double lower ) override;
960
961 AIDA::IProfile1D* createCopy( const std::string& full, const AIDA::IProfile1D& h ) override;
962
963 AIDA::IProfile1D* createCopy( const std::string& par, const std::string& rel, const AIDA::IProfile1D& h );
964
965 AIDA::IProfile1D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IProfile1D& h );
966
967 AIDA::IProfile1D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IProfile1D& h );
968
969 AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
970 int ny, double lowy, double upy );
971
972 AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
973 int ny, double lowy, double upy, const std::string& /*opt*/ ) override;
974
975 AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, const Edges& x, const Edges& y,
976 const std::string& /*opt*/ ) override;
977
978 AIDA::IProfile2D* createProfile2D( const std::string& nameAndTitle, int nx, double lowx, double upx, int ny,
979 double lowy, double upy ) override;
980
981 AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
982 int ny, double lowy, double upy, double upper, double lower );
983
984 AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
985 int ny, double lowy, double upy, double upper, double lower,
986 const std::string& /*opt*/ ) override;
987
988 AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, const Edges& x, const Edges& y,
989 double upper, double lower, const std::string& /*opt*/ ) override;
990
991 AIDA::IProfile2D* createProfile2D( const std::string& nameAndTitle, int nx, double lowx, double upx, int ny,
992 double lowy, double upy, double upper, double lower ) override;
993
994 AIDA::IProfile2D* createCopy( const std::string& full, const AIDA::IProfile2D& h ) override;
995
996 AIDA::IProfile2D* createCopy( const std::string& par, const std::string& rel, const AIDA::IProfile2D& h );
997
998 AIDA::IProfile2D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IProfile2D& h );
999
1000 AIDA::IProfile2D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IProfile2D& h );
1001
1002 AIDA::ICloud1D* createCloud1D( const std::string&, const std::string&, int, const std::string& ) override {
1004 return nullptr;
1005 }
1006
1007 AIDA::ICloud1D* createCloud1D( const std::string& ) override {
1009 return nullptr;
1010 }
1011
1012 AIDA::ICloud1D* createCopy( const std::string&, const AIDA::ICloud1D& ) override {
1014 return nullptr;
1015 }
1016
1017 AIDA::ICloud2D* createCloud2D( const std::string&, const std::string&, int, const std::string& ) override {
1019 return nullptr;
1020 }
1021
1022 AIDA::ICloud2D* createCloud2D( const std::string& ) override {
1024 return nullptr;
1025 }
1026
1027 AIDA::ICloud2D* createCopy( const std::string&, const AIDA::ICloud2D& ) override {
1029 return nullptr;
1030 }
1031
1032 AIDA::ICloud3D* createCloud3D( const std::string&, const std::string&, int, const std::string& ) override {
1034 return nullptr;
1035 }
1036
1037 AIDA::ICloud3D* createCloud3D( const std::string& ) override {
1039 return nullptr;
1040 }
1041
1042 AIDA::ICloud3D* createCopy( const std::string&, const AIDA::ICloud3D& ) override {
1044 return nullptr;
1045 }
1046
1052
1054 std::ostream& print( Base* h, std::ostream& s = std::cout ) const override;
1055
1057 std::ostream& write( Base* h, std::ostream& s = std::cout ) const override;
1058
1060 int write( Base* h, const char* file_name ) const override;
1061
1063 DataObject* createPath( const std::string& newPath ) override;
1064
1069 DataObject* createDirectory( const std::string& parentDir, const std::string& subDir ) override;
1070
1071 typedef std::map<std::string, Gaudi::Histo1DDef> Histo1DMap;
1072
1073private:
1075 void update1Ddefs();
1076
1078 std::string buildHistoPath( DataObject const* pPar, std::string const& rel );
1079
1080 Gaudi::Property<DBaseEntries> m_input{ this, "Input", {}, "input streams" };
1082 this, "Predefined1DHistos", {}, &HistogramSvc::update1Ddefs, "histograms with predefined parameters" };
1083
1084 // modified histograms:
1085 std::set<std::string> m_mods1D;
1086};
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
A DataObject is the base class of any identifiable object on any data store.
Definition DataObject.h:37
StatusCode registerObject(std::string_view parentPath, std::string_view objPath, DataObject *pObject) override
Register object with the data store.
Definition DataSvc.cpp:276
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
Define general base for Gaudi exception.
std::vector< std::string > DBaseEntries
AIDA::ICloud3D * createCopy(const std::string &, const AIDA::ICloud3D &) override
AIDA::IHistogram1D * sliceY(const std::string &name, const AIDA::IHistogram2D &h, int indexX) override
AIDA::IProfile1D * bookProf(const std::string &full, const std::string &title, int nx, double lowx, double upx, double upper, double lower, const std::string &opt) override
std::ostream & write(Base *h, std::ostream &s=std::cout) const override
Write (ASCII) the 1D histogram table into the output stream.
~HistogramSvc() override
Destructor.
AIDA::IHistogram3D H3D
AIDA::IHistogram2D * projectionXY(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
AIDA::IHistogram1D * divide(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
virtual AIDA::IProfile1D * bookProf(const std::pair< std::string, std::string > &loc, const std::string &title, int nx, double lowx, double upx, const std::string &opt)
AIDA::IProfile1D * bookProf(DataObject *pPar, int hID, const std::string &title, int nx, double lowx, double upx, double upper, double lower, const std::string &opt) override
AIDA::IProfile1D * bookProf(const std::string &par, int hID, const std::string &title, int nx, double lowx, double upx, const std::string &opt) override
std::set< std::string > m_mods1D
AIDA::IHistogram1D * projectionY(const std::string &name, const AIDA::IHistogram2D &h) override
StatusCode findObject(IRegistry *pReg, const std::string &path, AIDA::IProfile1D *&obj) override
StatusCode connectInput(const std::string &ident)
Connect input histogram file to the service.
AIDA::IHistogram3D * createHistogram3D(const std::string &name, const std::string &title, int nx, double lowx, double upx, int ny, double lowy, double upy, int nz, double lowz, double upz)
StatusCode retrieveObject(IRegistry *pReg, const std::string &path, AIDA::IHistogram1D *&obj) override
std::map< std::string, Gaudi::Histo1DDef > Histo1DMap
void update1Ddefs()
handler to be invoked for updating property m_defs1D
AIDA::IProfile1D * bookProf(const std::string &par, const std::string &rel, const std::string &title, int nx, double lowx, double upx, double upper, double lower, const std::string &opt) override
AIDA::IHistogram1D * createCopy(const std::string &full, const AIDA::IHistogram1D &h) override
StatusCode registerObject(const std::string &parent, const std::string &rel, Base *obj) override
virtual AIDA::IProfile1D * bookProf(const std::pair< std::string, std::string > &loc, const std::string &title, int nx, double lowx, double upx, double upper, double lower, const std::string &opt)
Gaudi::Property< DBaseEntries > m_input
AIDA::ICloud1D * createCloud1D(const std::string &, const std::string &, int, const std::string &) override
AIDA::IHistogram2D * projectionYZ(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
std::pair< std::string, std::string > i_splitPath(const std::string &full)
Split full path into its components.
void not_implemented() const
AIDA::IHistogram1D * projectionX(const std::string &name, const AIDA::IHistogram2D &h) override
AIDA::IHistogram2D * sliceXZ(const std::string &, const AIDA::IHistogram3D &, int, int) override
AIDA::IProfile1D * bookProf(DataObject *pPar, int hID, const std::string &title, int nx, double lowx, double upx, const std::string &opt) override
StatusCode reinitialize() override
Initialise the service.
AIDA::IHistogram2D * projectionXZ(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
AIDA::IHistogram1D * createHistogram1D(const std::string &name, const std::string &title, int nx, double lowx, double upx)
AIDA::IHistogram1D * book(DataObject *pPar, int hID, const std::string &title, int nx, double lowx, double upx) override
AIDA::IHistogram1D * sliceX(const std::string &name, const AIDA::IHistogram2D &h, int indexY1, int indexY2) override
AIDA::ICloud3D * createCloud3D(const std::string &, const std::string &, int, const std::string &) override
AIDA::IProfile1D * bookProf(DataObject *pPar, const std::string &rel, const std::string &title, int nx, double lowx, double upx, double upper, double lower, const std::string &opt) override
AIDA::IProfile1D * createProfile1D(const std::string &name, const std::string &title, int nx, double lowx, double upx, const std::string &opt) override
HistogramSvc(const std::string &name, ISvcLocator *svc)
Statndard Constructor.
AIDA::IHistogram2D * sliceYZ(const std::string &, const AIDA::IHistogram3D &, int, int) override
AIDA::IHistogram1D * multiply(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
AIDA::IHistogram1D * book(const std::string &par, const std::string &rel, const std::string &title, int nx, double lowx, double upx) override
Book histogram and register it with the histogram data store.
std::string buildHistoPath(DataObject const *pPar, std::string const &rel)
extracts the path of an histogram from the related DataObject
AIDA::IHistogram1D * book(const std::string &full, const std::string &title, int nx, double lowx, double upx) override
int write(Base *h, const char *file_name) const override
Write (ASCII) the 1D histogram table into a file.
Gaudi::Property< Histo1DMap > m_defs1D
AIDA::IHistogram2D * i_project(const std::string &nameAndTitle, const AIDA::IHistogram3D &h, const std::string &dir)
Helper for 2D projections.
AIDA::IHistogram1D * sliceX(const std::string &name, const AIDA::IHistogram2D &h, int indexY) override
AIDA::IProfile1D * bookProf(DataObject *pPar, const std::string &rel, const std::string &title, int nx, double lowx, double upx, const std::string &opt) override
AIDA::IProfile1D * bookProf(const std::string &par, const std::string &rel, const std::string &title, int nx, double lowx, double upx, const std::string &opt) override
Book histogram and register it with the histogram data store.
AIDA::IHistogram2D * sliceXY(const std::string &, const AIDA::IHistogram3D &, int, int) override
AIDA::ICloud2D * createCopy(const std::string &, const AIDA::ICloud2D &) override
virtual AIDA::IHistogram1D * book(const std::pair< std::string, std::string > &loc, const std::string &title, int nx, double lowx, double upx)
AIDA::ICloud3D * createCloud3D(const std::string &) override
AIDA::IHistogram1D * add(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
std::ostream & print(Base *h, std::ostream &s=std::cout) const override
Print (ASCII) the 1D histogram into the output stream.
AIDA::IProfile1D * bookProf(const std::string &full, const std::string &title, int nx, double lowx, double upx, const std::string &opt) override
std::vector< double > Edges
AIDA::IProfile2D P2D
StatusCode finalize() override
finalize the service
AIDA::ICloud2D * createCloud2D(const std::string &) override
AIDA::IHistogram1D * subtract(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
AIDA::IHistogram2D * createHistogram2D(const std::string &name, const std::string &title, int nx, double lowx, double upx, int ny, double lowy, double upy)
AIDA::IProfile2D * createProfile2D(const std::string &name, const std::string &title, int nx, double lowx, double upx, int ny, double lowy, double upy)
DataObject * createPath(const std::string &newPath) override
Create all directories in a given full path.
AIDA::IHistogramFactory * histogramFactory() override
Retrieve the AIDA HistogramFactory interface.
AIDA::IProfile1D * bookProf(const std::string &par, int hID, const std::string &title, int nx, double lowx, double upx, double upper, double lower, const std::string &opt) override
DataObject * createDirectory(const std::string &parentDir, const std::string &subDir) override
Create a sub-directory in a directory.
StatusCode unregisterObject(Base *obj) override
AIDA::IHistogram1D * sliceY(const std::string &name, const AIDA::IHistogram2D &h, int indexX1, int indexX2) override
StatusCode registerObject(const std::string &full, Base *obj) override
StatusCode registerObject(DataObject *pPar, const std::string &rel, Base *obj) override
AIDA::ICloud1D * createCopy(const std::string &, const AIDA::ICloud1D &) override
StatusCode initialize() override
Initialise the service.
AIDA::IHistogram1D * book(const std::string &par, int hID, const std::string &title, int nx, double lowx, double upx) override
AIDA::IHistogram1D * book(DataObject *pPar, const std::string &rel, const std::string &title, int nx, double lowx, double upx) override
AIDA::ICloud2D * createCloud2D(const std::string &, const std::string &, int, const std::string &) override
bool destroy(IBaseHistogram *hist) override
T * i_book(DataObject *pPar, const std::string &rel, const std::string &title, const std::pair< DataObject *, T * > &o)
AIDA::ICloud1D * createCloud1D(const std::string &) override
AIDA::IBaseHistogram Base
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
virtual StatusCode unregisterObject(std::string_view fullPath)=0
Unregister object from the data store.
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition IRegistry.h:29
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition ISvcLocator.h:42
const std::string & name() const override
Retrieve name of the service.
Definition Service.cpp:333
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
constexpr static const auto FAILURE
Definition StatusCode.h:100
Base class used to extend a class implementing other interfaces.
Definition extends.h:19
T * getRepresentation(const Q &hist)
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition System.cpp:260
StatusCode retrieve(A1 a1, A3 *&a3)
Helper(HistogramSvc *p)
StatusCode find(A1 a1, A2 a2, A3 *&a3)
StatusCode retrieve(A1 a1, A2 a2, A3 *&a3)
static R * act(R *res, const S &b, Bool_t(T1::*pmf)(const T2 *))
static R * act(R *res, const S &b, void(T1::*pmf)(const T2 *))
StatusCode find(A1 a1, A3 *&a3)
static R * act(R *res, const S &b, Bool_t(T1::*pmf)(const T2 *, Double_t), Double_t scale)
static R * act(R *res, const S &b, void(T1::*pmf)(const T2 *, Double_t), Double_t scale)
HistogramSvc * m_svc