The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
RootEvtSelector.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//====================================================================
12// RootTreeEvtSelector.h
13//--------------------------------------------------------------------
14//
15// Package : RootCnv
16//
17// Description: The RootEvtSelector component is able
18// to produce a list of event references given a set of "selection
19// criteria".
20//
21// Author : M.Frank
22// Created : 4/01/99
23//
24//====================================================================
25
26#pragma once
27
28// Framework include files
30#include <GaudiKernel/Service.h>
31
32/*
33 * Gaudi namespace declaration
34 */
35namespace Gaudi {
36
37 // Forward declarations
38 class RootCnvSvc;
39
48 class GAUDI_API RootEvtSelector : public extends<Service, IEvtSelector> {
49
51 StatusCode error( const std::string& msg ) const;
52
53 public:
55 using extends::extends;
56
58 StatusCode initialize() override;
59
61 StatusCode finalize() override;
62
64
68 StatusCode createContext( Context*& refpCtxt ) const override;
69
73 StatusCode last( Context& refContext ) const override;
74
76
80 StatusCode next( Context& refCtxt ) const override;
81
83
87 StatusCode next( Context& refCtxt, int jump ) const override;
88
90
95 StatusCode previous( Context& refCtxt ) const override;
96
98
103 StatusCode previous( Context& refCtxt, int jump ) const override;
104
106
110 StatusCode rewind( Context& refCtxt ) const override;
111
113
117 StatusCode createAddress( const Context& refCtxt, IOpaqueAddress*& ) const override;
118
120
124 StatusCode releaseContext( Context*& refCtxt ) const override;
125
132 StatusCode resetCriteria( const std::string& cr, Context& c ) const override;
133
134 protected:
135 // Data Members
139 CLID m_rootCLID = CLID_NULL;
140
141 Gaudi::Property<std::string> m_persName{ this, "EvtPersistencySvc", "EventPersistencySvc",
142 "Name of the persistency service to search for conversion service" };
143 Gaudi::Property<std::string> m_dummy{ this, "DbType", "", "dummy property to fake backwards compatibility" };
144
146 std::string m_cnvSvcName = "Gaudi::RootCnvSvc/RootCnvSvc";
148 std::string m_rootName;
150 std::string m_criteria;
151 };
152} // namespace Gaudi
unsigned int CLID
Class ID definition.
Definition ClassID.h:16
#define GAUDI_API
Definition Kernel.h:49
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
Description:
Definition RootCnvSvc.h:61
Concrete event selector implementation to access ROOT files.
StatusCode rewind(Context &refCtxt) const override
Rewind the dataset.
StatusCode resetCriteria(const std::string &cr, Context &c) const override
Will set a new criteria for the selection of the next list of events and will change the state of the...
StatusCode releaseContext(Context *&refCtxt) const override
Release existing event iteration context.
CLID m_rootCLID
Class id of root node to create opaque address.
StatusCode next(Context &refCtxt) const override
Get next iteration item from the event loop context.
StatusCode initialize() override
IService implementation: Db event selector override.
StatusCode error(const std::string &msg) const
Helper method to issue error messages.
StatusCode createContext(Context *&refpCtxt) const override
Create a new event loop context.
StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&) const override
Create new Opaque address corresponding to the current record.
StatusCode previous(Context &refCtxt) const override
Get previous iteration item from the event loop context.
StatusCode last(Context &refContext) const override
Access last item in the iteration.
std::string m_criteria
Property: File criteria to define item iteration.
StatusCode finalize() override
IService implementation: Service finalization.
Gaudi::Property< std::string > m_persName
std::string m_cnvSvcName
Property; Name of the concversion service used to create opaque addresses.
std::string m_rootName
Property: Name of the ROOT entry name.
RootCnvSvc * m_dbMgr
Reference to the corresponding conversion service.
Gaudi::Property< std::string > m_dummy
Opaque address interface definition.
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
Base class used to extend a class implementing other interfaces.
Definition extends.h:19
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1