ATLAS Offline Software
Enumerations | Functions
LArParamsProperties Namespace Reference

This include file contains inline functions describing LAr Parameters properties used in LArReadParamsFromFile and LArParams2Ntuple. More...

Enumerations

enum  ClassNumbering {
  CaliPulseParamsComplete = 0, DetCellParamsComplete, PhysCaliTdiffComplete, TdriftComplete,
  MphysOverMcalComplete, RinjComplete, TshaperComplete, EMEC_CphiComplete,
  EMEC_HValphaComplete, EMEC_HVbetaComplete, CableLengthComplete, CableAttenuationComplete,
  OFCBinComplete, END_OF_LIST
}
 

Functions

bool isValid (const LArCaliPulseParamsP &p)
 
bool isValid (const LArDetCellParamsP &p)
 
bool isValid (const LArPhysCaliTdiffP &p)
 
bool isValid (const LArTdriftP &p)
 
bool isValid (const LArRinjP &p)
 
bool isValid (const LArTshaperP &p)
 
bool isValid (const LArEMEC_CphiP &p)
 
bool isValid (const LArEMEC_HValphaP &p)
 
bool isValid (const LArEMEC_HVbetaP &p)
 
bool isValid (const LArCableLengthP &p)
 
bool isValid (const LArCableAttenuationP &p)
 
bool isValid (const LArOFCBinP &p)
 
unsigned getClassIndex (const LArCaliPulseParamsComplete *)
 
unsigned getClassIndex (const LArDetCellParamsComplete *)
 
unsigned getClassIndex (const LArPhysCaliTdiffComplete *)
 
unsigned getClassIndex (const LArTdriftComplete *)
 
unsigned getClassIndex (const LArMphysOverMcalComplete *)
 
unsigned getClassIndex (const LArRinjComplete *)
 
unsigned getClassIndex (const LArTshaperComplete *)
 
unsigned getClassIndex (const LArEMEC_CphiComplete *)
 
unsigned getClassIndex (const LArEMEC_HValphaComplete *)
 
unsigned getClassIndex (const LArEMEC_HVbetaComplete *)
 
unsigned getClassIndex (const LArCableLengthComplete *)
 
unsigned getClassIndex (const LArCableAttenuationComplete *)
 
unsigned getClassIndex (const LArOFCBinComplete *)
 
const std::vector< std::string > & ClassNames ()
 
unsigned numberOfParams (unsigned index)
 
bool isGainDependent (unsigned index)
 
const std::string & getClassName (unsigned index)
 
template<class T >
const std::string & getClassName (const T *p)
 
unsigned getClassIndex (const std::string &className)
 
unsigned numberOfParams (const std::string &className)
 
template<class T >
unsigned numberOfParams (const T *p)
 
bool isGainDependent (const std::string &className)
 
template<class T >
bool isGainDependent (const T *p)
 
std::string keyword (const std::string &classname)
 
std::string keyword (unsigned i)
 
template<class T >
std::string keyword (const T *p)
 

Detailed Description

This include file contains inline functions describing LAr Parameters properties used in LArReadParamsFromFile and LArParams2Ntuple.

To use them you must use namespace operator 'LArParamsProperties::' or put the line 'using LArParamsProperties'

Author
M. Fanti 27.02.2006

Enumeration Type Documentation

◆ ClassNumbering

Enumerator
CaliPulseParamsComplete 
DetCellParamsComplete 
PhysCaliTdiffComplete 
TdriftComplete 
MphysOverMcalComplete 
RinjComplete 
TshaperComplete 
EMEC_CphiComplete 
EMEC_HValphaComplete 
EMEC_HVbetaComplete 
CableLengthComplete 
CableAttenuationComplete 
OFCBinComplete 
END_OF_LIST 

Definition at line 80 of file LArParamsProperties.h.

80  {
86  RinjComplete ,
93  //CaliPulseParamsVsCalib ,
95  END_OF_LIST // used to count allowed data classes
96  } ;

Function Documentation

◆ ClassNames()

const std::vector< std::string > & LArParamsProperties::ClassNames ( )

Definition at line 48 of file LArParamsProperties.cxx.

49 {
50  static const std::vector<std::string> names = []() {
51  std::vector<std::string> names(END_OF_LIST);
52  names[CaliPulseParamsComplete] = "LArCaliPulseParamsComplete" ;
53  names[DetCellParamsComplete] = "LArDetCellParamsComplete" ;
54  names[PhysCaliTdiffComplete] = "LArPhysCaliTdiffComplete" ;
55  names[TdriftComplete] = "LArTdriftComplete" ;
56  names[MphysOverMcalComplete] = "LArMphysOverMcalComplete" ;
57  names[RinjComplete] = "LArRinjComplete" ;
58  names[TshaperComplete] = "LArTshaperComplete" ;
59  names[EMEC_CphiComplete] = "LArEMEC_CphiComplete" ;
60  names[EMEC_HValphaComplete] = "LArEMEC_HValphaComplete" ;
61  names[EMEC_HVbetaComplete] = "LArEMEC_HVbetaComplete" ;
62  names[CableLengthComplete] = "LArCableLengthComplete" ;
63  names[CableAttenuationComplete] = "LArCableAttenuationComplete" ;
64  //names[CaliPulseParamsVsCalib] = "LArCaliPulseParamsVsCalib" ;
65  names[OFCBinComplete] = "LArOFCBinComplete" ;
66  names[PhysCaliTdiffComplete] = "LArPhysCaliTdiffComplete" ;
67  return names ;
68  }() ;
69  return names ;
70 }

◆ getClassIndex() [1/14]

unsigned LArParamsProperties::getClassIndex ( const LArCableAttenuationComplete )

Definition at line 42 of file LArParamsProperties.cxx.

42 { return CableAttenuationComplete ; }

◆ getClassIndex() [2/14]

unsigned LArParamsProperties::getClassIndex ( const LArCableLengthComplete )

Definition at line 41 of file LArParamsProperties.cxx.

41 { return CableLengthComplete ; }

◆ getClassIndex() [3/14]

unsigned LArParamsProperties::getClassIndex ( const LArCaliPulseParamsComplete )

Definition at line 31 of file LArParamsProperties.cxx.

31 { return CaliPulseParamsComplete ; }

◆ getClassIndex() [4/14]

unsigned LArParamsProperties::getClassIndex ( const LArDetCellParamsComplete )

Definition at line 32 of file LArParamsProperties.cxx.

32 { return DetCellParamsComplete ; }

◆ getClassIndex() [5/14]

unsigned LArParamsProperties::getClassIndex ( const LArEMEC_CphiComplete )

Definition at line 38 of file LArParamsProperties.cxx.

38 { return EMEC_CphiComplete ; }

◆ getClassIndex() [6/14]

unsigned LArParamsProperties::getClassIndex ( const LArEMEC_HValphaComplete )

Definition at line 39 of file LArParamsProperties.cxx.

39 { return EMEC_HValphaComplete ; }

◆ getClassIndex() [7/14]

unsigned LArParamsProperties::getClassIndex ( const LArEMEC_HVbetaComplete )

Definition at line 40 of file LArParamsProperties.cxx.

40 { return EMEC_HVbetaComplete ; }

◆ getClassIndex() [8/14]

unsigned LArParamsProperties::getClassIndex ( const LArMphysOverMcalComplete )

Definition at line 35 of file LArParamsProperties.cxx.

35 { return MphysOverMcalComplete ; }

◆ getClassIndex() [9/14]

unsigned LArParamsProperties::getClassIndex ( const LArOFCBinComplete )

Definition at line 44 of file LArParamsProperties.cxx.

44 { return OFCBinComplete ; }

◆ getClassIndex() [10/14]

unsigned LArParamsProperties::getClassIndex ( const LArPhysCaliTdiffComplete )

Definition at line 33 of file LArParamsProperties.cxx.

33 { return PhysCaliTdiffComplete ; }

◆ getClassIndex() [11/14]

unsigned LArParamsProperties::getClassIndex ( const LArRinjComplete )

Definition at line 36 of file LArParamsProperties.cxx.

36 { return RinjComplete ; }

◆ getClassIndex() [12/14]

unsigned LArParamsProperties::getClassIndex ( const LArTdriftComplete )

Definition at line 34 of file LArParamsProperties.cxx.

34 { return TdriftComplete ; }

◆ getClassIndex() [13/14]

unsigned LArParamsProperties::getClassIndex ( const LArTshaperComplete )

Definition at line 37 of file LArParamsProperties.cxx.

37 { return TshaperComplete ; }

◆ getClassIndex() [14/14]

unsigned LArParamsProperties::getClassIndex ( const std::string &  className)

Definition at line 138 of file LArParamsProperties.cxx.

139 {
140  const std::vector<std::string> & names = ClassNames() ;
141  unsigned N = names.size() ;
142  for ( unsigned i=0 ; i<N ; i++ ) {
143  if ( className == names[i] ) return i ;
144  }
145  return N ;
146 }

◆ getClassName() [1/2]

template<class T >
const std::string& LArParamsProperties::getClassName ( const T *  p)

Definition at line 136 of file LArParamsProperties.h.

136 { return getClassName(getClassIndex(p)) ; }

◆ getClassName() [2/2]

const std::string & LArParamsProperties::getClassName ( unsigned  index)

Definition at line 128 of file LArParamsProperties.cxx.

129 {
130  static const std::string empty("");
131  const std::vector<std::string> & names = ClassNames() ;
132  if ( index < names.size() ) return names[index] ;
133  return empty ;
134 }

◆ isGainDependent() [1/3]

bool LArParamsProperties::isGainDependent ( const std::string &  className)

Definition at line 155 of file LArParamsProperties.cxx.

◆ isGainDependent() [2/3]

template<class T >
bool LArParamsProperties::isGainDependent ( const T *  p)

Definition at line 154 of file LArParamsProperties.h.

154 { return isGainDependent(getClassIndex(p)) ; }

◆ isGainDependent() [3/3]

bool LArParamsProperties::isGainDependent ( unsigned  index)

Definition at line 101 of file LArParamsProperties.cxx.

102 {
103  static const std::vector<bool> useGain = []() {
104  std::vector<bool> useGain(END_OF_LIST) ;
108  useGain[TdriftComplete] = false ;
110  useGain[RinjComplete] = false ;
111  useGain[TshaperComplete] = false ;
112  useGain[EMEC_CphiComplete] = false ;
113  useGain[EMEC_HValphaComplete] = false ;
114  useGain[EMEC_HVbetaComplete] = false ;
115  useGain[CableLengthComplete] = false ;
117  //useGain[CaliPulseParamsVsCalib] = false ;
118  useGain[OFCBinComplete] = true ;
120  return useGain ;
121  }() ;
122  if ( index < END_OF_LIST ) return useGain[index] ;
123  return false ;
124 }

◆ isValid() [1/12]

bool LArParamsProperties::isValid ( const LArCableAttenuationP p)

Definition at line 26 of file LArParamsProperties.cxx.

26 { return ( p.m_CableAttenuation != ILArCableAttenuation::ERRORCODE ) ; }

◆ isValid() [2/12]

bool LArParamsProperties::isValid ( const LArCableLengthP p)

Definition at line 25 of file LArParamsProperties.cxx.

25 { return ( p.m_CableLength != ILArCableLength::ERRORCODE ) ; }

◆ isValid() [3/12]

bool LArParamsProperties::isValid ( const LArCaliPulseParamsP p)

Definition at line 10 of file LArParamsProperties.cxx.

10 { return ( p.m_Tcal != ILArCaliPulseParams::ERRORCODE ) ; }

◆ isValid() [4/12]

bool LArParamsProperties::isValid ( const LArDetCellParamsP p)

Definition at line 11 of file LArParamsProperties.cxx.

11 { return ( p.m_Omega0 != ILArDetCellParams::ERRORCODE ) ; }

◆ isValid() [5/12]

bool LArParamsProperties::isValid ( const LArEMEC_CphiP p)

Definition at line 22 of file LArParamsProperties.cxx.

22 { return ( p.m_EMEC_Cphi != ILArEMEC_Cphi::ERRORCODE ) ; }

◆ isValid() [6/12]

bool LArParamsProperties::isValid ( const LArEMEC_HValphaP p)

Definition at line 23 of file LArParamsProperties.cxx.

23 { return ( p.m_EMEC_HValpha != ILArEMEC_HValpha::ERRORCODE ) ; }

◆ isValid() [7/12]

bool LArParamsProperties::isValid ( const LArEMEC_HVbetaP p)

Definition at line 24 of file LArParamsProperties.cxx.

24 { return ( p.m_EMEC_HVbeta != ILArEMEC_HVbeta::ERRORCODE ) ; }

◆ isValid() [8/12]

bool LArParamsProperties::isValid ( const LArOFCBinP p)

Definition at line 27 of file LArParamsProperties.cxx.

27 { return ( p.m_bin != LArOFCBinP::ERRORCODE ) ; }

◆ isValid() [9/12]

bool LArParamsProperties::isValid ( const LArPhysCaliTdiffP p)

Definition at line 12 of file LArParamsProperties.cxx.

12 { return ( p.m_Tdiff != ILArPhysCaliTdiff::ERRORCODE ) ; }

◆ isValid() [10/12]

bool LArParamsProperties::isValid ( const LArRinjP p)

Definition at line 20 of file LArParamsProperties.cxx.

20 { return ( p.m_Rinj != ILArRinj::ERRORCODE ) ; }

◆ isValid() [11/12]

bool LArParamsProperties::isValid ( const LArTdriftP p)

Definition at line 13 of file LArParamsProperties.cxx.

13 { return ( p.m_Tdrift != ILArTdrift::ERRORCODE ) ; }

◆ isValid() [12/12]

bool LArParamsProperties::isValid ( const LArTshaperP p)

Definition at line 21 of file LArParamsProperties.cxx.

21 { return ( p.m_Tshaper != ILArTshaper::ERRORCODE ) ; }

◆ keyword() [1/3]

std::string LArParamsProperties::keyword ( const std::string &  classname)

Definition at line 160 of file LArParamsProperties.cxx.

161 {
162  unsigned len = classname.length() ;
163  if ( classname.substr(len-8,8) == std::string("Complete") ) return classname.substr(0,len-8) ;
164  if ( classname.substr(len-7,7) == std::string("VsCalib") ) return classname.substr(0,len-7) ;
165  return classname ;
166 }

◆ keyword() [2/3]

template<class T >
std::string LArParamsProperties::keyword ( const T *  p)

Definition at line 162 of file LArParamsProperties.h.

162 { return keyword(getClassName(p)) ; }

◆ keyword() [3/3]

std::string LArParamsProperties::keyword ( unsigned  i)

Definition at line 168 of file LArParamsProperties.cxx.

168 { return keyword(getClassName(i)) ; }

◆ numberOfParams() [1/3]

unsigned LArParamsProperties::numberOfParams ( const std::string &  className)

Definition at line 150 of file LArParamsProperties.cxx.

150 { return numberOfParams(getClassIndex(className)) ; }

◆ numberOfParams() [2/3]

template<class T >
unsigned LArParamsProperties::numberOfParams ( const T *  p)

Definition at line 147 of file LArParamsProperties.h.

147 { return numberOfParams(getClassIndex(p)) ; }

◆ numberOfParams() [3/3]

unsigned LArParamsProperties::numberOfParams ( unsigned  index)

Definition at line 74 of file LArParamsProperties.cxx.

75 {
76  static const std::vector<unsigned> nOfPars = []() {
77  std::vector<unsigned> nOfPars(END_OF_LIST) ;
78  nOfPars[CaliPulseParamsComplete] = 5 ;
79  nOfPars[DetCellParamsComplete] = 2 ;
80  nOfPars[PhysCaliTdiffComplete] = 1 ;
81  nOfPars[TdriftComplete] = 1 ;
82  nOfPars[MphysOverMcalComplete] = 1 ;
83  nOfPars[RinjComplete] = 1 ;
84  nOfPars[TshaperComplete] = 1 ;
85  nOfPars[EMEC_CphiComplete] = 1 ;
86  nOfPars[EMEC_HValphaComplete] = 1 ;
87  nOfPars[EMEC_HVbetaComplete] = 1 ;
88  nOfPars[CableLengthComplete] = 1 ;
89  nOfPars[CableAttenuationComplete] = 1 ;
90  //nOfPars[CaliPulseParamsVsCalib] = 5 ;
91  nOfPars[OFCBinComplete] = 1 ;
92  nOfPars[PhysCaliTdiffComplete] = 1 ;
93  return nOfPars ;
94  }() ;
95  if ( index < END_OF_LIST ) return nOfPars[index] ;
96  return 0 ;
97 }
LArParamsProperties::DetCellParamsComplete
@ DetCellParamsComplete
Definition: LArParamsProperties.h:82
ILArCableLength::ERRORCODE
@ ERRORCODE
Definition: ILArCableLength.h:29
ILArDetCellParams::ERRORCODE
@ ERRORCODE
Definition: ILArDetCellParams.h:29
LArParamsProperties::numberOfParams
unsigned numberOfParams(unsigned index)
Definition: LArParamsProperties.cxx:74
LArParamsProperties::MphysOverMcalComplete
@ MphysOverMcalComplete
Definition: LArParamsProperties.h:85
index
Definition: index.py:1
ILArEMEC_HValpha::ERRORCODE
@ ERRORCODE
Definition: ILArEMEC_HValpha.h:29
LArParamsProperties::EMEC_HVbetaComplete
@ EMEC_HVbetaComplete
Definition: LArParamsProperties.h:90
ILArPhysCaliTdiff::ERRORCODE
@ ERRORCODE
Definition: ILArPhysCaliTdiff.h:29
LArParamsProperties::CableLengthComplete
@ CableLengthComplete
Definition: LArParamsProperties.h:91
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
ILArEMEC_Cphi::ERRORCODE
@ ERRORCODE
Definition: ILArEMEC_Cphi.h:30
LArParamsProperties::numberOfParams
unsigned numberOfParams(const T *p)
Definition: LArParamsProperties.h:147
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
LArParamsProperties::getClassName
const std::string & getClassName(unsigned index)
Definition: LArParamsProperties.cxx:128
LArParamsProperties::isGainDependent
bool isGainDependent(unsigned index)
Definition: LArParamsProperties.cxx:101
ILArTshaper::ERRORCODE
@ ERRORCODE
Definition: ILArTshaper.h:28
ILArCaliPulseParams::ERRORCODE
@ ERRORCODE
Definition: ILArCaliPulseParams.h:32
JetTagCalibConfig.className
string className
Definition: JetTagCalibConfig.py:36
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LArParamsProperties::RinjComplete
@ RinjComplete
Definition: LArParamsProperties.h:86
LArParamsProperties::keyword
std::string keyword(const T *p)
Definition: LArParamsProperties.h:162
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArParamsProperties::getClassName
const std::string & getClassName(const T *p)
Definition: LArParamsProperties.h:136
python.subdetectors.mmg.names
names
Definition: mmg.py:8
LArParamsProperties::OFCBinComplete
@ OFCBinComplete
Definition: LArParamsProperties.h:94
LArParamsProperties::isGainDependent
bool isGainDependent(const T *p)
Definition: LArParamsProperties.h:154
LArParamsProperties::CaliPulseParamsComplete
@ CaliPulseParamsComplete
Definition: LArParamsProperties.h:81
LArParamsProperties::EMEC_CphiComplete
@ EMEC_CphiComplete
Definition: LArParamsProperties.h:88
LArParamsProperties::PhysCaliTdiffComplete
@ PhysCaliTdiffComplete
Definition: LArParamsProperties.h:83
LArOFCBinP::ERRORCODE
@ ERRORCODE
Definition: LArOFCBinP.h:14
ILArRinj::ERRORCODE
@ ERRORCODE
Definition: ILArRinj.h:28
LArParamsProperties::TdriftComplete
@ TdriftComplete
Definition: LArParamsProperties.h:84
LArParamsProperties::getClassIndex
unsigned getClassIndex(const std::string &className)
Definition: LArParamsProperties.cxx:138
LArParamsProperties::TshaperComplete
@ TshaperComplete
Definition: LArParamsProperties.h:87
DeMoScan.index
string index
Definition: DeMoScan.py:364
LArParamsProperties::CableAttenuationComplete
@ CableAttenuationComplete
Definition: LArParamsProperties.h:92
LArParamsProperties::END_OF_LIST
@ END_OF_LIST
Definition: LArParamsProperties.h:95
ILArTdrift::ERRORCODE
@ ERRORCODE
Definition: ILArTdrift.h:27
ILArEMEC_HVbeta::ERRORCODE
@ ERRORCODE
Definition: ILArEMEC_HVbeta.h:29
LArParamsProperties::ClassNames
const std::vector< std::string > & ClassNames()
Definition: LArParamsProperties.cxx:48
WriteCellNoiseToCool.useGain
useGain
Definition: WriteCellNoiseToCool.py:343
LArParamsProperties::getClassIndex
unsigned getClassIndex(const LArCaliPulseParamsComplete *)
Definition: LArParamsProperties.cxx:31
LArParamsProperties::keyword
std::string keyword(const std::string &classname)
Definition: LArParamsProperties.cxx:160
LArParamsProperties::EMEC_HValphaComplete
@ EMEC_HValphaComplete
Definition: LArParamsProperties.h:89
ILArCableAttenuation::ERRORCODE
@ ERRORCODE
Definition: ILArCableAttenuation.h:30