The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
EventSelectorDataStream.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 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#pragma once
12
13#include <Gaudi/Property.h>
15#include <iostream>
16#include <vector>
17
18class MsgStream;
19class ISvcLocator;
21
39class GAUDI_API EventSelectorDataStream : public implements<IInterface> {
41 friend MsgStream& operator<<( MsgStream& s, const EventSelectorDataStream& obj );
43 friend std::ostream& operator<<( std::ostream& s, const EventSelectorDataStream& obj );
44
45public:
46 typedef std::vector<Gaudi::Property<std::string>> Properties;
47
48protected:
50 std::string m_name;
52 std::string m_definition;
54 std::string m_criteria;
56 std::string m_dbName;
58 std::string m_selectorType;
66 bool m_initialized = false;
68 virtual ~EventSelectorDataStream() = default;
69
70public:
72 EventSelectorDataStream( std::string nam, std::string def, ISvcLocator* svcloc );
74 virtual void setSelector( IEvtSelector* pSelector );
76 virtual StatusCode initialize();
78 virtual StatusCode finalize();
80 Gaudi::Property<std::string>* property( const std::string& nam );
82 const Gaudi::Property<std::string>* property( const std::string& nam ) const;
84 const Properties& properties() { return m_properties; }
86 const std::string& name() const { return m_name; }
88 const std::string& criteria() const { return m_criteria; }
90 const std::string& dbName() const { return m_dbName; }
92 const std::string& selectorType() const { return m_selectorType; }
94 const std::string& definition() const { return m_definition; }
96 IEvtSelector* selector() const { return m_pSelector.get(); }
98 bool isInitialized() const { return m_initialized; }
99};
100
104GAUDI_API std::ostream& operator<<( std::ostream& s, const EventSelectorDataStream& obj );
std::ostream & operator<<(std::ostream &s, AlgsExecutionStates::State x)
Streaming of State values.
GAUDI_API MsgStream & operator<<(MsgStream &s, const EventSelectorDataStream &obj)
Output friend for MsgStream.
#define GAUDI_API
Definition Kernel.h:49
Definition of class EventSelectorDataStream.
virtual StatusCode finalize()
Finalize stream and release resources.
const std::string & selectorType() const
Retrieve event selector type.
std::string m_selectorType
Event selector type.
const std::string & criteria() const
Retrieve stream criteria.
SmartIF< IEvtSelector > m_pSelector
Pointer to valid selector.
const Properties & properties()
Access properties.
const std::string & name() const
Retrieve stream name.
EventSelectorDataStream(std::string nam, std::string def, ISvcLocator *svcloc)
Standard Constructor.
Properties m_properties
Properties vector.
const std::string & definition() const
Retrieve definition string.
std::string m_definition
Definition string.
virtual StatusCode initialize()
Parse input criteria.
std::string m_criteria
Criteria.
virtual ~EventSelectorDataStream()=default
Standard Destructor.
Gaudi::Property< std::string > * property(const std::string &nam)
Allow access to individual properties by name.
bool isInitialized() const
Check initialization status.
virtual void setSelector(IEvtSelector *pSelector)
Attach event selector object.
ISvcLocator * m_pSvcLocator
Reference to service locator.
std::string m_dbName
String with name of the db as parsed.
const std::string & dbName() const
Retrieve stream dbName.
bool m_initialized
Initialization state.
IEvtSelector * selector() const
Retrieve event selector object.
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
The Event Selector Interface.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition ISvcLocator.h:42
Definition of the MsgStream class used to transmit messages.
Definition MsgStream.h:29
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64