HerdSoftware
0.1.1
|
Base class for GGSSimReaders. More...
#include <dataproviders/readers/GGSSimReader.h>
Classes | |
struct | ObjDescriptor |
struct | PsdIDVolInfo |
Public Types | |
enum | PsdType : int { PsdType::NONE = -1, PsdType::tiles = 0, PsdType::bars = 1 } |
Public Member Functions | |
GGSSimReader (std::shared_ptr< GGSTRootReader > reader, std::string fileName) | |
Constructor. More... | |
virtual | ~GGSSimReader ()=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... | |
bool | IsFileValid () |
Check if reader is connected to a valid simulation file. More... | |
void | SetFileName (std::string fileName) |
Set the filename of the current DataSource of the dataprovider. More... | |
void | SetCaloHitIDFromGGSPos (std::function< unsigned int(const float *)> conversionFunction) |
Set the volID calculator for the calorimeter. More... | |
void | SetFitGeoParamsColl (observer_ptr< FitGeoParamsColl > fitGeoParamsColl) |
Set the reference for the FIT geometric parameters. More... | |
void | SetStkGeoParamsColl (observer_ptr< StkGeoParamsColl > stkGeoParamsColl) |
Set the reference for the STK geometric parameters. More... | |
void | SetScdGeoParamsColl (observer_ptr< ScdGeoParamsColl > scdGeoParamsColl) |
Set the reference for the SCD geometric parameters. More... | |
void | SetPsdGeoParamsColl (observer_ptr< PsdGeoParamsColl > psdGeoParamsColl) |
Set the reference for the PSD geometric parameters. More... | |
void | SetSideFitFirstVolumeID (std::array< int, 4 > sideFitFirstVolumeID) |
Set the GGS volID of the first volume for each side FIT detector. More... | |
void | SetSideStkFirstWaferID (std::array< int, 4 > sideStkFirstWaferID) |
Set the GGS volID of the first wafer for each side STK detector. More... | |
void | SetSideStkFirstStripID (std::array< int, 4 > sideStkFirstStripID) |
Set the GGS volID of the first strip for each side STK detector. More... | |
void | SetSideScdFirstWaferID (std::array< int, 4 > sideScdFirstWaferID) |
Set the GGS volID of the first wafer for each side SCD detector. More... | |
void | SetSideScdFirstStripID (std::array< int, 4 > sideScdFirstStripID) |
Set the GGS volID of the first strip for each side SCD detector. More... | |
void | SetPsdType (PsdType type) |
Private Types | |
enum | SiliconDetectorType : int { SiliconDetectorType::UNKNOWN = -1, SiliconDetectorType::STRIP = 0, SiliconDetectorType::WAFER = 1 } |
enum | SiliconDetectorName { SiliconDetectorName::STK, SiliconDetectorName::SCD } |
enum | SidePsdSegmentation : int { SidePsdSegmentation::NONE = -1, SidePsdSegmentation::H = 0, SidePsdSegmentation::V = 1 } |
Base class for GGSSimReaders.
Class for reading the event objects of the from a GGS file.
|
strong |
|
strongprivate |
|
strongprivate |
|
strongprivate |
Herd::GGSSimReader::GGSSimReader | ( | std::shared_ptr< GGSTRootReader > | reader, |
std::string | fileName | ||
) |
Constructor.
reader | The 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. |
fileName | A GGS output file (.root) or a text file (.txt) containing a list of GGS files to be concatenated. This should be provided by the parent dataprovider. |
|
virtualdefault |
|
private |
|
private |
|
finalvirtual |
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.
objs | The list of objects to be freed. |
memStatus | The current memory occupation status. |
Implements Herd::DataReader.
|
private |
|
private |
|
private |
|
private |
|
private |
|
finalvirtual |
Provides an object.
See the description of the class for more information about the provided objects.
name | The name or alias of the requested object. |
category | The category of the requested object. |
wrapper | Wrapper for return value. |
actualName | The name of the object in case we're asking for an alias |
Implements Herd::DataReader.
|
private |
|
private |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
inline |
Check if reader is connected to a valid simulation file.
A valid GGS simulation file should provide at least a THitsReader or a MCTruthReader.
|
private |
|
private |
|
private |
|
private |
|
finalvirtual |
Check if an object is available.
Check in list of known providable objects if it is available or not.
name | The name or alias of the requested object. |
Implements Herd::DataReader.
|
finalvirtual |
Check if an object is known.
Check in list of known providable objects if it is there or not.
name | The name or alias of the requested object. |
Implements Herd::DataReader.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
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.
conversionFunction | the conversion function. |
|
finalvirtual |
Sets the current event.
In this particular reader this should be unused. The responsibility of changing the event relies on the parent dataprovider.
event | The index of the event to be set as current. |
Implements Herd::DataReader.
|
inline |
Set the filename of the current DataSource of the dataprovider.
Sets the filename of the rootfile being read. This is needed to allow checks for PSD particle hits for GGS versions < 2.7. This should be called only by the dataprovider upon setup of the reader.
fileName | the file name. |
void Herd::GGSSimReader::SetFitGeoParamsColl | ( | observer_ptr< FitGeoParamsColl > | fitGeoParamsColl | ) |
Set the reference for the FIT geometric parameters.
Sets the FIT geometric parameters to be used for GGSID -> VolumeID conversion.
fitGeoParamsColl | an observer_ptr to the geoparams collection. |
void Herd::GGSSimReader::SetPsdGeoParamsColl | ( | observer_ptr< PsdGeoParamsColl > | psdGeoParamsColl | ) |
Set the reference for the PSD geometric parameters.
Sets the PSD geometric parameters to be used for GGSID -> VolumeID conversion.
psdGeoParamsColl | an observer_ptr to the geoparams collection. |
|
inline |
void Herd::GGSSimReader::SetScdGeoParamsColl | ( | observer_ptr< ScdGeoParamsColl > | scdGeoParamsColl | ) |
Set the reference for the SCD geometric parameters.
Sets the SCD geometric parameters to be used for GGSID -> VolumeID conversion.
scdGeoParamsColl | an observer_ptr to the geoparams collection. |
|
inline |
Set the GGS volID of the first volume for each side FIT detector.
sideFitFirstVolumeID | an array containing the GGS volumeID for side FIT mats. |
|
inline |
Set the GGS volID of the first strip for each side SCD detector.
sideFitFirstStripID | an array containing the first GGS volumeID for side SCD layers. |
|
inline |
Set the GGS volID of the first wafer for each side SCD detector.
sideFitFirstWaferID | an array containing the first GGS volumeID for side SCD layers. |
|
inline |
Set the GGS volID of the first strip for each side STK detector.
sideFitFirstStripID | an array containing the first GGS volumeID for side STK layers. |
|
inline |
Set the GGS volID of the first wafer for each side STK detector.
sideFitFirstWaferID | an array containing the first GGS volumeID for side STK layers. |
void Herd::GGSSimReader::SetStkGeoParamsColl | ( | observer_ptr< StkGeoParamsColl > | stkGeoParamsColl | ) |
Set the reference for the STK geometric parameters.
Sets the STK geometric parameters to be used for GGSID -> VolumeID conversion.
stkGeoParamsColl | an observer_ptr to the geoparams collection. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |