ATLAS Offline Software
Loading...
Searching...
No Matches
ByteStreamCnvSvcBase Class Reference

The base class for offline and HLT ByteStream conversion services. More...

#include <ByteStreamCnvSvcBase.h>

Inheritance diagram for ByteStreamCnvSvcBase:
Collaboration diagram for ByteStreamCnvSvcBase:

Public Member Functions

 ByteStreamCnvSvcBase (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Service Constructor.
virtual ~ByteStreamCnvSvcBase ()
 Destructor.
virtual StatusCode initialize () override
 Required of all Gaudi Services.
virtual StatusCode updateServiceState (IOpaqueAddress *pAddress) override
 Checks whether an IOpaqueAddress is a GenericAddress.
virtual void handle (const Incident &) override
 Implementation of IIncidentListener: Handle for EndEvent incidence.

Protected Attributes

Gaudi::Property< std::vector< std::string > > m_initCnvs {this, "InitCnvs", {}, "Converters to initialize"}
Gaudi::Property< std::vector< std::string > > m_ROD2ROBmap {this, "ROD2ROBmap", {}, "", "OrderedSet<std::string>"}

Private Attributes

Flags which are not used by this service.

It only serves as an entity storing these values and some other components read it from here.

TODO: Remove this solution and move the properties where they are needed.

Gaudi::Property< bool > m_isSimulation {this, "IsSimulation", false}
Gaudi::Property< bool > m_isTestbeam {this, "IsTestbeam", false}
 flags for TestBeam EventType
Gaudi::Property< bool > m_isCalibration {this, "IsCalibration", false}
 flags for Calibration EventType

Detailed Description

The base class for offline and HLT ByteStream conversion services.

Definition at line 17 of file ByteStreamCnvSvcBase.h.

Constructor & Destructor Documentation

◆ ByteStreamCnvSvcBase()

ByteStreamCnvSvcBase::ByteStreamCnvSvcBase ( const std::string & name,
ISvcLocator * pSvcLocator )

Standard Service Constructor.

Definition at line 16 of file ByteStreamCnvSvcBase.cxx.

17 : base_class(name, pSvcLocator, ByteStreamAddress::storageType()) {}
static constexpr long storageType()

◆ ~ByteStreamCnvSvcBase()

ByteStreamCnvSvcBase::~ByteStreamCnvSvcBase ( )
virtualdefault

Destructor.

Standard Destructor.

Member Function Documentation

◆ handle()

void ByteStreamCnvSvcBase::handle ( const Incident & )
overridevirtual

Implementation of IIncidentListener: Handle for EndEvent incidence.

Definition at line 42 of file ByteStreamCnvSvcBase.cxx.

42 {
43 ServiceHandle<IClassIDSvc> clidSvc("ClassIDSvc", name());
44 if (!clidSvc.retrieve().isSuccess()) {
45 ATH_MSG_ERROR("Cannot get ClassIDSvc.");
46 return;
47 }
48 // Initialize the converters
49 for (const std::string& cnv : m_initCnvs.value()) {
50 ATH_MSG_DEBUG("Accessing Converter for " << cnv);
51 CLID id;
52 if (!clidSvc->getIDOfTypeName(cnv, id).isSuccess()) {
53 ATH_MSG_WARNING("Cannot get CLID for " << cnv);
54 } else {
55 IConverter* cnv = converter(id);
56 if (cnv == nullptr) {
57 ATH_MSG_WARNING("Cannot get converter for " << cnv);
58 }
59 }
60 }
61}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
uint32_t CLID
The Class ID type.
Gaudi::Property< std::vector< std::string > > m_initCnvs

◆ initialize()

StatusCode ByteStreamCnvSvcBase::initialize ( )
overridevirtual

Required of all Gaudi Services.

Initialize the service.

Definition at line 23 of file ByteStreamCnvSvcBase.cxx.

23 {
25
26 ServiceHandle<IIncidentSvc> incsvc("IncidentSvc", this->name());
27 ATH_CHECK(incsvc.retrieve());
28 incsvc->addListener(this, "BeginRun", 0, false, true); // true for singleshot
29 return StatusCode::SUCCESS;
30}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode initialize() override
Gaudi Service Implementation.

◆ updateServiceState()

StatusCode ByteStreamCnvSvcBase::updateServiceState ( IOpaqueAddress * pAddress)
overridevirtual

Checks whether an IOpaqueAddress is a GenericAddress.

Definition at line 32 of file ByteStreamCnvSvcBase.cxx.

32 {
33 if (pAddress != nullptr) {
34 GenericAddress* pAddr = dynamic_cast<GenericAddress*>(pAddress);
35 if (pAddr != nullptr) {
36 return StatusCode::SUCCESS;
37 }
38 }
39 return StatusCode::FAILURE;
40}

Member Data Documentation

◆ m_initCnvs

Gaudi::Property<std::vector<std::string> > ByteStreamCnvSvcBase::m_initCnvs {this, "InitCnvs", {}, "Converters to initialize"}
protected

Definition at line 34 of file ByteStreamCnvSvcBase.h.

34{this, "InitCnvs", {}, "Converters to initialize"};

◆ m_isCalibration

Gaudi::Property<bool> ByteStreamCnvSvcBase::m_isCalibration {this, "IsCalibration", false}
private

flags for Calibration EventType

Definition at line 49 of file ByteStreamCnvSvcBase.h.

49{this, "IsCalibration", false};

◆ m_isSimulation

Gaudi::Property<bool> ByteStreamCnvSvcBase::m_isSimulation {this, "IsSimulation", false}
private

flags for Simulation EventType

Definition at line 45 of file ByteStreamCnvSvcBase.h.

45{this, "IsSimulation", false};

◆ m_isTestbeam

Gaudi::Property<bool> ByteStreamCnvSvcBase::m_isTestbeam {this, "IsTestbeam", false}
private

flags for TestBeam EventType

Definition at line 47 of file ByteStreamCnvSvcBase.h.

47{this, "IsTestbeam", false};

◆ m_ROD2ROBmap

Gaudi::Property<std::vector<std::string> > ByteStreamCnvSvcBase::m_ROD2ROBmap {this, "ROD2ROBmap", {}, "", "OrderedSet<std::string>"}
protected

Definition at line 36 of file ByteStreamCnvSvcBase.h.

36{this, "ROD2ROBmap", {}, "", "OrderedSet<std::string>"};

The documentation for this class was generated from the following files: