The Gaudi Framework  master (37c0b60a)
HistogramAgent.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #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
std::vector< DataObject * >
ClassID.h
IRegistry
Definition: IRegistry.h:32
std::vector::push_back
T push_back(T... args)
HistogramAgent::selectedObjects
const IDataSelector & selectedObjects() const
Return the set of selected DataObjects.
Definition: HistogramAgent.h:33
HistogramAgent
Definition: HistogramAgent.h:28
HistogramAgent::m_objects
IDataSelector m_objects
Definition: HistogramAgent.h:29
IDataSelector.h
IRegistry.h
DataObject.h
IRegistry::object
virtual DataObject * object() const =0
Retrieve object behind the link.
DataObject
Definition: DataObject.h:36
HistogramAgent::analyse
bool analyse(IRegistry *pRegistry, int) override
Analyses a given directory entry.
Definition: HistogramAgent.h:35
DataObject::clID
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:66
IDataStoreAgent.h
IDataStoreAgent
Definition: IDataStoreAgent.h:27