hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Types | Private Attributes | List of all members
ModuleMapper Class Reference

#include <ModuleMapper.h>

Public Member Functions

 ModuleMapper (const int year=2019)
 
 ~ModuleMapper ()
 
std::string getHwFromString (const std::string &key)
 Get the Hw From String.
 
std::string getSwFromString (const std::string &key)
 Get the Sw From String.
 
std::string getHwFromSw (const std::string &key)
 Get the Hw From Sw.
 
std::string getSwFromHw (const std::string &key)
 Get the Sw From Hw.
 
std::string getStringFromHw (const std::string &key)
 Get the String From Hw.
 
std::string getStringFromSw (const std::string &key)
 Get the String From Sw.
 
std::vector< std::string > getHybridStrings ()
 Get the Hybrid Strings.
 
void getStrings (std::vector< std::string > &strings)
 Get list of string modules.
 
void getHws (std::vector< std::string > &hws)
 Get list of hw names.
 
void getSws (std::vector< std::string > &sws)
 Get list of sw names.
 
std::map< std::string, std::map< int, int > > buildChannelSvtIDMap ()
 Build global svt id map for all FebHybrid combinations.
 
int getSvtIDFromHWChannel (int channel, std::string hwTag, std::map< std::string, std::map< int, int > > svtid_map)
 Return global svt id for channel by providing local channel number and F<n>H<m> of channel.
 
void buildApvChannelMap ()
 Used to generate apv channel map and read in thresholds from database.
 
void ReadThresholdsFile (std::string filename)
 Used to read svt channel DAQ threshold values from daq thresholds file.
 
std::pair< std::string, int > findApvChannel (std::string feb, std::string hybrid, int channel)
 get APV channel number given feb, hybrid, and channel number
 
int getThresholdValue (std::string feb, std::string hybrid, int channel)
 Get channel DAQ threshold.
 

Private Types

typedef std::map< std::string, std::string >::iterator strmap_it
 description
 

Private Attributes

int year_ {2019}
 description
 
std::map< std::string, std::string > hw_to_sw
 description
 
std::map< std::string, std::string > sw_to_hw
 description
 
std::map< std::string, std::string > hw_to_string
 description
 
std::map< std::string, std::string > string_to_hw
 description
 
std::map< std::string, std::string > sw_to_string
 description
 
std::map< std::string, std::string > string_to_sw
 description
 
std::map< std::string, std::map< std::string, std::vector< int > > > apvChannelMap_
 description
 
std::map< std::string, std::vector< int > > thresholdsIn_
 description
 

Detailed Description

Definition at line 11 of file ModuleMapper.h.

Member Typedef Documentation

◆ strmap_it

typedef std::map<std::string,std::string>::iterator strmap_it
private

description

Definition at line 171 of file ModuleMapper.h.

Constructor & Destructor Documentation

◆ ModuleMapper()

ModuleMapper ( const int  year = 2019)

Definition at line 4 of file ModuleMapper.cxx.

◆ ~ModuleMapper()

Todo:
, clean up?

Definition at line 545 of file ModuleMapper.cxx.

Member Function Documentation

◆ buildApvChannelMap()

void buildApvChannelMap ( )

Used to generate apv channel map and read in thresholds from database.

Definition at line 572 of file ModuleMapper.cxx.

◆ buildChannelSvtIDMap()

std::map< std::string, std::map< int, int > > buildChannelSvtIDMap ( )

Build global svt id map for all FebHybrid combinations.

Returns
std::map<std::string, std::map<int,int>>

Definition at line 505 of file ModuleMapper.cxx.

◆ findApvChannel()

std::pair< std::string, int > findApvChannel ( std::string  feb,
std::string  hybrid,
int  channel 
)

get APV channel number given feb, hybrid, and channel number

Parameters
feb
hybrid
channel
Returns
std::pair<std::string,int>

Definition at line 708 of file ModuleMapper.cxx.

◆ getHwFromString()

std::string getHwFromString ( const std::string &  key)
inline

Get the Hw From String.

Parameters
key
Returns
std::string

Definition at line 25 of file ModuleMapper.h.

◆ getHwFromSw()

std::string getHwFromSw ( const std::string &  key)
inline

Get the Hw From Sw.

Parameters
key
Returns
std::string

Definition at line 41 of file ModuleMapper.h.

◆ getHws()

void getHws ( std::vector< std::string > &  hws)
inline

Get list of hw names.

Returns
hws

Definition at line 89 of file ModuleMapper.h.

◆ getHybridStrings()

std::vector< std::string > getHybridStrings ( )

Get the Hybrid Strings.

Returns
std::vector<std::string>

Definition at line 548 of file ModuleMapper.cxx.

◆ getStringFromHw()

std::string getStringFromHw ( const std::string &  key)
inline

Get the String From Hw.

Parameters
key
Returns
std::string

Definition at line 57 of file ModuleMapper.h.

◆ getStringFromSw()

std::string getStringFromSw ( const std::string &  key)
inline

Get the String From Sw.

Parameters
key
Returns
std::string

Definition at line 65 of file ModuleMapper.h.

◆ getStrings()

void getStrings ( std::vector< std::string > &  strings)
inline

Get list of string modules.

Returns
strings

Definition at line 79 of file ModuleMapper.h.

◆ getSvtIDFromHWChannel()

int getSvtIDFromHWChannel ( int  channel,
std::string  hwTag,
std::map< std::string, std::map< int, int > >  svtid_map 
)

Return global svt id for channel by providing local channel number and F<n>H<m> of channel.

Parameters
channel
hwTag
svtid_map
Returns
int

Definition at line 532 of file ModuleMapper.cxx.

◆ getSwFromHw()

std::string getSwFromHw ( const std::string &  key)
inline

Get the Sw From Hw.

Parameters
key
Returns
std::string

Definition at line 49 of file ModuleMapper.h.

◆ getSwFromString()

std::string getSwFromString ( const std::string &  key)
inline

Get the Sw From String.

Parameters
key
Returns
std::string

Definition at line 33 of file ModuleMapper.h.

◆ getSws()

void getSws ( std::vector< std::string > &  sws)
inline

Get list of sw names.

Returns
sws

Definition at line 99 of file ModuleMapper.h.

◆ getThresholdValue()

int getThresholdValue ( std::string  feb,
std::string  hybrid,
int  channel 
)

Get channel DAQ threshold.

Parameters
feb
hybrid
channel
Returns
std::pair<std::string,int>

Definition at line 749 of file ModuleMapper.cxx.

◆ ReadThresholdsFile()

void ReadThresholdsFile ( std::string  filename)

Used to read svt channel DAQ threshold values from daq thresholds file.

Parameters
filename

Definition at line 676 of file ModuleMapper.cxx.

Member Data Documentation

◆ apvChannelMap_

std::map<std::string,std::map<std::string,std::vector<int> > > apvChannelMap_
private

description

Definition at line 173 of file ModuleMapper.h.

◆ hw_to_string

std::map<std::string,std::string> hw_to_string
private

description

Definition at line 165 of file ModuleMapper.h.

◆ hw_to_sw

std::map<std::string, std::string> hw_to_sw
private

description

Definition at line 162 of file ModuleMapper.h.

◆ string_to_hw

std::map<std::string,std::string> string_to_hw
private

description

Definition at line 166 of file ModuleMapper.h.

◆ string_to_sw

std::map<std::string,std::string> string_to_sw
private

description

Definition at line 169 of file ModuleMapper.h.

◆ sw_to_hw

std::map<std::string, std::string> sw_to_hw
private

description

Definition at line 163 of file ModuleMapper.h.

◆ sw_to_string

std::map<std::string,std::string> sw_to_string
private

description

Definition at line 168 of file ModuleMapper.h.

◆ thresholdsIn_

std::map<std::string, std::vector<int> > thresholdsIn_
private

description

Definition at line 174 of file ModuleMapper.h.

◆ year_

int year_ {2019}
private

description

Definition at line 160 of file ModuleMapper.h.


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