HerdSoftware  0.1.1
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Herd::ParametricGeoReader Class Reference

Base class for ParametricGeoReaders. More...

#include <dataproviders/readers/ParametricGeoReader.h>

Inheritance diagram for Herd::ParametricGeoReader:
Herd::DataReader

Classes

struct  CaloGeoParamsHelpValues
 
struct  ObjDescriptor
 

Public Types

enum  PsdType : int { PsdType::NONE = -1, PsdType::tiles = 0, PsdType::bars = 1 }
 

Public Member Functions

 ParametricGeoReader (std::shared_ptr< GGSTRootReader > reader)
 Constructor. More...
 
virtual ~ParametricGeoReader ()=default
 
virtual bool SetCurrentEvent (unsigned int) final
 Sets the current event. More...
 
virtual bool IsObjectAvailable (const std::string &name) final
 Check if an object is available. More...
 
virtual bool IsObjectKnown (const std::string &name) final
 Check if an object is known. More...
 
RetrievalResult GetObject (const std::string &name, ObjectCategory category, ObjectWrapper &wrapper, std::string &actualName) final
 Provides an object. More...
 
virtual std::vector< std::string > FreeObjects (const std::vector< std::string > &, Memory::Status) final
 Free the memory of unneeded objects. More...
 
std::function< unsigned int(const float *)> CaloHitIDFromGGSPos ()
 Get the volID calculator for the calorimeter. More...
 
std::array< int, 4 > SideFitFirstVolumeID ()
 Get the GGS volID of the first volume for each side FIT detector. More...
 
std::array< int, 4 > SideStkFirstWaferID ()
 Get the GGS volID of the first wafer for each side STK detector. More...
 
std::array< int, 4 > SideStkFirstStripID ()
 Get the GGS volID of the first strip for each side STK detector. More...
 
std::array< int, 4 > SideScdFirstWaferID ()
 Get the GGS volID of the first wafer for each side SCD detector. More...
 
std::array< int, 4 > SideScdFirstStripID ()
 Get the GGS volID of the first strip for each side SCD detector. More...
 
std::pair< bool, bool > StkHasStrips ()
 Check whether Stk has native strips (Top and Side). More...
 
std::pair< bool, bool > ScdHasStrips ()
 Check whether Scd has native strips (Top and Side). More...
 
PsdType GetPsdType ()
 

Private Member Functions

void CheckAvailableObjects ()
 
bool IsCaloGeoParamsAvailable ()
 
ObjectWrapper GetCaloGeoParams ()
 
int CaloTray (int iGGSCubeID, CaloGeoParamsHelpValues caloValues)
 
int CaloLayer (int iGGSCubeID, CaloGeoParamsHelpValues caloValues)
 
unsigned int CaloHitIDFromGGSID (int iGGSCubeID, CaloGeoParamsHelpValues caloValues)
 
bool IsPsdGeoParamsAvailable ()
 
ObjectWrapper GetPsdGeoParams ()
 
RetrievalResult BuildBarPsdGeoParams (const GGSTGeoParams *params, bool onSource)
 
RetrievalResult BuildTilePsdGeoParams (const GGSTGeoParams *params, bool onSource)
 
bool IsFitGeoParamsAvailable ()
 
ObjectWrapper GetFitGeoParams ()
 
bool IsStkGeoParamsAvailable ()
 
ObjectWrapper GetStkGeoParams ()
 
bool IsScdGeoParamsAvailable ()
 
ObjectWrapper GetScdGeoParams ()
 
bool IsCssGeoParamsAvailable ()
 
ObjectWrapper GetCssGeoParams ()
 
bool IsGGSTGeoAvailable ()
 
ObjectWrapper GetGGSTGeo ()
 

Private Attributes

std::vector< ObjDescriptorm_knownObjects
 
std::shared_ptr< GGSTRootReader > m_ggsreader
 
CaloGeoParams m_caloGeoParams
 
std::function< unsigned int(const float *)> m_caloVolIDFromGGSPos
 
PsdGeoParamsColl m_psdGeoParamsColl
 
PsdType m_psdType = PsdType::NONE
 
FitGeoParamsColl m_fitGeoParamsColl
 
std::array< int, 4 > m_sideFitFirstVolumeID
 
StkGeoParamsColl m_stkGeoParamsColl
 
std::array< int, 4 > m_sideStkFirstWaferID
 
std::array< int, 4 > m_sideStkFirstStripID
 
bool m_topStkHasStrips = false
 
bool m_sideStkHasStrips = false
 
ScdGeoParamsColl m_scdGeoParamsColl
 
std::array< int, 4 > m_sideScdFirstWaferID
 
std::array< int, 4 > m_sideScdFirstStripID
 
bool m_topScdHasStrips = false
 
bool m_sideScdHasStrips = false
 
CssGeoParams m_cssGeoParams
 

Detailed Description

Base class for ParametricGeoReaders.

Class for reading the geometry parameters of the ParametricGeo geometry. Provides all GeoParams as well as the TGeo geometry (if available).

Member Enumeration Documentation

◆ PsdType

Enumerator
NONE 
tiles 
bars 

Constructor & Destructor Documentation

◆ ParametricGeoReader()

Herd::ParametricGeoReader::ParametricGeoReader ( std::shared_ptr< GGSTRootReader >  reader)

Constructor.

Parameters
readerThe GGSTRootReader that will be used for reading the data. This class is not supposed to take ownership of the reader, but instead share it with its parent dataproider.

◆ ~ParametricGeoReader()

virtual Herd::ParametricGeoReader::~ParametricGeoReader ( )
virtualdefault

Member Function Documentation

◆ BuildBarPsdGeoParams()

RetrievalResult Herd::ParametricGeoReader::BuildBarPsdGeoParams ( const GGSTGeoParams *  params,
bool  onSource 
)
private

◆ BuildTilePsdGeoParams()

RetrievalResult Herd::ParametricGeoReader::BuildTilePsdGeoParams ( const GGSTGeoParams *  params,
bool  onSource 
)
private

◆ CaloHitIDFromGGSID()

unsigned int Herd::ParametricGeoReader::CaloHitIDFromGGSID ( int  iGGSCubeID,
CaloGeoParamsHelpValues  caloValues 
)
private

◆ CaloHitIDFromGGSPos()

std::function<unsigned int(const float *)> Herd::ParametricGeoReader::CaloHitIDFromGGSPos ( )
inline

Get the volID calculator for the calorimeter.

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

Returns
the conversion function.

◆ CaloLayer()

int Herd::ParametricGeoReader::CaloLayer ( int  iGGSCubeID,
CaloGeoParamsHelpValues  caloValues 
)
private

◆ CaloTray()

int Herd::ParametricGeoReader::CaloTray ( int  iGGSCubeID,
CaloGeoParamsHelpValues  caloValues 
)
private

◆ CheckAvailableObjects()

void Herd::ParametricGeoReader::CheckAvailableObjects ( )
private

◆ FreeObjects()

virtual std::vector<std::string> Herd::ParametricGeoReader::FreeObjects ( const std::vector< std::string > &  ,
Memory::Status   
)
inlinefinalvirtual

Free the memory of unneeded objects.

This method should free the memory of the provided objects if memStatus is EXHAUSTED. However implementation is delegated to derived class.

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

Implements Herd::DataReader.

◆ GetCaloGeoParams()

ObjectWrapper Herd::ParametricGeoReader::GetCaloGeoParams ( )
private

◆ GetCssGeoParams()

ObjectWrapper Herd::ParametricGeoReader::GetCssGeoParams ( )
private

◆ GetFitGeoParams()

ObjectWrapper Herd::ParametricGeoReader::GetFitGeoParams ( )
private

◆ GetGGSTGeo()

ObjectWrapper Herd::ParametricGeoReader::GetGGSTGeo ( )
private

◆ GetObject()

RetrievalResult Herd::ParametricGeoReader::GetObject ( const std::string &  name,
ObjectCategory  category,
ObjectWrapper &  wrapper,
std::string &  actualName 
)
finalvirtual

Provides an object.

See the description of the class for more information about the provided objects.

Parameters
nameThe name or alias of the requested object.
categoryThe category of the requested object.
wrapperWrapper for return value.
actualNameThe name of the object in case we're asking for an alias
Returns
A RetrievalResult code with the result of the retrieval operation

Implements Herd::DataReader.

◆ GetPsdGeoParams()

ObjectWrapper Herd::ParametricGeoReader::GetPsdGeoParams ( )
private

◆ GetPsdType()

PsdType Herd::ParametricGeoReader::GetPsdType ( )
inline

◆ GetScdGeoParams()

ObjectWrapper Herd::ParametricGeoReader::GetScdGeoParams ( )
private

◆ GetStkGeoParams()

ObjectWrapper Herd::ParametricGeoReader::GetStkGeoParams ( )
private

◆ IsCaloGeoParamsAvailable()

bool Herd::ParametricGeoReader::IsCaloGeoParamsAvailable ( )
private

◆ IsCssGeoParamsAvailable()

bool Herd::ParametricGeoReader::IsCssGeoParamsAvailable ( )
private

◆ IsFitGeoParamsAvailable()

bool Herd::ParametricGeoReader::IsFitGeoParamsAvailable ( )
private

◆ IsGGSTGeoAvailable()

bool Herd::ParametricGeoReader::IsGGSTGeoAvailable ( )
private

◆ IsObjectAvailable()

bool Herd::ParametricGeoReader::IsObjectAvailable ( const std::string &  name)
finalvirtual

Check if an object is available.

Check in list of known providable objects if it is available or not.

Parameters
nameThe name or alias of the requested object.
Returns
true if the object can be retrieved, false otherwise.

Implements Herd::DataReader.

◆ IsObjectKnown()

bool Herd::ParametricGeoReader::IsObjectKnown ( const std::string &  name)
finalvirtual

Check if an object is known.

Check in list of known providable objects if it is there or not.

Parameters
nameThe name or alias of the requested object.
Returns
true if the object is a known one, false otherwise.

Implements Herd::DataReader.

◆ IsPsdGeoParamsAvailable()

bool Herd::ParametricGeoReader::IsPsdGeoParamsAvailable ( )
private

◆ IsScdGeoParamsAvailable()

bool Herd::ParametricGeoReader::IsScdGeoParamsAvailable ( )
private

◆ IsStkGeoParamsAvailable()

bool Herd::ParametricGeoReader::IsStkGeoParamsAvailable ( )
private

◆ ScdHasStrips()

std::pair<bool, bool> Herd::ParametricGeoReader::ScdHasStrips ( )
inline

Check whether Scd has native strips (Top and Side).

Returns
a pair of bools representing wether top/side have native strips.

◆ SetCurrentEvent()

virtual bool Herd::ParametricGeoReader::SetCurrentEvent ( unsigned int  )
inlinefinalvirtual

Sets the current event.

In this particular reader this should be unused. The responsibility of changing the event relies on the parent dataprovider.

Parameters
eventThe index of the event to be set as current.
Returns
true if the event number is a valid value, false otherwise.

Implements Herd::DataReader.

◆ SideFitFirstVolumeID()

std::array<int, 4> Herd::ParametricGeoReader::SideFitFirstVolumeID ( )
inline

Get the GGS volID of the first volume for each side FIT detector.

Returns an array containing the GGS volumeID for side FIT mats.

Returns
an array containing the GGS volumeID for side FIT mats.

◆ SideScdFirstStripID()

std::array<int, 4> Herd::ParametricGeoReader::SideScdFirstStripID ( )
inline

Get the GGS volID of the first strip for each side SCD detector.

Returns an array containing the strip GGS volumeID for side SCD layers.

Returns
an array containing the strip GGS volumeID for side SCD layers.

◆ SideScdFirstWaferID()

std::array<int, 4> Herd::ParametricGeoReader::SideScdFirstWaferID ( )
inline

Get the GGS volID of the first wafer for each side SCD detector.

Returns an array containing the wafer GGS volumeID for side SCD layers.

Returns
an array containing the wafer GGS volumeID for side SCD layers.

◆ SideStkFirstStripID()

std::array<int, 4> Herd::ParametricGeoReader::SideStkFirstStripID ( )
inline

Get the GGS volID of the first strip for each side STK detector.

Returns an array containing the strip GGS volumeID for side STK layers.

Returns
an array containing the strip GGS volumeID for side STK layers.

◆ SideStkFirstWaferID()

std::array<int, 4> Herd::ParametricGeoReader::SideStkFirstWaferID ( )
inline

Get the GGS volID of the first wafer for each side STK detector.

Returns an array containing the wafer GGS volumeID for side STK layers.

Returns
an array containing the wafer GGS volumeID for side STK layers.

◆ StkHasStrips()

std::pair<bool, bool> Herd::ParametricGeoReader::StkHasStrips ( )
inline

Check whether Stk has native strips (Top and Side).

Returns
a pair of bools representing wether top/side have native strips.

Member Data Documentation

◆ m_caloGeoParams

CaloGeoParams Herd::ParametricGeoReader::m_caloGeoParams
private

◆ m_caloVolIDFromGGSPos

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

◆ m_cssGeoParams

CssGeoParams Herd::ParametricGeoReader::m_cssGeoParams
private

◆ m_fitGeoParamsColl

FitGeoParamsColl Herd::ParametricGeoReader::m_fitGeoParamsColl
private

◆ m_ggsreader

std::shared_ptr<GGSTRootReader> Herd::ParametricGeoReader::m_ggsreader
private

◆ m_knownObjects

std::vector<ObjDescriptor> Herd::ParametricGeoReader::m_knownObjects
private

◆ m_psdGeoParamsColl

PsdGeoParamsColl Herd::ParametricGeoReader::m_psdGeoParamsColl
private

◆ m_psdType

PsdType Herd::ParametricGeoReader::m_psdType = PsdType::NONE
private

◆ m_scdGeoParamsColl

ScdGeoParamsColl Herd::ParametricGeoReader::m_scdGeoParamsColl
private

◆ m_sideFitFirstVolumeID

std::array<int, 4> Herd::ParametricGeoReader::m_sideFitFirstVolumeID
private

◆ m_sideScdFirstStripID

std::array<int, 4> Herd::ParametricGeoReader::m_sideScdFirstStripID
private

◆ m_sideScdFirstWaferID

std::array<int, 4> Herd::ParametricGeoReader::m_sideScdFirstWaferID
private

◆ m_sideScdHasStrips

bool Herd::ParametricGeoReader::m_sideScdHasStrips = false
private

◆ m_sideStkFirstStripID

std::array<int, 4> Herd::ParametricGeoReader::m_sideStkFirstStripID
private

◆ m_sideStkFirstWaferID

std::array<int, 4> Herd::ParametricGeoReader::m_sideStkFirstWaferID
private

◆ m_sideStkHasStrips

bool Herd::ParametricGeoReader::m_sideStkHasStrips = false
private

◆ m_stkGeoParamsColl

StkGeoParamsColl Herd::ParametricGeoReader::m_stkGeoParamsColl
private

◆ m_topScdHasStrips

bool Herd::ParametricGeoReader::m_topScdHasStrips = false
private

◆ m_topStkHasStrips

bool Herd::ParametricGeoReader::m_topStkHasStrips = false
private

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