evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
evio::StructureFinder Class Reference

This is a set of convenient static methods used to find lists of structures within an event, bank, segment, or tagsegment that match certain criteria. More...

#include <StructureFinder.h>

Static Public Member Functions

static void getMatchingStructures (std::shared_ptr< BaseStructure > structure, std::shared_ptr< IEvioFilter > filter, std::vector< std::shared_ptr< BaseStructure >> &vec)
 Collect all the structures in an event that pass a filter. More...
 
static void getMatchingBanks (std::shared_ptr< BaseStructure > structure, uint16_t tag, uint8_t num, std::vector< std::shared_ptr< BaseStructure >> &vec)
 Collect all the banks in an event that match a provided tag and number in their header. More...
 
static void getMatchingStructures (std::shared_ptr< BaseStructure > structure, uint16_t tag, std::vector< std::shared_ptr< BaseStructure >> &vec)
 Collect all the structures in an event that match a provided tag in their header. More...
 
static void getMatchingNonBanks (std::shared_ptr< BaseStructure > structure, uint16_t tag, std::vector< std::shared_ptr< BaseStructure >> &vec)
 Collect all the non-banks (i.e., Segments and TagSegments) in an event that match a provided tag in their header. More...
 
static void getMatchingStructures (std::shared_ptr< BaseStructure > structure, std::string name, EvioXMLDictionary &dictionary, std::vector< std::shared_ptr< BaseStructure >> &vec)
 Collect all structures in an event that match the given dictionary name. More...
 
static void getMatchingParent (std::shared_ptr< BaseStructure > structure, std::string parentName, EvioXMLDictionary &dictionary, std::vector< std::shared_ptr< BaseStructure >> &vec)
 Collect all structures in an event whose parent has the given dictionary name. More...
 
static void getMatchingChild (std::shared_ptr< BaseStructure > structure, std::string childName, EvioXMLDictionary &dictionary, std::vector< std::shared_ptr< BaseStructure >> &vec)
 Collect all structures in an event who has a child with the given dictionary name. More...
 

Detailed Description

This is a set of convenient static methods used to find lists of structures within an event, bank, segment, or tagsegment that match certain criteria.

For the most part it uses the BaseStructure#getMatchingStructures() method on the provided EvioEvent object by constructing the appropriate filter.

Author
heddle
timmer

Member Function Documentation

static void evio::StructureFinder::getMatchingBanks ( std::shared_ptr< BaseStructure structure,
uint16_t  tag,
uint8_t  num,
std::vector< std::shared_ptr< BaseStructure >> &  vec 
)
inlinestatic

Collect all the banks in an event that match a provided tag and number in their header.

Only Banks are returned, because only Banks have a number field.

Parameters
structurethe event/bank/seg/tagseg being queried.
tagthe tag to match.
numthe number to match.
vecvector provided to contain all Banks that are accepted by the filter for the provided event.

References getMatchingStructures(), and evio::StructureType::STRUCT_BANK.

static void evio::StructureFinder::getMatchingChild ( std::shared_ptr< BaseStructure structure,
std::string  childName,
EvioXMLDictionary dictionary,
std::vector< std::shared_ptr< BaseStructure >> &  vec 
)
inlinestatic

Collect all structures in an event who has a child with the given dictionary name.

Parameters
structurethe event/bank/seg/tagseg being queried.
childNamedictionary name of a child of structures to be returned.
dictionarydictionary to be used; if null, an existing global dictionary will be used.
vecvector provided to contain BaseStructures who have a child with the given name in the given dictionary.

References getMatchingStructures(), and evio::EvioXMLDictionary::getName().

static void evio::StructureFinder::getMatchingNonBanks ( std::shared_ptr< BaseStructure structure,
uint16_t  tag,
std::vector< std::shared_ptr< BaseStructure >> &  vec 
)
inlinestatic

Collect all the non-banks (i.e., Segments and TagSegments) in an event that match a provided tag in their header.

No Banks are returned.

Parameters
structurethe event/bank/seg/tagseg being queried.
tagthe tag to match.
vecvector provided to contain all non-bank structures that are accepted by the filter for the provided event.

References getMatchingStructures(), and evio::StructureType::STRUCT_BANK.

static void evio::StructureFinder::getMatchingParent ( std::shared_ptr< BaseStructure structure,
std::string  parentName,
EvioXMLDictionary dictionary,
std::vector< std::shared_ptr< BaseStructure >> &  vec 
)
inlinestatic

Collect all structures in an event whose parent has the given dictionary name.

Parameters
structurethe event/bank/seg/tagseg being queried.
parentNamedictionary name of parent of structures to be returned.
dictionarydictionary to be used.
vecvector provided to contain BaseStructures whose parent has the given name in the given dictionary.

References getMatchingStructures(), and evio::EvioXMLDictionary::getName().

static void evio::StructureFinder::getMatchingStructures ( std::shared_ptr< BaseStructure structure,
std::shared_ptr< IEvioFilter filter,
std::vector< std::shared_ptr< BaseStructure >> &  vec 
)
inlinestatic

Collect all the structures in an event that pass a filter.

Parameters
structurethe event/bank/seg/tagseg being queried.
filterthe filter that must be passed. If null, this will return all the structures.
vecvector provided to contain all structures that are accepted by the filter for the provided event.

Referenced by getMatchingBanks(), getMatchingChild(), getMatchingNonBanks(), getMatchingParent(), and getMatchingStructures().

static void evio::StructureFinder::getMatchingStructures ( std::shared_ptr< BaseStructure structure,
uint16_t  tag,
std::vector< std::shared_ptr< BaseStructure >> &  vec 
)
inlinestatic

Collect all the structures in an event that match a provided tag in their header.

Parameters
structurethe event/bank/seg/tagseg being queried.
tagthe tag to match.
vecvector provided to contain all structures that are accepted by the filter for the provided event.

References getMatchingStructures().

static void evio::StructureFinder::getMatchingStructures ( std::shared_ptr< BaseStructure structure,
std::string  name,
EvioXMLDictionary dictionary,
std::vector< std::shared_ptr< BaseStructure >> &  vec 
)
inlinestatic

Collect all structures in an event that match the given dictionary name.

Parameters
structurethe event/bank/seg/tagseg being queried.
namedictionary name of structures to be returned.
dictionarydictionary to be used.
vecvector provided to contain BaseStructures that have the given name in the given dictionary.

References getMatchingStructures(), and evio::EvioXMLDictionary::getName().


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