Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Attributes | List of all members
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. More...
 
virtual ~ByteStreamCnvSvcBase ()
 Destructor. More...
 
virtual StatusCode initialize () override
 Required of all Gaudi Services. More...
 
virtual StatusCode updateServiceState (IOpaqueAddress *pAddress) override
 Checks whether an IOpaqueAddress is a GenericAddress. More...
 
virtual void handle (const Incident &) override
 Implementation of IIncidentListener: Handle for EndEvent incidence. More...
 

Protected Attributes

std::vector< std::string > m_initCnvs
 
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 More...
 
Gaudi::Property< bool > m_isCalibration {this, "IsCalibration", false}
 flags for Calibration EventType More...
 

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.

16  :
17  base_class(name, pSvcLocator, ByteStreamAddress::storageType())
18 {
19  declareProperty("InitCnvs", m_initCnvs);
20 }

◆ ~ByteStreamCnvSvcBase()

ByteStreamCnvSvcBase::~ByteStreamCnvSvcBase ( )
virtual

Destructor.

Standard Destructor.

Definition at line 23 of file ByteStreamCnvSvcBase.cxx.

23  {
24 }

Member Function Documentation

◆ handle()

void ByteStreamCnvSvcBase::handle ( const Incident &  )
overridevirtual

Implementation of IIncidentListener: Handle for EndEvent incidence.

Definition at line 52 of file ByteStreamCnvSvcBase.cxx.

52  {
53  ServiceHandle<IClassIDSvc> clidSvc("ClassIDSvc", name());
54  if (!clidSvc.retrieve().isSuccess()) {
55  ATH_MSG_ERROR("Cannot get ClassIDSvc.");
56  return;
57  }
58  // Initialize the converters
59  for (const std::string& cnv : m_initCnvs) {
60  ATH_MSG_DEBUG("Accessing Converter for " << cnv);
61  CLID id;
62  if (!clidSvc->getIDOfTypeName(cnv, id).isSuccess()) {
63  ATH_MSG_WARNING("Cannot get CLID for " << cnv);
64  } else {
65  IConverter* cnv = converter(id);
66  if (cnv == 0) {
67  ATH_MSG_WARNING("Cannot get converter for " << cnv);
68  }
69  }
70  }
71  return;
72 }

◆ initialize()

StatusCode ByteStreamCnvSvcBase::initialize ( )
overridevirtual

Required of all Gaudi Services.

Initialize the service.

Definition at line 27 of file ByteStreamCnvSvcBase.cxx.

27  {
28  if (!::AthCnvSvc::initialize().isSuccess()) {
29  ATH_MSG_FATAL("Cannot initialize AthCnvSvc base class.");
30  return(StatusCode::FAILURE);
31  }
32 
33  ServiceHandle<IIncidentSvc> incsvc("IncidentSvc", this->name());
34  if (!incsvc.retrieve().isSuccess()) {
35  ATH_MSG_FATAL("Cannot get IncidentSvc.");
36  return(StatusCode::FAILURE);
37  }
38  incsvc->addListener(this, "BeginRun", 0, false, true); // true for singleshot
39  return(StatusCode::SUCCESS);
40 }

◆ updateServiceState()

StatusCode ByteStreamCnvSvcBase::updateServiceState ( IOpaqueAddress *  pAddress)
overridevirtual

Checks whether an IOpaqueAddress is a GenericAddress.

Definition at line 42 of file ByteStreamCnvSvcBase.cxx.

42  {
43  if (pAddress != 0) {
44  GenericAddress* pAddr = dynamic_cast<GenericAddress*>(pAddress);
45  if (pAddr != 0) {
46  return(StatusCode::SUCCESS);
47  }
48  }
49  return(StatusCode::FAILURE);
50 }

Member Data Documentation

◆ m_initCnvs

std::vector<std::string> ByteStreamCnvSvcBase::m_initCnvs
protected

Definition at line 34 of file ByteStreamCnvSvcBase.h.

◆ m_isCalibration

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

flags for Calibration EventType

Definition at line 49 of file ByteStreamCnvSvcBase.h.

◆ m_isSimulation

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

flags for Simulation EventType

Definition at line 45 of file ByteStreamCnvSvcBase.h.

◆ m_isTestbeam

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

flags for TestBeam EventType

Definition at line 47 of file ByteStreamCnvSvcBase.h.

◆ 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.


The documentation for this class was generated from the following files:
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ByteStreamCnvSvcBase::m_initCnvs
std::vector< std::string > m_initCnvs
Definition: ByteStreamCnvSvcBase.h:34
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
ByteStreamAddress::storageType
static constexpr long storageType()
Definition: ByteStreamAddress.h:51
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCnvSvc::initialize
virtual StatusCode initialize() override
Gaudi Service Implementation.
Definition: AthCnvSvc.cxx:104
ServiceHandle< IClassIDSvc >