The Gaudi Framework  v33r1 (b1225454)
HistogramAgent.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_HISTOGRAMAGENT_H
12 #define GAUDIKERNEL_HISTOGRAMAGENT_H
13 
14 #include "GaudiKernel/ClassID.h"
15 #include "GaudiKernel/DataObject.h"
18 #include "GaudiKernel/IRegistry.h"
19 
28 class HistogramAgent final : virtual public IDataStoreAgent {
30 
31 public:
33  const IDataSelector& selectedObjects() const { return m_objects; }
35  bool analyse( IRegistry* pRegistry, int ) override {
36  DataObject* obj = pRegistry->object();
37  if ( obj && obj->clID() != CLID_StatisticsFile ) {
38  m_objects.push_back( obj );
39  return true;
40  }
41  return false;
42  }
43 };
44 #endif // GAUDIKERNEL_HISTOGRAMAGENT_H
HistogramAgent base in charge of collecting all the references to DataObjects in a transient store th...
bool analyse(IRegistry *pRegistry, int) override
Analyses a given directory entry.
T push_back(T... args)
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:32
virtual DataObject * object() const =0
Retrieve object behind the link.
IDataSelector m_objects
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:66
Generic data agent interface.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:40
const IDataSelector & selectedObjects() const
Return the set of selected DataObjects.