ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloPprConditionsContainerRun2 Class Reference

Container of L1CaloPprConditions objects, inherit from the abstract base class AbstractL1CaloConditionContainer. More...

#include <L1CaloPprConditionsContainerRun2.h>

Inheritance diagram for L1CaloPprConditionsContainerRun2:
Collaboration diagram for L1CaloPprConditionsContainerRun2:

Public Types

enum  eCoolFolders { ePprChanDefaults , ePprChanCalib , ePprChanCalibCommon , ePprChanCalibStrategy }

Public Member Functions

 L1CaloPprConditionsContainerRun2 ()
 L1CaloPprConditionsContainerRun2 (const std::map< L1CaloPprConditionsContainerRun2::eCoolFolders, std::string > &folderKeysMap)
virtual ~L1CaloPprConditionsContainerRun2 ()
virtual DataObject * makePersistent () const
virtual void makeTransient (const std::map< std::string, const CondAttrListCollection * > &condAttrListCollectionMap)
const L1CaloPprConditionsRun2pprConditions (unsigned int channelId) const
const L1CaloPprConditionsRun2pprConditions (const L1CaloCoolChannelId &channelId) const
int bcidDecision1 () const
int satOverride1 () const
int bcidDecision2 () const
int satOverride2 () const
int bcidDecision3 () const
int satOverride3 () const
int peakFinderCond () const
int decisionSource () const
virtual std::vector< std::string > coolInputKeys () const
virtual std::string coolOutputKey () const
virtual void clear ()
void dump () const
virtual void makeTransient (const std::map< std::string, const AthenaAttributeList * > &condAttributeList)
std::string specificationName (int specId) const
std::string specificationType (int specId) const
void addSpecification (int specId, const std::string &specName, const std::string &specType)
coral::AttributeListSpecification * createAttributeListSpecification () const
virtual std::string conditionType () const

Private Types

enum  eAttrSpecification {
  eExtBcidThreshold , eSatBcidThreshLow , eSatBcidThreshHigh , eSatBcidLevel ,
  eBcidEnergyRangeLow , eBcidEnergyRangeHigh , eFirStartBit , eBcidDecision1 ,
  eSatOverride1 , eBcidDecision2 , eSatOverride2 , eBcidDecision3 ,
  eSatOverride3 , ePeakFinderCond , eDecisionSource , eFirCoeff1 ,
  eFirCoeff2 , eFirCoeff3 , eFirCoeff4 , eFirCoeff5 ,
  ePedValue , ePedMean , ePedFirSum , eLutCpStrategy ,
  eLutCpOffset , eLutCpNoiseCut , eLutCpSlope , eLutCpPar1 ,
  eLutCpPar2 , eLutCpPar3 , eLutCpPar4 , eLutCpScale ,
  eLutJepStrategy , eLutJepOffset , eLutJepNoiseCut , eLutJepSlope ,
  eLutJepPar1 , eLutJepPar2 , eLutJepPar3 , eLutJepPar4 ,
  eLutJepScale
}
typedef std::vector< L1CaloPprConditionsRun2 * > L1CaloPprConditionsVec
typedef std::map< int, std::string > AttrSpecificationMap

Private Member Functions

std::string coolFolderKey (L1CaloPprConditionsContainerRun2::eCoolFolders efolder) const

Private Attributes

L1CaloPprConditionsVec m_pprConditionsVec
std::map< L1CaloPprConditionsContainerRun2::eCoolFolders, std::string > m_coolFoldersKeysMap
int m_bcidDecision1 = 0
int m_satOverride1 = 0
int m_bcidDecision2 = 0
int m_satOverride2 = 0
int m_bcidDecision3 = 0
int m_satOverride3 = 0
int m_peakFinderCond = 0
int m_decisionSource = 0
AttrSpecificationMap m_attrSpecificationNameMap
AttrSpecificationMap m_attrSpecificationTypeMap
std::string m_strConditionType

Static Private Attributes

static const unsigned int s_vectorSize = 8192

Detailed Description

Container of L1CaloPprConditions objects, inherit from the abstract base class AbstractL1CaloConditionContainer.

Implement the IL1CaloPersistenceCapable interface.

Implementation for the Run-2 database.

Author
Veit Scharf

Definition at line 32 of file L1CaloPprConditionsContainerRun2.h.

Member Typedef Documentation

◆ AttrSpecificationMap

typedef std::map<int, std::string> AbstractL1CaloPersistentCondition::AttrSpecificationMap
privateinherited

Definition at line 50 of file AbstractL1CaloPersistentCondition.h.

◆ L1CaloPprConditionsVec

Member Enumeration Documentation

◆ eAttrSpecification

Enumerator
eExtBcidThreshold 
eSatBcidThreshLow 
eSatBcidThreshHigh 
eSatBcidLevel 
eBcidEnergyRangeLow 
eBcidEnergyRangeHigh 
eFirStartBit 
eBcidDecision1 
eSatOverride1 
eBcidDecision2 
eSatOverride2 
eBcidDecision3 
eSatOverride3 
ePeakFinderCond 
eDecisionSource 
eFirCoeff1 
eFirCoeff2 
eFirCoeff3 
eFirCoeff4 
eFirCoeff5 
ePedValue 
ePedMean 
ePedFirSum 
eLutCpStrategy 
eLutCpOffset 
eLutCpNoiseCut 
eLutCpSlope 
eLutCpPar1 
eLutCpPar2 
eLutCpPar3 
eLutCpPar4 
eLutCpScale 
eLutJepStrategy 
eLutJepOffset 
eLutJepNoiseCut 
eLutJepSlope 
eLutJepPar1 
eLutJepPar2 
eLutJepPar3 
eLutJepPar4 
eLutJepScale 

Definition at line 35 of file L1CaloPprConditionsContainerRun2.h.

◆ eCoolFolders

Constructor & Destructor Documentation

◆ L1CaloPprConditionsContainerRun2() [1/2]

L1CaloPprConditionsContainerRun2::L1CaloPprConditionsContainerRun2 ( )

Definition at line 17 of file L1CaloPprConditionsContainerRun2.cxx.

18 : AbstractL1CaloPersistentCondition("CondAttrListCollection"),
21 "/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib"},
23 "/TRIGGER/L1Calo/V2/Configuration/PprChanDefaults"}}) {
24 this->addSpecification(eBcidDecision1, std::string("CR12_BcidDecision1"),
25 std::string("Int32"));
26 this->addSpecification(eSatOverride1, std::string("CR12_SatOverride1"),
27 std::string("Int32"));
28 this->addSpecification(eBcidDecision2, std::string("CR13_BcidDecision2"),
29 std::string("Int32"));
30 this->addSpecification(eSatOverride2, std::string("CR13_SatOverride2"),
31 std::string("Int32"));
32 this->addSpecification(eBcidDecision3, std::string("CR14_BcidDecision3"),
33 std::string("Int32"));
34 this->addSpecification(eSatOverride3, std::string("CR14_SatOverride3"),
35 std::string("Int32"));
36 this->addSpecification(ePeakFinderCond, std::string("CR15_PeakFinderCond"),
37 std::string("Int32"));
38 this->addSpecification(eDecisionSource, std::string("CR15_DecisionSource"),
39 std::string("Int32"));
40
41 // ------------------------------------------------------------------------------------------------------------------
42 // Common
43 // ------------------------------------------------------------------------------------------------------------------
44 // Define DB rows names and types in order to construct the
45 // AttributeListSpecification object
46 this->addSpecification(eExtBcidThreshold, std::string("ExtBcidThreshold"),
47 std::string("UInt16"));
48 this->addSpecification(eSatBcidThreshLow, std::string("SatBcidThreshLow"),
49 std::string("UInt16"));
50 this->addSpecification(eSatBcidThreshHigh, std::string("SatBcidThreshHigh"),
51 std::string("UInt16"));
52 this->addSpecification(eSatBcidLevel, std::string("SatBcidLevel"),
53 std::string("UInt16"));
54 this->addSpecification(eBcidEnergyRangeLow, std::string("BcidEnergyRangeLow"),
55 std::string("UInt16"));
57 std::string("BcidEnergyRangeHigh"),
58 std::string("UInt16"));
59
60 this->addSpecification(ePedValue, std::string("PedValue"),
61 std::string("UInt32"));
62 this->addSpecification(ePedMean, std::string("PedMean"),
63 std::string("Double"));
64
65 this->addSpecification(eLutCpStrategy, std::string("LutCpStrategy"),
66 std::string("UInt16"));
67
68 this->addSpecification(eLutCpScale, std::string("LutCpScale"),
69 std::string("UInt16"));
70 this->addSpecification(eLutCpPar1, std::string("LutCpPar1"),
71 std::string("UInt16"));
72 this->addSpecification(eLutCpPar2, std::string("LutCpPar2"),
73 std::string("UInt16"));
74 this->addSpecification(eLutCpPar3, std::string("LutCpPar3"),
75 std::string("UInt16"));
76 this->addSpecification(eLutCpPar4, std::string("LutCpPar4"),
77 std::string("UInt16"));
78
79 this->addSpecification(eLutJepStrategy, std::string("LutJepStrategy"),
80 std::string("UInt16"));
81
82 this->addSpecification(eLutJepScale, std::string("LutJepScale"),
83 std::string("UInt16"));
84 this->addSpecification(eLutJepPar1, std::string("LutJepPar1"),
85 std::string("UInt16"));
86 this->addSpecification(eLutJepPar2, std::string("LutJepPar2"),
87 std::string("UInt16"));
88 this->addSpecification(eLutJepPar3, std::string("LutJepPar3"),
89 std::string("UInt16"));
90 this->addSpecification(eLutJepPar4, std::string("LutJepPar4"),
91 std::string("UInt16"));
92
93 // Missing attributes in model with strategy
94 this->addSpecification(ePedFirSum, std::string("PedFirSum"),
95 std::string("UInt32"));
96 this->addSpecification(eLutCpOffset, std::string("LutCpOffset"),
97 std::string("UInt16"));
98 this->addSpecification(eLutJepOffset, std::string("LutJepOffset"),
99 std::string("UInt16"));
100 // ------------------------------------------------------------------------------------------------------------------
101 // Strategy
102 // ------------------------------------------------------------------------------------------------------------------
103 this->addSpecification(eFirStartBit, std::string("FirStartBit"),
104 std::string("UInt16"));
105 this->addSpecification(eFirCoeff1, std::string("FirCoeff1"),
106 std::string("short"));
107 this->addSpecification(eFirCoeff2, std::string("FirCoeff2"),
108 std::string("short"));
109 this->addSpecification(eFirCoeff3, std::string("FirCoeff3"),
110 std::string("short"));
111 this->addSpecification(eFirCoeff4, std::string("FirCoeff4"),
112 std::string("short"));
113 this->addSpecification(eFirCoeff5, std::string("FirCoeff5"),
114 std::string("short"));
115 this->addSpecification(eLutCpNoiseCut, std::string("LutCpNoiseCut"),
116 std::string("UInt16"));
117 this->addSpecification(eLutCpSlope, std::string("LutCpSlope"),
118 std::string("UInt16"));
119 this->addSpecification(eLutJepNoiseCut, std::string("LutJepNoiseCut"),
120 std::string("UInt16"));
121 this->addSpecification(eLutJepSlope, std::string("LutJepSlope"),
122 std::string("UInt16"));
123 // ------------------------------------------------------------------------------------------------------------------
124
126 this->clear();
127}
AbstractL1CaloPersistentCondition(const std::string &condType)
void addSpecification(int specId, const std::string &specName, const std::string &specType)
std::map< L1CaloPprConditionsContainerRun2::eCoolFolders, std::string > m_coolFoldersKeysMap

◆ L1CaloPprConditionsContainerRun2() [2/2]

L1CaloPprConditionsContainerRun2::L1CaloPprConditionsContainerRun2 ( const std::map< L1CaloPprConditionsContainerRun2::eCoolFolders, std::string > & folderKeysMap)

Definition at line 129 of file L1CaloPprConditionsContainerRun2.cxx.

132 : L1CaloPprConditionsContainerRun2() // delegating constructor
133{
134 m_coolFoldersKeysMap = folderKeysMap;
135}

◆ ~L1CaloPprConditionsContainerRun2()

L1CaloPprConditionsContainerRun2::~L1CaloPprConditionsContainerRun2 ( )
virtual

Definition at line 137 of file L1CaloPprConditionsContainerRun2.cxx.

137 {
138 this->clear();
139}

Member Function Documentation

◆ addSpecification()

void AbstractL1CaloPersistentCondition::addSpecification ( int specId,
const std::string & specName,
const std::string & specType )
inherited

Definition at line 26 of file AbstractL1CaloPersistentCondition.cxx.

26 {
27 m_attrSpecificationNameMap[specId] = specName;
28 m_attrSpecificationTypeMap[specId] = specType;
29}

◆ bcidDecision1()

int L1CaloPprConditionsContainerRun2::bcidDecision1 ( ) const
inline

◆ bcidDecision2()

int L1CaloPprConditionsContainerRun2::bcidDecision2 ( ) const
inline

◆ bcidDecision3()

int L1CaloPprConditionsContainerRun2::bcidDecision3 ( ) const
inline

◆ clear()

void L1CaloPprConditionsContainerRun2::clear ( )
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 523 of file L1CaloPprConditionsContainerRun2.cxx.

523 {
524 for (L1CaloPprConditionsRun2* p : m_pprConditionsVec) {
525 if (p) delete p;
526 }
527 m_pprConditionsVec.assign(s_vectorSize, nullptr);
528}

◆ conditionType()

virtual std::string AbstractL1CaloPersistentCondition::conditionType ( ) const
inlinevirtualinherited

◆ coolFolderKey()

std::string L1CaloPprConditionsContainerRun2::coolFolderKey ( L1CaloPprConditionsContainerRun2::eCoolFolders efolder) const
private

Definition at line 141 of file L1CaloPprConditionsContainerRun2.cxx.

142 {
143 auto it = m_coolFoldersKeysMap.find(efolder);
144 if (it != m_coolFoldersKeysMap.end()) {
145 return it->second;
146 } else {
147 return std::string("");
148 }
149}

◆ coolInputKeys()

std::vector< std::string > L1CaloPprConditionsContainerRun2::coolInputKeys ( ) const
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 151 of file L1CaloPprConditionsContainerRun2.cxx.

152 {
153 std::vector<std::string> result{
155 std::string calibKey =
157
158 if (!calibKey.empty()) {
159 result.push_back(std::move(calibKey));
160 } else {
161 result.push_back(this->coolFolderKey(
163 result.push_back(this->coolFolderKey(
165 }
166
167 return result;
168}
std::string coolFolderKey(L1CaloPprConditionsContainerRun2::eCoolFolders efolder) const

◆ coolOutputKey()

std::string L1CaloPprConditionsContainerRun2::coolOutputKey ( ) const
virtual

◆ createAttributeListSpecification()

coral::AttributeListSpecification * AbstractL1CaloPersistentCondition::createAttributeListSpecification ( ) const
inherited

Definition at line 31 of file AbstractL1CaloPersistentCondition.cxx.

31 {
32
33 coral::AttributeListSpecification* attrSpecification = new coral::AttributeListSpecification();
34
35 AttrSpecificationMap::const_iterator it_name = m_attrSpecificationNameMap.begin();
36 AttrSpecificationMap::const_iterator it_type = m_attrSpecificationTypeMap.begin();
37
38 for(;it_name!=m_attrSpecificationNameMap.end();++it_name,++it_type) {
39 attrSpecification->extend(it_name->second, it_type->second);
40 }
41 return attrSpecification;
42}

◆ decisionSource()

int L1CaloPprConditionsContainerRun2::decisionSource ( ) const
inline

◆ dump()

void L1CaloPprConditionsContainerRun2::dump ( ) const

Definition at line 508 of file L1CaloPprConditionsContainerRun2.cxx.

508 {
509 std::cout << "bcidDecision1: " << m_bcidDecision1 << ", "
510 << "satOverride1: " << m_satOverride1 << ", "
511 << "bcidDecision2: " << m_bcidDecision2 << ", "
512 << "satOverride2: " << m_satOverride2 << ", "
513 << "bcidDecision3: " << m_bcidDecision3 << ", "
514 << "satOverride3: " << m_satOverride3 << ", "
515 << "peakFinderCond: " << m_peakFinderCond << ", "
516 << "decisionSource: " << m_decisionSource << std::endl;
517 std::size_t index(0);
518 for (auto* C : m_pprConditionsVec) {
519 if (C) std::cout << "index " << index++ << " * item: " << *C << std::endl;
520 }
521}
struct color C
str index
Definition DeMoScan.py:362

◆ makePersistent()

DataObject * L1CaloPprConditionsContainerRun2::makePersistent ( ) const
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 174 of file L1CaloPprConditionsContainerRun2.cxx.

174 {
175 // this container is not supposed to be saved to COOL
176 return 0;
177}

◆ makeTransient() [1/2]

void AbstractL1CaloPersistentCondition::makeTransient ( const std::map< std::string, const AthenaAttributeList * > & condAttributeList)
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 30 of file AbstractL1CaloPersistentCondition.cxx.

21 {
22 std::cout << "ERROR - The makeTransient(const map<std::string, const AthenaAttributeList*>) method you are calling is not implemented by the current class !" << std::endl;
23 return;
24}

◆ makeTransient() [2/2]

void L1CaloPprConditionsContainerRun2::makeTransient ( const std::map< std::string, const CondAttrListCollection * > & condAttrListCollectionMap)
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 179 of file L1CaloPprConditionsContainerRun2.cxx.

179 {
180 this->clear();
181 // --------------------------------------------------------------------------
182 // Folder names
183 std::string chanCalibFolderKey;
184 std::string chanCalibCommonFolderKey;
185 std::string chanCalibStrategyFolderKey;
186 std::string chanDefaultsFolderKey;
187
188 // cppcheck-suppress duplicateAssignExpression
189 auto it_pprChanCalibAttrListCollection = condAttrListCollectionMap.end();
190
191 auto it_pprChanCalibStrategyAttrListCollection = condAttrListCollectionMap.end();
192
193 // --------------------------------------------------------------------------
194
195 if (condAttrListCollectionMap.empty()) return;
196
197 // Reading cool paths
198 for (const auto& [name, coll] : condAttrListCollectionMap) {
199 if (name.find("PprChanDefaults")!=std::string::npos){
200 chanDefaultsFolderKey=name;}
201 if(name.find("PprChanCalib")!=std::string::npos){
202 chanCalibFolderKey=name;
203 }
204 if(name.find("PprChanCommon")!=std::string::npos){
205 chanCalibCommonFolderKey=name;
206 }
207 if(name.find("Mu")!=std::string::npos){
208 chanCalibStrategyFolderKey=name;
209 }
210 }
211
212
213 // Check that folders exist
214 bool isUseStrategy = false;
215 if (!chanCalibFolderKey.empty()) {
216 it_pprChanCalibAttrListCollection =
217 condAttrListCollectionMap.find(chanCalibFolderKey);
218 }
219 else {
220 isUseStrategy = true;
221 it_pprChanCalibAttrListCollection = condAttrListCollectionMap.find(chanCalibCommonFolderKey);
222 it_pprChanCalibStrategyAttrListCollection = condAttrListCollectionMap.find(chanCalibStrategyFolderKey);
223 }
224
225
226
227
228 // --------------------------------------------------------------------------
229 if (isUseStrategy) {
230 // Check that strategy folder exists
231 if (it_pprChanCalibStrategyAttrListCollection ==
232 condAttrListCollectionMap.end()) {
233 std::cout << "L1CaloPprConditionsContainerRun2 : Could not find "
234 "requested CondAttrListCollection"
235 << chanCalibStrategyFolderKey << std::endl;
236 return;
237 }
238
239 // Check that common folder exists
240 if (it_pprChanCalibAttrListCollection == condAttrListCollectionMap.end()) {
241 std::cout << "L1CaloPprConditionsContainerRun2 : Could not find "
242 "requested CondAttrListCollection "
243 << chanCalibCommonFolderKey << std::endl;
244 return;
245 }
246 } else{
247 if (it_pprChanCalibAttrListCollection == condAttrListCollectionMap.end()) {
248 std::cout << "L1CaloPprConditionsContainerRun2 : Could not find "
249 "requested CondAttrListCollection"
250 << chanCalibCommonFolderKey << std::endl;
251 return;
252 }
253 }
254 // --------------------------------------------------------------------------
255 const CondAttrListCollection* chanCalibAttrListCollection =
256 it_pprChanCalibAttrListCollection->second;
257
258
259 auto it_pprChanDefaultsAttrListCollection =
260 condAttrListCollectionMap.find(chanDefaultsFolderKey);
261 if (it_pprChanDefaultsAttrListCollection == condAttrListCollectionMap.end()) {
262 std::cout << "L1CaloPprConditionsContainerRun2 : Could not find requested "
263 "CondAttrListCollection" << chanDefaultsFolderKey
264 << std::endl;
265 return;
266 }
267 // --------------------------------------------------------------------------
268 const CondAttrListCollection* chanDefaultsAttrListCollection =
269 it_pprChanDefaultsAttrListCollection->second;
270
271 // There should be only one channel (channel#1 in data, #0 in MC) in the Default folder
272 const coral::AttributeList& chanDefaultAttrList = std::cbegin(*chanDefaultsAttrListCollection)->second;
273
275 chanDefaultAttrList[this->specificationName(eBcidDecision1)].data<int>();
277 chanDefaultAttrList[this->specificationName(eSatOverride1)].data<int>();
279 chanDefaultAttrList[this->specificationName(eBcidDecision2)].data<int>();
281 chanDefaultAttrList[this->specificationName(eSatOverride2)].data<int>();
283 chanDefaultAttrList[this->specificationName(eBcidDecision3)].data<int>();
285 chanDefaultAttrList[this->specificationName(eSatOverride3)].data<int>();
287 chanDefaultAttrList[this->specificationName(ePeakFinderCond)].data<int>();
289 chanDefaultAttrList[this->specificationName(eDecisionSource)].data<int>();
290 // ------------------------------------------------------------------------
291 // loop over CondAttrListCollection
292 auto it_AttrListColl = chanCalibAttrListCollection->begin();
293 auto it_AttrListCollE = chanCalibAttrListCollection->end();
294 // --------------------------------------------------------------------------
295 for (; it_AttrListColl != it_AttrListCollE; ++it_AttrListColl) {
296 // ------------------------------------------------------------------------
297 L1CaloCoolChannelId coolId(it_AttrListColl->first);
298 unsigned int index = (coolId.crate() << 10) + (coolId.module() << 6) +
299 (coolId.subModule() << 2) + coolId.channel();
300 // ------------------------------------------------------------------------
301 if (index >= s_vectorSize) {
302 continue;
303 }
304 // ------------------------------------------------------------------------
305 const coral::AttributeList& chanCalibAttrList(it_AttrListColl->second);
306 // ------------------------------------------------------------------------
307 unsigned short extBcidThreshold =
308 chanCalibAttrList[this->specificationName(eExtBcidThreshold)]
309 .data<unsigned short>();
310 unsigned short satBcidThreshLow =
311 chanCalibAttrList[this->specificationName(eSatBcidThreshLow)]
312 .data<unsigned short>();
313 unsigned short satBcidThreshHigh =
314 chanCalibAttrList[this->specificationName(eSatBcidThreshHigh)]
315 .data<unsigned short>();
316 unsigned short satBcidLevel =
317 chanCalibAttrList[this->specificationName(eSatBcidLevel)]
318 .data<unsigned short>();
319
320 unsigned short bcidEnergyRangeLow =
321 chanCalibAttrList[this->specificationName(eBcidEnergyRangeLow)]
322 .data<unsigned short>();
323 unsigned short bcidEnergyRangeHigh =
324 chanCalibAttrList[this->specificationName(eBcidEnergyRangeHigh)]
325 .data<unsigned short>();
326 unsigned short lutCpStrategy =
327 chanCalibAttrList[this->specificationName(eLutCpStrategy)]
328 .data<unsigned short>();
329
330 short lutCpPar1 =
331 chanCalibAttrList[this->specificationName(eLutCpPar1)].data<short>();
332 short lutCpPar2 =
333 chanCalibAttrList[this->specificationName(eLutCpPar2)].data<short>();
334 short lutCpPar3 =
335 chanCalibAttrList[this->specificationName(eLutCpPar3)].data<short>();
336 short lutCpPar4 =
337 chanCalibAttrList[this->specificationName(eLutCpPar4)].data<short>();
338 unsigned short lutJepStrategy =
339 chanCalibAttrList[this->specificationName(eLutJepStrategy)]
340 .data<unsigned short>();
341
342 unsigned short lutCpScale =
343 chanCalibAttrList[this->specificationName(eLutCpScale)]
344 .data<unsigned short>();
345 unsigned short lutJepScale =
346 chanCalibAttrList[this->specificationName(eLutJepScale)]
347 .data<unsigned short>();
348 short lutJepPar1 =
349 chanCalibAttrList[this->specificationName(eLutJepPar1)].data<short>();
350 short lutJepPar2 =
351 chanCalibAttrList[this->specificationName(eLutJepPar2)].data<short>();
352 short lutJepPar3 =
353 chanCalibAttrList[this->specificationName(eLutJepPar3)].data<short>();
354 short lutJepPar4 =
355 chanCalibAttrList[this->specificationName(eLutJepPar4)].data<short>();
356 unsigned int pedValue =
357 chanCalibAttrList[this->specificationName(ePedValue)]
358 .data<unsigned int>();
359 float pedMean =
360 (float)
361 chanCalibAttrList[this->specificationName(ePedMean)].data<double>();
362
363 unsigned short lutJepOffset =
364 isUseStrategy
365 ? 0
366 : chanCalibAttrList[this->specificationName(eLutJepOffset)]
367 .data<unsigned short>();
368 unsigned short lutCpOffset =
369 isUseStrategy ? 0
370 : chanCalibAttrList[this->specificationName(eLutCpOffset)]
371 .data<unsigned short>();
372 unsigned int pedFirSum =
373 isUseStrategy ? 0
374 : chanCalibAttrList[this->specificationName(ePedFirSum)]
375 .data<unsigned int>();
376
377 unsigned short firStartBit =
378 isUseStrategy ? 0
379 : chanCalibAttrList[this->specificationName(eFirStartBit)]
380 .data<unsigned short>();
381 short int firCoeff1 =
382 isUseStrategy ? 0
383 : chanCalibAttrList[this->specificationName(eFirCoeff1)]
384 .data<short>();
385 short int firCoeff2 =
386 isUseStrategy ? 0
387 : chanCalibAttrList[this->specificationName(eFirCoeff2)]
388 .data<short>();
389 short int firCoeff3 =
390 isUseStrategy ? 0
391 : chanCalibAttrList[this->specificationName(eFirCoeff3)]
392 .data<short>();
393 short int firCoeff4 =
394 isUseStrategy ? 0
395 : chanCalibAttrList[this->specificationName(eFirCoeff4)]
396 .data<short>();
397 short int firCoeff5 =
398 isUseStrategy ? 0
399 : chanCalibAttrList[this->specificationName(eFirCoeff5)]
400 .data<short>();
401
402 unsigned short lutCpSlope =
403 isUseStrategy ? 0
404 : chanCalibAttrList[this->specificationName(eLutCpSlope)]
405 .data<unsigned short>();
406 unsigned short lutCpNoiseCut =
407 isUseStrategy
408 ? 0
409 : chanCalibAttrList[this->specificationName(eLutCpNoiseCut)]
410 .data<unsigned short>();
411 unsigned short lutJepSlope =
412 isUseStrategy ? 0
413 : chanCalibAttrList[this->specificationName(eLutJepSlope)]
414 .data<unsigned short>();
415 unsigned short lutJepNoiseCut =
416 isUseStrategy
417 ? 0
418 : chanCalibAttrList[this->specificationName(eLutJepNoiseCut)]
419 .data<unsigned short>();
420 // ------------------------------------------------------------------------
421 m_pprConditionsVec[index] = new L1CaloPprConditionsRun2(
422 extBcidThreshold, satBcidThreshLow, satBcidThreshHigh, satBcidLevel,
423 bcidEnergyRangeLow, bcidEnergyRangeHigh, firStartBit, firCoeff1,
424 firCoeff2, firCoeff3, firCoeff4, firCoeff5, lutCpStrategy, lutCpOffset,
425 lutCpSlope, lutCpNoiseCut, lutCpPar1, lutCpPar2, lutCpPar3, lutCpPar4,
426 lutCpScale, lutJepStrategy, lutJepOffset, lutJepSlope, lutJepNoiseCut,
427 lutJepPar1, lutJepPar2, lutJepPar3, lutJepPar4, lutJepScale, pedValue,
428 pedMean, pedFirSum);
429 }
430 // --------------------------------------------------------------------------
431 if (isUseStrategy){
432 // ------------------------------------------------------------------------
433 const CondAttrListCollection* chanCalibAttrListCollection =
434 it_pprChanCalibStrategyAttrListCollection->second;
435 auto it_AttrListColl = chanCalibAttrListCollection->begin();
436 auto it_AttrListCollE = chanCalibAttrListCollection->end();
437 // ------------------------------------------------------------------------
438 for (; it_AttrListColl != it_AttrListCollE; ++it_AttrListColl) {
439 L1CaloCoolChannelId coolId(it_AttrListColl->first);
440 unsigned int index = (coolId.crate() << 10) + (coolId.module() << 6) +
441 (coolId.subModule() << 2) + coolId.channel();
442
443 if (index >= s_vectorSize) {
444 continue;
445 }
446
447 const coral::AttributeList& chanCalibAttrList(it_AttrListColl->second);
448
449 if (m_pprConditionsVec[index] == nullptr){
450 std::cout << "L1CaloPprConditionsContainerRun2 : Could not find channel "
451 << " with index " << index << std::endl;
452 return;
453 }
454
455 unsigned short firStartBit =
456 chanCalibAttrList[this->specificationName(eFirStartBit)]
457 .data<unsigned short>();
458 short int firCoeff1 =
459 chanCalibAttrList[this->specificationName(eFirCoeff1)].data<short>();
460 short int firCoeff2 =
461 chanCalibAttrList[this->specificationName(eFirCoeff2)].data<short>();
462 short int firCoeff3 =
463 chanCalibAttrList[this->specificationName(eFirCoeff3)].data<short>();
464 short int firCoeff4 =
465 chanCalibAttrList[this->specificationName(eFirCoeff4)].data<short>();
466 short int firCoeff5 =
467 chanCalibAttrList[this->specificationName(eFirCoeff5)].data<short>();
468
469 unsigned short lutCpSlope =
470 chanCalibAttrList[this->specificationName(eLutCpSlope)]
471 .data<unsigned short>();
472 unsigned short lutCpNoiseCut =
473 chanCalibAttrList[this->specificationName(eLutCpNoiseCut)]
474 .data<unsigned short>();
475 unsigned short lutJepSlope =
476 chanCalibAttrList[this->specificationName(eLutJepSlope)]
477 .data<unsigned short>();
478 unsigned short lutJepNoiseCut =
479 chanCalibAttrList[this->specificationName(eLutJepNoiseCut)]
480 .data<unsigned short>();
481 m_pprConditionsVec[index]->initializeByStrategy(
482 firStartBit, firCoeff1, firCoeff2, firCoeff3, firCoeff4, firCoeff5,
483 lutCpSlope, lutCpNoiseCut, lutJepSlope, lutJepNoiseCut);
484
485 } // end for
486 // ------------------------------------------------------------------------
487 } // end isUseStrategy
488 // --------------------------------------------------------------------------
489
490}
const_iterator end() const
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.

◆ peakFinderCond()

int L1CaloPprConditionsContainerRun2::peakFinderCond ( ) const
inline

Definition at line 65 of file L1CaloPprConditionsContainerRun2.h.

65{ return m_peakFinderCond; }

◆ pprConditions() [1/2]

const L1CaloPprConditionsRun2 * L1CaloPprConditionsContainerRun2::pprConditions ( const L1CaloCoolChannelId & channelId) const

Definition at line 498 of file L1CaloPprConditionsContainerRun2.cxx.

499 {
500 unsigned int index = (channelId.crate() << 10) + (channelId.module() << 6) +
501 (channelId.subModule() << 2) + channelId.channel();
502 if (index < s_vectorSize)
504 else
505 return 0;
506}

◆ pprConditions() [2/2]

const L1CaloPprConditionsRun2 * L1CaloPprConditionsContainerRun2::pprConditions ( unsigned int channelId) const

Definition at line 492 of file L1CaloPprConditionsContainerRun2.cxx.

493 {
494 L1CaloCoolChannelId coolId(channelId);
495 return pprConditions(coolId);
496}
const L1CaloPprConditionsRun2 * pprConditions(unsigned int channelId) const

◆ satOverride1()

int L1CaloPprConditionsContainerRun2::satOverride1 ( ) const
inline

Definition at line 60 of file L1CaloPprConditionsContainerRun2.h.

60{ return m_satOverride1; }

◆ satOverride2()

int L1CaloPprConditionsContainerRun2::satOverride2 ( ) const
inline

Definition at line 62 of file L1CaloPprConditionsContainerRun2.h.

62{ return m_satOverride2; }

◆ satOverride3()

int L1CaloPprConditionsContainerRun2::satOverride3 ( ) const
inline

Definition at line 64 of file L1CaloPprConditionsContainerRun2.h.

64{ return m_satOverride3; }

◆ specificationName()

std::string AbstractL1CaloPersistentCondition::specificationName ( int specId) const
inherited

Definition at line 44 of file AbstractL1CaloPersistentCondition.cxx.

44 {
45 return m_attrSpecificationNameMap.find(specId)->second;
46}

◆ specificationType()

std::string AbstractL1CaloPersistentCondition::specificationType ( int specId) const
inherited

Definition at line 48 of file AbstractL1CaloPersistentCondition.cxx.

48 {
49 return m_attrSpecificationTypeMap.find(specId)->second;
50}

Member Data Documentation

◆ m_attrSpecificationNameMap

AttrSpecificationMap AbstractL1CaloPersistentCondition::m_attrSpecificationNameMap
privateinherited

Definition at line 51 of file AbstractL1CaloPersistentCondition.h.

◆ m_attrSpecificationTypeMap

AttrSpecificationMap AbstractL1CaloPersistentCondition::m_attrSpecificationTypeMap
privateinherited

Definition at line 52 of file AbstractL1CaloPersistentCondition.h.

◆ m_bcidDecision1

int L1CaloPprConditionsContainerRun2::m_bcidDecision1 = 0
private

Definition at line 83 of file L1CaloPprConditionsContainerRun2.h.

◆ m_bcidDecision2

int L1CaloPprConditionsContainerRun2::m_bcidDecision2 = 0
private

Definition at line 85 of file L1CaloPprConditionsContainerRun2.h.

◆ m_bcidDecision3

int L1CaloPprConditionsContainerRun2::m_bcidDecision3 = 0
private

Definition at line 87 of file L1CaloPprConditionsContainerRun2.h.

◆ m_coolFoldersKeysMap

std::map<L1CaloPprConditionsContainerRun2::eCoolFolders, std::string> L1CaloPprConditionsContainerRun2::m_coolFoldersKeysMap
private

Definition at line 81 of file L1CaloPprConditionsContainerRun2.h.

◆ m_decisionSource

int L1CaloPprConditionsContainerRun2::m_decisionSource = 0
private

Definition at line 90 of file L1CaloPprConditionsContainerRun2.h.

◆ m_peakFinderCond

int L1CaloPprConditionsContainerRun2::m_peakFinderCond = 0
private

Definition at line 89 of file L1CaloPprConditionsContainerRun2.h.

◆ m_pprConditionsVec

L1CaloPprConditionsVec L1CaloPprConditionsContainerRun2::m_pprConditionsVec
private

Definition at line 79 of file L1CaloPprConditionsContainerRun2.h.

◆ m_satOverride1

int L1CaloPprConditionsContainerRun2::m_satOverride1 = 0
private

Definition at line 84 of file L1CaloPprConditionsContainerRun2.h.

◆ m_satOverride2

int L1CaloPprConditionsContainerRun2::m_satOverride2 = 0
private

Definition at line 86 of file L1CaloPprConditionsContainerRun2.h.

◆ m_satOverride3

int L1CaloPprConditionsContainerRun2::m_satOverride3 = 0
private

Definition at line 88 of file L1CaloPprConditionsContainerRun2.h.

◆ m_strConditionType

std::string AbstractL1CaloPersistentCondition::m_strConditionType
privateinherited

Definition at line 53 of file AbstractL1CaloPersistentCondition.h.

◆ s_vectorSize

const unsigned int L1CaloPprConditionsContainerRun2::s_vectorSize = 8192
staticprivate

Definition at line 92 of file L1CaloPprConditionsContainerRun2.h.


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