| The Gaudi Framework v32r1 (f65d50dc)

EventSelectorDataStream.h
Go to the documentation of this file.
1 //====================================================================
2 // EventSelectorDataStream.h
3 //--------------------------------------------------------------------
4 //
5 // Package : EventSelectorDataStream (LHCb Event Selector Package)
6 //
7 // Author : M.Frank
8 // Created : 4/10/00
9 // Changes : R. Lambert 2009-09-04
10 //
11 //====================================================================
12 #ifndef GAUDIKERNEL_EVENTSELECTORDATASTREAM_H
13 #define GAUDIKERNEL_EVENTSELECTORDATASTREAM_H 1
14
15 // Include files
16 #include "GaudiKernel/IEvtSelector.h"
17 #include "GaudiKernel/Property.h"
18
19 // STL include files
20 #include <iostream>
21 #include <vector>
22
23 // Forward declarations
24 class MsgStream;
25 class ISvcLocator;
26 class EventSelectorDataStream;
27
45 class GAUDI_API EventSelectorDataStream : public implements<IInterface> {
47 friend MsgStream& operator<<( MsgStream& s, const EventSelectorDataStream& obj );
49 friend std::ostream& operator<<( std::ostream& s, const EventSelectorDataStream& obj );
50
51 public:
52 typedef std::vector<Gaudi::Property<std::string>> Properties;
53
54 protected:
56 std::string m_name;
58 std::string m_definition;
60 std::string m_criteria;
62 std::string m_dbName;
64 std::string m_selectorType;
66 SmartIF<IEvtSelector> m_pSelector;
68 ISvcLocator* m_pSvcLocator;
70 Properties m_properties;
72 bool m_initialized = false;
74 virtual ~EventSelectorDataStream() = default;
75
76 public:
78 EventSelectorDataStream( std::string nam, std::string def, ISvcLocator* svcloc );
80 virtual void setSelector( IEvtSelector* pSelector );
82 virtual StatusCode initialize();
84 virtual StatusCode finalize();
86 Gaudi::Property<std::string>* property( const std::string& nam );
88 const Gaudi::Property<std::string>* property( const std::string& nam ) const;
90 const Properties& properties() { return m_properties; }
92 const std::string& name() const { return m_name; }
94 const std::string& criteria() const { return m_criteria; }
96 const std::string& dbName() const { return m_dbName; }
98 const std::string& selectorType() const { return m_selectorType; }
100 const std::string& definition() const { return m_definition; }
102 IEvtSelector* selector() const { return m_pSelector.get(); }
104 bool isInitialized() const { return m_initialized; }
105 };
106
108 GAUDI_API MsgStream& operator<<( MsgStream& s, const EventSelectorDataStream& obj );
110 GAUDI_API std::ostream& operator<<( std::ostream& s, const EventSelectorDataStream& obj );
111
112 #endif // GAUDIKERNEL_EVENTSELECTORDATASTREAM_H
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IEvtSelector >
implements
Base class used to implement the interfaces.
Definition: implements.h:9
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
IEvtSelector
The Event Selector Interface.
Definition: IEvtSelector.h:18
EventSelectorDataStream::dbName
const std::string & dbName() const
Retrieve stream dbName.
Definition: EventSelectorDataStream.h:96
EventSelectorDataStream::name
const std::string & name() const
Retrieve stream name.
Definition: EventSelectorDataStream.h:92
EventSelectorDataStream::criteria
const std::string & criteria() const
Retrieve stream criteria.
Definition: EventSelectorDataStream.h:94
EventSelectorDataStream::m_criteria
std::string m_criteria
Criteria.
Definition: EventSelectorDataStream.h:60
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
EventSelectorDataStream::m_selectorType
std::string m_selectorType
Event selector type.
Definition: EventSelectorDataStream.h:64
std::string
STL class.
EventSelectorDataStream::m_pSelector
SmartIF< IEvtSelector > m_pSelector
Pointer to valid selector.
Definition: EventSelectorDataStream.h:66
EventSelectorDataStream::m_pSvcLocator
ISvcLocator * m_pSvcLocator
Reference to service locator.
Definition: EventSelectorDataStream.h:68
EventSelectorDataStream::Properties
std::vector< Gaudi::Property< std::string > > Properties
Definition: EventSelectorDataStream.h:52
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
EventSelectorDataStream::selector
IEvtSelector * selector() const
Retrieve event selector object.
Definition: EventSelectorDataStream.h:102
EventSelectorDataStream::isInitialized
bool isInitialized() const
Check initialization status.
Definition: EventSelectorDataStream.h:104
EventSelectorDataStream::m_definition
std::string m_definition
Definition string.
Definition: EventSelectorDataStream.h:58
EventSelectorDataStream::m_name
std::string m_name
Name.
Definition: EventSelectorDataStream.h:56
EventSelectorDataStream::selectorType
const std::string & selectorType() const
Retrieve event selector type.
Definition: EventSelectorDataStream.h:98
std::vector
STL class.
EventSelectorDataStream::m_properties
Properties m_properties
Properties vector.
Definition: EventSelectorDataStream.h:70
EventSelectorDataStream::definition
const std::string & definition() const
Retrieve definition string.
Definition: EventSelectorDataStream.h:100
EventSelectorDataStream
Definition of class EventSelectorDataStream.
Definition: EventSelectorDataStream.h:45
Property.h
gaudirun.s
string s
Definition: gaudirun.py:316
IEvtSelector.h
EventSelectorDataStream::properties
const Properties & properties()
Access properties.
Definition: EventSelectorDataStream.h:90
EventSelectorDataStream::m_dbName
std::string m_dbName
String with name of the db as parsed.
Definition: EventSelectorDataStream.h:62
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
std::ostream
STL class.
operator<<
GAUDI_API MsgStream & operator<<(MsgStream &s, const EventSelectorDataStream &obj)
Output friend for MsgStream.
Definition: EventSelectorDataStream.cpp:25