ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
HLT
Event
TrigByteStreamCnvSvc
src
EFInterfaceSvc.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef EFINTERFACESVC_H
6
#define EFINTERFACESVC_H
7
8
#include "GaudiKernel/IIncidentListener.h"
9
#include "Gaudi/Interfaces/IOptionsSvc.h"
10
#include "
AthenaBaseComps/AthService.h
"
11
#include "
CxxUtils/checker_macros.h
"
12
#include "eformat/eformat.h"
13
#include "df_ef_interface/df_ef_interface.h"
14
#include <boost/dll.hpp>
15
#include <boost/property_tree/ptree.hpp>
16
#include <queue>
17
#include <mutex>
18
#include <memory>
19
28
class
EFInterfaceSvc
:
public
extends <AthService, IIncidentListener>
29
{
30
public
:
31
32
enum class
Status
{
33
OK
= 0,
34
NO_EVENT
,
35
STOP
36
};
37
38
EFInterfaceSvc
(
const
std::string& name, ISvcLocator *svc );
39
virtual
~EFInterfaceSvc
() noexcept
override
{}
40
41
virtual
StatusCode
initialize
ATLAS_NOT_THREAD_SAFE
()
override
;
42
virtual
StatusCode
stop
()
override
;
43
virtual
StatusCode
finalize
()
override
;
44
45
virtual
void
handle
(
const
Incident& incident)
override
;
46
virtual
Status
getNext
(std::unique_ptr<uint32_t[]>& rawEventPtr);
47
void
eventDone
(std::unique_ptr<uint32_t[]> rawEventPtr);
48
boost::property_tree::ptree
prepInterfacePTree
();
49
50
// Event Counters
51
uint32_t
m_acceptedEvents
{0};
52
uint32_t
m_rejectedEvents
{0};
53
uint32_t
m_processedEvents
{0};
54
55
private
:
56
boost::dll::shared_library
m_efdfinterface_library
;
57
std::unique_ptr<daq::df_ef_interface::EventHandler>
m_eventHandler
;
58
std::queue<std::future<std::unique_ptr<uint32_t []>>>
m_getNextFuture
;
59
std::mutex
m_queueMutex
;
60
61
// ------------------------- Properties --------------------------------------
62
Gaudi::Property<std::string>
m_interface_library_name
{
this
,
"EFDFInterfaceLibraryName"
,
"TrigDFEmulator"
,
63
"Name of the EFDF interface shared library to load"
};
64
Gaudi::Property<int>
m_getNextTimeout
{
this
,
"GetNextTimeout"
, 1000,
65
"Timeout for getting the next event (in milliseconds)"
};
66
Gaudi::Property<int>
m_stride
{
this
,
"Stride"
, 1,
67
"Stride for the event retrieval"
};
68
Gaudi::Property<int>
m_fileOffset
{
this
,
"FileOffset"
, -1,
69
"File offset for the event retrieval. If single file: -1"
};
70
Gaudi::Property<int>
m_numEvents
{
this
,
"NumEvents"
, 100,
71
"Number of events to process"
};
72
Gaudi::Property<int>
m_skipEvents
{
this
,
"SkipEvents"
, 0,
73
"Number of events to skip"
};
74
Gaudi::Property<bool>
m_loopOverFiles
{
this
,
"LoopOverFiles"
,
true
,
75
"Flag to enable looping over files"
};
76
Gaudi::Property<std::string>
m_outputFileName
{
this
,
"OutputFileName"
,
""
,
77
"Name of the output file"
};
78
Gaudi::Property<std::vector<std::string>>
m_files
{
this
,
"Files"
, {
""
},
79
"List of input files"
};
80
Gaudi::Property<int>
m_runNumber
{
this
,
"RunNumber"
, 0,
81
"Run number for the events processing"
};
82
Gaudi::Property<int>
m_triggerType
{
this
,
"TriggerType"
, 0,
83
"Trigger type for the events processing"
};
84
Gaudi::Property<int>
m_beamType
{
this
,
"BeamType"
, 0,
85
"Beam type"
};
86
Gaudi::Property<int>
m_beamEnergy
{
this
,
"BeamEnergy"
, 0,
87
"Beam energy"
};
88
Gaudi::Property<std::string>
m_detMask
{
this
,
"DetMask"
,
"00000000000000000000000000000000"
,
89
"Detector mask"
};
90
Gaudi::Property<std::string>
m_T0_project_tag
{
this
,
"T0ProjectTag"
,
""
,
91
"T0 project tag"
};
92
Gaudi::Property<std::string>
m_stream
{
this
,
"Stream"
,
"stream"
,
93
"Stream name"
};
94
Gaudi::Property<int>
m_lumiblock
{
this
,
"Lumiblock"
, 0,
95
"Lumiblock"
};
96
};
97
98
#endif
// EFINTERFACESVC_H
99
AthService.h
checker_macros.h
Define macros for attributes used to control the static checker.
EFInterfaceSvc::m_outputFileName
Gaudi::Property< std::string > m_outputFileName
Definition
EFInterfaceSvc.h:76
EFInterfaceSvc::~EFInterfaceSvc
virtual ~EFInterfaceSvc() noexcept override
Definition
EFInterfaceSvc.h:39
EFInterfaceSvc::Status
Status
Definition
EFInterfaceSvc.h:32
EFInterfaceSvc::Status::NO_EVENT
@ NO_EVENT
no event available
Definition
EFInterfaceSvc.h:34
EFInterfaceSvc::Status::STOP
@ STOP
stop transition (no more events)
Definition
EFInterfaceSvc.h:35
EFInterfaceSvc::Status::OK
@ OK
event returned
Definition
EFInterfaceSvc.h:33
EFInterfaceSvc::m_getNextTimeout
Gaudi::Property< int > m_getNextTimeout
Definition
EFInterfaceSvc.h:64
EFInterfaceSvc::m_getNextFuture
std::queue< std::future< std::unique_ptr< uint32_t[]> > > m_getNextFuture
Definition
EFInterfaceSvc.h:58
EFInterfaceSvc::EFInterfaceSvc
EFInterfaceSvc(const std::string &name, ISvcLocator *svc)
Definition
EFInterfaceSvc.cxx:13
EFInterfaceSvc::stop
virtual StatusCode stop() override
Definition
EFInterfaceSvc.cxx:75
EFInterfaceSvc::ATLAS_NOT_THREAD_SAFE
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE() override
EFInterfaceSvc::finalize
virtual StatusCode finalize() override
Definition
EFInterfaceSvc.cxx:107
EFInterfaceSvc::m_beamType
Gaudi::Property< int > m_beamType
Definition
EFInterfaceSvc.h:84
EFInterfaceSvc::m_acceptedEvents
uint32_t m_acceptedEvents
Definition
EFInterfaceSvc.h:51
EFInterfaceSvc::m_stream
Gaudi::Property< std::string > m_stream
Definition
EFInterfaceSvc.h:92
EFInterfaceSvc::m_detMask
Gaudi::Property< std::string > m_detMask
Definition
EFInterfaceSvc.h:88
EFInterfaceSvc::m_triggerType
Gaudi::Property< int > m_triggerType
Definition
EFInterfaceSvc.h:82
EFInterfaceSvc::m_numEvents
Gaudi::Property< int > m_numEvents
Definition
EFInterfaceSvc.h:70
EFInterfaceSvc::eventDone
void eventDone(std::unique_ptr< uint32_t[]> rawEventPtr)
Definition
EFInterfaceSvc.cxx:115
EFInterfaceSvc::getNext
virtual Status getNext(std::unique_ptr< uint32_t[]> &rawEventPtr)
Definition
EFInterfaceSvc.cxx:133
EFInterfaceSvc::m_interface_library_name
Gaudi::Property< std::string > m_interface_library_name
Definition
EFInterfaceSvc.h:62
EFInterfaceSvc::m_loopOverFiles
Gaudi::Property< bool > m_loopOverFiles
Definition
EFInterfaceSvc.h:74
EFInterfaceSvc::m_files
Gaudi::Property< std::vector< std::string > > m_files
Definition
EFInterfaceSvc.h:78
EFInterfaceSvc::m_fileOffset
Gaudi::Property< int > m_fileOffset
Definition
EFInterfaceSvc.h:68
EFInterfaceSvc::m_eventHandler
std::unique_ptr< daq::df_ef_interface::EventHandler > m_eventHandler
Definition
EFInterfaceSvc.h:57
EFInterfaceSvc::m_runNumber
Gaudi::Property< int > m_runNumber
Definition
EFInterfaceSvc.h:80
EFInterfaceSvc::m_T0_project_tag
Gaudi::Property< std::string > m_T0_project_tag
Definition
EFInterfaceSvc.h:90
EFInterfaceSvc::m_beamEnergy
Gaudi::Property< int > m_beamEnergy
Definition
EFInterfaceSvc.h:86
EFInterfaceSvc::m_efdfinterface_library
boost::dll::shared_library m_efdfinterface_library
Library with the df_ef_interface implementation.
Definition
EFInterfaceSvc.h:56
EFInterfaceSvc::m_lumiblock
Gaudi::Property< int > m_lumiblock
Definition
EFInterfaceSvc.h:94
EFInterfaceSvc::handle
virtual void handle(const Incident &incident) override
Definition
EFInterfaceSvc.cxx:29
EFInterfaceSvc::m_processedEvents
uint32_t m_processedEvents
Definition
EFInterfaceSvc.h:53
EFInterfaceSvc::m_stride
Gaudi::Property< int > m_stride
Definition
EFInterfaceSvc.h:66
EFInterfaceSvc::m_queueMutex
std::mutex m_queueMutex
Mutex for future queue.
Definition
EFInterfaceSvc.h:59
EFInterfaceSvc::m_rejectedEvents
uint32_t m_rejectedEvents
Definition
EFInterfaceSvc.h:52
EFInterfaceSvc::m_skipEvents
Gaudi::Property< int > m_skipEvents
Definition
EFInterfaceSvc.h:72
EFInterfaceSvc::prepInterfacePTree
boost::property_tree::ptree prepInterfacePTree()
Definition
EFInterfaceSvc.cxx:190
initialize
void initialize()
Definition
run_EoverP.cxx:894
Generated on
for ATLAS Offline Software by
1.17.0