HistogramSvc.cpp
Go to the documentation of this file.
1 // $Id: HistogramSvc.cpp,v 1.28 2007/09/26 16:14:47 marcocle Exp $
2 #ifdef __ICC
3 // disable icc remark #2259: non-pointer conversion from "X" to "Y" may lose significant bits
4 // TODO: To be removed, since it comes from ROOT TMathBase.h
5 #pragma warning(disable:2259)
6 #endif
7 #ifdef WIN32
8 // Disable warning
9 // warning C4996: 'sprintf': This function or variable may be unsafe.
10 // coming from TString.h
11 #pragma warning(disable:4996)
12 #endif
13 // ============================================================================
14 // Include files
15 // ============================================================================
16 // STD&STL
17 // ============================================================================
18 #include <cstdlib>
19 #include <stdexcept>
20 #include <sstream>
21 // ============================================================================
22 // GaudiKernel
23 // ============================================================================
24 #include "GaudiKernel/xtoa.h"
25 #include "GaudiKernel/Property.h"
26 #include "GaudiKernel/AttribStringParser.h"
27 #include "GaudiKernel/MsgStream.h"
28 #include "GaudiKernel/DataObject.h"
29 #include "GaudiKernel/IConversionSvc.h"
30 #include "GaudiKernel/GenericAddress.h"
31 // ============================================================================
32 // Local
33 // ============================================================================
34 #include "HistogramSvc.h"
35 // ============================================================================
36 // Instantiation of a factory class used by clients
38 // ============================================================================
39 using namespace AIDA;
40 // ============================================================================
41 namespace
42 {
43  // ==========================================================================
44  inline std::string histoAddr
45  ( const std::string& name)
46  {
47  if ( 0 == name.find ( "/stat/" ) ){ return std::string( name , 6 ) ; }
48  return name ;
49  }
50  // ==========================================================================
51  inline std::string histoAddr
52  ( const DataObject* obj ,
53  const std::string& rel )
54  {
55  if ( 0 == obj ) { return rel ; }
56  IRegistry* reg = obj->registry() ;
57  if ( 0 == reg ) { return rel ; }
58  const std::string& name = reg->identifier() ;
59  //
60  if ( rel .empty() ) { return histoAddr ( name ) ; }
61  if ( '/' == name[name.size()-1] ||
62  '/' == rel[0] ) { return histoAddr ( name + rel ) ; }
63  return histoAddr ( name + "/" + rel ) ;
64  }
65  // ==========================================================================
66 }
67 //------------------------------------------------------------------------------
68 std::string HistogramSvc::_STR(int i) {
69  std::ostringstream txt; txt << i;
70  return txt.str();
71 }
72 //------------------------------------------------------------------------------
73 StatusCode HistogramSvc::registerObject(CSTR full, IBaseHistogram* obj) {
74  std::pair<std::string,std::string> split=i_splitPath(full);
75  return registerObject(split.first, split.second, obj);
76 }
77 //------------------------------------------------------------------------------
79 (DataObject* pPar,CSTR obj,IBaseHistogram* hObj) {
80  // Set the histogram id
81  if (obj[0] == SEPARATOR) {
82  // hObj->setTitle(obj.substr(1) + "|" + hObj->title());
83  if (!hObj->annotation().addItem("id", obj.substr(1)))
84  hObj->annotation().setValue("id", obj.substr(1));
85  }
86  else {
87  // hObj->setTitle(obj + "|" + hObj->title());
88  if (!hObj->annotation().addItem("id", obj))
89  hObj->annotation().setValue("id", obj);
90  }
91  // Register the histogram in the histogram data store
92  return DataSvc::registerObject(pPar,obj,__cast(hObj));
93 }
94 
95 // Helper for 2D projections
96 AIDA::IHistogram2D*
97 HistogramSvc::i_project(CSTR nameAndTitle,const IHistogram3D& h, CSTR dir) {
98  TH3D *h3d = Gaudi::getRepresentation<IHistogram3D,TH3D>(h);
99  if ( h3d ) {
100  TH2D *h2d = dynamic_cast<TH2D*>(h3d->Project3D(dir.c_str()));
101  if ( h2d ) {
102  std::pair<DataObject*,H2D*> r=Gaudi::createH2D(h2d);
103  if ( r.second && registerObject(nameAndTitle,r.second).isSuccess() ) {
104  return r.second;
105  }
106  }
107  }
108  return 0;
109 }
110 
111 //------------------------------------------------------------------------------
112 // ASCII output
113 //------------------------------------------------------------------------------
114 std::ostream& HistogramSvc::print(IBaseHistogram* h, std::ostream& s) const {
115  Gaudi::HistogramBase* b = dynamic_cast<Gaudi::HistogramBase*>(h);
116  if(0 != b) return b->print(s);
117  MsgStream log(msgSvc(), name());
118  log << MSG::ERROR << "Unknown histogram type: Cannot cast to Gaudi::HistogramBase."
119  << endmsg;
120  return s;
121 }
122 //------------------------------------------------------------------------------
123 std::ostream& HistogramSvc::write(IBaseHistogram* h, std::ostream& s) const {
124  Gaudi::HistogramBase* b = dynamic_cast<Gaudi::HistogramBase*>(h);
125  if(0 != b) return b->write(s);
126  MsgStream log(msgSvc(), name());
127  log << MSG::ERROR << "Unknown histogram type: Cannot cast to Gaudi::HistogramBase."
128  << endmsg;
129  return s;
130 }
131 //------------------------------------------------------------------------------
132 int HistogramSvc::write(IBaseHistogram* h, const char* file_name) const {
133  Gaudi::HistogramBase* b = dynamic_cast<Gaudi::HistogramBase*>(h);
134  if(0 != b) return b->write(file_name);
135  MsgStream log(msgSvc(), name());
136  log << MSG::ERROR << "Unknown histogram type: Cannot cast to Gaudi::HistogramBase."
137  << endmsg;
138  return 0;
139 }
140 //------------------------------------------------------------------------------
141 std::pair<std::string,std::string> HistogramSvc::i_splitPath(CSTR full) {
142  std::string tmp = full;
143  if (tmp[0] != SEPARATOR) {
144  tmp.insert(tmp.begin(), SEPARATOR);
145  tmp.insert(tmp.begin(), m_rootName.begin(), m_rootName.end());
146  }
147  // Remove trailing "/" from newPath if it exists
148  if (tmp.rfind(SEPARATOR) == tmp.length()-1) {
149  tmp.erase(tmp.rfind(SEPARATOR),1);
150  }
151  int sep = tmp.rfind(SEPARATOR);
152  return std::pair<std::string,std::string>
153  (tmp.substr(0,sep),tmp.substr(sep,tmp.length()-sep));
154 }
155 //------------------------------------------------------------------------------
157  std::string tmpPath = newPath;
158  if (tmpPath[0] != SEPARATOR) {
159  tmpPath.insert(tmpPath.begin(), SEPARATOR);
160  tmpPath.insert(tmpPath.begin(), m_rootName.begin(), m_rootName.end());
161  }
162  // Remove trailing "/" from newPath if it exists
163  if (tmpPath.rfind(SEPARATOR) == tmpPath.length()-1) {
164  tmpPath.erase(tmpPath.rfind(SEPARATOR),1);
165  }
166  DataObject* pObject = 0;
167  StatusCode sc = DataSvc::findObject(tmpPath, pObject);
168  if(sc.isSuccess()) {
169  return pObject;
170  }
171  int sep = tmpPath.rfind(SEPARATOR);
172  std::string rest(tmpPath, sep+1, tmpPath.length()-sep);
173  std::string subPath(tmpPath, 0, sep);
174  if(0 != sep) {
175  createPath(subPath);
176  }
177  else {
178  MsgStream log(msgSvc(), name());
179  log << MSG::ERROR << "Unable to create the histogram path" << endmsg;
180  return 0;
181  }
182  pObject = createDirectory(subPath, rest);
183  return pObject;
184 }
185 //------------------------------------------------------------------------------
187  DataObject* directory = new DataObject();
188  if (0 != directory) {
189  DataObject* pnode;
190  StatusCode status = DataSvc::retrieveObject(parentDir, pnode);
191  if(status.isSuccess()) {
192  status = DataSvc::registerObject(pnode, subDir, directory);
193  if (!status.isSuccess()) {
194  MsgStream log(msgSvc(), name());
195  log << MSG::ERROR << "Unable to create the histogram directory: "
196  << parentDir << "/" << subDir << endmsg;
197  delete directory;
198  return 0;
199  }
200  }
201  else {
202  MsgStream log(msgSvc(), name());
203  log << MSG::ERROR << "Unable to create the histogram directory: "
204  << parentDir << "/" << subDir << endmsg;
205  delete directory;
206  return 0;
207  }
208  }
209  return directory;
210 }
211 //------------------------------------------------------------------------------
213  setDataLoader( 0 ).ignore();
214  clearStore().ignore();
215 }
216 //------------------------------------------------------------------------------
218  using Parser = Gaudi::Utils::AttribStringParser;
219  MsgStream log (msgSvc(), name());
220  DataObject* pO = 0;
221  StatusCode status = this->findObject(m_rootName, pO);
222  if (status.isSuccess()) {
223  std::string::size_type loc = ident.find(" ");
224  std::string filename, auth, svc = "", typ = "";
225  std::string logname = ident.substr(0, loc);
226  for (auto attrib: Parser(ident.substr(loc+1))) {
227  switch(::toupper(attrib.tag[0])) {
228  case 'F': // FILE='<file name>'
229  case 'D': // DATAFILE='<file name>'
230  filename = std::move(attrib.value);
231  break;
232  case 'T': // TYP='<HBOOK,ROOT,OBJY,...>'
233  typ = std::move(attrib.value);
234  break;
235  default:
236  break;
237  }
238  }
239  if (typ.length() > 0) {
240  // Now add the registry entry to the store
241  std::string entryname = m_rootName;
242  entryname += '/';
243  entryname += logname;
244  GenericAddress* pA = 0;
245  switch(::toupper(typ[0])) {
246  case 'H':
247  pA=new GenericAddress(HBOOK_StorageType,CLID_StatisticsFile,
248  filename,entryname,0,'O');
249  break;
250  case 'R':
251  pA=new GenericAddress(ROOT_StorageType,CLID_StatisticsFile,
252  filename,entryname,0,'O');
253  break;
254  }
255  if (0 != pA) {
256  status = registerAddress(pO, logname, pA);
257  if (status.isSuccess()) {
258  log << MSG::INFO << "Added stream file:" << filename
259  << " as " << logname << endmsg;
260  return status;
261  }
262  pA->release();
263  }
264  }
265  }
266  log << MSG::ERROR << "Cannot add " << ident << " invalid filename!" << endmsg;
267  return StatusCode::FAILURE;
268 }
269 //------------------------------------------------------------------------------
271  MsgStream log(msgSvc(), name());
272  StatusCode status = DataSvc::initialize();
273  // Set root object
274  if (status.isSuccess()) {
275  DataObject* rootObj = new DataObject();
276  status = setRoot("/stat", rootObj);
277  if (!status.isSuccess()) {
278  log << MSG::ERROR << "Unable to set hstogram data store root." << endmsg;
279  delete rootObj;
280  return status;
281  }
282  IConversionSvc* svc = 0;
283  status = service("HistogramPersistencySvc",svc,true);
284  if ( status.isSuccess() ) {
285  setDataLoader( svc ).ignore();
286  svc->release();
287  }
288  else {
289  log << MSG::ERROR << "Could not find HistogramPersistencySvc." << endmsg;
290  return status;
291  }
292  // Connect all input streams (if any)
293  for (DBaseEntries::iterator j = m_input.begin(); j != m_input.end(); j++) {
294  status = connectInput(*j);
295  if (!status.isSuccess()) {
296  return status;
297  }
298  }
299  }
300  if ( !m_defs1D.empty() )
301  {
302  log << MSG::INFO << " Predefined 1D-Histograms: " << endmsg ;
303  for ( Histo1DMap::const_iterator ih = m_defs1D.begin() ;
304  m_defs1D.end() != ih ; ++ih )
305  {
306  log << MSG::INFO
307  << " Path='" << ih->first << "'"
308  << " Description " << ih->second << endmsg ;
309  }
310  }
311  return status;
312 }
313 //------------------------------------------------------------------------------
315  return StatusCode::SUCCESS;
316 }
317 //------------------------------------------------------------------------------
318 IHistogram1D* HistogramSvc::sliceX
319 (CSTR name,const IHistogram2D& h,int idxY1,int idxY2) {
320  std::pair<DataObject*,IHistogram1D*> o(0,0);
321  try {
322  int firstbin = Gaudi::Axis::toRootIndex(idxY1,h.yAxis().bins());
323  int lastbin = Gaudi::Axis::toRootIndex(idxY2,h.yAxis().bins());
324  o = Gaudi::slice1DX(name, h, firstbin, lastbin);
325  }
326  catch ( ... ) {
327  throw GaudiException("Cannot cast 2D histogram to H2D to create sliceX `"
328  + name + "'!", "HistogramSvc", StatusCode::FAILURE);
329  }
330  if ( o.first && registerObject(name,(IBaseHistogram*)o.second).isSuccess() ) {
331  return o.second;
332  }
333  delete o.first;
334  throw GaudiException("Cannot create sliceX `" + name + "' of 2D histogram!",
335  "HistogramSvc", StatusCode::FAILURE);
336 }
337 //------------------------------------------------------------------------------
338 IHistogram1D*
339 HistogramSvc::sliceY(CSTR name,const IHistogram2D& h,int indexX1,int indexX2) {
340  std::pair<DataObject*,IHistogram1D*> o(0,0);
341  try {
342  int firstbin = Gaudi::Axis::toRootIndex( indexX1, h.xAxis().bins() );
343  int lastbin = Gaudi::Axis::toRootIndex( indexX2, h.xAxis().bins() );
344  o = Gaudi::slice1DY(name, h, firstbin, lastbin);
345  }
346  catch ( ... ) {
347  throw GaudiException("Cannot create sliceY `"+name+"'!",
348  "HistogramSvc",StatusCode::FAILURE);
349  }
350  // name stands here for the fullPath of the histogram
351  if ( o.first && registerObject(name,(IBaseHistogram*)o.second).isSuccess() ) {
352  return o.second;
353  }
354  delete o.first;
355  throw GaudiException("Cannot create sliceY `"+name+"' of 2D histogram!",
356  "HistogramSvc", StatusCode::FAILURE);
357 }
358 //------------------------------------------------------------------------------
359 bool HistogramSvc::destroy( IBaseHistogram* hist ) {
360  StatusCode sc = unregisterObject( dynamic_cast<IHistogram*>(hist) );
361  if ( !sc.isSuccess() ) return false;
362  if ( hist ) delete hist;
363  return true;
364 }
365 // ============================================================================
366 AIDA::IHistogram1D* HistogramSvc::book
367 (DataObject* pPar, CSTR rel, CSTR title, DBINS(x))
368 {
369  if ( m_defs1D.empty () )
370  { return i_book(pPar,rel,title,Gaudi::createH1D(title, BINS(x))); }
371  std::string hn = histoAddr ( pPar , rel ) ;
372  Histo1DMap::const_iterator ifound = m_defs1D.find( hn ) ;
373  if ( m_defs1D.end() == ifound )
374  { return i_book(pPar,rel,title,Gaudi::createH1D(title, BINS(x))); }
375  if (msgLevel(MSG::DEBUG)) {
376  MsgStream log ( msgSvc() , name() ) ;
377  log << MSG::DEBUG
378  << " Redefine the parameters for the histogram '" + hn + "' to be "
379  << ifound->second
380  << endmsg;
381  }
382  m_mods1D.insert ( hn ) ;
383  return i_book ( pPar , rel , ifound -> second.title () ,
385  ( ifound -> second.title () ,
386  ifound -> second.bins () ,
387  ifound -> second.lowEdge () ,
388  ifound -> second.lowEdge () ) ) ;
389 }
390 // ============================================================================
391 // constructor
392 // ============================================================================
394  : base_class(nam, svc)
395  , m_defs1D ()
396  , m_mods1D ()
397 {
398  // Properties can be declared here
399  m_rootName = "/stat";
400  m_rootCLID = CLID_DataObject;
401  declareProperty ( "Input", m_input);
402  declareProperty ( "Predefined1DHistos" , m_defs1D ,
403  "Histograms with predefined parameters" ) ;
404  // update handler
405  Property* p = Gaudi::Utils::getProperty ( this , "Predefined1DHistos" ) ;
407 
408 }
409 // ============================================================================
410 // handler to be invoked for updating property m_defs1D
411 // ============================================================================
412 namespace
413 {
414  inline size_t removeLeading
415  ( HistogramSvc::Histo1DMap& m , const std::string& lead = "/stat/")
416  {
417  for ( HistogramSvc::Histo1DMap::iterator it = m.begin() ;
418  m.end() != it ; ++it )
419  {
420  if ( 0 == it->first.find ( lead ) )
421  {
422  std::string addr = std::string( it->first , lead.size() ) ;
423  Gaudi::Histo1DDef hdef = it->second ;
424  m.erase ( it ) ; // remove
425  m[addr] = hdef ; // insert
426  return 1 + removeLeading ( m , lead ) ; // return
427  }
428  }
429  return 0 ;
430  }
431 }
432 // ============================================================================
434 {
435  // check and remove the leading '/stat/'
436  removeLeading ( m_defs1D , "/stat/" ) ;
437 }
438 // ============================================================================
439 // finalize the service
441 {
442  if ( !m_mods1D.empty() )
443  {
444  MsgStream log ( msgSvc () , name () ) ;
445  if (msgLevel(MSG::DEBUG))
446  log << MSG::DEBUG
447  << " Substituted histograms #" << m_mods1D.size() << " : " << endmsg;
448  for ( std::set<std::string>::const_iterator ih = m_mods1D.begin() ;
449  m_mods1D.end() != ih ; ++ih )
450  {
451  if (msgLevel(MSG::DEBUG))
452  log << MSG::DEBUG << " Path='" << (*ih) << "'" ;
453  Histo1DMap::const_iterator im = m_defs1D.find( *ih ) ;
454  if ( m_defs1D.end() != im ) { log << " " << im->second ; }
455  }
456  m_mods1D.clear() ;
457  }
458  return DataSvc::finalize () ;
459 }
460 // ============================================================================
461 // The END
462 // ============================================================================
virtual StatusCode setDataLoader(IConversionSvc *svc)
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.
Definition: DataSvc.cpp:203
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DY(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
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:26
const std::string & CSTR
Definition: HistogramSvc.h:59
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
Definition: DataSvc.cpp:855
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)
Register object with the data store.
Definition: DataSvc.cpp:361
std::set< std::string > m_mods1D
Definition: HistogramSvc.h:971
bool destroy(IBaseHistogram *hist)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
std::pair< DataObject *, AIDA::IHistogram1D * > createH1D(const AIDA::IHistogram1D &hist)
Copy constructor.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
std::string m_rootName
Name of root event.
Definition: DataSvc.h:50
virtual std::ostream & print(std::ostream &s) const =0
Print histogram to output stream.
virtual std::ostream & write(std::ostream &s) const =0
Write (binary) histogram to output stream.
const long ROOT_StorageType
Definition: ClassID.h:53
virtual std::ostream & write(Base *h, std::ostream &s=std::cout) const
Write (ASCII) the 1D histogram table into the output stream.
virtual StatusCode initialize()
Initialise the service.
virtual H1D * book(CSTR par, CSTR rel, CSTR title, DBINS(x))
Book histogram and register it with the histogram data store.
Definition: HistogramSvc.h:213
virtual H1D * sliceY(CSTR name, const H2D &h, int indexX)
Definition: HistogramSvc.h:775
Generic Transient Address.
H2D * i_project(CSTR nameAndTitle, const H3D &h, CSTR dir)
Helper for 2D projections.
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)
IDataManagerSvc: Register object address with the data store.
Definition: DataSvc.cpp:249
DBaseEntries m_input
Input streams.
Definition: HistogramSvc.h:139
StatusCode connectInput(CSTR ident)
Connect input histogram file to the service.
GaudiKernel.
Definition: Fill.h:10
Histo1DMap m_defs1D
Definition: HistogramSvc.h:968
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
virtual ~HistogramSvc()
Destructor.
virtual StatusCode finalize()
finalize the service
virtual StatusCode setRoot(const std::string &root_name, DataObject *pRootObj)
Initialize data store for new event by giving new event path and root object.
Definition: DataSvc.cpp:154
constexpr double second
virtual void declareUpdateHandler(PropertyCallbackFunctor *pf)
set new callback for update
Definition: Property.cpp:141
virtual std::ostream & print(Base *h, std::ostream &s=std::cout) const
Print (ASCII) the 1D histogram into the output stream.
std::pair< std::string, std::string > i_splitPath(CSTR full)
Split full path into its components.
virtual unsigned long release()
release reference to object
#define BINS(x)
Definition: HistogramSvc.h:40
HistogramSvc(CSTR name, ISvcLocator *svc)
Statndard Constructor.
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
constexpr double m
Definition: SystemOfUnits.h:93
Simple helper class for description of 1D-histogram The class is targeted to act as the primary "hist...
Definition: HistoDef.h:32
virtual DataObject * createPath(CSTR newPath)
Create all directories in a given full path.
std::pair< DataObject *, AIDA::IHistogram2D * > createH2D(const AIDA::IHistogram2D &hist)
Copy constructor.
void update1Ddefs(Property &)
handler to be invoked for updating property m_defs1D
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DX(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
static DataObject * __cast(T *p)
Definition: HistogramSvc.h:172
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
const std::string CSTR
virtual H1D * sliceX(CSTR name, const H2D &h, int indexY)
Definition: HistogramSvc.h:773
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)
Retrieve object from data store.
Definition: DataSvc.cpp:782
virtual StatusCode registerObject(CSTR parent, CSTR rel, Base *obj)
Definition: HistogramSvc.h:559
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:349
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
virtual StatusCode initialize()
Service initialization.
Definition: DataSvc.cpp:1201
virtual DataObject * createDirectory(CSTR parentDir, CSTR subDir)
Create a sub-directory in a directory.
virtual StatusCode findObject(IRegistry *pReg, CSTR path, P1D *&obj)
Definition: HistogramSvc.h:678
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
#define DBINS(x)
Definition: HistogramSvc.h:39
Common base class for all histograms Use is solely functional to minimize dynamic_casts inside Histog...
Definition: HistogramBase.h:22
virtual unsigned long release()=0
Release Interface instance.
std::string _STR(int i)
virtual StatusCode clearStore()
IDataManagerSvc: Remove all data objects in the data store.
Definition: DataSvc.cpp:115
string s
Definition: gaudirun.py:244
Templated class to add the standard messaging functionalities.
CLID m_rootCLID
Integer Property corresponding to CLID of root entry.
Definition: DataSvc.h:48
static int toRootIndex(int index, int nbins)
Definition: Axis.h:37
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Service.h:143
virtual const id_type & identifier() const =0
Full identifier (or key)
void ignore() const
Definition: StatusCode.h:107
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:212
virtual StatusCode unregisterObject(Base *obj)
Definition: HistogramSvc.h:574
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
list i
Definition: ana.py:128
void toupper(std::string &s)
virtual StatusCode finalize()
Service initialization.
Definition: DataSvc.cpp:1241
virtual StatusCode reinitialize()
Initialise the service.
std::map< std::string, Gaudi::Histo1DDef > Histo1DMap
Definition: HistogramSvc.h:963
const long HBOOK_StorageType
Definition: ClassID.h:57
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
HistogramSvc class definition.
Definition: HistogramSvc.h:48