ATLAS Offline Software
Loading...
Searching...
No Matches
LArCalibPatchingAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5//Dear emacs, this is -*-c++-*-
6
13
14
15#ifndef LARCALIBPATCHINGALG_H
16#define LARCALIBPATCHINGALG_H
17
18#include <vector>
19#include <string>
20
32
33
34
50
51
52template<class CONDITIONSCONTAINER>
54
55public:
59 LArCalibPatchingAlg (const std::string& name, ISvcLocator* pSvcLocator);
60
65
71 StatusCode initialize();
72
76 StatusCode execute() {return StatusCode::SUCCESS;}
77
83 StatusCode stop();
84 StatusCode finalize(){return StatusCode::SUCCESS;}
85
86private:
87
88 typedef typename CONDITIONSCONTAINER::ConstConditionsMapIterator CONTIT;
89 typedef typename CONDITIONSCONTAINER::LArCondObj LArCondObj;
90
96 bool patch(const HWIdentifier chid, const int gain, const LArBadChannelCont* bcCont, const LArOnOffIdMapping* cabling, const LArCalibLineMapping *clCont);
97
98
105 bool getAverage(const HWIdentifier chid, const int gain, LArRampP1& patch, const LArBadChannelCont* bcCont, const LArOnOffIdMapping* cabling, bool isphi=true);
106
113 bool getAverage(const HWIdentifier chid, const int gain, LArOFCP1& patch, const LArBadChannelCont* bcCont, const LArOnOffIdMapping* cabling, bool isphi=true);
114
121 bool getAverage(const HWIdentifier chid, const int gain, LArAutoCorrP1& patch, const LArBadChannelCont* bcCont, const LArOnOffIdMapping* cabling, bool isphi=false);
122
123 bool setZero(const HWIdentifier chid, const int gain, LArRampP1& patch);
124 bool setZero(const HWIdentifier chid, const int gain, LArOFCP1& patch);
125 bool setZero(const HWIdentifier chid, const int gain, LArCaliWaveVec& patch);
126 bool setZero(const HWIdentifier chid, const int gain, LArAutoCorrP1& patch);
127
128
129
130
131 //The following #ifdef-logic is to make this package compile against 13.2.0. as well as 14.X.0
132 //since the payload object of LArMphysOverMcal has changed from LArMphysOverMcalP1 to LArSingleFloatP
133
134
135#ifdef LARRAWCONDITIONS_LARMPHYSOVERMCALP
142
143 //For backward compatiblity only!!! Will be removed at some point
144 bool getAverage(const HWIdentifier chid, const int gain, LArMphysOverMcalP1& patch, const LArBadChannelCont* bcCont, bool isphi=true);
145#endif
146
147
148#ifdef LARRAWCONDITIONS_LARSINGLEFLOATP
155 bool getAverage(const HWIdentifier chid, const int gain, LArSingleFloatP& patch, const LArBadChannelCont* bcCont, const LArOnOffIdMapping* cabling, bool isphi=true);
157#endif
158
159
160
161
162 bool getAverage(const HWIdentifier,const int, LArCaliWaveVec&, const LArBadChannelCont* bcCont, const LArOnOffIdMapping* cabling, bool isphi=true) ;
163
171 std::vector<HWIdentifier>& getPhiRing(const HWIdentifier chid, const LArBadChannelCont* bcCont, const LArOnOffIdMapping* cabling, unsigned distance=1);
172
173 /* Get list of channels in the same FEB. Used for FEBAverage method */
174 std::vector<HWIdentifier>& getFEBChans(const HWIdentifier chid, const LArBadChannelCont* bcCont);
175
176 StatusCode setSymlink(const LArRampComplete* ramp) const;
177 StatusCode setSymlink(const LArOFCComplete* ofc) const;
178 StatusCode setSymlink(const LArMphysOverMcalComplete* ramp) const;
179 StatusCode setSymlink(const LArCaliWaveContainer* ) const
180 {return StatusCode::SUCCESS;};
181 StatusCode setSymlink(const LArAutoCorrComplete* ) const;
182
190
191 SG::ReadCondHandleKey<LArBadChannelCont> m_BCKey {this, "BadChanKey", "LArBadChannel", "SG key for LArBadChan object"};
192 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"};
193 SG::ReadCondHandleKey<LArCalibLineMapping> m_CLKey{this, "CalibLineKey", "LArCalibLineMap", "SG calib line key"};
195 Gaudi::Property<std::vector<std::string> > m_problemsToPatch{this,"ProblemsToPatch",{}, "Bad-Channel categories to patch"};
196 Gaudi::Property<std::vector<unsigned int> > m_doNotPatchCBs{this, "DoNotPatchCBs", {}, "Do not patch channels from this CalibBoard"};
197
198
199 BooleanProperty m_useCorrChannel{this, "UseCorrChannels", true, "True: Use separate correction COOL channel, False: Correction + data in the same channel"};
200 BooleanProperty m_patchAllMissing{this, "PatchAllMissing", false, "True: Patch missing calibration constants regardless of their bad-channel status"};
201 BooleanProperty m_unlock{this, "Unlock", false, "Modify input container"};
202 BooleanProperty m_isSC{this, "SuperCells", false, "Working on the SuperCells ?"};
203
206
207 const CONDITIONSCONTAINER* m_contIn;
208 CONDITIONSCONTAINER* m_contOut;
209
211 StringProperty m_containerKey{this, "ContainerKey", "", "SG key of the LArConditionsContainer to be patched"};
212 StringProperty m_newContainerKey{this, "NewContainerKey", "", "If the corrections go in a separate container put SG key here"};
213 StringProperty m_patchMethodProp{this, "PatchMethod", "FEBNeighbor", "Method to patch conditions for channels with broken calibration line"};
214
215 std::vector<HWIdentifier> m_idList;
216
217};
218
220
221#endif
222
Helper class for offline supercell identifiers.
LArBadXCont< LArBadChannel > LArBadChannelCont
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Helper base class for offline cell identifiers.
This class implements the ILArAutoCorr interface.
c-struct reproducing the structure of the persistent data
Liquid Argon Cumulative Wave Container.
bool getAverage(const HWIdentifier chid, const int gain, LArRampP1 &patch, const LArBadChannelCont *bcCont, const LArOnOffIdMapping *cabling, bool isphi=true)
Specialized method to average Ramps over a phi-ring.
bool patch(const HWIdentifier chid, const int gain, const LArBadChannelCont *bcCont, const LArOnOffIdMapping *cabling, const LArCalibLineMapping *clCont)
patch method
bool setZero(const HWIdentifier chid, const int gain, LArRampP1 &patch)
Gaudi::Property< std::vector< unsigned int > > m_doNotPatchCBs
Gaudi::Property< std::vector< std::string > > m_problemsToPatch
bool setZero(const HWIdentifier chid, const int gain, LArCaliWaveVec &patch)
bool getAverage(const HWIdentifier, const int, LArCaliWaveVec &, const LArBadChannelCont *bcCont, const LArOnOffIdMapping *cabling, bool isphi=true)
bool setZero(const HWIdentifier chid, const int gain, LArAutoCorrP1 &patch)
StatusCode initialize()
Initialize method.
StatusCode setSymlink(const LArMphysOverMcalComplete *ramp) const
std::vector< HWIdentifier > & getFEBChans(const HWIdentifier chid, const LArBadChannelCont *bcCont)
bool setZero(const HWIdentifier chid, const int gain, LArOFCP1 &patch)
StatusCode setSymlink(const LArRampComplete *ramp) const
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
~LArCalibPatchingAlg()
Destructor.
CONDITIONSCONTAINER::ConstConditionsMapIterator CONTIT
LArCalibPatchingAlg(const std::string &name, ISvcLocator *pSvcLocator)
regular Algorithm constructor
bool getAverage(const HWIdentifier chid, const int gain, LArAutoCorrP1 &patch, const LArBadChannelCont *bcCont, const LArOnOffIdMapping *cabling, bool isphi=false)
Specialized method to average LArAutoCorr over a FEB.
bool getAverage(const HWIdentifier chid, const int gain, LArOFCP1 &patch, const LArBadChannelCont *bcCont, const LArOnOffIdMapping *cabling, bool isphi=true)
Specialized method to average OFCs over a phi-ring.
StatusCode stop()
Finalize method.
SG::ReadCondHandleKey< LArCalibLineMapping > m_CLKey
std::vector< HWIdentifier > & getPhiRing(const HWIdentifier chid, const LArBadChannelCont *bcCont, const LArOnOffIdMapping *cabling, unsigned distance=1)
Helper method to get a phi-ring.
StatusCode setSymlink(const LArCaliWaveContainer *) const
StatusCode setSymlink(const LArAutoCorrComplete *) const
StatusCode setSymlink(const LArOFCComplete *ofc) const
StatusCode execute()
Empty Execute method.
CONDITIONSCONTAINER::LArCondObj LArCondObj
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
This class implements the ILArMphysOverMcal interface.
c-struct reproducing the structure of the persistent data
This class implements the ILArOFC interface.
c-struct reproducing the structure of the persistent data
Definition LArOFCP1.h:22
Helper for the Liquid Argon Calorimeter cell identifiers.
Persistent data for LArRamp Copied from LAr.
Definition LArRampP1.h:24