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

EventReadingAlgorithm class. More...

#include "EventReadingAlgorithm.h"

Inheritance diagram for EventReadingAlgorithm:
Collaboration diagram for EventReadingAlgorithm:

Classes

class  ExternalEventReadingParameters
 External event reading parameters class. More...
 
class  Factory
 Factory class for instantiating algorithm. 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 Pandora & GetPandora () 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

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.
 
bool ExternalParametersPresent () const
 Whether external parameters are present.
 
ExternalParameters * GetExternalParameters () 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

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.
 
pandora::FileReaderm_pEventFileReader
 Address of the event file reader.
 
const Pandora * m_pPandora
 The pandora object that will run the process.
 
std::string m_type
 The process type.
 
std::string m_instanceName
 The process instance name.
 

Static Private Attributes

static ExternalParametersMap m_externalParametersMap
 The external parameters map.
 

Detailed Description

EventReadingAlgorithm class.

Definition at line 24 of file EventReadingAlgorithm.h.

Constructor & Destructor Documentation

◆ EventReadingAlgorithm()

EventReadingAlgorithm::EventReadingAlgorithm ( )

Default constructor.

Definition at line 19 of file EventReadingAlgorithm.cc.

Here is the caller graph for this function:

◆ ~EventReadingAlgorithm()

EventReadingAlgorithm::~EventReadingAlgorithm ( )

Destructor.

Definition at line 27 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
protected

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

Parameters
fileNamethe file name
Returns
the file type

Definition at line 135 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 ( )
protectedvirtual

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

Reimplemented from pandora::Process.

Definition at line 34 of file EventReadingAlgorithm.cc.

Here is the call graph for this function:

◆ MoveToNextEventFile()

void EventReadingAlgorithm::MoveToNextEventFile ( )
protected

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

Definition at line 88 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)
protectedvirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements pandora::Process.

Definition at line 157 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)
protected

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

Parameters
fileNamethe file name

Definition at line 109 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 ( )
protectedvirtual

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 67 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 EventReadingAlgorithm::m_eventFileName
protected

Name of the current file containing event information.

Definition at line 85 of file EventReadingAlgorithm.h.

◆ m_eventFileNameVector

pandora::StringVector EventReadingAlgorithm::m_eventFileNameVector
protected

Vector of file names to be processed.

Definition at line 86 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 EventReadingAlgorithm::m_geometryFileName
protected

Name of the file containing geometry information.

Definition at line 84 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_pEventFileReader

pandora::FileReader* EventReadingAlgorithm::m_pEventFileReader
protected

Address of the event file reader.

Definition at line 90 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 EventReadingAlgorithm::m_skipToEvent
protected

Index of first event to consider in first input file.

Definition at line 88 of file EventReadingAlgorithm.h.

◆ m_type

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

The process type.

Definition at line 88 of file Process.h.


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