Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::EventReadingAlgorithm Class Reference

EventReadingAlgorithm class. More...

#include "EventReadingAlgorithm.h"

Inheritance diagram for lar_content::EventReadingAlgorithm:
Collaboration diagram for lar_content::EventReadingAlgorithm:

Classes

class  ExternalEventReadingParameters
 External event reading parameters class. More...
 

Public Member Functions

 EventReadingAlgorithm ()
 Default constructor.
 
 ~EventReadingAlgorithm ()
 Destructor.
 
const std::string & GetType () const
 Get the type.
 
const std::string & GetInstanceName () const
 Get the instance name.
 
const PandoraGetPandora () const
 Get the associated pandora instance.
 

Static Public Member Functions

static StatusCode SetExternalParameters (const Pandora &pandora, const std::string &algorithmType, ExternalParameters *const pExternalParameters)
 Set the external parameters associated with an algorithm instance of a specific type, created by the given Pandora instance.
 

Protected Member Functions

bool ExternalParametersPresent () const
 Whether external parameters are present.
 
ExternalParametersGetExternalParameters () const
 Get the external parameters associated with algorithm instances created by a given Pandora instance. A single call to this function per algorithm type, per Pandora instance is enforced to prevent misuse.
 
virtual StatusCode Reset ()
 Perform any operations when pandora is reset, typically at the end of each event.
 
StatusCode RegisterDetails (const Pandora *const pPandora, const std::string &type, const std::string &instanceName)
 Register i) the pandora instance that will run the process and ii) the process type.
 

Protected Attributes

const Pandoram_pPandora
 The pandora object that will run the process.
 
std::string m_type
 The process type.
 
std::string m_instanceName
 The process instance name.
 

Private Member Functions

pandora::StatusCode Initialize ()
 Perform any operations that must occur after reading settings, but before running the process.
 
pandora::StatusCode Run ()
 Run the algorithm.
 
void MoveToNextEventFile ()
 Proceed to process next event file named in the input list.
 
pandora::StatusCode ReplaceEventFileReader (const std::string &fileName)
 Replace the current event file reader with a new reader for the specified file.
 
pandora::FileType GetFileType (const std::string &fileName) const
 Analyze a provided file name to extract the file type/extension.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 

Private Attributes

std::string m_geometryFileName
 Name of the file containing geometry information.
 
std::string m_eventFileName
 Name of the current file containing event information.
 
pandora::StringVector m_eventFileNameVector
 Vector of file names to be processed.
 
unsigned int m_skipToEvent
 Index of first event to consider in first input file.
 
bool m_useLArCaloHits
 Whether to read lar calo hits, or standard pandora calo hits.
 
unsigned int m_larCaloHitVersion
 LArCaloHit version for LArCaloHitFactory.
 
bool m_useLArMCParticles
 Whether to read lar mc particles, or standard pandora mc particles.
 
unsigned int m_larMCParticleVersion
 LArMCParticle version for LArMCParticleFactory.
 
pandora::FileReaderm_pEventFileReader
 Address of the event file reader.
 

Static Private Attributes

static ExternalParametersMap m_externalParametersMap
 The external parameters map.
 

Detailed Description

EventReadingAlgorithm class.

Definition at line 30 of file EventReadingAlgorithm.h.

Constructor & Destructor Documentation

◆ EventReadingAlgorithm()

EventReadingAlgorithm::EventReadingAlgorithm ( )

Default constructor.

Definition at line 26 of file EventReadingAlgorithm.cc.

◆ ~EventReadingAlgorithm()

EventReadingAlgorithm::~EventReadingAlgorithm ( )

Destructor.

Definition at line 38 of file EventReadingAlgorithm.cc.

Member Function Documentation

◆ ExternalParametersPresent()

bool pandora::ExternallyConfiguredAlgorithm::ExternalParametersPresent ( ) const
protectedinherited

Whether external parameters are present.

Returns
boolean

Definition at line 58 of file ExternallyConfiguredAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetExternalParameters()

ExternalParameters * pandora::ExternallyConfiguredAlgorithm::GetExternalParameters ( ) const
protectedinherited

Get the external parameters associated with algorithm instances created by a given Pandora instance. A single call to this function per algorithm type, per Pandora instance is enforced to prevent misuse.

Returns
the address of the external parameters

Definition at line 65 of file ExternallyConfiguredAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFileType()

FileType EventReadingAlgorithm::GetFileType ( const std::string &  fileName) const
private

Analyze a provided file name to extract the file type/extension.

Parameters
fileNamethe file name
Returns
the file type

Definition at line 152 of file EventReadingAlgorithm.cc.

Here is the caller graph for this function:

◆ GetInstanceName()

const std::string & pandora::Process::GetInstanceName ( ) const
inlineinherited

Get the instance name.

Returns
The instance name

Definition at line 109 of file Process.h.

◆ GetPandora()

const Pandora & pandora::Process::GetPandora ( ) const
inlineinherited

Get the associated pandora instance.

Returns
the associated pandora instance

Definition at line 116 of file Process.h.

◆ GetType()

const std::string & pandora::Process::GetType ( ) const
inlineinherited

Get the type.

Returns
The type

Definition at line 102 of file Process.h.

◆ Initialize()

StatusCode EventReadingAlgorithm::Initialize ( )
privatevirtual

Perform any operations that must occur after reading settings, but before running the process.

Reimplemented from pandora::Process.

Definition at line 45 of file EventReadingAlgorithm.cc.

Here is the call graph for this function:

◆ MoveToNextEventFile()

void EventReadingAlgorithm::MoveToNextEventFile ( )
private

Proceed to process next event file named in the input list.

Definition at line 99 of file EventReadingAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSettings()

StatusCode EventReadingAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements pandora::Process.

Definition at line 174 of file EventReadingAlgorithm.cc.

Here is the call graph for this function:

◆ RegisterDetails()

StatusCode pandora::Process::RegisterDetails ( const Pandora *const  pPandora,
const std::string &  type,
const std::string &  instanceName 
)
inlineprotectedinherited

Register i) the pandora instance that will run the process and ii) the process type.

Parameters
pPandoraaddress of the pandora object that will run the process
typethe process type
instanceNamethe process instance name

Definition at line 146 of file Process.h.

Here is the caller graph for this function:

◆ ReplaceEventFileReader()

StatusCode EventReadingAlgorithm::ReplaceEventFileReader ( const std::string &  fileName)
private

Replace the current event file reader with a new reader for the specified file.

Parameters
fileNamethe file name

Definition at line 120 of file EventReadingAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reset()

StatusCode pandora::Process::Reset ( )
inlineprotectedvirtualinherited

Perform any operations when pandora is reset, typically at the end of each event.

Reimplemented in lar_content::MasterAlgorithm, lar_content::PostProcessingAlgorithm, and lar_content::PreProcessingAlgorithm.

Definition at line 133 of file Process.h.

Here is the caller graph for this function:

◆ Run()

StatusCode EventReadingAlgorithm::Run ( )
privatevirtual

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 78 of file EventReadingAlgorithm.cc.

Here is the call graph for this function:

◆ SetExternalParameters()

StatusCode pandora::ExternallyConfiguredAlgorithm::SetExternalParameters ( const Pandora pandora,
const std::string &  algorithmType,
ExternalParameters *const  pExternalParameters 
)
staticinherited

Set the external parameters associated with an algorithm instance of a specific type, created by the given Pandora instance.

Parameters
pandorathe pandora instance
algorithmTypethe algorithm type
pExternalParametersthe address of the external parameters instance

Definition at line 51 of file ExternallyConfiguredAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_eventFileName

std::string lar_content::EventReadingAlgorithm::m_eventFileName
private

Name of the current file containing event information.

Definition at line 82 of file EventReadingAlgorithm.h.

◆ m_eventFileNameVector

pandora::StringVector lar_content::EventReadingAlgorithm::m_eventFileNameVector
private

Vector of file names to be processed.

Definition at line 83 of file EventReadingAlgorithm.h.

◆ m_externalParametersMap

ExternallyConfiguredAlgorithm::ExternalParametersMap pandora::ExternallyConfiguredAlgorithm::m_externalParametersMap
staticprivateinherited

The external parameters map.

Definition at line 143 of file ExternallyConfiguredAlgorithm.h.

◆ m_geometryFileName

std::string lar_content::EventReadingAlgorithm::m_geometryFileName
private

Name of the file containing geometry information.

Definition at line 81 of file EventReadingAlgorithm.h.

◆ m_instanceName

std::string pandora::Process::m_instanceName
protectedinherited

The process instance name.

Definition at line 89 of file Process.h.

◆ m_larCaloHitVersion

unsigned int lar_content::EventReadingAlgorithm::m_larCaloHitVersion
private

LArCaloHit version for LArCaloHitFactory.

Definition at line 87 of file EventReadingAlgorithm.h.

◆ m_larMCParticleVersion

unsigned int lar_content::EventReadingAlgorithm::m_larMCParticleVersion
private

LArMCParticle version for LArMCParticleFactory.

Definition at line 89 of file EventReadingAlgorithm.h.

◆ m_pEventFileReader

pandora::FileReader* lar_content::EventReadingAlgorithm::m_pEventFileReader
private

Address of the event file reader.

Definition at line 91 of file EventReadingAlgorithm.h.

◆ m_pPandora

const Pandora* pandora::Process::m_pPandora
protectedinherited

The pandora object that will run the process.

Definition at line 87 of file Process.h.

◆ m_skipToEvent

unsigned int lar_content::EventReadingAlgorithm::m_skipToEvent
private

Index of first event to consider in first input file.

Definition at line 85 of file EventReadingAlgorithm.h.

◆ m_type

std::string pandora::Process::m_type
protectedinherited

The process type.

Definition at line 88 of file Process.h.

◆ m_useLArCaloHits

bool lar_content::EventReadingAlgorithm::m_useLArCaloHits
private

Whether to read lar calo hits, or standard pandora calo hits.

Definition at line 86 of file EventReadingAlgorithm.h.

◆ m_useLArMCParticles

bool lar_content::EventReadingAlgorithm::m_useLArMCParticles
private

Whether to read lar mc particles, or standard pandora mc particles.

Definition at line 88 of file EventReadingAlgorithm.h.


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