PandaRoot
BSEmcGeoNeighbouringRelationPar Class Reference

Neigbouring Relations based on a list of detectorIds. More...

#include <BSEmcGeoNeighbouringRelationPar.h>

Inheritance diagram for BSEmcGeoNeighbouringRelationPar:

Public Member Functions

 BSEmcGeoNeighbouringRelationPar (const char *t_name="EmcGeoNeighbouringRelationPar", const char *t_title="Neighbouring relation of Emc crystals", const char *t_context="TestDefaultContext")
 
 ~BSEmcGeoNeighbouringRelationPar (void)
 
void clear (void)
 
void putParams (FairParamList *)
 
Bool_t getParams (FairParamList *)
 
void RegisterIdAndNeighbours (Int_t t_id, std::vector< Int_t > &t_neighbours)
 
void AddNeighbourToId (Int_t t_neighbourid, Int_t t_id)
 
const std::vector< Int_t > & GetNeighbourIds (Int_t t_detectorid) const
 
Bool_t AreNeighbours (Int_t t_a, Int_t t_b) const
 
const TObjArray * GetRelations () const
 
 BSEmcGeoNeighbouringRelationPar (const BSEmcGeoNeighbouringRelationPar &t_l)
 
BSEmcGeoNeighbouringRelationParoperator= (const BSEmcGeoNeighbouringRelationPar &t_l)
 
void InitFromTextFile (const TString &t_filename)
 
void FillMap ()
 
void UpdateRelationArray ()
 
Bool_t IsSet ()
 
const std::map< Int_t, std::vector< Int_t > > & GetRelationMap () const
 

Static Public Attributes

static std::string fgParameterName
 

Detailed Description

Neigbouring Relations based on a list of detectorIds.

Author
Ben Salisbury salis.nosp@m.bury.nosp@m.@hisk.nosp@m.p.un.nosp@m.i-bon.nosp@m.n.de, HISKP Bonn
Date
2021-02

Definition at line 31 of file BSEmcGeoNeighbouringRelationPar.h.

Constructor & Destructor Documentation

◆ BSEmcGeoNeighbouringRelationPar() [1/2]

BSEmcGeoNeighbouringRelationPar::BSEmcGeoNeighbouringRelationPar ( const char *  t_name = "EmcGeoNeighbouringRelationPar",
const char *  t_title = "Neighbouring relation of Emc crystals",
const char *  t_context = "TestDefaultContext" 
)

Referenced by GetRelations().

◆ ~BSEmcGeoNeighbouringRelationPar()

BSEmcGeoNeighbouringRelationPar::~BSEmcGeoNeighbouringRelationPar ( void  )

◆ BSEmcGeoNeighbouringRelationPar() [2/2]

BSEmcGeoNeighbouringRelationPar::BSEmcGeoNeighbouringRelationPar ( const BSEmcGeoNeighbouringRelationPar t_l)

Member Function Documentation

◆ AddNeighbourToId()

void BSEmcGeoNeighbouringRelationPar::AddNeighbourToId ( Int_t  t_neighbourid,
Int_t  t_id 
)

Referenced by clear().

◆ AreNeighbours()

Bool_t BSEmcGeoNeighbouringRelationPar::AreNeighbours ( Int_t  t_a,
Int_t  t_b 
) const
inline

Definition at line 46 of file BSEmcGeoNeighbouringRelationPar.h.

References GetNeighbourIds().

Referenced by BSEmcEnergies_t::GetEnergies().

47  {
48  const std::vector<Int_t> &ids = GetNeighbourIds(t_a);
49  return std::find(ids.begin(), ids.end(), t_b) != ids.end();
50  }
const std::vector< Int_t > & GetNeighbourIds(Int_t t_detectorid) const

◆ clear()

void BSEmcGeoNeighbouringRelationPar::clear ( void  )
inline

◆ FillMap()

void BSEmcGeoNeighbouringRelationPar::FillMap ( )

◆ GetNeighbourIds()

const std::vector<Int_t>& BSEmcGeoNeighbouringRelationPar::GetNeighbourIds ( Int_t  t_detectorid) const

Referenced by AreNeighbours(), and clear().

◆ getParams()

Bool_t BSEmcGeoNeighbouringRelationPar::getParams ( FairParamList *  )

Referenced by clear().

◆ GetRelationMap()

const std::map<Int_t, std::vector<Int_t> >& BSEmcGeoNeighbouringRelationPar::GetRelationMap ( ) const
inline

Definition at line 61 of file BSEmcGeoNeighbouringRelationPar.h.

61 { return fRelationMap; }

◆ GetRelations()

const TObjArray* BSEmcGeoNeighbouringRelationPar::GetRelations ( ) const
inline

Definition at line 51 of file BSEmcGeoNeighbouringRelationPar.h.

References BSEmcGeoNeighbouringRelationPar(), FillMap(), InitFromTextFile(), operator=(), and UpdateRelationArray().

51 { return fRelations.get(); }

◆ InitFromTextFile()

void BSEmcGeoNeighbouringRelationPar::InitFromTextFile ( const TString &  t_filename)

Referenced by GetRelations().

◆ IsSet()

Bool_t BSEmcGeoNeighbouringRelationPar::IsSet ( )
inline

Definition at line 60 of file BSEmcGeoNeighbouringRelationPar.h.

Referenced by BSEmcParameterLoadingProcess< DataStruct >::SetupParameters().

60 { return fRelations->GetEntriesFast() != 0; }

◆ operator=()

BSEmcGeoNeighbouringRelationPar& BSEmcGeoNeighbouringRelationPar::operator= ( const BSEmcGeoNeighbouringRelationPar t_l)

Referenced by GetRelations().

◆ putParams()

void BSEmcGeoNeighbouringRelationPar::putParams ( FairParamList *  )

Referenced by clear().

◆ RegisterIdAndNeighbours()

void BSEmcGeoNeighbouringRelationPar::RegisterIdAndNeighbours ( Int_t  t_id,
std::vector< Int_t > &  t_neighbours 
)

◆ UpdateRelationArray()

void BSEmcGeoNeighbouringRelationPar::UpdateRelationArray ( )

Member Data Documentation

◆ fgParameterName

std::string BSEmcGeoNeighbouringRelationPar::fgParameterName
static

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