HerdSoftware  0.2.3
Public Member Functions | Private Attributes | List of all members
Herd::Readers::GGSCaloHitsReader Class Reference

CaloHits reader class. More...

#include <dataproviders/readers/event/GGSCaloHitsReader.h>

Public Member Functions

 GGSCaloHitsReader (std::shared_ptr< GGSTRootReader > ggsReader)
 
bool IsCaloHitsAvailable ()
 Checks if CALO hits are available in the simulation file. More...
 
RetrievalResult GetCaloHits (ObjectWrapper &wrapper)
 Get the CALO Hits. More...
 
std::vector< std::string > FreeObjects (const std::vector< std::string > &objs, Memory::Status memStatus)
 Free the memory of unneeded objects. More...
 
void SetCaloHitIDFromGGSPos (std::function< unsigned int(const float *)> conversionFunction)
 Set the volID calculator for the calorimeter. More...
 

Private Attributes

std::shared_ptr< GGSTRootReader > m_ggsReader
 
GGSTHitsReader * m_hitReader = nullptr
 
long long int m_lastReadEvent = std::numeric_limits<long long int>::max()
 
std::function< unsigned int(const float *)> m_caloVolIDFromGGSPos
 
int m_caloDetIndex = std::numeric_limits<int>::lowest()
 
CaloHits m_caloHits
 

Detailed Description

CaloHits reader class.

Class for reading the CaloHits object from a GGS simulation file.

Constructor & Destructor Documentation

◆ GGSCaloHitsReader()

Herd::Readers::GGSCaloHitsReader::GGSCaloHitsReader ( std::shared_ptr< GGSTRootReader >  ggsReader)
inline

Member Function Documentation

◆ FreeObjects()

std::vector< std::string > Herd::Readers::GGSCaloHitsReader::FreeObjects ( const std::vector< std::string > &  objs,
Memory::Status  memStatus 
)

Free the memory of unneeded objects.

Currently this method frees the memory of the provided objects if memStatus is EXHAUSTED. This reader frees the following objects:

  • caloHitsGGS
Parameters
objsThe list of objects to be freed.
memStatusThe current memory occupation status.
Returns
a list of freed objects.

◆ GetCaloHits()

RetrievalResult Herd::Readers::GGSCaloHitsReader::GetCaloHits ( ObjectWrapper &  wrapper)

Get the CALO Hits.

Parameters
wrapperA wrapper to the CaloHits object
Returns
RetrievalResult The result of the operation (SUCCESS or ERROR)

◆ IsCaloHitsAvailable()

bool Herd::Readers::GGSCaloHitsReader::IsCaloHitsAvailable ( )

Checks if CALO hits are available in the simulation file.

Check the GGS reader for the presence of CALO hits

Returns
true
false

◆ SetCaloHitIDFromGGSPos()

void Herd::Readers::GGSCaloHitsReader::SetCaloHitIDFromGGSPos ( std::function< unsigned int(const float *)>  conversionFunction)
inline

Set the volID calculator for the calorimeter.

Sets the function that handles the computation of the volumeID for a calo cell at a given position.

Parameters
conversionFunctionthe conversion function.

Member Data Documentation

◆ m_caloDetIndex

int Herd::Readers::GGSCaloHitsReader::m_caloDetIndex = std::numeric_limits<int>::lowest()
private

◆ m_caloHits

CaloHits Herd::Readers::GGSCaloHitsReader::m_caloHits
private

◆ m_caloVolIDFromGGSPos

std::function<unsigned int(const float *)> Herd::Readers::GGSCaloHitsReader::m_caloVolIDFromGGSPos
private

◆ m_ggsReader

std::shared_ptr<GGSTRootReader> Herd::Readers::GGSCaloHitsReader::m_ggsReader
private

◆ m_hitReader

GGSTHitsReader* Herd::Readers::GGSCaloHitsReader::m_hitReader = nullptr
private

◆ m_lastReadEvent

long long int Herd::Readers::GGSCaloHitsReader::m_lastReadEvent = std::numeric_limits<long long int>::max()
private

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