HistogramSvc.h
Go to the documentation of this file.
1 // ============================================================================
2 #ifndef GAUDISVC_HISTOGRAMSVC_H
3 #define GAUDISVC_HISTOGRAMSVC_H 1
4 // ============================================================================
5 // Include Files
6 // ============================================================================
7 // GaudiKernel
8 // ============================================================================
9 #include "GaudiKernel/DataSvc.h"
13 #include "GaudiKernel/IRegistry.h"
14 #include "GaudiKernel/System.h"
15 // ============================================================================
16 // AIDA
17 // ============================================================================
19 #include "AIDA/IAnnotation.h"
20 #include "AIDA/IHistogramFactory.h"
21 #include "AIDA_visibility_hack.h"
22 // ============================================================================
23 // local (+PI)
24 // ============================================================================
25 #include "Axis.h"
26 #include "GaudiPI.h"
27 #include "TH1.h"
28 #include "TH2.h"
29 #include "TH3.h"
30 // ============================================================================
31 namespace AIDA
32 {
33  class ICloud1D;
34  class ICloud2D;
35  class ICloud3D;
36 }
37 // ============================================================================
38 // Forward declarations
39 #define DBINS( x ) int n##x, double low##x, double up##x
40 #define BINS( x ) n##x, low##x, up##x
41 #define NOT_IMPLEMENTED \
42  { \
43  not_implemented(); \
44  return 0; \
45  }
46 // ============================================================================
52 class HistogramSvc : public extends<DataSvc, IHistogramSvc>, virtual public AIDA::IHistogramFactory
53 {
54 
55 private:
57  void not_implemented() const { error() << "Sorry, not yet implemented..." << endmsg; }
58 protected:
59  typedef const std::string& CSTR;
62  typedef AIDA::IHistogram1D H1D;
63  typedef AIDA::IHistogram2D H2D;
64  typedef AIDA::IHistogram3D H3D;
65  typedef AIDA::IProfile1D P1D;
66  typedef AIDA::IProfile2D P2D;
67  typedef AIDA::IBaseHistogram Base;
68  struct Helper {
70  Helper( HistogramSvc* p ) : m_svc( p ) {}
71  template <class A1, class A3>
72  StatusCode retrieve( A1 a1, A3*& a3 )
73  {
74  DataObject* pObject = nullptr;
75  StatusCode sc = m_svc->DataSvc::retrieveObject( a1, pObject );
76  a3 = dynamic_cast<A3*>( pObject );
77  return sc;
78  }
79  template <class A1, class A2, class A3>
80  StatusCode retrieve( A1 a1, A2 a2, A3*& a3 )
81  {
82  DataObject* pObject = nullptr;
83  StatusCode sc = m_svc->DataSvc::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  {
90  DataObject* pObject = nullptr;
91  StatusCode sc = m_svc->DataSvc::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  {
98  DataObject* pObject = nullptr;
99  StatusCode sc = m_svc->DataSvc::findObject( a1, a2, pObject );
100  a3 = dynamic_cast<A3*>( pObject );
101  return sc;
102  }
103  template <class R, class S, class T1, class T2>
104  static R* act( R* res, const S& b, void ( T1::*pmf )( const T2*, Double_t ), Double_t scale )
105  {
106  T1* h1 = Gaudi::getRepresentation<R, T1>( *res );
107  T1* h2 = Gaudi::getRepresentation<R, T1>( b );
108  if ( h1 && h2 ) {
109  ( h1->*pmf )( h2, scale );
110  return res;
111  }
112  return nullptr;
113  }
114  template <class R, class S, class T1, class T2>
115  static R* act( R* res, const S& b, Bool_t ( T1::*pmf )( const T2*, Double_t ), Double_t scale )
116  {
117  T1* h1 = Gaudi::getRepresentation<R, T1>( *res );
118  T1* h2 = Gaudi::getRepresentation<R, T1>( b );
119  if ( h1 && h2 ) {
120  ( h1->*pmf )( h2, scale );
121  return res;
122  }
123  return nullptr;
124  }
125  template <class R, class S, class T1, class T2>
126  static R* act( R* res, const S& b, void ( T1::*pmf )( const T2* ) )
127  {
128  T1* h1 = Gaudi::getRepresentation<R, T1>( *res );
129  T1* h2 = Gaudi::getRepresentation<R, T1>( b );
130  if ( h1 && h2 ) {
131  ( h1->*pmf )( h2 );
132  return res;
133  }
134  return nullptr;
135  }
136  template <class R, class S, class T1, class T2>
137  static R* act( R* res, const S& b, Bool_t ( T1::*pmf )( const T2* ) )
138  {
139  T1* h1 = Gaudi::getRepresentation<R, T1>( *res );
140  T1* h2 = Gaudi::getRepresentation<R, T1>( b );
141  if ( h1 && h2 ) {
142  ( h1->*pmf )( h2 );
143  return res;
144  }
145  return nullptr;
146  }
147  };
148 
149 public:
154  HistogramSvc( const std::string& name, ISvcLocator* svc );
155 
157  ~HistogramSvc() override;
158 
164  std::pair<std::string, std::string> i_splitPath( CSTR full );
165 
169  StatusCode connectInput( CSTR ident );
170 
171  template <class T>
172  inline T* i_book( DataObject* pPar, CSTR rel, CSTR title, const std::pair<DataObject*, T*>& o )
173  {
174  if ( o.first && registerObject( pPar, rel, (Base*)o.second ).isSuccess() ) return o.second;
175  delete o.first;
176  throw GaudiException( "Cannot book " + System::typeinfoName( typeid( T ) ) + " " + title, "HistogramSvc",
178  }
179  template <class T>
180  static DataObject* __cast( T* p )
181  {
182  DataObject* q = dynamic_cast<DataObject*>( p );
183  if ( !q && p ) {
184  throw std::runtime_error( "HistogramSvc: Unexpected object type." );
185  }
186  return q;
187  }
189  H2D* i_project( CSTR nameAndTitle, const H3D& h, CSTR dir );
190 
191 public:
193  StatusCode initialize() override;
195  StatusCode reinitialize() override;
197  StatusCode finalize() override;
198 
200  AIDA::IHistogramFactory* histogramFactory() override { return this; }
201 
202  // ==========================================================================
203  // Book 1D histogram with fix binning
204  // ==========================================================================
222  H1D* book( CSTR par, CSTR rel, CSTR title, DBINS( x ) ) override
223  {
224  return book( createPath( par ), rel, title, BINS( x ) );
225  }
226  H1D* book( CSTR par, int hID, CSTR title, DBINS( x ) ) override
227  {
228  return book( par, std::to_string( hID ), title, BINS( x ) );
229  }
230  H1D* book( DataObject* pPar, int hID, CSTR title, DBINS( x ) ) override
231  {
232  return book( pPar, std::to_string( hID ), title, BINS( x ) );
233  }
234  H1D* book( DataObject* pPar, CSTR rel, CSTR title, DBINS( x ) ) override;
235  virtual H1D* book( STRPAIR loc, CSTR title, DBINS( x ) ) { return book( loc.first, loc.second, title, BINS( x ) ); }
236  H1D* book( CSTR full, CSTR title, DBINS( x ) ) override { return book( i_splitPath( full ), title, BINS( x ) ); }
237  // ==========================================================================
238  // Book 1D Profile histogram with fix binning
239  // ==========================================================================
257  P1D* bookProf( CSTR par, CSTR rel, CSTR title, DBINS( x ), CSTR opt ) override
258  {
259  return bookProf( createPath( par ), rel, title, BINS( x ), opt );
260  }
261  P1D* bookProf( CSTR par, int hID, CSTR title, DBINS( x ), CSTR opt ) override
262  {
263  return bookProf( par, std::to_string( hID ), title, BINS( x ), opt );
264  }
265  P1D* bookProf( DataObject* pPar, int hID, CSTR title, DBINS( x ), CSTR opt ) override
266  {
267  return bookProf( pPar, std::to_string( hID ), title, BINS( x ), opt );
268  }
269  virtual P1D* bookProf( STRPAIR loc, CSTR title, DBINS( x ), CSTR opt )
270  {
271  return bookProf( loc.first, loc.second, title, BINS( x ), opt );
272  }
273  P1D* bookProf( CSTR full, CSTR title, DBINS( x ), CSTR opt ) override
274  {
275  return bookProf( i_splitPath( full ), title, BINS( x ), opt );
276  }
277  P1D* bookProf( DataObject* pPar, CSTR rel, CSTR title, DBINS( x ), CSTR opt ) override
278  {
279  return i_book( pPar, rel, title, Gaudi::createProf1D( title, BINS( x ), 0, 0, opt ) );
280  }
281 
282  P1D* bookProf( CSTR par, CSTR rel, CSTR title, DBINS( x ), double upper, double lower, CSTR opt ) override
283  {
284  return bookProf( createPath( par ), rel, title, BINS( x ), upper, lower, opt );
285  }
286  P1D* bookProf( CSTR par, int hID, CSTR title, DBINS( x ), double upper, double lower, CSTR opt ) override
287  {
288  return bookProf( par, std::to_string( hID ), title, BINS( x ), upper, lower, opt );
289  }
290  P1D* bookProf( DataObject* pPar, int hID, CSTR title, DBINS( x ), double upper, double lower, CSTR opt ) override
291  {
292  return bookProf( pPar, std::to_string( hID ), title, BINS( x ), upper, lower, opt );
293  }
294  virtual P1D* bookProf( STRPAIR loc, CSTR title, DBINS( x ), double upper, double lower, CSTR opt )
295  {
296  return bookProf( loc.first, loc.second, title, BINS( x ), upper, lower, opt );
297  }
298  P1D* bookProf( CSTR full, CSTR title, DBINS( x ), double upper, double lower, CSTR opt ) override
299  {
300  return bookProf( i_splitPath( full ), title, BINS( x ), upper, lower, opt );
301  }
302  P1D* bookProf( DataObject* pPar, CSTR rel, CSTR title, DBINS( x ), double upper, double lower, CSTR opt ) override
303  {
304  return i_book( pPar, rel, title, Gaudi::createProf1D( title, BINS( x ), upper, lower, opt ) );
305  }
306  // ==========================================================================
307  // Book 1D histogram with variable binning
308  // ==========================================================================
323  H1D* book( CSTR par, int hID, CSTR title, Edges e ) override { return book( par, std::to_string( hID ), title, e ); }
324  H1D* book( DataObject* pPar, int hID, CSTR title, Edges e ) override
325  {
326  return book( pPar, std::to_string( hID ), title, e );
327  }
328  H1D* book( CSTR par, CSTR rel, CSTR title, Edges e ) override { return book( createPath( par ), rel, title, e ); }
329  virtual H1D* book( STRPAIR loc, CSTR title, Edges e ) { return book( loc.first, loc.second, title, e ); }
330  H1D* book( CSTR full, CSTR title, Edges e ) override { return book( i_splitPath( full ), title, e ); }
331  H1D* book( DataObject* pPar, CSTR rel, CSTR title, Edges e ) override
332  {
333  return i_book( pPar, rel, title, Gaudi::createH1D( title, e ) );
334  }
335 
336  // ==========================================================================
337  // Book 1D profile histogram with variable binning
338  // ==========================================================================
353  P1D* bookProf( CSTR full, CSTR title, Edges e ) override { return bookProf( i_splitPath( full ), title, e ); }
354  P1D* bookProf( CSTR par, CSTR rel, CSTR title, Edges e ) override
355  {
356  return bookProf( createPath( par ), rel, title, e );
357  }
358  P1D* bookProf( CSTR par, int hID, CSTR title, Edges e ) override
359  {
360  return bookProf( par, std::to_string( hID ), title, e );
361  }
362  P1D* bookProf( DataObject* pPar, int hID, CSTR title, Edges e ) override
363  {
364  return bookProf( pPar, std::to_string( hID ), title, e );
365  }
366  virtual P1D* bookProf( STRPAIR loc, CSTR title, Edges e ) { return bookProf( loc.first, loc.second, title, e ); }
367  P1D* bookProf( DataObject* pPar, CSTR rel, CSTR title, Edges e ) override
368  {
369  return i_book( pPar, rel, title, Gaudi::createProf1D( title, e, 0, 0 ) );
370  }
371 
372  virtual P1D* bookProf( CSTR full, CSTR title, Edges e, double upper, double lower )
373  {
374  return bookProf( i_splitPath( full ), title, e, upper, lower );
375  }
376  virtual P1D* bookProf( CSTR par, CSTR rel, CSTR title, Edges e, double upper, double lower )
377  {
378  return bookProf( createPath( par ), rel, title, e, upper, lower );
379  }
380  virtual P1D* bookProf( CSTR par, int hID, CSTR title, Edges e, double upper, double lower )
381  {
382  return bookProf( par, std::to_string( hID ), title, e, upper, lower );
383  }
384  virtual P1D* bookProf( DataObject* pPar, int hID, CSTR title, Edges e, double upper, double lower )
385  {
386  return bookProf( pPar, std::to_string( hID ), title, e, upper, lower );
387  }
388  virtual P1D* bookProf( STRPAIR loc, CSTR title, Edges e, double upper, double lower )
389  {
390  return bookProf( loc.first, loc.second, title, e, upper, lower );
391  }
392  virtual P1D* bookProf( DataObject* pPar, CSTR rel, CSTR title, Edges e, double upper, double lower )
393  {
394  return i_book( pPar, rel, title, Gaudi::createProf1D( title, e, upper, lower ) );
395  }
396  // ==========================================================================
397  // Book 2D histogram with fixed binning
398  // ==========================================================================
416  H2D* book( CSTR full, CSTR title, DBINS( x ), DBINS( y ) ) override
417  {
418  return book( i_splitPath( full ), title, BINS( x ), BINS( y ) );
419  }
420  H2D* book( CSTR par, CSTR rel, CSTR title, DBINS( x ), DBINS( y ) ) override
421  {
422  return book( createPath( par ), rel, title, BINS( x ), BINS( y ) );
423  }
424  H2D* book( CSTR par, int hID, CSTR title, DBINS( x ), DBINS( y ) ) override
425  {
426  return book( par, std::to_string( hID ), title, BINS( x ), BINS( y ) );
427  }
428  virtual H2D* book( STRPAIR loc, CSTR title, DBINS( x ), DBINS( y ) )
429  {
430  return book( loc.first, loc.second, title, BINS( x ), BINS( y ) );
431  }
432  H2D* book( DataObject* pPar, int hID, CSTR title, DBINS( x ), DBINS( y ) ) override
433  {
434  return book( pPar, std::to_string( hID ), title, BINS( x ), BINS( y ) );
435  }
436  H2D* book( DataObject* pPar, CSTR rel, CSTR title, DBINS( x ), DBINS( y ) ) override
437  {
438  return i_book( pPar, rel, title, Gaudi::createH2D( title, BINS( x ), BINS( y ) ) );
439  }
440  // ==========================================================================
441  // Book 2D profile histogram with fixed binning
442  // ==========================================================================
460  virtual P2D* bookProf( CSTR full, CSTR title, DBINS( x ), DBINS( y ), double upper, double lower )
461  {
462  return bookProf( i_splitPath( full ), title, BINS( x ), BINS( y ), upper, lower );
463  }
464  virtual P2D* bookProf( CSTR par, CSTR rel, CSTR title, DBINS( x ), DBINS( y ), double upper, double lower )
465  {
466  return bookProf( createPath( par ), rel, title, BINS( x ), BINS( y ), upper, lower );
467  }
468  virtual P2D* bookProf( STRPAIR loc, CSTR title, DBINS( x ), DBINS( y ), double upper, double lower )
469  {
470  return bookProf( loc.first, loc.second, title, BINS( x ), BINS( y ), upper, lower );
471  }
472  virtual P2D* bookProf( CSTR par, int hID, CSTR title, DBINS( x ), DBINS( y ), double upper, double lower )
473  {
474  return bookProf( par, std::to_string( hID ), title, BINS( x ), BINS( y ), upper, lower );
475  }
476  virtual P2D* bookProf( DataObject* pPar, int hID, CSTR title, DBINS( x ), DBINS( y ), double upper, double lower )
477  {
478  return bookProf( pPar, std::to_string( hID ), title, BINS( x ), BINS( y ), upper, lower );
479  }
480  virtual P2D* bookProf( DataObject* pPar, CSTR rel, CSTR title, DBINS( x ), DBINS( y ), double upper, double lower )
481  {
482  return i_book( pPar, rel, title, Gaudi::createProf2D( title, BINS( x ), BINS( y ), upper, lower ) );
483  }
484 
485  P2D* bookProf( CSTR full, CSTR title, DBINS( x ), DBINS( y ) ) override
486  {
487  return bookProf( i_splitPath( full ), title, BINS( x ), BINS( y ) );
488  }
489  P2D* bookProf( CSTR par, CSTR rel, CSTR title, DBINS( x ), DBINS( y ) ) override
490  {
491  return bookProf( createPath( par ), rel, title, BINS( x ), BINS( y ) );
492  }
493  virtual P2D* bookProf( STRPAIR loc, CSTR title, DBINS( x ), DBINS( y ) )
494  {
495  return bookProf( loc.first, loc.second, title, BINS( x ), BINS( y ) );
496  }
497  P2D* bookProf( CSTR par, int hID, CSTR title, DBINS( x ), DBINS( y ) ) override
498  {
499  return bookProf( par, std::to_string( hID ), title, BINS( x ), BINS( y ) );
500  }
501  P2D* bookProf( DataObject* pPar, int hID, CSTR title, DBINS( x ), DBINS( y ) ) override
502  {
503  return bookProf( pPar, std::to_string( hID ), title, BINS( x ), BINS( y ) );
504  }
505  P2D* bookProf( DataObject* pPar, CSTR rel, CSTR title, DBINS( x ), DBINS( y ) ) override
506  {
507  return i_book( pPar, rel, title, Gaudi::createProf2D( title, BINS( x ), BINS( y ), 0, 0 ) );
508  }
509  // ==========================================================================
510  // Book 2D histogram with variable binning
511  // ==========================================================================
526  H2D* book( CSTR full, CSTR title, Edges x, Edges y ) override { return book( i_splitPath( full ), title, x, y ); }
527  H2D* book( CSTR par, CSTR rel, CSTR title, Edges x, Edges y ) override
528  {
529  return book( createPath( par ), rel, title, x, y );
530  }
531  H2D* book( CSTR par, int hID, CSTR title, Edges x, Edges y ) override
532  {
533  return book( par, std::to_string( hID ), title, x, y );
534  }
535  virtual H2D* book( STRPAIR loc, CSTR title, Edges x, Edges y ) { return book( loc.first, loc.second, title, x, y ); }
536  H2D* book( DataObject* pPar, int hID, CSTR title, Edges x, Edges y ) override
537  {
538  return book( pPar, std::to_string( hID ), title, x, y );
539  }
540  H2D* book( DataObject* pPar, CSTR rel, CSTR title, Edges x, Edges y ) override
541  {
542  return i_book( pPar, rel, title, Gaudi::createH2D( title, x, y ) );
543  }
544  // ==========================================================================
545  // Book 2D profile histogram with variable binning
546  // ==========================================================================
561  P2D* bookProf( CSTR full, CSTR title, Edges x, Edges y ) override
562  {
563  return bookProf( i_splitPath( full ), title, x, y );
564  }
565  P2D* bookProf( CSTR par, CSTR rel, CSTR title, Edges x, Edges y ) override
566  {
567  return bookProf( createPath( par ), rel, title, x, y );
568  }
569  P2D* bookProf( CSTR par, int hID, CSTR title, Edges x, Edges y ) override
570  {
571  return bookProf( par, std::to_string( hID ), title, x, y );
572  }
573  P2D* bookProf( DataObject* pPar, int hID, CSTR title, Edges x, Edges y ) override
574  {
575  return bookProf( pPar, std::to_string( hID ), title, x, y );
576  }
577  virtual P2D* bookProf( STRPAIR loc, CSTR title, Edges x, Edges y )
578  {
579  return bookProf( loc.first, loc.second, title, x, y );
580  }
581  P2D* bookProf( DataObject* pPar, CSTR rel, CSTR title, Edges x, Edges y ) override
582  {
583  return i_book( pPar, rel, title, Gaudi::createProf2D( title, x, y, 0, 0 ) );
584  }
585 
586  virtual P2D* bookProf( CSTR full, CSTR title, Edges x, Edges y, double upper, double lower )
587  {
588  return bookProf( i_splitPath( full ), title, x, y, upper, lower );
589  }
590  virtual P2D* bookProf( CSTR par, CSTR rel, CSTR title, Edges x, Edges y, double upper, double lower )
591  {
592  return bookProf( createPath( par ), rel, title, x, y, upper, lower );
593  }
594  virtual P2D* bookProf( CSTR par, int hID, CSTR title, Edges x, Edges y, double upper, double lower )
595  {
596  return bookProf( par, std::to_string( hID ), title, x, y, upper, lower );
597  }
598  virtual P2D* bookProf( DataObject* pPar, int hID, CSTR title, Edges x, Edges y, double upper, double lower )
599  {
600  return bookProf( pPar, std::to_string( hID ), title, x, y, upper, lower );
601  }
602  virtual P2D* bookProf( STRPAIR loc, CSTR title, Edges x, Edges y, double upper, double lower )
603  {
604  return bookProf( loc.first, loc.second, title, x, y, upper, lower );
605  }
606  virtual P2D* bookProf( DataObject* pPar, CSTR rel, CSTR title, Edges x, Edges y, double upper, double lower )
607  {
608  return i_book( pPar, rel, title, Gaudi::createProf2D( title, x, y, upper, lower ) );
609  }
610  // ==========================================================================
611  // Book 3D histogram with fixed binning
612  // ==========================================================================
630  H3D* book( CSTR full, CSTR title, DBINS( x ), DBINS( y ), DBINS( z ) ) override
631  {
632  return book( i_splitPath( full ), title, BINS( x ), BINS( y ), BINS( z ) );
633  }
634  H3D* book( CSTR par, CSTR rel, CSTR title, DBINS( x ), DBINS( y ), DBINS( z ) ) override
635  {
636  return book( createPath( par ), rel, title, BINS( x ), BINS( y ), BINS( z ) );
637  }
638  H3D* book( CSTR par, int hID, CSTR title, DBINS( x ), DBINS( y ), DBINS( z ) ) override
639  {
640  return book( par, std::to_string( hID ), title, BINS( x ), BINS( y ), BINS( z ) );
641  }
642  H3D* book( DataObject* pPar, int hID, CSTR title, DBINS( x ), DBINS( y ), DBINS( z ) ) override
643  {
644  return book( pPar, std::to_string( hID ), title, BINS( x ), BINS( y ), BINS( z ) );
645  }
646  virtual H3D* book( STRPAIR loc, CSTR title, DBINS( x ), DBINS( y ), DBINS( z ) )
647  {
648  return book( loc.first, loc.second, title, BINS( x ), BINS( y ), BINS( z ) );
649  }
650  H3D* book( DataObject* pPar, CSTR rel, CSTR title, DBINS( x ), DBINS( y ), DBINS( z ) ) override
651  {
652  return i_book( pPar, rel, title, Gaudi::createH3D( title, BINS( x ), BINS( y ), BINS( z ) ) );
653  }
654  // ==========================================================================
655  // Book 3D histogram with variable binning
656  // ==========================================================================
673  H3D* book( CSTR full, CSTR title, Edges x, Edges y, Edges z ) override
674  {
675  return book( i_splitPath( full ), title, x, y, z );
676  }
677  H3D* book( CSTR par, CSTR rel, CSTR title, Edges x, Edges y, Edges z ) override
678  {
679  return book( createPath( par ), rel, title, x, y, z );
680  }
681  H3D* book( CSTR par, int hID, CSTR title, Edges x, Edges y, Edges z ) override
682  {
683  return book( par, std::to_string( hID ), title, x, y, z );
684  }
685  H3D* book( DataObject* pPar, int hID, CSTR title, Edges x, Edges y, Edges z ) override
686  {
687  return book( pPar, std::to_string( hID ), title, x, y, z );
688  }
689  virtual H3D* book( STRPAIR loc, CSTR title, Edges x, Edges y, Edges z )
690  {
691  return book( loc.first, loc.second, title, x, y, z );
692  }
693  H3D* book( DataObject* pPar, CSTR rel, CSTR title, Edges x, Edges y, Edges z ) override
694  {
695  return i_book( pPar, rel, title, Gaudi::createH3D( title, x, y, z ) );
696  }
697 
698  // ==========================================================================
699  // Register histogram with the data store
700  // ==========================================================================
701  //------------------------------------------------------------------------------
702  // Register object with the data store
703  //------------------------------------------------------------------------------
704  StatusCode registerObject( CSTR parent, CSTR rel, Base* obj ) override
705  {
706  return registerObject( createPath( parent ), rel, obj );
707  }
708  StatusCode registerObject( CSTR parent, int item, Base* obj ) override
709  {
710  return registerObject( parent, std::to_string( item ), obj );
711  }
712  StatusCode registerObject( Base* pPar, CSTR rel, Base* obj ) override
713  {
714  return registerObject( __cast( pPar ), rel, obj );
715  }
716  StatusCode registerObject( DataObject* pPar, int item, Base* obj ) override
717  {
718  return registerObject( pPar, std::to_string( item ), obj );
719  }
720  StatusCode registerObject( Base* pPar, int item, Base* obj ) override
721  {
722  return registerObject( __cast( pPar ), item, obj );
723  }
724  StatusCode registerObject( CSTR full, Base* obj ) override;
725  StatusCode registerObject( DataObject* pPar, CSTR rel, Base* obj ) override;
726  // ==========================================================================
727  // Unregister histogram from the data store
728  // ==========================================================================
729  StatusCode unregisterObject( Base* obj ) override { return DataSvc::unregisterObject( __cast( obj ) ); }
730  StatusCode unregisterObject( Base* obj, CSTR objectPath ) override
731  {
732  return DataSvc::unregisterObject( __cast( obj ), objectPath );
733  }
734  StatusCode unregisterObject( Base* obj, int item ) override
735  {
736  return DataSvc::unregisterObject( __cast( obj ), item );
737  }
738  // ==========================================================================
739  // Retrieve histogram from data store
740  // ==========================================================================
741  StatusCode retrieveObject( IRegistry* pReg, CSTR path, H1D*& obj ) override
742  {
743  return Helper( this ).retrieve( pReg, path, obj );
744  }
745  StatusCode retrieveObject( IRegistry* pReg, CSTR path, P1D*& obj ) override
746  {
747  return Helper( this ).retrieve( pReg, path, obj );
748  }
749  StatusCode retrieveObject( IRegistry* pReg, CSTR path, H2D*& obj ) override
750  {
751  return Helper( this ).retrieve( pReg, path, obj );
752  }
753  StatusCode retrieveObject( IRegistry* pReg, CSTR path, P2D*& obj ) override
754  {
755  return Helper( this ).retrieve( pReg, path, obj );
756  }
757  StatusCode retrieveObject( IRegistry* pReg, CSTR path, H3D*& obj ) override
758  {
759  return Helper( this ).retrieve( pReg, path, obj );
760  }
761  //------------------------------------------------------------------------------
762  StatusCode retrieveObject( CSTR full, P1D*& obj ) override { return Helper( this ).retrieve( full, obj ); }
763  StatusCode retrieveObject( CSTR full, P2D*& obj ) override { return Helper( this ).retrieve( full, obj ); }
764  StatusCode retrieveObject( CSTR full, H1D*& obj ) override { return Helper( this ).retrieve( full, obj ); }
765  StatusCode retrieveObject( CSTR full, H2D*& obj ) override { return Helper( this ).retrieve( full, obj ); }
766  StatusCode retrieveObject( CSTR full, H3D*& obj ) override { return Helper( this ).retrieve( full, obj ); }
767  //------------------------------------------------------------------------------
768  StatusCode retrieveObject( CSTR parent, CSTR rel, P1D*& obj ) override
769  {
770  return Helper( this ).retrieve( parent, rel, obj );
771  }
772  StatusCode retrieveObject( CSTR parent, CSTR rel, P2D*& obj ) override
773  {
774  return Helper( this ).retrieve( parent, rel, obj );
775  }
776  StatusCode retrieveObject( CSTR parent, CSTR rel, H1D*& obj ) override
777  {
778  return Helper( this ).retrieve( parent, rel, obj );
779  }
780  StatusCode retrieveObject( CSTR parent, CSTR rel, H2D*& obj ) override
781  {
782  return Helper( this ).retrieve( parent, rel, obj );
783  }
784  StatusCode retrieveObject( CSTR parent, CSTR rel, H3D*& obj ) override
785  {
786  return Helper( this ).retrieve( parent, rel, obj );
787  }
788  //------------------------------------------------------------------------------
789  StatusCode retrieveObject( CSTR parent, int item, P1D*& obj ) override
790  {
791  return Helper( this ).retrieve( parent, item, obj );
792  }
793  StatusCode retrieveObject( CSTR parent, int item, P2D*& obj ) override
794  {
795  return Helper( this ).retrieve( parent, item, obj );
796  }
797  StatusCode retrieveObject( CSTR parent, int item, H1D*& obj ) override
798  {
799  return Helper( this ).retrieve( parent, item, obj );
800  }
801  StatusCode retrieveObject( CSTR parent, int item, H2D*& obj ) override
802  {
803  return Helper( this ).retrieve( parent, item, obj );
804  }
805  StatusCode retrieveObject( CSTR parent, int item, H3D*& obj ) override
806  {
807  return Helper( this ).retrieve( parent, item, obj );
808  }
809  //------------------------------------------------------------------------------
810  StatusCode retrieveObject( DataObject* par, CSTR item, P1D*& obj ) override
811  {
812  return Helper( this ).retrieve( par, item, obj );
813  }
814  StatusCode retrieveObject( DataObject* par, CSTR item, P2D*& obj ) override
815  {
816  return Helper( this ).retrieve( par, item, obj );
817  }
818  StatusCode retrieveObject( DataObject* par, CSTR item, H1D*& obj ) override
819  {
820  return Helper( this ).retrieve( par, item, obj );
821  }
822  StatusCode retrieveObject( DataObject* par, CSTR item, H2D*& obj ) override
823  {
824  return Helper( this ).retrieve( par, item, obj );
825  }
826  StatusCode retrieveObject( DataObject* par, CSTR item, H3D*& obj ) override
827  {
828  return Helper( this ).retrieve( par, item, obj );
829  }
830  //------------------------------------------------------------------------------
831  StatusCode retrieveObject( DataObject* par, int item, P1D*& obj ) override
832  {
833  return Helper( this ).retrieve( par, item, obj );
834  }
835  StatusCode retrieveObject( DataObject* par, int item, P2D*& obj ) override
836  {
837  return Helper( this ).retrieve( par, item, obj );
838  }
839  StatusCode retrieveObject( DataObject* par, int item, H1D*& obj ) override
840  {
841  return Helper( this ).retrieve( par, item, obj );
842  }
843  StatusCode retrieveObject( DataObject* par, int item, H2D*& obj ) override
844  {
845  return Helper( this ).retrieve( par, item, obj );
846  }
847  StatusCode retrieveObject( DataObject* par, int item, H3D*& obj ) override
848  {
849  return Helper( this ).retrieve( par, item, obj );
850  }
851  //------------------------------------------------------------------------------
852  StatusCode retrieveObject( Base* par, int item, P1D*& obj ) override
853  {
854  return Helper( this ).retrieve( __cast( par ), item, obj );
855  }
856  StatusCode retrieveObject( Base* par, int item, P2D*& obj ) override
857  {
858  return Helper( this ).retrieve( __cast( par ), item, obj );
859  }
860  StatusCode retrieveObject( Base* par, int item, H1D*& obj ) override
861  {
862  return Helper( this ).retrieve( __cast( par ), item, obj );
863  }
864  StatusCode retrieveObject( Base* par, int item, H2D*& obj ) override
865  {
866  return Helper( this ).retrieve( __cast( par ), item, obj );
867  }
868  StatusCode retrieveObject( Base* par, int item, H3D*& obj ) override
869  {
870  return Helper( this ).retrieve( __cast( par ), item, obj );
871  }
872  //------------------------------------------------------------------------------
873  StatusCode retrieveObject( Base* par, CSTR item, P1D*& obj ) override
874  {
875  return Helper( this ).retrieve( __cast( par ), item, obj );
876  }
877  StatusCode retrieveObject( Base* par, CSTR item, P2D*& obj ) override
878  {
879  return Helper( this ).retrieve( __cast( par ), item, obj );
880  }
881  StatusCode retrieveObject( Base* par, CSTR item, H1D*& obj ) override
882  {
883  return Helper( this ).retrieve( __cast( par ), item, obj );
884  }
885  StatusCode retrieveObject( Base* par, CSTR item, H2D*& obj ) override
886  {
887  return Helper( this ).retrieve( __cast( par ), item, obj );
888  }
889  StatusCode retrieveObject( Base* par, CSTR item, H3D*& obj ) override
890  {
891  return Helper( this ).retrieve( __cast( par ), item, obj );
892  }
893 
894  // ==========================================================================
895  // Find histogram identified by its full path in the data store
896  // ==========================================================================
897 
898  //------------------------------------------------------------------------------
899  // Find object identified by its full path in the data store
900  //------------------------------------------------------------------------------
901  StatusCode findObject( IRegistry* pReg, CSTR path, P1D*& obj ) override
902  {
903  return Helper( this ).find( pReg, path, obj );
904  }
905  StatusCode findObject( IRegistry* pReg, CSTR path, P2D*& obj ) override
906  {
907  return Helper( this ).find( pReg, path, obj );
908  }
909  StatusCode findObject( IRegistry* pReg, CSTR path, H1D*& obj ) override
910  {
911  return Helper( this ).find( pReg, path, obj );
912  }
913  StatusCode findObject( IRegistry* pReg, CSTR path, H2D*& obj ) override
914  {
915  return Helper( this ).find( pReg, path, obj );
916  }
917  StatusCode findObject( IRegistry* pReg, CSTR path, H3D*& obj ) override
918  {
919  return Helper( this ).find( pReg, path, obj );
920  }
921  //------------------------------------------------------------------------------
922  StatusCode findObject( CSTR full, P1D*& obj ) override { return Helper( this ).find( full, obj ); }
923  StatusCode findObject( CSTR full, P2D*& obj ) override { return Helper( this ).find( full, obj ); }
924  StatusCode findObject( CSTR full, H1D*& obj ) override { return Helper( this ).find( full, obj ); }
925  StatusCode findObject( CSTR full, H2D*& obj ) override { return Helper( this ).find( full, obj ); }
926  StatusCode findObject( CSTR full, H3D*& obj ) override { return Helper( this ).find( full, obj ); }
927  //------------------------------------------------------------------------------
928  StatusCode findObject( CSTR par, CSTR rel, P1D*& obj ) override { return Helper( this ).find( par, rel, obj ); }
929  StatusCode findObject( CSTR par, CSTR rel, P2D*& obj ) override { return Helper( this ).find( par, rel, obj ); }
930  StatusCode findObject( CSTR par, CSTR rel, H1D*& obj ) override { return Helper( this ).find( par, rel, obj ); }
931  StatusCode findObject( CSTR par, CSTR rel, H2D*& obj ) override { return Helper( this ).find( par, rel, obj ); }
932  StatusCode findObject( CSTR par, CSTR rel, H3D*& obj ) override { return Helper( this ).find( par, rel, obj ); }
933  //------------------------------------------------------------------------------
934  StatusCode findObject( CSTR par, int item, P1D*& obj ) override { return Helper( this ).find( par, item, obj ); }
935  StatusCode findObject( CSTR par, int item, P2D*& obj ) override { return Helper( this ).find( par, item, obj ); }
936  StatusCode findObject( CSTR par, int item, H1D*& obj ) override { return Helper( this ).find( par, item, obj ); }
937  StatusCode findObject( CSTR par, int item, H2D*& obj ) override { return Helper( this ).find( par, item, obj ); }
938  StatusCode findObject( CSTR par, int item, H3D*& obj ) override { return Helper( this ).find( par, item, obj ); }
939  //------------------------------------------------------------------------------
940  StatusCode findObject( DataObject* par, int item, P1D*& obj ) override
941  {
942  return Helper( this ).find( par, item, obj );
943  }
944  StatusCode findObject( DataObject* par, int item, P2D*& obj ) override
945  {
946  return Helper( this ).find( par, item, obj );
947  }
948  StatusCode findObject( DataObject* par, int item, H1D*& obj ) override
949  {
950  return Helper( this ).find( par, item, obj );
951  }
952  StatusCode findObject( DataObject* par, int item, H2D*& obj ) override
953  {
954  return Helper( this ).find( par, item, obj );
955  }
956  StatusCode findObject( DataObject* par, int item, H3D*& obj ) override
957  {
958  return Helper( this ).find( par, item, obj );
959  }
960  //------------------------------------------------------------------------------
961  StatusCode findObject( DataObject* par, CSTR item, P1D*& obj ) override
962  {
963  return Helper( this ).find( par, item, obj );
964  }
965  StatusCode findObject( DataObject* par, CSTR item, P2D*& obj ) override
966  {
967  return Helper( this ).find( par, item, obj );
968  }
969  StatusCode findObject( DataObject* par, CSTR item, H1D*& obj ) override
970  {
971  return Helper( this ).find( par, item, obj );
972  }
973  StatusCode findObject( DataObject* par, CSTR item, H2D*& obj ) override
974  {
975  return Helper( this ).find( par, item, obj );
976  }
977  StatusCode findObject( DataObject* par, CSTR item, H3D*& obj ) override
978  {
979  return Helper( this ).find( par, item, obj );
980  }
981  //------------------------------------------------------------------------------
982  StatusCode findObject( Base* par, int item, P1D*& obj ) override
983  {
984  return Helper( this ).find( __cast( par ), item, obj );
985  }
986  StatusCode findObject( Base* par, int item, P2D*& obj ) override
987  {
988  return Helper( this ).find( __cast( par ), item, obj );
989  }
990  StatusCode findObject( Base* par, int item, H1D*& obj ) override
991  {
992  return Helper( this ).find( __cast( par ), item, obj );
993  }
994  StatusCode findObject( Base* par, int item, H2D*& obj ) override
995  {
996  return Helper( this ).find( __cast( par ), item, obj );
997  }
998  StatusCode findObject( Base* par, int item, H3D*& obj ) override
999  {
1000  return Helper( this ).find( __cast( par ), item, obj );
1001  }
1002  //------------------------------------------------------------------------------
1003  StatusCode findObject( Base* par, CSTR item, P1D*& obj ) override
1004  {
1005  return Helper( this ).find( __cast( par ), item, obj );
1006  }
1007  StatusCode findObject( Base* par, CSTR item, P2D*& obj ) override
1008  {
1009  return Helper( this ).find( __cast( par ), item, obj );
1010  }
1011  StatusCode findObject( Base* par, CSTR item, H1D*& obj ) override
1012  {
1013  return Helper( this ).find( __cast( par ), item, obj );
1014  }
1015  StatusCode findObject( Base* par, CSTR item, H2D*& obj ) override
1016  {
1017  return Helper( this ).find( __cast( par ), item, obj );
1018  }
1019  StatusCode findObject( Base* par, CSTR item, H3D*& obj ) override
1020  {
1021  return Helper( this ).find( __cast( par ), item, obj );
1022  }
1023 
1024  // ==========================================================================
1025  // Projections and slices.
1026  // ==========================================================================
1027  H1D* projectionX( CSTR name, const H2D& h ) override
1028  {
1029  return sliceX( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1030  }
1031  H1D* projectionY( CSTR name, const H2D& h ) override
1032  {
1033  return sliceY( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1034  }
1035  H1D* sliceX( CSTR name, const H2D& h, int indexY ) override { return sliceX( name, h, indexY, indexY ); }
1036  H1D* sliceY( CSTR name, const H2D& h, int indexX ) override { return sliceY( name, h, indexX, indexX ); }
1037  H1D* sliceX( CSTR name, const H2D& h, int indexY1, int indexY2 ) override;
1038  H1D* sliceY( CSTR name, const H2D& h, int indexX1, int indexX2 ) override;
1039  //------------------------------------------------------------------------------
1040  bool destroy( IBaseHistogram* hist ) override;
1041 
1042  H1D* add( CSTR nameAndTitle, const H1D& a, const H1D& b ) override
1043  {
1044  return Helper::act( createCopy( nameAndTitle, a ), b, &TH1::Add, 1. );
1045  }
1046  H1D* subtract( CSTR nameAndTitle, const H1D& a, const H1D& b ) override
1047  {
1048  return Helper::act( createCopy( nameAndTitle, a ), b, &TH1::Add, -1. );
1049  }
1050  H1D* multiply( CSTR nameAndTitle, const H1D& a, const H1D& b ) override
1051  {
1052  return Helper::act( createCopy( nameAndTitle, a ), b, &TH1::Multiply );
1053  }
1054  H1D* divide( CSTR nameAndTitle, const H1D& a, const H1D& b ) override
1055  {
1056  return Helper::act( createCopy( nameAndTitle, a ), b, &TH1::Divide );
1057  }
1058 
1059  H2D* add( CSTR nameAndTitle, const H2D& a, const H2D& b ) override
1060  {
1061  return Helper::act( createCopy( nameAndTitle, a ), b, &TH2D::Add, 1. );
1062  }
1063  H2D* subtract( CSTR nameAndTitle, const H2D& a, const H2D& b ) override
1064  {
1065  return Helper::act( createCopy( nameAndTitle, a ), b, &TH2D::Add, -1. );
1066  }
1067  H2D* multiply( CSTR nameAndTitle, const H2D& a, const H2D& b ) override
1068  {
1069  return Helper::act( createCopy( nameAndTitle, a ), b, &TH2D::Multiply );
1070  }
1071  H2D* divide( CSTR nameAndTitle, const H2D& a, const H2D& b ) override
1072  {
1073  return Helper::act( createCopy( nameAndTitle, a ), b, &TH2D::Divide );
1074  }
1075 
1076  H3D* add( CSTR nameAndTitle, const H3D& a, const H3D& b ) override
1077  {
1078  return Helper::act( createCopy( nameAndTitle, a ), b, &TH3D::Add, 1. );
1079  }
1080  H3D* subtract( CSTR nameAndTitle, const H3D& a, const H3D& b ) override
1081  {
1082  return Helper::act( createCopy( nameAndTitle, a ), b, &TH3D::Add, -1. );
1083  }
1084  H3D* multiply( CSTR nameAndTitle, const H3D& a, const H3D& b ) override
1085  {
1086  return Helper::act( createCopy( nameAndTitle, a ), b, &TH3D::Multiply );
1087  }
1088  H3D* divide( CSTR nameAndTitle, const H3D& a, const H3D& b ) override
1089  {
1090  return Helper::act( createCopy( nameAndTitle, a ), b, &TH3D::Divide );
1091  }
1092 
1093  H2D* projectionXY( CSTR nameAndTitle, const H3D& h ) override { return i_project( nameAndTitle, h, "xy" ); }
1094  H2D* projectionXZ( CSTR nameAndTitle, const H3D& h ) override { return i_project( nameAndTitle, h, "xz" ); }
1095  H2D* projectionYZ( CSTR nameAndTitle, const H3D& h ) override { return i_project( nameAndTitle, h, "yz" ); }
1096  H2D* sliceXY( CSTR /* nameAndTitle */, const H3D& /* h */, int /* low */,
1097  int /* high */ ) override NOT_IMPLEMENTED H2D* sliceXZ( CSTR /* nameAndTitle */, const H3D& /* h */,
1098  int /* low */, int /* high */ ) override
1099  NOT_IMPLEMENTED H2D* sliceYZ( CSTR /* nameAndTitle */, const H3D& /* h */, int /* low */,
1100  int /* high */ ) override NOT_IMPLEMENTED
1101 
1102  //------------------------------------------------------------------------------
1103  H1D* createHistogram1D( CSTR name, CSTR tit, DBINS( x ) )
1104  {
1105  return book( name, tit, BINS( x ) );
1106  }
1107  H1D* createHistogram1D( CSTR name, CSTR tit, DBINS( x ), CSTR /*opt*/ ) override
1108  {
1109  return book( name, tit, BINS( x ) );
1110  }
1111  H1D* createHistogram1D( CSTR name, CSTR title, const Edges& x, CSTR /*opt*/ ) override
1112  {
1113  return book( name, title, x );
1114  }
1115  H1D* createHistogram1D( CSTR nameAndTitle, DBINS( x ) ) override
1116  {
1117  return book( nameAndTitle, nameAndTitle, BINS( x ) );
1118  }
1119  H1D* createCopy( CSTR full, const H1D& h ) override { return createCopy( i_splitPath( full ), h ); }
1120  H1D* createCopy( CSTR par, CSTR rel, const H1D& h ) { return createCopy( createPath( par ), rel, h ); }
1121  H1D* createCopy( STRPAIR loc, const H1D& h ) { return createCopy( loc.first, loc.second, h ); }
1122  H1D* createCopy( DataObject* pPar, CSTR rel, const H1D& h )
1123  {
1124  return i_book( pPar, rel, h.title(), Gaudi::createH1D( h ) );
1125  }
1126  //------------------------------------------------------------------------------
1127  H2D* createHistogram2D( CSTR name, CSTR tit, DBINS( x ), DBINS( y ) )
1128  {
1129  return book( name, tit, BINS( x ), BINS( y ) );
1130  }
1131  H2D* createHistogram2D( CSTR name, CSTR tit, DBINS( x ), DBINS( y ), CSTR /*opt*/ ) override
1132  {
1133  return book( name, tit, BINS( x ), BINS( y ) );
1134  }
1135  H2D* createHistogram2D( CSTR name, CSTR title, const Edges& x, const Edges& y, CSTR /*opt*/ ) override
1136  {
1137  return book( name, title, x, y );
1138  }
1139  H2D* createHistogram2D( CSTR nameAndTitle, DBINS( x ), DBINS( y ) ) override
1140  {
1141  return book( nameAndTitle, nameAndTitle, BINS( x ), BINS( y ) );
1142  }
1143  H2D* createCopy( CSTR full, const H2D& h ) override { return createCopy( i_splitPath( full ), h ); }
1144  H2D* createCopy( CSTR par, CSTR rel, const H2D& h ) { return createCopy( createPath( par ), rel, h ); }
1145  H2D* createCopy( STRPAIR loc, const H2D& h ) { return createCopy( loc.first, loc.second, h ); }
1146  H2D* createCopy( DataObject* pPar, CSTR rel, const H2D& h )
1147  {
1148  return i_book( pPar, rel, h.title(), Gaudi::createH2D( h ) );
1149  }
1150  //------------------------------------------------------------------------------
1151  H3D* createHistogram3D( CSTR name, CSTR tit, DBINS( x ), DBINS( y ), DBINS( z ) )
1152  {
1153  return book( name, tit, BINS( x ), BINS( y ), BINS( z ) );
1154  }
1155  H3D* createHistogram3D( CSTR name, CSTR tit, DBINS( x ), DBINS( y ), DBINS( z ), CSTR /*opt*/ ) override
1156  {
1157  return book( name, tit, BINS( x ), BINS( y ), BINS( z ) );
1158  }
1159  H3D* createHistogram3D( CSTR name, CSTR title, const Edges& x, const Edges& y, const Edges& z, CSTR /*opt*/ ) override
1160  {
1161  return book( name, title, x, y, z );
1162  }
1163  H3D* createHistogram3D( CSTR nameAndTitle, DBINS( x ), DBINS( y ), DBINS( z ) ) override
1164  {
1165  return book( nameAndTitle, nameAndTitle, BINS( x ), BINS( y ), BINS( z ) );
1166  }
1167  H3D* createCopy( CSTR full, const H3D& h ) override { return createCopy( i_splitPath( full ), h ); }
1168  H3D* createCopy( CSTR par, CSTR rel, const H3D& h ) { return createCopy( createPath( par ), rel, h ); }
1169  H3D* createCopy( STRPAIR loc, const H3D& h ) { return createCopy( loc.first, loc.second, h ); }
1170  H3D* createCopy( DataObject* pPar, CSTR rel, const H3D& h )
1171  {
1172  return i_book( pPar, rel, h.title(), Gaudi::createH3D( h ) );
1173  }
1174  //------------------------------------------------------------------------------
1175 
1176  P1D* createProfile1D( CSTR name, CSTR tit, DBINS( x ), CSTR opt ) override
1177  {
1178  return bookProf( name, tit, BINS( x ), opt );
1179  }
1180  P1D* createProfile1D( CSTR name, CSTR tit, DBINS( x ), double upper, double lower, CSTR opt ) override
1181  {
1182  return bookProf( name, tit, BINS( x ), upper, lower, opt );
1183  }
1184  P1D* createProfile1D( CSTR name, CSTR title, const Edges& x, CSTR /* opt */ ) override
1185  {
1186  return bookProf( name, title, x );
1187  }
1188  P1D* createProfile1D( CSTR name, CSTR title, const Edges& x, double upper, double lower, CSTR /* opt */ ) override
1189  {
1190  return bookProf( name, title, x, upper, lower );
1191  }
1192 
1193  P1D* createProfile1D( CSTR nametit, DBINS( x ) ) override { return bookProf( nametit, nametit, BINS( x ), "s" ); }
1194  P1D* createProfile1D( CSTR nametit, DBINS( x ), double upper, double lower ) override
1195  {
1196  return bookProf( nametit, nametit, BINS( x ), upper, lower, "s" );
1197  }
1198 
1199  P1D* createCopy( CSTR full, const P1D& h ) override { return createCopy( i_splitPath( full ), h ); }
1200  P1D* createCopy( CSTR par, CSTR rel, const P1D& h ) { return createCopy( createPath( par ), rel, h ); }
1201  P1D* createCopy( STRPAIR loc, const P1D& h ) { return createCopy( loc.first, loc.second, h ); }
1202  P1D* createCopy( DataObject* pPar, CSTR rel, const P1D& h )
1203  {
1204  return i_book( pPar, rel, h.title(), Gaudi::createProf1D( h ) );
1205  }
1206  //------------------------------------------------------------------------------
1207  P2D* createProfile2D( CSTR name, CSTR tit, DBINS( x ), DBINS( y ) )
1208  {
1209  return bookProf( name, tit, BINS( x ), BINS( y ) );
1210  }
1211  P2D* createProfile2D( CSTR name, CSTR tit, DBINS( x ), DBINS( y ), CSTR /*opt*/ ) override
1212  {
1213  return bookProf( name, tit, BINS( x ), BINS( y ) );
1214  }
1215  P2D* createProfile2D( CSTR name, CSTR title, const Edges& x, const Edges& y, CSTR /*opt*/ ) override
1216  {
1217  return bookProf( name, title, x, y );
1218  }
1219  P2D* createProfile2D( CSTR nameAndTitle, DBINS( x ), DBINS( y ) ) override
1220  {
1221  return bookProf( nameAndTitle, nameAndTitle, BINS( x ), BINS( y ) );
1222  }
1223 
1224  P2D* createProfile2D( CSTR name, CSTR tit, DBINS( x ), DBINS( y ), double upper, double lower )
1225  {
1226  return bookProf( name, tit, BINS( x ), BINS( y ), upper, lower );
1227  }
1228  P2D* createProfile2D( CSTR name, CSTR tit, DBINS( x ), DBINS( y ), double upper, double lower, CSTR /*opt*/ ) override
1229  {
1230  return bookProf( name, tit, BINS( x ), BINS( y ), upper, lower );
1231  }
1232  P2D* createProfile2D( CSTR name, CSTR title, const Edges& x, const Edges& y, double upper, double lower,
1233  CSTR /*opt*/ ) override
1234  {
1235  return bookProf( name, title, x, y, upper, lower );
1236  }
1237  P2D* createProfile2D( CSTR nameAndTitle, DBINS( x ), DBINS( y ), double upper, double lower ) override
1238  {
1239  return bookProf( nameAndTitle, nameAndTitle, BINS( x ), BINS( y ), upper, lower );
1240  }
1241 
1242  P2D* createCopy( CSTR full, const P2D& h ) override { return createCopy( i_splitPath( full ), h ); }
1243  P2D* createCopy( CSTR par, CSTR rel, const P2D& h ) { return createCopy( createPath( par ), rel, h ); }
1244  P2D* createCopy( STRPAIR loc, const P2D& h ) { return createCopy( loc.first, loc.second, h ); }
1245  P2D* createCopy( DataObject* pPar, CSTR rel, const P2D& h )
1246  {
1247  return i_book( pPar, rel, h.title(), Gaudi::createProf2D( h ) );
1248  }
1249  //------------------------------------------------------------------------------
1250  AIDA::ICloud1D* createCloud1D( CSTR, CSTR, int, CSTR ) override NOT_IMPLEMENTED AIDA::ICloud1D* createCloud1D(
1251  CSTR ) override NOT_IMPLEMENTED AIDA::ICloud1D* createCopy( CSTR, const AIDA::ICloud1D& ) override
1252  NOT_IMPLEMENTED AIDA::ICloud2D* createCloud2D( CSTR, CSTR, int, CSTR ) override
1253  NOT_IMPLEMENTED AIDA::ICloud2D* createCloud2D( CSTR ) override NOT_IMPLEMENTED AIDA::ICloud2D* createCopy(
1254  CSTR, const AIDA::ICloud2D& ) override NOT_IMPLEMENTED AIDA::ICloud3D* createCloud3D( CSTR, CSTR, int, CSTR )
1255  override NOT_IMPLEMENTED AIDA::ICloud3D* createCloud3D( CSTR ) override
1256  NOT_IMPLEMENTED AIDA::ICloud3D* createCopy( CSTR, const AIDA::ICloud3D& ) override NOT_IMPLEMENTED
1257 
1263 
1265  std::ostream& print( Base* h, std::ostream& s = std::cout ) const override;
1266 
1268  std::ostream& write( Base* h, std::ostream& s = std::cout ) const override;
1269 
1271  int write( Base* h, const char* file_name ) const override;
1272 
1274  DataObject* createPath( CSTR newPath ) override;
1275 
1280  DataObject* createDirectory( CSTR parentDir, CSTR subDir ) override;
1281 
1282 public:
1283  // ==========================================================================
1285  void update1Ddefs( Gaudi::Details::PropertyBase& );
1286  // ==========================================================================
1288  // ==========================================================================
1289 private:
1290  Gaudi::Property<DBaseEntries> m_input{this, "Input", {}, "input streams"};
1291  Gaudi::Property<Histo1DMap> m_defs1D{this, "Predefined1DHistos", {}, "histograms with predefined parameters"};
1292 
1293  // ==========================================================================
1294  // modified histograms:
1296  // ==========================================================================
1297 };
1298 // ===========================================================================
1299 // The END
1300 // ===========================================================================
1301 #endif // GAUDISVC_HISTOGRAMSVC_H
1302 // ===========================================================================
StatusCode unregisterObject(const std::string &fullPath) override
Unregister object from the data store.
Definition: DataSvc.cpp:471
StatusCode findObject(DataObject *par, int item, H1D *&obj) override
Definition: HistogramSvc.h:948
H2D * book(CSTR par, CSTR rel, CSTR title, Edges x, Edges y) override
Definition: HistogramSvc.h:527
P2D * createProfile2D(CSTR nameAndTitle, DBINS(x), DBINS(y)) override
virtual P2D * bookProf(STRPAIR loc, CSTR title, Edges x, Edges y, double upper, double lower)
Definition: HistogramSvc.h:602
H1D * createCopy(CSTR par, CSTR rel, const H1D &h)
H1D * book(DataObject *pPar, int hID, CSTR title, Edges e) override
Definition: HistogramSvc.h:324
P2D * bookProf(DataObject *pPar, CSTR rel, CSTR title, DBINS(x), DBINS(y)) override
Definition: HistogramSvc.h:505
H3D * book(DataObject *pPar, int hID, CSTR title, Edges x, Edges y, Edges z) override
Definition: HistogramSvc.h:685
P1D * bookProf(CSTR full, CSTR title, DBINS(x), double upper, double lower, CSTR opt) override
Definition: HistogramSvc.h:298
StatusCode retrieveObject(IRegistry *pReg, CSTR path, H1D *&obj) override
Definition: HistogramSvc.h:741
StatusCode retrieveObject(IRegistry *pReg, CSTR path, H2D *&obj) override
Definition: HistogramSvc.h:749
StatusCode findObject(CSTR par, int item, H2D *&obj) override
Definition: HistogramSvc.h:937
virtual P2D * bookProf(CSTR par, int hID, CSTR title, Edges x, Edges y, double upper, double lower)
Definition: HistogramSvc.h:594
StatusCode findObject(IRegistry *pReg, CSTR path, H2D *&obj) override
Definition: HistogramSvc.h:913
StatusCode findObject(CSTR par, CSTR rel, H2D *&obj) override
Definition: HistogramSvc.h:931
virtual H1D * book(STRPAIR loc, CSTR title, Edges e)
Definition: HistogramSvc.h:329
StatusCode retrieveObject(Base *par, int item, H1D *&obj) override
Definition: HistogramSvc.h:860
P1D * bookProf(CSTR par, CSTR rel, CSTR title, DBINS(x), double upper, double lower, CSTR opt) override
Definition: HistogramSvc.h:282
P1D * createCopy(CSTR full, const P1D &h) override
StatusCode retrieveObject(Base *par, int item, P2D *&obj) override
Definition: HistogramSvc.h:856
H2D * createCopy(DataObject *pPar, CSTR rel, const H2D &h)
P2D * bookProf(DataObject *pPar, int hID, CSTR title, Edges x, Edges y) override
Definition: HistogramSvc.h:573
H1D * createCopy(DataObject *pPar, CSTR rel, const H1D &h)
virtual P2D * bookProf(DataObject *pPar, int hID, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
Definition: HistogramSvc.h:476
StatusCode retrieveObject(CSTR parent, int item, P2D *&obj) override
Definition: HistogramSvc.h:793
Define general base for Gaudi exception.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
const std::string & CSTR
Definition: HistogramSvc.h:59
std::set< std::string > m_mods1D
H2D * book(CSTR full, CSTR title, Edges x, Edges y) override
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:526
H3D * book(DataObject *pPar, int hID, CSTR title, DBINS(x), DBINS(y), DBINS(z)) override
Definition: HistogramSvc.h:642
virtual P1D * bookProf(STRPAIR loc, CSTR title, Edges e, double upper, double lower)
Definition: HistogramSvc.h:388
StatusCode retrieveObject(DataObject *par, int item, P1D *&obj) override
Definition: HistogramSvc.h:831
H1D * book(CSTR par, CSTR rel, CSTR title, DBINS(x)) override
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:222
H1D * projectionX(CSTR name, const H2D &h) override
GAUDI_API AIDA::IHistogram1D * book(IHistogramSvc *svc, const std::string &path, const Gaudi::Histo1DDef &hist)
helper function to book 1D-histogram
Definition: HistoDef.cpp:124
std::map< std::string, Gaudi::Histo1DDef > Histo1DMap
Implementation of property with value of concrete type.
Definition: Property.h:314
StatusCode retrieveObject(CSTR parent, CSTR rel, P2D *&obj) override
Definition: HistogramSvc.h:772
H3D * book(CSTR par, int hID, CSTR title, DBINS(x), DBINS(y), DBINS(z)) override
Definition: HistogramSvc.h:638
virtual H2D * book(STRPAIR loc, CSTR title, DBINS(x), DBINS(y))
Definition: HistogramSvc.h:428
P2D * createProfile2D(CSTR name, CSTR tit, DBINS(x), DBINS(y), double upper, double lower)
StatusCode findObject(CSTR par, int item, P2D *&obj) override
Definition: HistogramSvc.h:935
H3D * multiply(CSTR nameAndTitle, const H3D &a, const H3D &b) override
H3D * add(CSTR nameAndTitle, const H3D &a, const H3D &b) override
StatusCode retrieveObject(DataObject *par, CSTR item, P2D *&obj) override
Definition: HistogramSvc.h:814
virtual P2D * bookProf(CSTR par, CSTR rel, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
Definition: HistogramSvc.h:464
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
StatusCode unregisterObject(Base *obj, CSTR objectPath) override
Definition: HistogramSvc.h:730
P2D * createProfile2D(CSTR name, CSTR title, const Edges &x, const Edges &y, CSTR) override
StatusCode findObject(CSTR par, CSTR rel, P2D *&obj) override
Definition: HistogramSvc.h:929
H2D * book(DataObject *pPar, int hID, CSTR title, DBINS(x), DBINS(y)) override
Definition: HistogramSvc.h:432
StatusCode retrieveObject(CSTR full, P1D *&obj) override
Definition: HistogramSvc.h:762
std::pair< DataObject *, AIDA::IHistogram1D * > createH1D(const AIDA::IHistogram1D &hist)
Copy constructor.
P1D * bookProf(DataObject *pPar, int hID, CSTR title, Edges e) override
Definition: HistogramSvc.h:362
H1D * divide(CSTR nameAndTitle, const H1D &a, const H1D &b) override
H2D * createHistogram2D(CSTR name, CSTR tit, DBINS(x), DBINS(y), CSTR) override
P1D * bookProf(CSTR par, CSTR rel, CSTR title, Edges e) override
Definition: HistogramSvc.h:354
const std::pair< std::string, std::string > & STRPAIR
Definition: HistogramSvc.h:56
P1D * createCopy(STRPAIR loc, const P1D &h)
P1D * createProfile1D(CSTR name, CSTR title, const Edges &x, CSTR) override
StatusCode findObject(IRegistry *pReg, CSTR path, P1D *&obj) override
Definition: HistogramSvc.h:901
StatusCode findObject(DataObject *par, CSTR item, H1D *&obj) override
Definition: HistogramSvc.h:969
P2D * bookProf(DataObject *pPar, int hID, CSTR title, DBINS(x), DBINS(y)) override
Definition: HistogramSvc.h:501
H1D * book(CSTR par, CSTR rel, CSTR title, Edges e) override
Definition: HistogramSvc.h:328
P2D * bookProf(DataObject *pPar, CSTR rel, CSTR title, Edges x, Edges y) override
Definition: HistogramSvc.h:581
StatusCode retrieveObject(CSTR parent, int item, P1D *&obj) override
Definition: HistogramSvc.h:789
T to_string(T...args)
H1D * createHistogram1D(CSTR nameAndTitle, DBINS(x)) override
virtual H1D * book(STRPAIR loc, CSTR title, DBINS(x))
Definition: HistogramSvc.h:235
virtual P2D * bookProf(DataObject *pPar, CSTR rel, CSTR title, Edges x, Edges y, double upper, double lower)
Definition: HistogramSvc.h:606
StatusCode findObject(Base *par, CSTR item, P1D *&obj) override
H3D * createHistogram3D(CSTR name, CSTR title, const Edges &x, const Edges &y, const Edges &z, CSTR) override
H2D * book(DataObject *pPar, CSTR rel, CSTR title, Edges x, Edges y) override
Definition: HistogramSvc.h:540
virtual P2D * bookProf(CSTR full, CSTR title, Edges x, Edges y, double upper, double lower)
Definition: HistogramSvc.h:586
virtual P1D * bookProf(CSTR par, int hID, CSTR title, Edges e, double upper, double lower)
Definition: HistogramSvc.h:380
T * i_book(DataObject *pPar, CSTR rel, CSTR title, const std::pair< DataObject *, T * > &o)
Definition: HistogramSvc.h:172
StatusCode retrieveObject(IRegistry *pReg, CSTR path, P1D *&obj) override
Definition: HistogramSvc.h:745
StatusCode findObject(CSTR full, P1D *&obj) override
Definition: HistogramSvc.h:922
void not_implemented() const
Definition: HistogramSvc.h:57
StatusCode find(A1 a1, A3 *&a3)
Definition: HistogramSvc.h:88
P1D * bookProf(CSTR full, CSTR title, DBINS(x), CSTR opt) override
Definition: HistogramSvc.h:273
H1D * book(CSTR par, int hID, CSTR title, DBINS(x)) override
Definition: HistogramSvc.h:226
StatusCode findObject(Base *par, CSTR item, H3D *&obj) override
H1D * book(DataObject *pPar, CSTR rel, CSTR title, Edges e) override
Definition: HistogramSvc.h:331
StatusCode retrieve(A1 a1, A2 a2, A3 *&a3)
Definition: HistogramSvc.h:80
StatusCode unregisterObject(Base *obj) override
Definition: HistogramSvc.h:729
P1D * bookProf(DataObject *pPar, int hID, CSTR title, DBINS(x), CSTR opt) override
Definition: HistogramSvc.h:265
StatusCode findObject(CSTR full, H2D *&obj) override
Definition: HistogramSvc.h:925
virtual P2D * bookProf(STRPAIR loc, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
Definition: HistogramSvc.h:468
H2D * multiply(CSTR nameAndTitle, const H2D &a, const H2D &b) override
H3D * createHistogram3D(CSTR name, CSTR tit, DBINS(x), DBINS(y), DBINS(z))
StatusCode retrieveObject(CSTR parent, int item, H1D *&obj) override
Definition: HistogramSvc.h:797
virtual P1D * bookProf(CSTR full, CSTR title, Edges e, double upper, double lower)
Definition: HistogramSvc.h:372
virtual P1D * bookProf(DataObject *pPar, int hID, CSTR title, Edges e, double upper, double lower)
Definition: HistogramSvc.h:384
virtual P1D * bookProf(STRPAIR loc, CSTR title, Edges e)
Definition: HistogramSvc.h:366
H2D * createCopy(CSTR par, CSTR rel, const H2D &h)
H3D * book(CSTR par, CSTR rel, CSTR title, DBINS(x), DBINS(y), DBINS(z)) override
Definition: HistogramSvc.h:634
P1D * bookProf(CSTR par, CSTR rel, CSTR title, DBINS(x), CSTR opt) override
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:257
STL class.
virtual P2D * bookProf(STRPAIR loc, CSTR title, DBINS(x), DBINS(y))
Definition: HistogramSvc.h:493
GaudiKernel.
Definition: Fill.h:8
H2D * book(CSTR par, int hID, CSTR title, Edges x, Edges y) override
Definition: HistogramSvc.h:531
StatusCode retrieveObject(Base *par, int item, H2D *&obj) override
Definition: HistogramSvc.h:864
StatusCode retrieveObject(DataObject *par, int item, H3D *&obj) override
Definition: HistogramSvc.h:847
StatusCode findObject(CSTR full, H3D *&obj) override
Definition: HistogramSvc.h:926
H3D * book(CSTR full, CSTR title, DBINS(x), DBINS(y), DBINS(z)) override
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:630
H1D * add(CSTR nameAndTitle, const H1D &a, const H1D &b) override
StatusCode retrieveObject(Base *par, CSTR item, P1D *&obj) override
Definition: HistogramSvc.h:873
HistogramSvc * m_svc
Definition: HistogramSvc.h:69
StatusCode retrieveObject(CSTR full, H3D *&obj) override
Definition: HistogramSvc.h:766
std::pair< DataObject *, AIDA::IProfile2D * > createProf2D(const AIDA::IProfile2D &hist)
Copy constructor.
P1D * bookProf(DataObject *pPar, CSTR rel, CSTR title, DBINS(x), double upper, double lower, CSTR opt) override
Definition: HistogramSvc.h:302
H1D * createHistogram1D(CSTR name, CSTR tit, DBINS(x), CSTR) override
P1D * createProfile1D(CSTR nametit, DBINS(x)) override
StatusCode findObject(DataObject *par, int item, P2D *&obj) override
Definition: HistogramSvc.h:944
H2D * createHistogram2D(CSTR nameAndTitle, DBINS(x), DBINS(y)) override
STL class.
StatusCode retrieveObject(Base *par, int item, H3D *&obj) override
Definition: HistogramSvc.h:868
StatusCode findObject(CSTR par, int item, H1D *&obj) override
Definition: HistogramSvc.h:936
StatusCode retrieveObject(DataObject *par, CSTR item, H1D *&obj) override
Definition: HistogramSvc.h:818
H1D * subtract(CSTR nameAndTitle, const H1D &a, const H1D &b) override
StatusCode retrieveObject(CSTR full, P2D *&obj) override
Definition: HistogramSvc.h:763
StatusCode retrieveObject(Base *par, CSTR item, H2D *&obj) override
Definition: HistogramSvc.h:885
virtual P2D * bookProf(DataObject *pPar, int hID, CSTR title, Edges x, Edges y, double upper, double lower)
Definition: HistogramSvc.h:598
H2D * projectionXZ(CSTR nameAndTitle, const H3D &h) override
StatusCode findObject(CSTR par, CSTR rel, H1D *&obj) override
Definition: HistogramSvc.h:930
StatusCode retrieveObject(Base *par, int item, P1D *&obj) override
Definition: HistogramSvc.h:852
virtual P1D * bookProf(STRPAIR loc, CSTR title, DBINS(x), double upper, double lower, CSTR opt)
Definition: HistogramSvc.h:294
H2D * book(DataObject *pPar, CSTR rel, CSTR title, DBINS(x), DBINS(y)) override
Definition: HistogramSvc.h:436
#define BINS(x)
Definition: HistogramSvc.h:40
H3D * createHistogram3D(CSTR nameAndTitle, DBINS(x), DBINS(y), DBINS(z)) override
P1D * createProfile1D(CSTR nametit, DBINS(x), double upper, double lower) override
StatusCode findObject(CSTR full, P2D *&obj) override
Definition: HistogramSvc.h:923
virtual StatusCode findObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Find object identified by its directory entry.
H1D * createHistogram1D(CSTR name, CSTR tit, DBINS(x))
H1D * createCopy(STRPAIR loc, const H1D &h)
StatusCode findObject(Base *par, int item, P2D *&obj) override
Definition: HistogramSvc.h:986
StatusCode findObject(Base *par, int item, H2D *&obj) override
Definition: HistogramSvc.h:994
P2D * createProfile2D(CSTR name, CSTR tit, DBINS(x), DBINS(y), double upper, double lower, CSTR) override
AIDA::IProfile1D P1D
Definition: HistogramSvc.h:65
virtual StatusCode unregisterObject(const std::string &fullPath)=0
Unregister object from the data store.
H2D * subtract(CSTR nameAndTitle, const H2D &a, const H2D &b) override
StatusCode retrieveObject(DataObject *par, int item, P2D *&obj) override
Definition: HistogramSvc.h:835
StatusCode retrieveObject(DataObject *par, int item, H1D *&obj) override
Definition: HistogramSvc.h:839
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
static R * act(R *res, const S &b, void(T1::*pmf)(const T2 *))
Definition: HistogramSvc.h:126
AIDA::IHistogram2D H2D
Definition: HistogramSvc.h:63
P2D * createCopy(DataObject *pPar, CSTR rel, const P2D &h)
P2D * bookProf(CSTR par, int hID, CSTR title, DBINS(x), DBINS(y)) override
Definition: HistogramSvc.h:497
H1D * sliceY(CSTR name, const H2D &h, int indexX) override
virtual P2D * bookProf(CSTR par, CSTR rel, CSTR title, Edges x, Edges y, double upper, double lower)
Definition: HistogramSvc.h:590
P2D * createProfile2D(CSTR name, CSTR tit, DBINS(x), DBINS(y))
StatusCode findObject(DataObject *par, int item, H2D *&obj) override
Definition: HistogramSvc.h:952
StatusCode findObject(Base *par, CSTR item, H1D *&obj) override
AIDA::IBaseHistogram Base
Definition: HistogramSvc.h:67
P1D * createProfile1D(CSTR name, CSTR title, const Edges &x, double upper, double lower, CSTR) override
H1D * book(CSTR full, CSTR title, DBINS(x)) override
Definition: HistogramSvc.h:236
std::pair< DataObject *, AIDA::IHistogram2D * > createH2D(const AIDA::IHistogram2D &hist)
Copy constructor.
virtual P2D * bookProf(DataObject *pPar, CSTR rel, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
Definition: HistogramSvc.h:480
P1D * createCopy(CSTR par, CSTR rel, const P1D &h)
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
static DataObject * __cast(T *p)
Definition: HistogramSvc.h:180
P2D * createCopy(CSTR par, CSTR rel, const P2D &h)
H2D * add(CSTR nameAndTitle, const H2D &a, const H2D &b) override
StatusCode findObject(Base *par, CSTR item, H2D *&obj) override
StatusCode findObject(DataObject *par, CSTR item, H3D *&obj) override
Definition: HistogramSvc.h:977
StatusCode findObject(IRegistry *pReg, CSTR path, P2D *&obj) override
Definition: HistogramSvc.h:905
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
H3D * subtract(CSTR nameAndTitle, const H3D &a, const H3D &b) override
StatusCode findObject(Base *par, int item, H1D *&obj) override
Definition: HistogramSvc.h:990
virtual P2D * bookProf(CSTR full, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:460
H2D * projectionYZ(CSTR nameAndTitle, const H3D &h) override
P2D * createProfile2D(CSTR nameAndTitle, DBINS(x), DBINS(y), double upper, double lower) override
StatusCode findObject(CSTR par, CSTR rel, H3D *&obj) override
Definition: HistogramSvc.h:932
StatusCode findObject(IRegistry *pReg, CSTR path, H1D *&obj) override
Definition: HistogramSvc.h:909
H2D * book(CSTR par, int hID, CSTR title, DBINS(x), DBINS(y)) override
Definition: HistogramSvc.h:424
StatusCode registerObject(CSTR parent, CSTR rel, Base *obj) override
Definition: HistogramSvc.h:704
StatusCode findObject(CSTR full, H1D *&obj) override
Definition: HistogramSvc.h:924
StatusCode retrieveObject(CSTR parent, CSTR rel, H2D *&obj) override
Definition: HistogramSvc.h:780
H3D * createCopy(CSTR full, const H3D &h) override
P1D * bookProf(CSTR full, CSTR title, Edges e) override
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:353
H2D * createCopy(STRPAIR loc, const H2D &h)
P2D * bookProf(CSTR full, CSTR title, Edges x, Edges y) override
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:561
P1D * createCopy(DataObject *pPar, CSTR rel, const P1D &h)
H3D * createHistogram3D(CSTR name, CSTR tit, DBINS(x), DBINS(y), DBINS(z), CSTR) override
StatusCode retrieveObject(CSTR parent, int item, H3D *&obj) override
Definition: HistogramSvc.h:805
StatusCode retrieveObject(CSTR full, H1D *&obj) override
Definition: HistogramSvc.h:764
StatusCode findObject(CSTR par, CSTR rel, P1D *&obj) override
Definition: HistogramSvc.h:928
H1D * book(DataObject *pPar, int hID, CSTR title, DBINS(x)) override
Definition: HistogramSvc.h:230
StatusCode findObject(DataObject *par, int item, H3D *&obj) override
Definition: HistogramSvc.h:956
H2D * createHistogram2D(CSTR name, CSTR tit, DBINS(x), DBINS(y))
std::vector< std::string > DBaseEntries
Definition: HistogramSvc.h:61
P2D * bookProf(CSTR full, CSTR title, DBINS(x), DBINS(y)) override
Definition: HistogramSvc.h:485
StatusCode registerObject(Base *pPar, int item, Base *obj) override
Definition: HistogramSvc.h:720
StatusCode retrieveObject(DataObject *par, CSTR item, P1D *&obj) override
Definition: HistogramSvc.h:810
std::vector< double > Edges
Definition: HistogramSvc.h:60
H3D * createCopy(STRPAIR loc, const H3D &h)
H3D * book(DataObject *pPar, CSTR rel, CSTR title, Edges x, Edges y, Edges z) override
Definition: HistogramSvc.h:693
StatusCode retrieveObject(CSTR full, H2D *&obj) override
Definition: HistogramSvc.h:765
P2D * bookProf(CSTR par, CSTR rel, CSTR title, Edges x, Edges y) override
Definition: HistogramSvc.h:565
StatusCode registerObject(Base *pPar, CSTR rel, Base *obj) override
Definition: HistogramSvc.h:712
H3D * createCopy(DataObject *pPar, CSTR rel, const H3D &h)
#define DBINS(x)
Definition: HistogramSvc.h:39
P2D * createProfile2D(CSTR name, CSTR title, const Edges &x, const Edges &y, double upper, double lower, CSTR) override
StatusCode findObject(CSTR par, int item, H3D *&obj) override
Definition: HistogramSvc.h:938
StatusCode retrieveObject(Base *par, CSTR item, P2D *&obj) override
Definition: HistogramSvc.h:877
StatusCode unregisterObject(Base *obj, int item) override
Definition: HistogramSvc.h:734
static R * act(R *res, const S &b, Bool_t(T1::*pmf)(const T2 *, Double_t), Double_t scale)
Definition: HistogramSvc.h:115
virtual P2D * bookProf(CSTR par, int hID, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
Definition: HistogramSvc.h:472
virtual H2D * book(STRPAIR loc, CSTR title, Edges x, Edges y)
Definition: HistogramSvc.h:535
def bookProf(args, kwargs)
The trivial function to book 1D&2D profile histograms:
Definition: HistoUtils.py:232
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
std::pair< DataObject *, AIDA::IHistogram3D * > createH3D(const AIDA::IHistogram3D &hist)
Copy constructor.
AIDA::IHistogramFactory * histogramFactory() override
Retrieve the AIDA HistogramFactory interface.
Definition: HistogramSvc.h:200
H2D * createCopy(CSTR full, const H2D &h) override
virtual P1D * bookProf(DataObject *pPar, CSTR rel, CSTR title, Edges e, double upper, double lower)
Definition: HistogramSvc.h:392
P1D * bookProf(DataObject *pPar, int hID, CSTR title, DBINS(x), double upper, double lower, CSTR opt) override
Definition: HistogramSvc.h:290
void print(string text)
Definition: mergesort.cpp:33
StatusCode registerObject(CSTR parent, int item, Base *obj) override
Definition: HistogramSvc.h:708
StatusCode findObject(CSTR par, int item, P1D *&obj) override
Definition: HistogramSvc.h:934
virtual P1D * bookProf(CSTR par, CSTR rel, CSTR title, Edges e, double upper, double lower)
Definition: HistogramSvc.h:376
StatusCode retrieveObject(CSTR parent, CSTR rel, H3D *&obj) override
Definition: HistogramSvc.h:784
H1D * projectionY(CSTR name, const H2D &h) override
H1D * book(CSTR full, CSTR title, Edges e) override
Definition: HistogramSvc.h:330
H3D * book(DataObject *pPar, CSTR rel, CSTR title, DBINS(x), DBINS(y), DBINS(z)) override
Definition: HistogramSvc.h:650
static R * act(R *res, const S &b, Bool_t(T1::*pmf)(const T2 *))
Definition: HistogramSvc.h:137
StatusCode findObject(Base *par, CSTR item, P2D *&obj) override
StatusCode retrieveObject(Base *par, CSTR item, H1D *&obj) override
Definition: HistogramSvc.h:881
H1D * sliceX(CSTR name, const H2D &h, int indexY) override
StatusCode findObject(DataObject *par, int item, P1D *&obj) override
Definition: HistogramSvc.h:940
StatusCode retrieveObject(CSTR parent, CSTR rel, H1D *&obj) override
Definition: HistogramSvc.h:776
string s
Definition: gaudirun.py:245
P2D * bookProf(CSTR par, int hID, CSTR title, Edges x, Edges y) override
Definition: HistogramSvc.h:569
H3D * book(CSTR par, int hID, CSTR title, Edges x, Edges y, Edges z) override
Definition: HistogramSvc.h:681
StatusCode retrieveObject(DataObject *par, CSTR item, H3D *&obj) override
Definition: HistogramSvc.h:826
virtual P2D * bookProf(STRPAIR loc, CSTR title, Edges x, Edges y)
Definition: HistogramSvc.h:577
H1D * createCopy(CSTR full, const H1D &h) override
P1D * bookProf(CSTR par, int hID, CSTR title, DBINS(x), double upper, double lower, CSTR opt) override
Definition: HistogramSvc.h:286
#define NOT_IMPLEMENTED
Definition: HistogramSvc.h:41
P2D * createCopy(CSTR full, const P2D &h) override
H1D * createHistogram1D(CSTR name, CSTR title, const Edges &x, CSTR) override
H3D * book(CSTR full, CSTR title, Edges x, Edges y, Edges z) override
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:673
static R * act(R *res, const S &b, void(T1::*pmf)(const T2 *, Double_t), Double_t scale)
Definition: HistogramSvc.h:104
P2D * bookProf(CSTR par, CSTR rel, CSTR title, DBINS(x), DBINS(y)) override
Definition: HistogramSvc.h:489
StatusCode retrieveObject(IRegistry *pReg, CSTR path, P2D *&obj) override
Definition: HistogramSvc.h:753
StatusCode retrieveObject(DataObject *par, int item, H2D *&obj) override
Definition: HistogramSvc.h:843
H2D * projectionXY(CSTR nameAndTitle, const H3D &h) override
H3D * createCopy(CSTR par, CSTR rel, const H3D &h)
std::pair< DataObject *, AIDA::IProfile1D * > createProf1D(const AIDA::IProfile1D &hist)
Copy constructor.
StatusCode retrieveObject(CSTR parent, int item, H2D *&obj) override
Definition: HistogramSvc.h:801
Helper(HistogramSvc *p)
Definition: HistogramSvc.h:70
H2D * book(DataObject *pPar, int hID, CSTR title, Edges x, Edges y) override
Definition: HistogramSvc.h:536
P1D * bookProf(DataObject *pPar, CSTR rel, CSTR title, DBINS(x), CSTR opt) override
Definition: HistogramSvc.h:277
H3D * divide(CSTR nameAndTitle, const H3D &a, const H3D &b) override
P1D * createProfile1D(CSTR name, CSTR tit, DBINS(x), double upper, double lower, CSTR opt) override
StatusCode retrieveObject(DataObject *par, CSTR item, H2D *&obj) override
Definition: HistogramSvc.h:822
StatusCode findObject(DataObject *par, CSTR item, P2D *&obj) override
Definition: HistogramSvc.h:965
P1D * bookProf(DataObject *pPar, CSTR rel, CSTR title, Edges e) override
Definition: HistogramSvc.h:367
StatusCode retrieveObject(CSTR parent, CSTR rel, P1D *&obj) override
Definition: HistogramSvc.h:768
H2D * divide(CSTR nameAndTitle, const H2D &a, const H2D &b) override
StatusCode findObject(Base *par, int item, P1D *&obj) override
Definition: HistogramSvc.h:982
StatusCode retrieve(A1 a1, A3 *&a3)
Definition: HistogramSvc.h:72
StatusCode findObject(DataObject *par, CSTR item, H2D *&obj) override
Definition: HistogramSvc.h:973
H2D * book(CSTR par, CSTR rel, CSTR title, DBINS(x), DBINS(y)) override
Definition: HistogramSvc.h:420
AIDA::IProfile2D P2D
Definition: HistogramSvc.h:66
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)=0
Register object with the data store.
AIDA::IHistogram1D H1D
Definition: HistogramSvc.h:62
StatusCode retrieveObject(Base *par, CSTR item, H3D *&obj) override
Definition: HistogramSvc.h:889
virtual H3D * book(STRPAIR loc, CSTR title, DBINS(x), DBINS(y), DBINS(z))
Definition: HistogramSvc.h:646
H1D * multiply(CSTR nameAndTitle, const H1D &a, const H1D &b) override
AIDA::IHistogram3D H3D
Definition: HistogramSvc.h:64
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
P1D * createProfile1D(CSTR name, CSTR tit, DBINS(x), CSTR opt) override
virtual H3D * book(STRPAIR loc, CSTR title, Edges x, Edges y, Edges z)
Definition: HistogramSvc.h:689
STL class.
H1D * book(CSTR par, int hID, CSTR title, Edges e) override
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:323
P2D * createProfile2D(CSTR name, CSTR tit, DBINS(x), DBINS(y), CSTR) override
StatusCode registerObject(DataObject *pPar, int item, Base *obj) override
Definition: HistogramSvc.h:716
StatusCode findObject(DataObject *par, CSTR item, P1D *&obj) override
Definition: HistogramSvc.h:961
H2D * book(CSTR full, CSTR title, DBINS(x), DBINS(y)) override
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:416
virtual P1D * bookProf(STRPAIR loc, CSTR title, DBINS(x), CSTR opt)
Definition: HistogramSvc.h:269
H3D * book(CSTR par, CSTR rel, CSTR title, Edges x, Edges y, Edges z) override
Definition: HistogramSvc.h:677
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
P1D * bookProf(CSTR par, int hID, CSTR title, Edges e) override
Definition: HistogramSvc.h:358
StatusCode findObject(IRegistry *pReg, CSTR path, H3D *&obj) override
Definition: HistogramSvc.h:917
P2D * createCopy(STRPAIR loc, const P2D &h)
StatusCode findObject(Base *par, int item, H3D *&obj) override
Definition: HistogramSvc.h:998
H2D * createHistogram2D(CSTR name, CSTR title, const Edges &x, const Edges &y, CSTR) override
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
P1D * bookProf(CSTR par, int hID, CSTR title, DBINS(x), CSTR opt) override
Definition: HistogramSvc.h:261
StatusCode find(A1 a1, A2 a2, A3 *&a3)
Definition: HistogramSvc.h:96
StatusCode retrieveObject(IRegistry *pReg, CSTR path, H3D *&obj) override
Definition: HistogramSvc.h:757
HistogramSvc class definition.
Definition: HistogramSvc.h:52