ATLAS Offline Software
Loading...
Searching...
No Matches
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
31
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 //-------------------------------------------------------
97
98 // conversion: data class pointer --> class index
99 //------------------------------------------------
103 unsigned getClassIndex(const LArTdriftComplete*);
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*);
112 //unsigned getClassIndex(const LArCaliPulseParamsVsCalib*);
113 unsigned getClassIndex(const LArOFCBinComplete*);
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
This class implements the ILArCableAttenuation interface.
c-struct reproducing the structure of the persistent data
This class implements the ILArCableLength interface.
c-struct reproducing the structure of the persistent data
This class implements the ILArCaliPulseParams interface.
This class implements the ILArDetCellParams interface.
This class implements the ILArEMEC_Cphi interface.
c-struct reproducing the structure of the persistent data
This class implements the ILArEMEC_HValpha interface.
c-struct reproducing the structure of the persistent data
This class implements the ILArEMEC_HVbeta interface.
c-struct reproducing the structure of the persistent data
This class implements the ILArMphysOverMcal interface.
c-struct reproducing the structure of the persistent data
This class implements the ILArPhysCaliTdiff interface ` *.
This class implements the ILArRinj interface.
c-struct reproducing the structure of the persistent data
Definition LArRinjP.h:20
This class implements the ILArTdrift interface.
This class implements the ILArTshaper interface.
c-struct reproducing the structure of the persistent data
Definition LArTshaperP.h:20
This include file contains inline functions describing LAr Parameters properties used in LArReadParam...
std::string keyword(const std::string &classname)
unsigned numberOfParams(unsigned index)
unsigned getClassIndex(const LArCaliPulseParamsComplete *)
bool isGainDependent(unsigned index)
bool isValid(const LArCaliPulseParamsP &p)
const std::string & getClassName(unsigned index)
const std::vector< std::string > & ClassNames()
Definition index.py:1