ATLAS Offline Software
IItemListSvc.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // IItemListSvc.h
8 // Header file for class IItemListSvc
9 // Author: S.Binet<binet@cern.ch>
10 // B.Radics<radbal@cern.ch>
12 #ifndef ATHENAKERNEL_IITEMLISTSVC_H
13 #define ATHENAKERNEL_IITEMLISTSVC_H 1
14 
21 // STL includes
22 #include <vector>
23 #include <string>
24 #include <map>
25 #include <mutex>
26 
27 // fwd declares
28 class INamedInterface;
29 
30 
32  : virtual public ::INamedInterface
33 {
34 
35 public:
37 
38  virtual ~IItemListSvc();
39 
41  // Public interface methods
42  // non-const
43  //
44  // add a stream-item pair to the service listing
45  virtual StatusCode addStreamItem(const std::string& stream, const std::string& itemname) = 0;
46  // remove Item
47  virtual StatusCode removeStreamItem(const std::string& stream, const std::string& itemname) = 0;
48  //
49  // const
50  //
51  // check if a stream-item is registered
52  //virtual bool containsItem(const std::string itemname) const = 0;
53  virtual bool containsItem(const std::string& itemname, const std::string& stream="ANY") const = 0;
54  // check how many streams contain an item
55  //virtual long countItemInstances(const std::string itemname) const = 0;
56  // get the streams for a given item
57  virtual std::vector<std::string> getStreamsForItem(const std::string& itemname) const = 0;
58  // get the items for a given stream
59  virtual std::vector<std::string> getItemsForStream(const std::string& stream) const = 0;
60 
61  // get mutex for streaming itemlist to output
62  virtual std::mutex& streamMutex();
63 
64 
65 private:
66 
68 
69 };
70 
72 // Inline methods:
74 
75 inline
78 {
79  return m_stream_mut;
80 }
81 
82 #endif //> !ATHENAKERNEL_IITEMLISTSVC_H
83 
IItemListSvc::addStreamItem
virtual StatusCode addStreamItem(const std::string &stream, const std::string &itemname)=0
IItemListSvc::containsItem
virtual bool containsItem(const std::string &itemname, const std::string &stream="ANY") const =0
IItemListSvc::DeclareInterfaceID
DeclareInterfaceID(IItemListSvc, 1, 0)
IItemListSvc::streamMutex
virtual std::mutex & streamMutex()
Definition: IItemListSvc.h:77
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
IItemListSvc::getItemsForStream
virtual std::vector< std::string > getItemsForStream(const std::string &stream) const =0
IItemListSvc::removeStreamItem
virtual StatusCode removeStreamItem(const std::string &stream, const std::string &itemname)=0
IItemListSvc::~IItemListSvc
virtual ~IItemListSvc()
Definition: IItemListSvc.cxx:30
IItemListSvc::getStreamsForItem
virtual std::vector< std::string > getStreamsForItem(const std::string &itemname) const =0
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
IItemListSvc
This class defines a protocol to register boolean decisions and.
Definition: IItemListSvc.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IItemListSvc::m_stream_mut
std::mutex m_stream_mut
Definition: IItemListSvc.h:67