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

LpdHits reader class. More...

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

Public Member Functions

 GGSCaloLpdHitsReader (std::shared_ptr< GGSTRootReader > ggsReader)
 
bool IsCaloLpdHitsAvailable ()
 Checks if LPD hits are available in the simulation file. More...
 
RetrievalResult GetCaloLpdHits (ObjectWrapper &wrapper)
 Get the LPD Hits. More...
 
std::vector< std::string > FreeObjects (const std::vector< std::string > &objs, Memory::Status memStatus)
 Free the memory of unneeded objects. More...
 
void SetCaloLpdHitIDFromGGSPos (std::function< unsigned int(const float *)> conversionFunction)
 Set the volID calculator for the LPD. More...
 
void SetSameIDs (bool value)
 Sets the same IDs flag. 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_lpdVolIDFromGGSPos
 
bool m_sameIDs
 
int m_caloDetIndex = std::numeric_limits<int>::lowest()
 
CaloLpdHits m_CaloLpdHits
 

Detailed Description

LpdHits reader class.

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

Constructor & Destructor Documentation

◆ GGSCaloLpdHitsReader()

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

Member Function Documentation

◆ FreeObjects()

std::vector< std::string > Herd::Readers::GGSCaloLpdHitsReader::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:

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

◆ GetCaloLpdHits()

RetrievalResult Herd::Readers::GGSCaloLpdHitsReader::GetCaloLpdHits ( ObjectWrapper &  wrapper)

Get the LPD Hits.

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

◆ IsCaloLpdHitsAvailable()

bool Herd::Readers::GGSCaloLpdHitsReader::IsCaloLpdHitsAvailable ( )

Checks if LPD hits are available in the simulation file.

Check the GGS reader for the presence of LPD hits

Returns
true
false

◆ SetCaloLpdHitIDFromGGSPos()

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

Set the volID calculator for the LPD.

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

Parameters
conversionFunctionthe conversion function.

◆ SetSameIDs()

void Herd::Readers::GGSCaloLpdHitsReader::SetSameIDs ( bool  value)
inline

Sets the same IDs flag.

When the flag is set to true the GGSCaloHitsReader will assume that the GGS volume IDs are equal to the Herd volume IDs and will not call the function set by SetCaloLpdHitIDFromGGSPos to determine the Herd volume ID from GGS position.

Parameters
valueThe flag value.

Member Data Documentation

◆ m_caloDetIndex

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

◆ m_CaloLpdHits

CaloLpdHits Herd::Readers::GGSCaloLpdHitsReader::m_CaloLpdHits
private

◆ m_ggsReader

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

◆ m_hitReader

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

◆ m_lastReadEvent

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

◆ m_lpdVolIDFromGGSPos

std::function<unsigned int(const float *)> Herd::Readers::GGSCaloLpdHitsReader::m_lpdVolIDFromGGSPos
private

◆ m_sameIDs

bool Herd::Readers::GGSCaloLpdHitsReader::m_sameIDs
private

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