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

ScdHits reader class. More...

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

Public Member Functions

 GGSScdHitsReader (std::shared_ptr< GGSTRootReader > ggsReader)
 
bool IsScdHitsCollAvailable ()
 Checks if Scd hits are available in the simulation file. More...
 
EA::RetrievalResult GetScdHitsColl (EA::ObjectWrapper &wrapper)
 Get the Scd Hits. More...
 
bool IsScdWaferParticleHitsCollAvailable ()
 Checks if Scd particle hits are available in the simulation file. More...
 
EA::RetrievalResult GetScdWaferParticleHitsColl (EA::ObjectWrapper &wrapper)
 Get the Scd Particle Hits. More...
 
std::vector< std::string > FreeObjects (const std::vector< std::string > &objs, EA::Memory::Status memStatus)
 Free the memory of unneeded objects. More...
 
void SetScdGeoParamsColl (EA::observer_ptr< ScdGeoParamsColl > sdGeoParamsColl)
 Set the reference for the Scd geometric parameters. More...
 
void SetSideDetectorFirstWaferID (std::array< int, 4 > sideScdFirstWaferID)
 Set the GGS volID of the first wafer for each side Scd detector. More...
 

Private Member Functions

bool SetupScdReadout ()
 

Private Attributes

std::shared_ptr< GGSTRootReader > m_ggsReader
 
GGSTHitsReader * m_hitReader = nullptr
 
long long int m_lastHitsReadEvent = std::numeric_limits<long long int>::max()
 
long long int m_lastPartHitsReadEvent = std::numeric_limits<long long int>::max()
 
EA::observer_ptr< ScdGeoParamsCollm_sdGeoParamsColl = nullptr
 
int m_topScdDetIndex = std::numeric_limits<int>::lowest()
 
int m_sideScdHDetIndex = std::numeric_limits<int>::lowest()
 
int m_sideScdVDetIndex = std::numeric_limits<int>::lowest()
 
std::array< int, 4 > m_sideScdFirstWaferID {}
 
ScdHitsColl m_sdHitsColl
 
ScdParticleHitsColl m_sdWaferParticleHitsColl
 
bool m_firstRun = true
 

Detailed Description

ScdHits reader class.

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

Constructor & Destructor Documentation

◆ GGSScdHitsReader()

Herd::Readers::GGSScdHitsReader::GGSScdHitsReader ( std::shared_ptr< GGSTRootReader >  ggsReader)
inlineexplicit

Member Function Documentation

◆ FreeObjects()

std::vector< std::string > Herd::Readers::GGSScdHitsReader::FreeObjects ( const std::vector< std::string > &  objs,
EA::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:

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

◆ GetScdHitsColl()

EA::RetrievalResult Herd::Readers::GGSScdHitsReader::GetScdHitsColl ( EA::ObjectWrapper &  wrapper)

Get the Scd Hits.

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

◆ GetScdWaferParticleHitsColl()

EA::RetrievalResult Herd::Readers::GGSScdHitsReader::GetScdWaferParticleHitsColl ( EA::ObjectWrapper &  wrapper)

Get the Scd Particle Hits.

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

◆ IsScdHitsCollAvailable()

bool Herd::Readers::GGSScdHitsReader::IsScdHitsCollAvailable ( )

Checks if Scd hits are available in the simulation file.

Check the GGS reader for the presence of Scd hits

Returns
true if SCD hits are available, false otherwise.

◆ IsScdWaferParticleHitsCollAvailable()

bool Herd::Readers::GGSScdHitsReader::IsScdWaferParticleHitsCollAvailable ( )
inline

Checks if Scd particle hits are available in the simulation file.

Check the GGS reader for the presence of Scd particle hits N.B: we assume that if we simulated wafers we always have particle hits

Returns
true
false

◆ SetScdGeoParamsColl()

void Herd::Readers::GGSScdHitsReader::SetScdGeoParamsColl ( EA::observer_ptr< ScdGeoParamsColl sdGeoParamsColl)

Set the reference for the Scd geometric parameters.

Sets the Scd geometric parameters to be used for GGSID -> VolumeID conversion.

Parameters
sdGeoParamsCollan observer_ptr to the geoparams collection.

◆ SetSideDetectorFirstWaferID()

void Herd::Readers::GGSScdHitsReader::SetSideDetectorFirstWaferID ( std::array< int, 4 >  sideScdFirstWaferID)
inline

Set the GGS volID of the first wafer for each side Scd detector.

Parameters
sideScdFirstWaferIDan array containing the first GGS volumeID for side Scd layers.

◆ SetupScdReadout()

bool Herd::Readers::GGSScdHitsReader::SetupScdReadout ( )
private

Member Data Documentation

◆ m_firstRun

bool Herd::Readers::GGSScdHitsReader::m_firstRun = true
private

◆ m_ggsReader

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

◆ m_hitReader

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

◆ m_lastHitsReadEvent

long long int Herd::Readers::GGSScdHitsReader::m_lastHitsReadEvent = std::numeric_limits<long long int>::max()
private

◆ m_lastPartHitsReadEvent

long long int Herd::Readers::GGSScdHitsReader::m_lastPartHitsReadEvent = std::numeric_limits<long long int>::max()
private

◆ m_sdGeoParamsColl

EA::observer_ptr<ScdGeoParamsColl> Herd::Readers::GGSScdHitsReader::m_sdGeoParamsColl = nullptr
private

◆ m_sdHitsColl

ScdHitsColl Herd::Readers::GGSScdHitsReader::m_sdHitsColl
private

◆ m_sdWaferParticleHitsColl

ScdParticleHitsColl Herd::Readers::GGSScdHitsReader::m_sdWaferParticleHitsColl
private

◆ m_sideScdFirstWaferID

std::array<int, 4> Herd::Readers::GGSScdHitsReader::m_sideScdFirstWaferID {}
private

◆ m_sideScdHDetIndex

int Herd::Readers::GGSScdHitsReader::m_sideScdHDetIndex = std::numeric_limits<int>::lowest()
private

◆ m_sideScdVDetIndex

int Herd::Readers::GGSScdHitsReader::m_sideScdVDetIndex = std::numeric_limits<int>::lowest()
private

◆ m_topScdDetIndex

int Herd::Readers::GGSScdHitsReader::m_topScdDetIndex = std::numeric_limits<int>::lowest()
private

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