| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

# HistogramSvc.h

Go to the documentation of this file.

    00001 // $Id: HistogramSvc.h,v 1.16 2008/10/09 09:59:14 marcocle Exp $
    00002 // ============================================================================
    00003 #ifndef GAUDISVC_HISTOGRAMSVC_H
    00004 #define GAUDISVC_HISTOGRAMSVC_H 1
    00005 // ============================================================================
    00006 // Include Files
    00007 // ============================================================================
    00008 // GaudiKernel
    00009 // ============================================================================
    00010 #include "GaudiKernel/System.h"
    00011 #include "GaudiKernel/DataSvc.h"
    00012 #include "GaudiKernel/IHistogramSvc.h"
    00013 #include "GaudiKernel/GaudiException.h"
    00014 #include "GaudiKernel/IRegistry.h"
    00015 #include "GaudiKernel/HistoProperty.h"
    00016 // ============================================================================
    00017 // AIDA
    00018 // ============================================================================
    00020 #include "AIDA_visibility_hack.h"
    00021 #include "AIDA/IHistogramFactory.h"
    00022 #include "AIDA/IAnnotation.h"
    00023 // ============================================================================
    00024 // local (+PI)
    00025 // ============================================================================
    00026 #include "Axis.h"
    00027 #include "GaudiPI.h"
    00028 #include "TH1.h"
    00029 #include "TH2.h"
    00030 #include "TH3.h"
    00031 // ============================================================================
    00032 namespace AIDA {
    00033   class ICloud1D;
    00034   class ICloud2D;
    00035   class ICloud3D;
    00036 }
    00037 // ============================================================================
    00038 // Forward declarations
    00039 template <class T> class SvcFactory;
    00040 #define DBINS(x) int n##x, double low##x, double up##x
    00041 #define BINS(x)  n##x, low##x, up##x
    00042 #define NOT_IMPLEMENTED { not_implemented(); return 0; }
    00043 // ============================================================================
    00049 class HistogramSvc : virtual public extends1<DataSvc, IHistogramSvc>,
    00050                      virtual public AIDA::IHistogramFactory
    00051 {
    00052
    00053 private:
    00054   // Allow SvcFactory to instantiate the service.
    00055   friend class SvcFactory<HistogramSvc>;
    00056   typedef const std::pair<std::string,std::string>& STRPAIR;
    00057   void not_implemented()  const {
    00058     MsgStream log( msgSvc(), name() );
    00059     log << MSG::ERROR << "Sorry, not yet implemented..." << endmsg;
    00060   }
    00061 protected:
    00062   typedef const std::string&       CSTR;
    00063   typedef std::vector<double>      Edges;
    00064   typedef std::vector<std::string> DBaseEntries;
    00065   typedef AIDA::IHistogram1D       H1D;
    00066   typedef AIDA::IHistogram2D       H2D;
    00067   typedef AIDA::IHistogram3D       H3D;
    00068   typedef AIDA::IProfile1D         P1D;
    00069   typedef AIDA::IProfile2D         P2D;
    00070   typedef AIDA::IBaseHistogram     Base;
    00071   struct Helper {
    00072     HistogramSvc* m_svc;
    00073     Helper(HistogramSvc* p) : m_svc(p) {}
    00074     template <class A1, class A3> StatusCode retrieve(A1 a1, A3*& a3)  {
    00075       DataObject* pObject  = 0;
    00076       StatusCode sc = m_svc->DataSvc::retrieveObject(a1,pObject);
    00077       a3 = dynamic_cast<A3*>(pObject);
    00078       return sc;
    00079     }
    00080     template <class A1, class A2, class A3> StatusCode retrieve(A1 a1, A2 a2, A3*& a3)  {
    00081       DataObject* pObject  = 0;
    00082       StatusCode sc = m_svc->DataSvc::retrieveObject(a1,a2,pObject);
    00083       a3 = dynamic_cast<A3*>(pObject);
    00084       return sc;
    00085     }
    00086     template <class A1, class A3> StatusCode find(A1 a1, A3*& a3)  {
    00087       DataObject* pObject  = 0;
    00088       StatusCode sc = m_svc->DataSvc::findObject(a1,pObject);
    00089       a3 = dynamic_cast<A3*>(pObject);
    00090       return sc;
    00091     }
    00092     template <class A1, class A2, class A3> StatusCode find(A1 a1, A2 a2, A3*& a3)  {
    00093       DataObject* pObject  = 0;
    00094       StatusCode sc = m_svc->DataSvc::findObject(a1,a2,pObject);
    00095       a3 = dynamic_cast<A3*>(pObject);
    00096       return sc;
    00097     }
    00098     template <class R, class S, class T1, class T2>
    00099     static R* act(R* res,const S& b, void (T1::*pmf)(const T2*,Double_t), Double_t scale)  {
    00100       T1 *h1 = Gaudi::getRepresentation<R,T1>(*res);
    00101       T1 *h2 = Gaudi::getRepresentation<R,T1>(b);
    00102       if ( h1 && h2 )  {
    00103         (h1->*pmf)(h2,scale);
    00104         return res;
    00105       }
    00106       return 0;
    00107     }
    00108     template <class R, class S, class T1, class T2>
    00109     static R* act(R* res,const S& b, void (T1::*pmf)(const T2*))  {
    00110       T1 *h1 = Gaudi::getRepresentation<R,T1>(*res);
    00111       T1 *h2 = Gaudi::getRepresentation<R,T1>(b);
    00112       if ( h1 && h2 )  {
    00113         (h1->*pmf)(h2);
    00114         return res;
    00115       }
    00116       return 0;
    00117     }
    00118   };
    00119
    00120
    00122   DBaseEntries                      m_input;
    00123
    00124 public:
    00129   HistogramSvc(CSTR name, ISvcLocator* svc );
    00130
    00132   virtual ~HistogramSvc();
    00133
    00139   std::pair<std::string,std::string> i_splitPath(CSTR full);
    00140
    00144   StatusCode connectInput(CSTR ident);
    00145   std::string _STR(int i);
    00146
    00147   template <class T> inline
    00148   T* i_book(DataObject* pPar,CSTR rel,CSTR title,const std::pair<DataObject*,T*>& o)  {
    00149     if (o.first && registerObject(pPar, rel, (Base*)o.second).isSuccess())
    00150       return o.second;
    00151     delete o.first;
    00152     throw GaudiException("Cannot book "+System::typeinfoName(typeid(T))+" "+title,
    00153       "HistogramSvc",StatusCode::FAILURE);
    00154   }
    00155   template <class T> static DataObject* __cast(T* p)  {
    00156     DataObject* q = dynamic_cast<DataObject*>(p);
    00157     if ( 0 == q && 0 != p )  {
    00158       throw std::runtime_error("HistogramSvc: Unexpected object type.");
    00159     }
    00160     return q;
    00161   }
    00163   H2D* i_project(CSTR nameAndTitle,const H3D& h, CSTR dir);
    00164
    00165 public:
    00167   virtual StatusCode initialize   ();
    00169   virtual StatusCode reinitialize ();
    00171   virtual StatusCode finalize     ();
    00172
    00174   virtual AIDA::IHistogramFactory* histogramFactory()   {  return this; }
    00175
    00176   // ==========================================================================
    00177   // Book 1D histogram with fix binning
    00178   // ==========================================================================
    00196   virtual H1D* book(CSTR par,  CSTR rel, CSTR title, DBINS(x))
    00197   {  return book(createPath(par), rel, title, BINS(x));                          }
    00198   virtual H1D* book(CSTR par,  int hID, CSTR title, DBINS(x))
    00199   {  return book(par, _STR(hID), title, BINS(x));                                }
    00200   virtual H1D* book(DataObject* pPar, int hID, CSTR title, DBINS(x))
    00201   {  return book(pPar, _STR(hID), title, BINS(x));                               }
    00202   virtual H1D* book(DataObject* pPar, CSTR rel, CSTR title, DBINS(x)) ;
    00203   virtual H1D* book(STRPAIR loc,CSTR title, DBINS(x))
    00204   { return book(loc.first, loc.second, title, BINS(x));                          }
    00205   virtual H1D* book(CSTR full, CSTR title, DBINS(x))
    00206   { return book(i_splitPath(full), title, BINS(x));                              }
    00207   // ==========================================================================
    00208   // Book 1D Profile histogram with fix binning
    00209   // ==========================================================================
    00227   virtual P1D* bookProf(CSTR par, CSTR rel, CSTR title, DBINS(x),CSTR opt)
    00228   { return bookProf(createPath(par), rel, title, BINS(x),opt);                     }
    00229   virtual P1D* bookProf(CSTR par, int hID, CSTR title, DBINS(x),CSTR opt )
    00230   { return bookProf(par, _STR(hID), title, BINS(x),opt);                           }
    00231   virtual P1D* bookProf(DataObject* pPar, int hID, CSTR title, DBINS(x),CSTR opt )
    00232   { return bookProf(pPar, _STR(hID), title, BINS(x),opt);                          }
    00233   virtual P1D* bookProf(STRPAIR loc,CSTR title, DBINS(x),CSTR opt)
    00234   { return bookProf(loc.first, loc.second, title, BINS(x),opt);                    }
    00235   virtual P1D* bookProf(CSTR full, CSTR title, DBINS(x),CSTR opt)
    00236   { return bookProf(i_splitPath(full), title, BINS(x),opt);                        }
    00237   virtual P1D* bookProf(DataObject* pPar, CSTR rel, CSTR title, DBINS(x),CSTR opt)
    00238   { return i_book(pPar,rel,title,Gaudi::createProf1D(title, BINS(x),0,0,opt));     }
    00239
    00240   virtual P1D* bookProf(CSTR par, CSTR rel, CSTR title, DBINS(x), double upper, double lower,CSTR opt)
    00241   { return bookProf(createPath(par), rel, title, BINS(x), upper, lower , opt);                     }
    00242   virtual P1D* bookProf(CSTR par, int hID, CSTR title, DBINS(x), double upper, double lower, CSTR opt)
    00243   { return bookProf(par, _STR(hID), title, BINS(x), upper, lower, opt );                           }
    00244   virtual P1D* bookProf(DataObject* pPar, int hID, CSTR title, DBINS(x), double upper, double lower, CSTR opt)
    00245   { return bookProf(pPar, _STR(hID), title, BINS(x), upper, lower, opt);                          }
    00246   virtual P1D* bookProf(STRPAIR loc,CSTR title, DBINS(x), double upper, double lower, CSTR opt)
    00247   { return bookProf(loc.first, loc.second, title, BINS(x), upper, lower,opt);                    }
    00248   virtual P1D* bookProf(CSTR full, CSTR title, DBINS(x), double upper, double lower, CSTR opt )
    00249   { return bookProf(i_splitPath(full), title, BINS(x), upper, lower , opt );                        }
    00250   virtual P1D* bookProf(DataObject* pPar, CSTR rel, CSTR title, DBINS(x), double upper, double lower, CSTR opt)
    00251   { return i_book(pPar,rel,title,Gaudi::createProf1D(title, BINS(x), upper, lower, opt));         }
    00252   // ==========================================================================
    00253   // Book 1D histogram with variable binning
    00254   // ==========================================================================
    00269   virtual H1D* book(CSTR par, int hID, CSTR title, Edges e)
    00270   {  return book(par, _STR(hID), title, e);                                 }
    00271   virtual H1D* book(DataObject* pPar, int hID, CSTR title, Edges e)
    00272   {  return book(pPar, _STR(hID), title, e);                                }
    00273   virtual H1D* book(CSTR par, CSTR rel, CSTR title, Edges e )
    00274   {  return book(createPath(par), rel, title, e);                           }
    00275   virtual H1D* book(STRPAIR loc,CSTR title, Edges e )
    00276   { return book(loc.first, loc.second, title, e);                           }
    00277   virtual H1D* book(CSTR full, CSTR title, Edges e )
    00278   { return book(i_splitPath(full), title, e);                               }
    00279   virtual H1D* book(DataObject* pPar, CSTR rel, CSTR title, Edges e )
    00280   { return i_book(pPar, rel, title, Gaudi::createH1D(title, e));            }
    00281
    00282   // ==========================================================================
    00283   // Book 1D profile histogram with variable binning
    00284   // ==========================================================================
    00299   virtual P1D* bookProf(CSTR full, CSTR title, Edges e )
    00300   { return bookProf(i_splitPath(full), title, e);                             }
    00301   virtual P1D* bookProf(CSTR par, CSTR rel, CSTR title, Edges e )
    00302   { return bookProf(createPath(par), rel, title, e);                          }
    00303   virtual P1D* bookProf(CSTR par, int hID, CSTR title, Edges e )
    00304   { return bookProf(par, _STR(hID), title, e);                                }
    00305   virtual P1D* bookProf(DataObject* pPar, int hID, CSTR title, Edges e )
    00306   { return bookProf(pPar, _STR(hID), title, e);                               }
    00307   virtual P1D* bookProf(STRPAIR loc,CSTR title, Edges e)
    00308   { return bookProf(loc.first, loc.second, title, e);                         }
    00309   virtual P1D* bookProf(DataObject* pPar, CSTR rel, CSTR title, Edges e )
    00310   { return i_book(pPar,rel,title,Gaudi::createProf1D(title, e, 0, 0));        }
    00311
    00312   virtual P1D* bookProf(CSTR full, CSTR title, Edges e, double upper, double lower)
    00313   { return bookProf(i_splitPath(full), title, e, upper, lower);               }
    00314   virtual P1D* bookProf(CSTR par, CSTR rel, CSTR title, Edges e, double upper, double lower)
    00315   { return bookProf(createPath(par), rel, title, e, upper, lower);            }
    00316   virtual P1D* bookProf(CSTR par, int hID, CSTR title, Edges e, double upper, double lower)
    00317   { return bookProf(par, _STR(hID), title, e, upper, lower);                  }
    00318   virtual P1D* bookProf(DataObject* pPar, int hID, CSTR title, Edges e, double upper, double lower)
    00319   { return bookProf(pPar, _STR(hID), title, e, upper, lower);                 }
    00320   virtual P1D* bookProf(STRPAIR loc,CSTR title, Edges e, double upper, double lower)
    00321   { return bookProf(loc.first, loc.second, title, e, upper, lower);           }
    00322   virtual P1D* bookProf(DataObject* pPar, CSTR rel, CSTR title, Edges e, double upper, double lower)
    00323   { return i_book(pPar,rel,title,Gaudi::createProf1D(title, e, upper, lower));}
    00324   // ==========================================================================
    00325   // Book 2D histogram with fixed binning
    00326   // ==========================================================================
    00344   virtual H2D* book(CSTR full, CSTR title, DBINS(x), DBINS(y))
    00345   { return book(i_splitPath(full), title, BINS(x),BINS(y));               }
    00346   virtual H2D* book(CSTR par, CSTR rel, CSTR title, DBINS(x), DBINS(y))
    00347   { return book(createPath(par), rel, title, BINS(x),BINS(y));            }
    00348   virtual H2D* book(CSTR par, int hID, CSTR title, DBINS(x), DBINS(y))
    00349   { return book(par,_STR(hID), title, BINS(x),BINS(y));                   }
    00350   virtual H2D* book(STRPAIR loc,CSTR title, DBINS(x), DBINS(y))
    00351   { return book(loc.first, loc.second, title, BINS(x), BINS(y));          }
    00352   virtual H2D* book(DataObject* pPar, int hID, CSTR title, DBINS(x), DBINS(y))
    00353   { return book(pPar,_STR(hID), title, BINS(x),BINS(y));                  }
    00354   virtual H2D* book(DataObject* pPar, CSTR rel, CSTR title, DBINS(x), DBINS(y))
    00355   { return i_book(pPar,rel,title,Gaudi::createH2D(title, BINS(x),BINS(y)));}
    00356   // ==========================================================================
    00357   // Book 2D profile histogram with fixed binning
    00358   // ==========================================================================
    00376   virtual P2D* bookProf(CSTR full, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
    00377   { return bookProf(i_splitPath(full), title, BINS(x),BINS(y), upper, lower);               }
    00378   virtual P2D* bookProf(CSTR par, CSTR rel, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
    00379   { return bookProf(createPath(par), rel, title, BINS(x),BINS(y), upper, lower);            }
    00380   virtual P2D* bookProf(STRPAIR loc,CSTR title, DBINS(x), DBINS(y), double upper, double lower)
    00381   { return bookProf(loc.first, loc.second, title, BINS(x), BINS(y), upper, lower);          }
    00382   virtual P2D* bookProf(CSTR par, int hID, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
    00383   { return bookProf(par, _STR(hID), title, BINS(x),BINS(y), upper, lower);                  }
    00384   virtual P2D* bookProf(DataObject* pPar, int hID, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
    00385   { return bookProf(pPar,_STR(hID), title, BINS(x),BINS(y), upper, lower);                  }
    00386   virtual P2D* bookProf(DataObject* pPar, CSTR rel, CSTR title, DBINS(x), DBINS(y), double upper, double lower)
    00387   { return i_book(pPar,rel,title,Gaudi::createProf2D(title, BINS(x),BINS(y), upper, lower));  }
    00388
    00389   virtual P2D* bookProf(CSTR full, CSTR title, DBINS(x), DBINS(y))
    00390   { return bookProf(i_splitPath(full), title, BINS(x),BINS(y));               }
    00391   virtual P2D* bookProf(CSTR par, CSTR rel, CSTR title, DBINS(x), DBINS(y))
    00392   { return bookProf(createPath(par), rel, title, BINS(x),BINS(y));            }
    00393   virtual P2D* bookProf(STRPAIR loc,CSTR title, DBINS(x), DBINS(y))
    00394   { return bookProf(loc.first, loc.second, title, BINS(x), BINS(y));          }
    00395   virtual P2D* bookProf(CSTR par, int hID, CSTR title, DBINS(x), DBINS(y))
    00396   { return bookProf(par, _STR(hID), title, BINS(x),BINS(y));                  }
    00397   virtual P2D* bookProf(DataObject* pPar, int hID, CSTR title, DBINS(x), DBINS(y))
    00398   { return bookProf(pPar,_STR(hID), title, BINS(x),BINS(y));                  }
    00399   virtual P2D* bookProf(DataObject* pPar, CSTR rel, CSTR title, DBINS(x), DBINS(y))
    00400   { return i_book(pPar,rel,title,Gaudi::createProf2D(title, BINS(x),BINS(y),0,0));}
    00401   // ==========================================================================
    00402   // Book 2D histogram with variable binning
    00403   // ==========================================================================
    00418   virtual H2D* book(CSTR full, CSTR title, Edges x, Edges y )
    00419   { return book(i_splitPath(full), title, x, y);                        }
    00420   virtual H2D* book(CSTR par, CSTR rel, CSTR title, Edges x, Edges y )
    00421   { return book(createPath(par), rel, title, x, y);                     }
    00422   virtual H2D* book(CSTR par, int hID, CSTR title, Edges x, Edges y )
    00423   { return book(par, _STR(hID), title, x, y);                           }
    00424   virtual H2D* book(STRPAIR loc,CSTR title, Edges x, Edges y )
    00425   { return book(loc.first, loc.second, title, x, y);                    }
    00426   virtual H2D* book(DataObject* pPar, int hID, CSTR title, Edges x, Edges y )
    00427   { return book(pPar, _STR(hID), title, x, y);                          }
    00428   virtual H2D* book(DataObject* pPar, CSTR rel, CSTR title, Edges x, Edges y )
    00429   { return i_book(pPar, rel, title, Gaudi::createH2D(title, x,y));      }
    00430   // ==========================================================================
    00431   // Book 2D profile histogram with variable binning
    00432   // ==========================================================================
    00447   virtual P2D* bookProf(CSTR full, CSTR title, Edges x, Edges y )
    00448   { return bookProf(i_splitPath(full), title, x, y);                    }
    00449   virtual P2D* bookProf(CSTR par, CSTR rel, CSTR title, Edges x, Edges y )
    00450   { return bookProf(createPath(par), rel, title, x, y);                  }
    00451   virtual P2D* bookProf(CSTR par, int hID, CSTR title, Edges x, Edges y )
    00452   { return bookProf(par, _STR(hID), title, x, y);                        }
    00453   virtual P2D* bookProf(DataObject* pPar, int hID, CSTR title, Edges x, Edges y )
    00454   { return bookProf(pPar, _STR(hID), title, x, y);                       }
    00455   virtual P2D* bookProf(STRPAIR loc,CSTR title, Edges x, Edges y )
    00456   { return bookProf(loc.first, loc.second, title, x, y);                 }
    00457   virtual P2D* bookProf(DataObject* pPar, CSTR rel, CSTR title, Edges x, Edges y )
    00458   { return i_book(pPar, rel, title, Gaudi::createProf2D(title,x,y,0,0)); }
    00459
    00460   virtual P2D* bookProf(CSTR full, CSTR title, Edges x, Edges y, double upper, double lower )
    00461   { return bookProf(i_splitPath(full), title, x, y, upper, lower);       }
    00462   virtual P2D* bookProf(CSTR par, CSTR rel, CSTR title, Edges x, Edges y, double upper, double lower )
    00463   { return bookProf(createPath(par), rel, title, x, y, upper, lower);                  }
    00464   virtual P2D* bookProf(CSTR par, int hID, CSTR title, Edges x, Edges y, double upper, double lower )
    00465   { return bookProf(par, _STR(hID), title, x, y, upper, lower);                        }
    00466   virtual P2D* bookProf(DataObject* pPar, int hID, CSTR title, Edges x, Edges y, double upper, double lower )
    00467   { return bookProf(pPar, _STR(hID), title, x, y, upper, lower);                       }
    00468   virtual P2D* bookProf(STRPAIR loc,CSTR title, Edges x, Edges y, double upper, double lower )
    00469   { return bookProf(loc.first, loc.second, title, x, y, upper, lower);                 }
    00470   virtual P2D* bookProf(DataObject* pPar, CSTR rel, CSTR title, Edges x, Edges y, double upper, double lower )
    00471   { return i_book(pPar, rel, title, Gaudi::createProf2D(title,x,y, upper, lower));     }
    00472   // ==========================================================================
    00473   // Book 3D histogram with fixed binning
    00474   // ==========================================================================
    00492   virtual H3D* book(CSTR full, CSTR title, DBINS(x), DBINS(y), DBINS(z))
    00493   { return book(i_splitPath(full),title,BINS(x),BINS(y),BINS(z));            }
    00494   virtual H3D* book(CSTR par, CSTR rel, CSTR title, DBINS(x), DBINS(y), DBINS(z))
    00495   { return book(createPath(par),rel,title,BINS(x),BINS(y),BINS(z));          }
    00496   virtual H3D* book(CSTR par, int hID, CSTR title, DBINS(x), DBINS(y), DBINS(z))
    00497   { return book(par,_STR(hID),title,BINS(x),BINS(y),BINS(z));                }
    00498   virtual H3D* book(DataObject* pPar, int hID, CSTR title, DBINS(x), DBINS(y), DBINS(z))
    00499   { return book(pPar,_STR(hID), title, BINS(x),BINS(y),BINS(z));             }
    00500   virtual H3D* book(STRPAIR loc,CSTR title, DBINS(x), DBINS(y), DBINS(z))
    00501   { return book(loc.first, loc.second, title, BINS(x),BINS(y),BINS(z));      }
    00502   virtual H3D* book(DataObject* pPar, CSTR rel, CSTR title, DBINS(x), DBINS(y), DBINS(z))
    00503   { return i_book(pPar, rel, title, Gaudi::createH3D(title,BINS(x),BINS(y),BINS(z)));}
    00504   // ==========================================================================
    00505   // Book 3D histogram with variable binning
    00506   // ==========================================================================
    00523   virtual H3D* book(CSTR full, CSTR title, Edges x, Edges y, Edges z)
    00524   { return book(i_splitPath(full), title, x, y, z);                         }
    00525   virtual H3D* book(CSTR par, CSTR rel, CSTR title, Edges x, Edges y, Edges z)
    00526   { return book(createPath(par), rel, title, x, y, z);                      }
    00527   virtual H3D* book(CSTR par, int hID, CSTR title, Edges x, Edges y, Edges z)
    00528   { return book(par,_STR(hID), title, x, y, z);                             }
    00529   virtual H3D* book(DataObject* pPar, int hID, CSTR title, Edges x, Edges y, Edges z)
    00530   { return book(pPar,_STR(hID), title, x, y, z);                            }
    00531   virtual H3D* book(STRPAIR loc,CSTR title, Edges x, Edges y, Edges z)
    00532   { return book(loc.first, loc.second, title, x,y,z);                       }
    00533   virtual H3D* book(DataObject* pPar, CSTR rel, CSTR title, Edges x, Edges y, Edges z)
    00534   { return i_book(pPar, rel, title, Gaudi::createH3D(title,x,y,z));         }
    00535
    00536   // ==========================================================================
    00537   // Register histogram with the data store
    00538   // ==========================================================================
    00539 //------------------------------------------------------------------------------
    00540 // Register object with the data store
    00541 //------------------------------------------------------------------------------
    00542   virtual StatusCode registerObject(CSTR parent, CSTR rel, Base* obj )
    00543   { return registerObject(createPath(parent), rel, obj);                       }
    00544   virtual StatusCode registerObject(CSTR parent, int item, Base* obj )
    00545   { return registerObject(parent, _STR(item), obj);                            }
    00546   virtual StatusCode registerObject(Base* pPar, CSTR rel, Base* obj )
    00547   { return registerObject(__cast(pPar), rel, obj);                             }
    00548   virtual StatusCode registerObject(DataObject* pPar, int item, Base* obj )
    00549   { return registerObject(pPar, _STR(item), obj);                              }
    00550   virtual StatusCode registerObject(Base* pPar, int item, Base* obj )
    00551   { return registerObject(__cast(pPar), item, obj);                            }
    00552   virtual StatusCode registerObject(CSTR full, Base* obj );
    00553   virtual StatusCode registerObject(DataObject* pPar, CSTR rel, Base* obj );
    00554   // ==========================================================================
    00555   // Unregister histogram from the data store
    00556   // ==========================================================================
    00557   virtual StatusCode unregisterObject(Base* obj )
    00558   { return DataSvc::unregisterObject(__cast(obj));                             }
    00559   virtual StatusCode unregisterObject(Base* obj, CSTR objectPath)
    00560   { return DataSvc::unregisterObject(__cast(obj),objectPath);                  }
    00561   virtual StatusCode unregisterObject(Base* obj, int item )
    00562   { return DataSvc::unregisterObject(__cast(obj),item);                        }
    00563   // ==========================================================================
    00564   // Retrieve histogram from data store
    00565   // ==========================================================================
    00566   virtual StatusCode retrieveObject(IRegistry* pReg, CSTR path, H1D*& obj)
    00567   { return Helper(this).retrieve(pReg,path,obj);                                }
    00568   virtual StatusCode retrieveObject(IRegistry* pReg, CSTR path, P1D*& obj)
    00569   { return Helper(this).retrieve(pReg,path,obj);                                }
    00570   virtual StatusCode retrieveObject(IRegistry* pReg, CSTR path, H2D*& obj)
    00571   { return Helper(this).retrieve(pReg,path,obj);                                }
    00572   virtual StatusCode retrieveObject(IRegistry* pReg, CSTR path, P2D*& obj)
    00573   { return Helper(this).retrieve(pReg,path,obj);                                }
    00574   virtual StatusCode retrieveObject(IRegistry* pReg, CSTR path, H3D*& obj)
    00575   { return Helper(this).retrieve(pReg,path,obj);                                }
    00576   //------------------------------------------------------------------------------
    00577   virtual StatusCode retrieveObject(CSTR full,P1D*& obj)
    00578   {  return Helper(this).retrieve(full,obj);                                    }
    00579   virtual StatusCode retrieveObject(CSTR full,P2D*& obj)
    00580   {  return Helper(this).retrieve(full,obj);                                    }
    00581   virtual StatusCode retrieveObject(CSTR full,H1D*& obj)
    00582   {  return Helper(this).retrieve(full,obj);                                    }
    00583   virtual StatusCode retrieveObject(CSTR full,H2D*& obj)
    00584   {  return Helper(this).retrieve(full,obj);                                    }
    00585   virtual StatusCode retrieveObject(CSTR full,H3D*& obj)
    00586   {  return Helper(this).retrieve(full,obj);                                    }
    00587   //------------------------------------------------------------------------------
    00588   virtual StatusCode retrieveObject(CSTR parent,CSTR rel,P1D*& obj)
    00589   {  return Helper(this).retrieve(parent,rel,obj);                              }
    00590   virtual StatusCode retrieveObject(CSTR parent,CSTR rel,P2D*& obj)
    00591   {  return Helper(this).retrieve(parent,rel,obj);                              }
    00592   virtual StatusCode retrieveObject(CSTR parent,CSTR rel,H1D*& obj)
    00593   {  return Helper(this).retrieve(parent,rel,obj);                              }
    00594   virtual StatusCode retrieveObject(CSTR parent,CSTR rel,H2D*& obj)
    00595   {  return Helper(this).retrieve(parent,rel,obj);                              }
    00596   virtual StatusCode retrieveObject(CSTR parent,CSTR rel,H3D*& obj)
    00597   {  return Helper(this).retrieve(parent,rel,obj);                              }
    00598   //------------------------------------------------------------------------------
    00599   virtual StatusCode retrieveObject(CSTR parent,int item,P1D*& obj)
    00600   {  return Helper(this).retrieve(parent,item,obj);                             }
    00601   virtual StatusCode retrieveObject(CSTR parent,int item,P2D*& obj)
    00602   {  return Helper(this).retrieve(parent,item,obj);                             }
    00603   virtual StatusCode retrieveObject(CSTR parent,int item,H1D*& obj)
    00604   {  return Helper(this).retrieve(parent,item,obj);                             }
    00605   virtual StatusCode retrieveObject(CSTR parent,int item,H2D*& obj)
    00606   {  return Helper(this).retrieve(parent,item,obj);                             }
    00607   virtual StatusCode retrieveObject(CSTR parent,int item,H3D*& obj)
    00608   {  return Helper(this).retrieve(parent,item,obj);                             }
    00609   //------------------------------------------------------------------------------
    00610   virtual StatusCode retrieveObject(DataObject* par,CSTR item,P1D*& obj)
    00611   {  return Helper(this).retrieve(par,item,obj);                                }
    00612   virtual StatusCode retrieveObject(DataObject* par,CSTR item,P2D*& obj)
    00613   {  return Helper(this).retrieve(par,item,obj);                                }
    00614   virtual StatusCode retrieveObject(DataObject* par,CSTR item,H1D*& obj)
    00615   {  return Helper(this).retrieve(par,item,obj);                                }
    00616   virtual StatusCode retrieveObject(DataObject* par,CSTR item,H2D*& obj)
    00617   {  return Helper(this).retrieve(par,item,obj);                                }
    00618   virtual StatusCode retrieveObject(DataObject* par,CSTR item,H3D*& obj)
    00619   {  return Helper(this).retrieve(par,item,obj);                                }
    00620   //------------------------------------------------------------------------------
    00621   virtual StatusCode retrieveObject(DataObject* par,int item,P1D*& obj)
    00622   {  return Helper(this).retrieve(par,item,obj);                                }
    00623   virtual StatusCode retrieveObject(DataObject* par,int item,P2D*& obj)
    00624   {  return Helper(this).retrieve(par,item,obj);                                }
    00625   virtual StatusCode retrieveObject(DataObject* par,int item,H1D*& obj)
    00626   {  return Helper(this).retrieve(par,item,obj);                                }
    00627   virtual StatusCode retrieveObject(DataObject* par,int item,H2D*& obj)
    00628   {  return Helper(this).retrieve(par,item,obj);                                }
    00629   virtual StatusCode retrieveObject(DataObject* par,int item,H3D*& obj)
    00630   {  return Helper(this).retrieve(par,item,obj);                                }
    00631   //------------------------------------------------------------------------------
    00632   virtual StatusCode retrieveObject(Base* par,int item,P1D*& obj)
    00633   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00634   virtual StatusCode retrieveObject(Base* par,int item,P2D*& obj)
    00635   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00636   virtual StatusCode retrieveObject(Base* par,int item,H1D*& obj)
    00637   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00638   virtual StatusCode retrieveObject(Base* par,int item,H2D*& obj)
    00639   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00640   virtual StatusCode retrieveObject(Base* par,int item,H3D*& obj)
    00641   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00642   //------------------------------------------------------------------------------
    00643   virtual StatusCode retrieveObject(Base* par,CSTR item,P1D*& obj)
    00644   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00645   virtual StatusCode retrieveObject(Base* par,CSTR item,P2D*& obj)
    00646   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00647   virtual StatusCode retrieveObject(Base* par,CSTR item,H1D*& obj)
    00648   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00649   virtual StatusCode retrieveObject(Base* par,CSTR item,H2D*& obj)
    00650   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00651   virtual StatusCode retrieveObject(Base* par,CSTR item,H3D*& obj)
    00652   {  return Helper(this).retrieve(__cast(par),item,obj);                        }
    00653
    00654   // ==========================================================================
    00655   // Find histogram identified by its full path in the data store
    00656   // ==========================================================================
    00657
    00658   //------------------------------------------------------------------------------
    00659   // Find object identified by its full path in the data store
    00660   //------------------------------------------------------------------------------
    00661   virtual StatusCode findObject(IRegistry* pReg,CSTR path,P1D*& obj)
    00662   {  return Helper(this).find(pReg,path,obj);                                 }
    00663   virtual StatusCode findObject(IRegistry* pReg,CSTR path,P2D*& obj)
    00664   {  return Helper(this).find(pReg,path,obj);                                 }
    00665   virtual StatusCode findObject(IRegistry* pReg,CSTR path,H1D*& obj)
    00666   {  return Helper(this).find(pReg,path,obj);                                 }
    00667   virtual StatusCode findObject(IRegistry* pReg,CSTR path,H2D*& obj)
    00668   {  return Helper(this).find(pReg,path,obj);                                 }
    00669   virtual StatusCode findObject(IRegistry* pReg,CSTR path,H3D*& obj)
    00670   {  return Helper(this).find(pReg,path,obj);                                 }
    00671   //------------------------------------------------------------------------------
    00672   virtual StatusCode findObject(CSTR full,P1D*& obj)
    00673   {  return Helper(this).find(full,obj);                                      }
    00674   virtual StatusCode findObject(CSTR full,P2D*& obj)
    00675   {  return Helper(this).find(full,obj);                                      }
    00676   virtual StatusCode findObject(CSTR full,H1D*& obj)
    00677   {  return Helper(this).find(full,obj);                                      }
    00678   virtual StatusCode findObject(CSTR full,H2D*& obj)
    00679   {  return Helper(this).find(full,obj);                                      }
    00680   virtual StatusCode findObject(CSTR full,H3D*& obj)
    00681   {  return Helper(this).find(full,obj);                                      }
    00682   //------------------------------------------------------------------------------
    00683   virtual StatusCode findObject(CSTR par,CSTR rel,P1D*& obj)
    00684   {  return Helper(this).find(par,rel,obj);                                   }
    00685   virtual StatusCode findObject(CSTR par,CSTR rel,P2D*& obj)
    00686   {  return Helper(this).find(par,rel,obj);                                   }
    00687   virtual StatusCode findObject(CSTR par,CSTR rel,H1D*& obj)
    00688   {  return Helper(this).find(par,rel,obj);                                   }
    00689   virtual StatusCode findObject(CSTR par,CSTR rel,H2D*& obj)
    00690   {  return Helper(this).find(par,rel,obj);                                   }
    00691   virtual StatusCode findObject(CSTR par,CSTR rel,H3D*& obj)
    00692   {  return Helper(this).find(par,rel,obj);                                   }
    00693   //------------------------------------------------------------------------------
    00694   virtual StatusCode findObject(CSTR par,int item,P1D*& obj)
    00695   {  return Helper(this).find(par,item,obj);                                  }
    00696   virtual StatusCode findObject(CSTR par,int item,P2D*& obj)
    00697   {  return Helper(this).find(par,item,obj);                                  }
    00698   virtual StatusCode findObject(CSTR par,int item,H1D*& obj)
    00699   {  return Helper(this).find(par,item,obj);                                  }
    00700   virtual StatusCode findObject(CSTR par,int item,H2D*& obj)
    00701   {  return Helper(this).find(par,item,obj);                                  }
    00702   virtual StatusCode findObject(CSTR par,int item,H3D*& obj)
    00703   {  return Helper(this).find(par,item,obj);                                  }
    00704   //------------------------------------------------------------------------------
    00705   virtual StatusCode findObject(DataObject* par,int item,P1D*& obj)
    00706   {  return Helper(this).find(par,item,obj);                                  }
    00707   virtual StatusCode findObject(DataObject* par,int item,P2D*& obj)
    00708   {  return Helper(this).find(par,item,obj);                                  }
    00709   virtual StatusCode findObject(DataObject* par,int item,H1D*& obj)
    00710   {  return Helper(this).find(par,item,obj);                                  }
    00711   virtual StatusCode findObject(DataObject* par,int item,H2D*& obj)
    00712   {  return Helper(this).find(par,item,obj);                                  }
    00713   virtual StatusCode findObject(DataObject* par,int item,H3D*& obj)
    00714   {  return Helper(this).find(par,item,obj);                                  }
    00715   //------------------------------------------------------------------------------
    00716   virtual StatusCode findObject(DataObject* par,CSTR item,P1D*& obj)
    00717   {  return Helper(this).find(par,item,obj);                                  }
    00718   virtual StatusCode findObject(DataObject* par,CSTR item,P2D*& obj)
    00719   {  return Helper(this).find(par,item,obj);                                  }
    00720   virtual StatusCode findObject(DataObject* par,CSTR item,H1D*& obj)
    00721   {  return Helper(this).find(par,item,obj);                                  }
    00722   virtual StatusCode findObject(DataObject* par,CSTR item,H2D*& obj)
    00723   {  return Helper(this).find(par,item,obj);                                  }
    00724   virtual StatusCode findObject(DataObject* par,CSTR item,H3D*& obj)
    00725   {  return Helper(this).find(par,item,obj);                                  }
    00726   //------------------------------------------------------------------------------
    00727   virtual StatusCode findObject(Base* par,int item,P1D*& obj)
    00728   {  return Helper(this).find(__cast(par),item,obj);                          }
    00729   virtual StatusCode findObject(Base* par,int item,P2D*& obj)
    00730   {  return Helper(this).find(__cast(par),item,obj);                          }
    00731   virtual StatusCode findObject(Base* par,int item,H1D*& obj)
    00732   {  return Helper(this).find(__cast(par),item,obj);                          }
    00733   virtual StatusCode findObject(Base* par,int item,H2D*& obj)
    00734   {  return Helper(this).find(__cast(par),item,obj);                          }
    00735   virtual StatusCode findObject(Base* par,int item,H3D*& obj)
    00736   {  return Helper(this).find(__cast(par),item,obj);                          }
    00737   //------------------------------------------------------------------------------
    00738   virtual StatusCode findObject(Base* par,CSTR item,P1D*& obj)
    00739   {  return Helper(this).find(__cast(par),item,obj);                          }
    00740   virtual StatusCode findObject(Base* par,CSTR item,P2D*& obj)
    00741   {  return Helper(this).find(__cast(par),item,obj);                          }
    00742   virtual StatusCode findObject(Base* par,CSTR item,H1D*& obj)
    00743   {  return Helper(this).find(__cast(par),item,obj);                          }
    00744   virtual StatusCode findObject(Base* par,CSTR item,H2D*& obj)
    00745   {  return Helper(this).find(__cast(par),item,obj);                          }
    00746   virtual StatusCode findObject(Base* par,CSTR item,H3D*& obj)
    00747   {  return Helper(this).find(__cast(par),item,obj);                          }
    00748
    00749   // ==========================================================================
    00750   // Projections and slices.
    00751   // ==========================================================================
    00752   virtual H1D* projectionX(CSTR name,const H2D& h)
    00753   {  return sliceX( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN);      }
    00754   virtual H1D* projectionY(CSTR name,const H2D& h)
    00755   {  return sliceY( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN);      }
    00756   virtual H1D* sliceX(CSTR name,const H2D& h,int indexY)
    00757   {  return sliceX( name, h, indexY, indexY );                                }
    00758   virtual H1D* sliceY(CSTR name,const H2D& h,int indexX)
    00759   {  return sliceY( name, h, indexX, indexX );                                }
    00760   virtual H1D* sliceX(CSTR name,const H2D& h,int indexY1,int indexY2);
    00761   virtual H1D* sliceY(CSTR name,const H2D& h,int indexX1,int indexX2);
    00762   //------------------------------------------------------------------------------
    00763   bool destroy( IBaseHistogram* hist);
    00764
    00765   H1D* add(CSTR nameAndTitle, const H1D& a, const H1D& b)
    00766   { return Helper::act(createCopy(nameAndTitle,a),b,&TH1::Add, 1.);          }
    00767   H1D* subtract(CSTR nameAndTitle, const H1D& a, const H1D& b)
    00768   { return Helper::act(createCopy(nameAndTitle,a),b,&TH1::Add,-1.);          }
    00769   H1D* multiply(CSTR nameAndTitle, const H1D& a, const H1D& b)
    00770   { return Helper::act(createCopy(nameAndTitle,a),b,&TH1::Multiply);         }
    00771   H1D* divide(CSTR nameAndTitle, const H1D& a, const H1D& b)
    00772   { return Helper::act(createCopy(nameAndTitle,a),b,&TH1::Divide);           }
    00773
    00774   H2D* add(CSTR nameAndTitle, const H2D& a, const H2D& b)
    00775   { return Helper::act(createCopy(nameAndTitle,a),b,&TH2D::Add, 1.);           }
    00776   H2D* subtract(CSTR nameAndTitle, const H2D& a, const H2D& b)
    00777   { return Helper::act(createCopy(nameAndTitle,a),b,&TH2D::Add,-1.);           }
    00778   H2D* multiply(CSTR nameAndTitle, const H2D& a, const H2D& b)
    00779   { return Helper::act(createCopy(nameAndTitle,a),b,&TH2D::Multiply);          }
    00780   H2D* divide(CSTR nameAndTitle, const H2D& a, const H2D& b)
    00781   { return Helper::act(createCopy(nameAndTitle,a),b,&TH2D::Divide);            }
    00782
    00783   H3D* add(CSTR nameAndTitle, const H3D& a, const H3D& b)
    00784   { return Helper::act(createCopy(nameAndTitle,a),b,&TH3D::Add, 1.);           }
    00785   H3D* subtract(CSTR nameAndTitle, const H3D& a, const H3D& b)
    00786   { return Helper::act(createCopy(nameAndTitle,a),b,&TH3D::Add,-1.);           }
    00787   H3D* multiply(CSTR nameAndTitle, const H3D& a, const H3D& b)
    00788   { return Helper::act(createCopy(nameAndTitle,a),b,&TH3D::Multiply);          }
    00789   H3D* divide(CSTR nameAndTitle, const H3D& a, const H3D& b)
    00790   { return Helper::act(createCopy(nameAndTitle,a),b,&TH3D::Divide);            }
    00791
    00792   H2D* projectionXY(CSTR nameAndTitle,const H3D& h)
    00793   { return i_project(nameAndTitle,h,"xy");                                    }
    00794   H2D* projectionXZ(CSTR nameAndTitle,const H3D& h)
    00795   { return i_project(nameAndTitle,h,"xz");                                    }
    00796   H2D* projectionYZ(CSTR nameAndTitle,const H3D& h)
    00797   { return i_project(nameAndTitle,h,"yz");                                    }
    00798   H2D* sliceXY(CSTR /* nameAndTitle */,const H3D& /* h */,int /* low */,int /* high */ ) NOT_IMPLEMENTED
    00799   H2D* sliceXZ(CSTR /* nameAndTitle */,const H3D& /* h */,int /* low */,int /* high */ ) NOT_IMPLEMENTED
    00800   H2D* sliceYZ(CSTR /* nameAndTitle */,const H3D& /* h */,int /* low */,int /* high */ ) NOT_IMPLEMENTED
    00801
    00802   //------------------------------------------------------------------------------
    00803   H1D* createHistogram1D(CSTR name,CSTR tit,DBINS(x))
    00804   {  return book( name, tit, BINS(x));                                        }
    00805   H1D* createHistogram1D(CSTR name,CSTR tit,DBINS(x),CSTR /*opt*/)
    00806   {  return book( name, tit, BINS(x));                                        }
    00807   H1D* createHistogram1D(CSTR name,CSTR title,const Edges& x,CSTR /*opt*/)
    00808   {  return book(name, title, x);                                             }
    00809   H1D* createHistogram1D(CSTR nameAndTitle, DBINS(x))
    00810   { return book(nameAndTitle, nameAndTitle, BINS(x));                         }
    00811   H1D* createCopy(CSTR full, const H1D& h)
    00812   {  return createCopy(i_splitPath(full), h);                                 }
    00813   H1D* createCopy(CSTR par, CSTR rel, const H1D& h)
    00814   {  return createCopy(createPath(par), rel, h);                              }
    00815   H1D* createCopy(STRPAIR loc, const H1D& h)
    00816   {  return createCopy(loc.first, loc.second, h);                             }
    00817   H1D* createCopy(DataObject* pPar, CSTR rel, const H1D& h)
    00818   { return i_book(pPar, rel, h.title(), Gaudi::createH1D(h));                 }
    00819   //------------------------------------------------------------------------------
    00820   H2D* createHistogram2D(CSTR name,CSTR tit,DBINS(x),DBINS(y))
    00821   {  return book( name, tit, BINS(x), BINS(y));                               }
    00822   H2D* createHistogram2D(CSTR name,CSTR tit,DBINS(x),DBINS(y),CSTR /*opt*/)
    00823   {  return book( name, tit, BINS(x), BINS(y));                               }
    00824   H2D* createHistogram2D(CSTR name,CSTR title,const Edges& x,const Edges& y, CSTR /*opt*/)
    00825   {  return book(name, title, x, y);                                          }
    00826   H2D* createHistogram2D(CSTR nameAndTitle, DBINS(x), DBINS(y))
    00827   { return book(nameAndTitle, nameAndTitle, BINS(x), BINS(y));                }
    00828   H2D* createCopy(CSTR full, const H2D& h)
    00829   {  return createCopy(i_splitPath(full), h);                                 }
    00830   H2D* createCopy(CSTR par, CSTR rel, const H2D& h)
    00831   {  return createCopy(createPath(par), rel, h);                              }
    00832   H2D* createCopy(STRPAIR loc, const H2D& h)
    00833   {  return createCopy(loc.first, loc.second, h);                             }
    00834   H2D* createCopy(DataObject* pPar, CSTR rel, const H2D& h)
    00835   { return i_book(pPar, rel, h.title(), Gaudi::createH2D(h));                 }
    00836   //------------------------------------------------------------------------------
    00837   H3D* createHistogram3D(CSTR name, CSTR tit, DBINS(x), DBINS(y), DBINS(z))
    00838   {  return book( name, tit, BINS(x), BINS(y), BINS(z));                      }
    00839   H3D* createHistogram3D(CSTR name, CSTR tit, DBINS(x), DBINS(y), DBINS(z), CSTR /*opt*/)
    00840   {  return book( name, tit, BINS(x), BINS(y), BINS(z));                      }
    00841   H3D* createHistogram3D(CSTR name, CSTR title,const Edges& x,const Edges& y,const Edges& z,CSTR /*opt*/)
    00842   {  return book(name, title, x, y, z);                                       }
    00843   H3D* createHistogram3D(CSTR nameAndTitle, DBINS(x), DBINS(y), DBINS(z))
    00844   { return book(nameAndTitle, nameAndTitle, BINS(x), BINS(y), BINS(z));       }
    00845   H3D* createCopy(CSTR full, const H3D& h)
    00846   {  return createCopy(i_splitPath(full), h);                                 }
    00847   H3D* createCopy(CSTR par, CSTR rel, const H3D& h)
    00848   {  return createCopy(createPath(par), rel, h);                              }
    00849   H3D* createCopy(STRPAIR loc, const H3D& h)
    00850   {  return createCopy(loc.first, loc.second, h);                             }
    00851   H3D* createCopy(DataObject* pPar, CSTR rel, const H3D& h)
    00852   { return i_book(pPar, rel, h.title(), Gaudi::createH3D(h));                 }
    00853   //------------------------------------------------------------------------------
    00854
    00855
    00856   P1D* createProfile1D(CSTR name,CSTR tit,DBINS(x),CSTR opt )
    00857   {  return bookProf( name, tit, BINS(x) , opt );                             }
    00858   P1D* createProfile1D(CSTR name,CSTR tit,DBINS(x),double upper, double lower , CSTR opt )
    00859   {  return bookProf( name, tit, BINS(x), upper, lower , opt );               }
    00860   P1D* createProfile1D(CSTR name,CSTR title,const Edges& x,CSTR   /* opt */ )
    00861   {  return bookProf(name, title, x );                                        }
    00862   P1D* createProfile1D(CSTR name,CSTR title,const Edges& x,double upper, double lower, CSTR /* opt */ )
    00863   {  return bookProf(name, title, x, upper, lower );                          }
    00864
    00865   P1D* createProfile1D(CSTR nametit,DBINS(x))
    00866   {  return bookProf( nametit, nametit, BINS(x) , "s");                       }
    00867   P1D* createProfile1D(CSTR nametit,DBINS(x),double upper, double lower )
    00868   {  return bookProf( nametit, nametit, BINS(x), upper, lower , "s");         }
    00869
    00870
    00871   P1D* createCopy(CSTR full, const P1D& h)
    00872   {  return createCopy(i_splitPath(full), h);                                 }
    00873   P1D* createCopy(CSTR par, CSTR rel, const P1D& h)
    00874   {  return createCopy(createPath(par), rel, h);                              }
    00875   P1D* createCopy(STRPAIR loc, const P1D& h)
    00876   {  return createCopy(loc.first, loc.second, h);                             }
    00877   P1D* createCopy(DataObject* pPar, CSTR rel, const P1D& h)
    00878   { return i_book(pPar, rel, h.title(), Gaudi::createProf1D(h));              }
    00879   //------------------------------------------------------------------------------
    00880   P2D* createProfile2D(CSTR name,CSTR tit,DBINS(x),DBINS(y))
    00881   {  return bookProf( name, tit, BINS(x), BINS(y));                           }
    00882   P2D* createProfile2D(CSTR name,CSTR tit,DBINS(x),DBINS(y),CSTR /*opt*/)
    00883   {  return bookProf( name, tit, BINS(x), BINS(y));                           }
    00884   P2D* createProfile2D(CSTR name,CSTR title,const Edges& x,const Edges& y, CSTR /*opt*/)
    00885   {  return bookProf(name, title, x, y);                                      }
    00886   P2D* createProfile2D(CSTR nameAndTitle, DBINS(x), DBINS(y))
    00887   { return bookProf(nameAndTitle, nameAndTitle, BINS(x), BINS(y));            }
    00888
    00889   P2D* createProfile2D(CSTR name,CSTR tit,DBINS(x),DBINS(y),double upper, double lower)
    00890   {  return bookProf( name, tit, BINS(x), BINS(y), upper, lower);             }
    00891   P2D* createProfile2D(CSTR name,CSTR tit,DBINS(x),DBINS(y),double upper, double lower,CSTR /*opt*/)
    00892   {  return bookProf( name, tit, BINS(x), BINS(y), upper, lower);             }
    00893   P2D* createProfile2D(CSTR name,CSTR title,const Edges& x,const Edges& y,double upper, double lower, CSTR /*opt*/)
    00894   {  return bookProf(name, title, x, y, upper, lower);                        }
    00895   P2D* createProfile2D(CSTR nameAndTitle, DBINS(x), DBINS(y),double upper, double lower)
    00896   { return bookProf(nameAndTitle, nameAndTitle, BINS(x), BINS(y), upper, lower);}
    00897
    00898   P2D* createCopy(CSTR full, const P2D& h)
    00899   {  return createCopy(i_splitPath(full), h);                                 }
    00900   P2D* createCopy(CSTR par, CSTR rel, const P2D& h)
    00901   {  return createCopy(createPath(par), rel, h);                              }
    00902   P2D* createCopy(STRPAIR loc, const P2D& h)
    00903   {  return createCopy(loc.first, loc.second, h);                             }
    00904   P2D* createCopy(DataObject* pPar, CSTR rel, const P2D& h)
    00905   { return i_book(pPar, rel, h.title(), Gaudi::createProf2D(h));              }
    00906   //------------------------------------------------------------------------------
    00907   AIDA::ICloud1D* createCloud1D(CSTR, CSTR, int, CSTR)         NOT_IMPLEMENTED
    00908   AIDA::ICloud1D* createCloud1D(CSTR)                          NOT_IMPLEMENTED
    00909   AIDA::ICloud1D* createCopy(CSTR, const AIDA::ICloud1D&)      NOT_IMPLEMENTED
    00910   AIDA::ICloud2D* createCloud2D(CSTR, CSTR, int, CSTR)         NOT_IMPLEMENTED
    00911   AIDA::ICloud2D* createCloud2D(CSTR)                          NOT_IMPLEMENTED
    00912   AIDA::ICloud2D* createCopy(CSTR, const AIDA::ICloud2D&)      NOT_IMPLEMENTED
    00913   AIDA::ICloud3D* createCloud3D(CSTR, CSTR, int, CSTR)         NOT_IMPLEMENTED
    00914   AIDA::ICloud3D* createCloud3D(CSTR)                          NOT_IMPLEMENTED
    00915   AIDA::ICloud3D* createCopy(CSTR, const AIDA::ICloud3D&)      NOT_IMPLEMENTED
    00916
    00918   using IDataProviderSvc::registerObject;
    00919   using IDataProviderSvc::unregisterObject;
    00920   using IDataProviderSvc::retrieveObject;
    00921   using IDataProviderSvc::findObject;
    00922
    00924   virtual std::ostream& print(Base* h, std::ostream& s = std::cout) const;
    00925
    00927   virtual std::ostream& write(Base* h, std::ostream& s = std::cout) const;
    00928
    00930   virtual int write(Base* h, const char* file_name ) const;
    00931
    00933   virtual DataObject* createPath(CSTR newPath );
    00934
    00939   virtual DataObject* createDirectory  (CSTR parentDir, CSTR subDir );
    00940
    00941 public:
    00942   // ==========================================================================
    00944   void update1Ddefs ( Property& ) ;
    00945   // ==========================================================================
    00946   typedef std::map<std::string,Gaudi::Histo1DDef> Histo1DMap ;
    00947   // ==========================================================================
    00948 private:
    00949   // ==========================================================================
    00950   // container with the definition of "the special" histograms
    00951   Histo1DMap                  m_defs1D ;
    00952   // ==========================================================================
    00953   // modified histograms:
    00954   std::set<std::string>       m_mods1D ;
    00955   // ==========================================================================
    00956 };
    00957 // ===========================================================================
    00958 // The END
    00959 // ===========================================================================
    00960 #endif    // GAUDISVC_HISTOGRAMSVC_H
    00961 // ===========================================================================

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines