ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCalibTools
LArCalibTools
LArParamsProperties.h
Go to the documentation of this file.
1
//Dear emacs, this is -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
15
#ifndef LARCALIBTOOLS_LARPARAMSPROPERTIES_H
16
#define LARCALIBTOOLS_LARPARAMSPROPERTIES_H
17
18
#include "
LArRawConditions/LArCaliPulseParamsComplete.h
"
19
#include "
LArRawConditions/LArDetCellParamsComplete.h
"
20
#include "
LArRawConditions/LArPhysCaliTdiffComplete.h
"
21
#include "
LArRawConditions/LArTdriftComplete.h
"
22
#include "
LArRawConditions/LArMphysOverMcalComplete.h
"
23
#include "
LArRawConditions/LArRinjComplete.h
"
24
#include "
LArRawConditions/LArTshaperComplete.h
"
25
#include "
LArRawConditions/LArEMEC_CphiComplete.h
"
26
#include "
LArRawConditions/LArEMEC_HValphaComplete.h
"
27
#include "
LArRawConditions/LArEMEC_HVbetaComplete.h
"
28
#include "
LArRawConditions/LArCableLengthComplete.h
"
29
#include "
LArRawConditions/LArCableAttenuationComplete.h
"
30
#include "
LArRawConditions/LArOFCBinComplete.h
"
31
32
namespace
LArParamsProperties
{
33
35
//
36
// To add a new LAr data class (e.g. LArNewClass) containing payload objects
37
// (e.g. LArPayload) you must:
38
//
39
// (0) overload the 'inline bool isValid()' function with the reference
40
// to the payload object (e.g. isValid(const LArPayload&) {return(...);};
41
// giving a validity criterion
42
//
43
// (1) add its sequential number to the enum, before END_OF_LIST
44
// (call it with the class name without 'LAr', e.g. 'NewClass')
45
//
46
// (2) overload the 'inline unsigned getClassIndex()' with the pointer
47
// to the new class (e.g. getClassIndex(LArNewClass*) {return NewClass;};
48
//
49
// (3) add the properties of the new class to the functions:
50
// ClassNames(), numberOfParams(unsigned), isGainDependent(unsigned)
51
//
52
// all the rest should be self-consistent and does not need any update.
53
//
55
56
// validity of payload data ( invalid = empty )
57
//----------------------------------------------
58
bool
isValid
(
const
LArCaliPulseParamsP
& p);
59
bool
isValid
(
const
LArDetCellParamsP
& p);
60
bool
isValid
(
const
LArPhysCaliTdiffP
& p);
61
bool
isValid
(
const
LArTdriftP
& p);
62
#ifdef LARRAWCONDITIONS_LARSINGLEFLOATP
63
bool
isValid
(
const
LArSingleFloatP
& p);
64
#endif
65
#ifdef LARRAWCONDITIONS_LARMPHYSOVERMCALP1
66
bool
isValid
(
const
LArMphysOverMcalP1
& p);
67
#endif
68
bool
isValid
(
const
LArRinjP
& p);
69
bool
isValid
(
const
LArTshaperP
& p);
70
bool
isValid
(
const
LArEMEC_CphiP
& p);
71
bool
isValid
(
const
LArEMEC_HValphaP
& p);
72
bool
isValid
(
const
LArEMEC_HVbetaP
& p);
73
bool
isValid
(
const
LArCableLengthP
& p);
74
bool
isValid
(
const
LArCableAttenuationP
& p);
75
bool
isValid
(
const
LArOFCBinP
& p);
76
bool
isValid
(
const
LArPhysCaliTdiffP
& p);
77
78
// sequential number associated to foreseen data classes
79
//-------------------------------------------------------
80
enum
ClassNumbering
{
81
CaliPulseParamsComplete
= 0 ,
82
DetCellParamsComplete
,
83
PhysCaliTdiffComplete
,
84
TdriftComplete
,
85
MphysOverMcalComplete
,
86
RinjComplete
,
87
TshaperComplete
,
88
EMEC_CphiComplete
,
89
EMEC_HValphaComplete
,
90
EMEC_HVbetaComplete
,
91
CableLengthComplete
,
92
CableAttenuationComplete
,
93
//CaliPulseParamsVsCalib ,
94
OFCBinComplete
,
95
END_OF_LIST
// used to count allowed data classes
96
} ;
97
98
// conversion: data class pointer --> class index
99
//------------------------------------------------
100
unsigned
getClassIndex
(
const
LArCaliPulseParamsComplete
*);
101
unsigned
getClassIndex
(
const
LArDetCellParamsComplete
*);
102
unsigned
getClassIndex
(
const
LArPhysCaliTdiffComplete*);
103
unsigned
getClassIndex
(
const
LArTdriftComplete
*);
104
unsigned
getClassIndex
(
const
LArMphysOverMcalComplete
*);
105
unsigned
getClassIndex
(
const
LArRinjComplete
*);
106
unsigned
getClassIndex
(
const
LArTshaperComplete
*);
107
unsigned
getClassIndex
(
const
LArEMEC_CphiComplete
*);
108
unsigned
getClassIndex
(
const
LArEMEC_HValphaComplete
*);
109
unsigned
getClassIndex
(
const
LArEMEC_HVbetaComplete
*);
110
unsigned
getClassIndex
(
const
LArCableLengthComplete
*);
111
unsigned
getClassIndex
(
const
LArCableAttenuationComplete
*);
112
//unsigned getClassIndex(const LArCaliPulseParamsVsCalib*);
113
unsigned
getClassIndex
(
const
LArOFCBinComplete
*);
114
unsigned
getClassIndex
(
const
LArPhysCaliTdiffComplete*);
115
116
// vector of class names
117
//-----------------------
118
const
std::vector< std::string > &
ClassNames
();
119
120
// number of parameters hosted in each data class
121
//------------------------------------------------
122
unsigned
numberOfParams
(
unsigned
index
);
123
124
// gain dependency of data class parameters
125
//------------------------------------------
126
bool
isGainDependent
(
unsigned
index
);
127
129
// don't modify anything from now on!
131
132
// getClassName : from class index and class pointer
133
//---------------------------------------------------
134
const
std::string &
getClassName
(
unsigned
index
);
135
template
<
class
T>
136
const
std::string &
getClassName
(
const
T* p) {
return
getClassName
(
getClassIndex
(p)) ; }
137
138
// get class index from class name :
139
//-----------------------------------
140
unsigned
getClassIndex
(
const
std::string& className);
141
142
// number of parameters contained in each data class
143
//---------------------------------------------------
144
unsigned
numberOfParams
(
const
std::string& className);
145
146
template
<
class
T>
147
unsigned
numberOfParams
(
const
T* p) {
return
numberOfParams
(
getClassIndex
(p)) ; }
148
149
// gain dependance of data class
150
//-------------------------------
151
bool
isGainDependent
(
const
std::string& className);
152
153
template
<
class
T>
154
bool
isGainDependent
(
const
T* p) {
return
isGainDependent
(
getClassIndex
(p)) ; }
155
156
// keyword for detector store
157
//----------------------------
158
std::string
keyword
(
const
std::string& classname);
159
std::string
keyword
(
unsigned
i);
160
161
template
<
class
T >
162
std::string
keyword
(
const
T* p){
return
keyword
(
getClassName
(p)) ; }
163
164
}
165
166
#endif
isValid
bool isValid() const
Test to see if the link can be dereferenced.
LArCableAttenuationComplete.h
LArCableLengthComplete.h
LArCaliPulseParamsComplete.h
LArDetCellParamsComplete.h
LArEMEC_CphiComplete.h
LArEMEC_HValphaComplete.h
LArEMEC_HVbetaComplete.h
LArMphysOverMcalComplete.h
LArOFCBinComplete.h
LArPhysCaliTdiffComplete.h
LArRinjComplete.h
LArTdriftComplete.h
LArTshaperComplete.h
LArCableAttenuationComplete
This class implements the ILArCableAttenuation interface.
Definition
LArCableAttenuationComplete.h:27
LArCableAttenuationP
c-struct reproducing the structure of the persistent data
Definition
LArCableAttenuationP.h:20
LArCableLengthComplete
This class implements the ILArCableLength interface.
Definition
LArCableLengthComplete.h:27
LArCableLengthP
c-struct reproducing the structure of the persistent data
Definition
LArCableLengthP.h:20
LArCaliPulseParamsComplete
This class implements the ILArCaliPulseParams interface.
Definition
LArCaliPulseParamsComplete.h:29
LArCaliPulseParamsP
Definition
LArCaliPulseParamsP.h:12
LArDetCellParamsComplete
This class implements the ILArDetCellParams interface.
Definition
LArDetCellParamsComplete.h:26
LArDetCellParamsP
Definition
LArDetCellParamsP.h:11
LArEMEC_CphiComplete
This class implements the ILArEMEC_Cphi interface.
Definition
LArEMEC_CphiComplete.h:28
LArEMEC_CphiP
c-struct reproducing the structure of the persistent data
Definition
LArEMEC_CphiP.h:20
LArEMEC_HValphaComplete
This class implements the ILArEMEC_HValpha interface.
Definition
LArEMEC_HValphaComplete.h:28
LArEMEC_HValphaP
c-struct reproducing the structure of the persistent data
Definition
LArEMEC_HValphaP.h:20
LArEMEC_HVbetaComplete
This class implements the ILArEMEC_HVbeta interface.
Definition
LArEMEC_HVbetaComplete.h:28
LArEMEC_HVbetaP
c-struct reproducing the structure of the persistent data
Definition
LArEMEC_HVbetaP.h:20
LArMphysOverMcalComplete
This class implements the ILArMphysOverMcal interface.
Definition
LArMphysOverMcalComplete.h:29
LArMphysOverMcalP1
c-struct reproducing the structure of the persistent data
Definition
LArMphysOverMcalP1.h:19
LArOFCBinComplete
Definition
LArOFCBinComplete.h:13
LArOFCBinP
Definition
LArOFCBinP.h:8
LArPhysCaliTdiffP
Definition
LArPhysCaliTdiffP.h:11
LArRinjComplete
This class implements the ILArRinj interface.
Definition
LArRinjComplete.h:26
LArRinjP
c-struct reproducing the structure of the persistent data
Definition
LArRinjP.h:20
LArSingleFloatP
Definition
LArSingleFloatP.h:11
LArTdriftComplete
This class implements the ILArTdrift interface.
Definition
LArTdriftComplete.h:24
LArTdriftP
Definition
LArTdriftP.h:11
LArTshaperComplete
This class implements the ILArTshaper interface.
Definition
LArTshaperComplete.h:27
LArTshaperP
c-struct reproducing the structure of the persistent data
Definition
LArTshaperP.h:20
LArParamsProperties
This include file contains inline functions describing LAr Parameters properties used in LArReadParam...
Definition
LArParamsProperties.h:32
LArParamsProperties::keyword
std::string keyword(const std::string &classname)
Definition
LArParamsProperties.cxx:160
LArParamsProperties::numberOfParams
unsigned numberOfParams(unsigned index)
Definition
LArParamsProperties.cxx:74
LArParamsProperties::getClassIndex
unsigned getClassIndex(const LArCaliPulseParamsComplete *)
Definition
LArParamsProperties.cxx:31
LArParamsProperties::isGainDependent
bool isGainDependent(unsigned index)
Definition
LArParamsProperties.cxx:101
LArParamsProperties::ClassNumbering
ClassNumbering
Definition
LArParamsProperties.h:80
LArParamsProperties::RinjComplete
@ RinjComplete
Definition
LArParamsProperties.h:86
LArParamsProperties::MphysOverMcalComplete
@ MphysOverMcalComplete
Definition
LArParamsProperties.h:85
LArParamsProperties::PhysCaliTdiffComplete
@ PhysCaliTdiffComplete
Definition
LArParamsProperties.h:83
LArParamsProperties::OFCBinComplete
@ OFCBinComplete
Definition
LArParamsProperties.h:94
LArParamsProperties::CaliPulseParamsComplete
@ CaliPulseParamsComplete
Definition
LArParamsProperties.h:81
LArParamsProperties::END_OF_LIST
@ END_OF_LIST
Definition
LArParamsProperties.h:95
LArParamsProperties::TshaperComplete
@ TshaperComplete
Definition
LArParamsProperties.h:87
LArParamsProperties::TdriftComplete
@ TdriftComplete
Definition
LArParamsProperties.h:84
LArParamsProperties::EMEC_CphiComplete
@ EMEC_CphiComplete
Definition
LArParamsProperties.h:88
LArParamsProperties::EMEC_HVbetaComplete
@ EMEC_HVbetaComplete
Definition
LArParamsProperties.h:90
LArParamsProperties::EMEC_HValphaComplete
@ EMEC_HValphaComplete
Definition
LArParamsProperties.h:89
LArParamsProperties::CableAttenuationComplete
@ CableAttenuationComplete
Definition
LArParamsProperties.h:92
LArParamsProperties::DetCellParamsComplete
@ DetCellParamsComplete
Definition
LArParamsProperties.h:82
LArParamsProperties::CableLengthComplete
@ CableLengthComplete
Definition
LArParamsProperties.h:91
LArParamsProperties::getClassName
const std::string & getClassName(unsigned index)
Definition
LArParamsProperties.cxx:128
LArParamsProperties::ClassNames
const std::vector< std::string > & ClassNames()
Definition
LArParamsProperties.cxx:48
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0