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