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

#include <LArPedestalValidationAlg.h>

Inheritance diagram for LArPedestalValidationAlg:
Collaboration diagram for LArPedestalValidationAlg:

Classes

class  DataPerFEB

Public Member Functions

 LArPedestalValidationAlg (const std::string &name, ISvcLocator *pSvcLocator)
 Regular algorithm constructor.
StatusCode initialize ()
 Standard initialization method.
StatusCode execute ()
 Standard execute method This method has to be emtpy since all the job is done in stop()
StatusCode stop ()
 Standard finalize method Loops over all channels and all gains and calls the validateChannel method.
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Types

typedef LArPedestalComplete::ConstConditionsMapIterator CONTIT
typedef LArPedestalComplete::LArCondObj LArCondObj
typedef LArPedestalComplete::MultChanCollection MULTICHANCOLL
typedef std::vector< std::pair< HWIdentifier, bool > > CHECKEDID_t
 Keeping track of channels failing the validation criteria (per gain)

Protected Member Functions

const std::string channelDescription (const HWIdentifier &chid, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont, const unsigned gain=99, bool isFeb=false) const
 Textual representation of gain and location of a certain cell or FEB.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

MSG::Level m_myMsgLvl
 Message level for reporting deviations.
int m_myMsgLvlProp
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey
SG::ReadCondHandleKey< LArBadChannelContm_BCKey
SG::ReadCondHandleKey< LArCalibLineMappingm_CLKey
LArBadChannelMask m_bcMask
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Gaudi::Property< std::vector< unsigned int > > m_patchCBs
BooleanProperty m_isSC
const LArOnlineID_Basem_onlineHelper
const CaloCell_Base_IDm_caloId
const ILArPedestalm_reference
 Pointer to container with reference values.
const LArPedestalCompletem_validation
 Pointer to container to be validated.
LArPedestalCompletem_nc_validation
 Non-const pointer to container to be validated (for FEB patching)
std::string m_validationKey
 SG key of the container to be validated (job-property)
SG::ReadCondHandleKey< ILArPedestalm_referenceKey
 SG key of the reference container (job-property)
bool m_useBCInfo
 Flag set to true in order to use bad-channel info for the channel description as well as to ingore some types of bad-channels via the masking tool.
bool m_checkCompleteness
 wether completeness shall be checked or not (job-property)
bool m_patchMissingFEBs
 wether missing FEBS (incomplete COOL channels) should be patched
bool m_printFailedPattern
 wether to check for FEBs and Calib-lines with many deviating channels
bool m_doFebAverages
 wether to compare feb-averages (used only by derived class)
unsigned m_maxmessages
 Limit for the number of messages about indiviual deviating channels (usd only by derived class)
unsigned m_nChecked
 Number of channels that where checked (grand-total)
unsigned m_nFailedValidation
 Number of channels for which vaildateChannel returned false.
unsigned m_nValidated
 Number of channels for which vaildateChannel returned true.
unsigned m_nBad
 Number of channels known to be bad according to the bad-channel tool.
unsigned m_nNoReference
 Number of channels for which not reference channel could be found.
std::vector< CHECKEDID_tm_checkedIds
std::string m_chanFileName
 File name to store list of deviating channels.
std::ofstream m_chanFile
 File name to store list of deviating channels.
std::string m_febFileName
 File name to store list of FEBs with deviating channels.
std::ofstream m_febFile
 File name to store list of FEBs with deviating channels.
bool m_useCorrChannel

Private Types

typedef std::vector< std::pair< HWIdentifier, unsigned > > FEBANDGAIN_t
typedef std::vector< std::pair< std::pair< HWIdentifier, unsigned >, unsigned > > CBANDCHANANDGAIN_t
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool validateChannel (const LArCondObj &ref, const LArCondObj &val, const HWIdentifier chid, const int gain, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont) override final
 Method to validate the pedestal single readout channels.
virtual LArCondObj getRefObj (const HWIdentifier chid, const int gain) const override final
 Method implmented in derived class to get the reference object from ref-container.
virtual StatusCode summary (const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont) override
 Summary method executed after the loop over all channels.
virtual StatusCode preLoop () override
 Executed before the loop over all channels to reset global sums.
bool febSummary (const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
 Method to compare FEB averages.
bool checkCoolChannelCompleteness (const LArOnOffIdMapping *cabling, const LArCalibLineMapping *clCont, const LArBadChannelCont *bcCont)
 Verify if all FEBs of each Cool-Channel is present.
bool patchMissingFEBs (const FEBANDGAIN_t &febAndGain, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
 Fills channels of missing FEBs.
bool patchMissingCalibBoards (const CBANDCHANANDGAIN_t &CBAndGain, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
 Fills channels of missing calib boards.
void febOutput (const HWIdentifier &febid, const unsigned gain, const unsigned nGood, const unsigned nBad)
void findFailedPatterns (const LArOnOffIdMapping *cabling, const LArCalibLineMapping *clCont, const LArBadChannelCont *bcCont)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::vector< std::string > m_pedToleranceInit
 Pedestal tolerance (in ADC counts) (job-Property)
CaloCellGroupList m_pedTolerance
std::vector< std::string > m_rmsToleranceInit
 Pedestal RMS tolerances as CaloCellGroupList (job-Properties)
CaloCellGroupList m_rmsTolerance
std::vector< std::string > m_pedToleranceFEBInit
 Tolerance fro the average pedestal of one FEB (in ADC counts) (job-Property)
CaloCellGroupList m_pedToleranceFEB
std::vector< std::string > m_rmsToleranceFEBInit
 Tolerance fro the average pedestal RMS (noise) of one FEB (in ADC counts) (job-Property)
CaloCellGroupList m_rmsToleranceFEB
std::vector< DataPerFEBm_vDataPerFEB
double m_pedGlobalVal
double m_rmsGlobalVal
double m_pedGlobalRef
double m_rmsGlobalRef
unsigned m_nEntriesGlobal
std::vector< std::string > m_gainMap
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 40 of file LArPedestalValidationAlg.h.

Member Typedef Documentation

◆ CBANDCHANANDGAIN_t

typedef std::vector<std::pair<std::pair<HWIdentifier,unsigned>, unsigned > > LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::CBANDCHANANDGAIN_t
privateinherited

Definition at line 145 of file LArCalibValidationAlg.h.

◆ CHECKEDID_t

typedef std::vector<std::pair<HWIdentifier, bool > > LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::CHECKEDID_t
protectedinherited

Keeping track of channels failing the validation criteria (per gain)

Definition at line 233 of file LArCalibValidationAlg.h.

◆ CONTIT

◆ FEBANDGAIN_t

typedef std::vector<std::pair<HWIdentifier,unsigned> > LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::FEBANDGAIN_t
privateinherited

Definition at line 135 of file LArCalibValidationAlg.h.

◆ LArCondObj

Definition at line 80 of file LArCalibValidationAlg.h.

◆ MULTICHANCOLL

Definition at line 81 of file LArCalibValidationAlg.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArPedestalValidationAlg()

LArPedestalValidationAlg::LArPedestalValidationAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Regular algorithm constructor.

Definition at line 8 of file LArPedestalValidationAlg.cxx.

8 :
9 LArPedestalValidationBase(name,pSvcLocator) {
10
11 declareProperty("PedestalTolerance",m_pedToleranceInit,
12 "CaloCellGroup of allowed deviation of the pedestal (in ADC counts)");
13 declareProperty("PedestalRMSTolerance",m_rmsToleranceInit,
14 "CaloCellGroup of allowed deviation of the pedestal RMS (in ADC counts)");
15
16 declareProperty("PedestalToleranceFEB",m_pedToleranceFEBInit,
17 "CaloCellGroup of allowed deviation of the pedestal (average over one FEB, in ADC counts)");
18 declareProperty("PedestalRMSToleranceFEB",m_rmsToleranceFEBInit,
19 "CaloCellGroup Allowed deviation of the pedestal RMS (average over one FEB, in ADC counts)");
25}
LArCalibValidationAlg< LArPedestalComplete, ILArPedestal > LArPedestalValidationBase
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< std::string > m_rmsToleranceInit
Pedestal RMS tolerances as CaloCellGroupList (job-Properties)
std::vector< std::string > m_rmsToleranceFEBInit
Tolerance fro the average pedestal RMS (noise) of one FEB (in ADC counts) (job-Property)
std::vector< std::string > m_pedToleranceFEBInit
Tolerance fro the average pedestal of one FEB (in ADC counts) (job-Property)
std::vector< std::string > m_pedToleranceInit
Pedestal tolerance (in ADC counts) (job-Property)

Member Function Documentation

◆ channelDescription()

const std::string LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::channelDescription ( const HWIdentifier & chid,
const LArOnOffIdMapping * cabling,
const LArBadChannelCont * bcCont,
const unsigned gain = 99,
bool isFeb = false ) const
protectedinherited

Textual representation of gain and location of a certain cell or FEB.

Parameters
chidOnline identifier of the cell or FEB
gainGain in question, a value >2 won't be printed
iFebIf chid should be interpreted as FEB identifer
Returns
string Creates a string containing the Side, Barrel-EC, FT, Slot, FEB-Channel in human-readable form

◆ checkCoolChannelCompleteness()

bool LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::checkCoolChannelCompleteness ( const LArOnOffIdMapping * cabling,
const LArCalibLineMapping * clCont,
const LArBadChannelCont * bcCont )
privateinherited

Verify if all FEBs of each Cool-Channel is present.

Returns
False if at least one incomplete COOL channel is found, true otherwise Calls patchMissingFEBs if m_patchMissingFebs is true

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Algorithm to validate LAr Autocorr;.

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::execute ( )
inlineinherited

Standard execute method This method has to be emtpy since all the job is done in stop()

Definition at line 69 of file LArCalibValidationAlg.h.

69{return StatusCode::SUCCESS;}

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 69 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
58}

◆ febOutput()

void LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::febOutput ( const HWIdentifier & febid,
const unsigned gain,
const unsigned nGood,
const unsigned nBad )
privateinherited

◆ febSummary()

bool LArPedestalValidationAlg::febSummary ( const LArOnOffIdMapping * cabling,
const LArBadChannelCont * bcCont )
private

Method to compare FEB averages.

Definition at line 157 of file LArPedestalValidationAlg.cxx.

157 {
158
159 unsigned nBadFebs=0;
160
161 msg().precision(3);
162 msg().setf(std::ios::fixed,std::ios::floatfield);
163
164
165 for (DataPerFEB& dataPerFeb : m_vDataPerFEB) {
166 dataPerFeb.pedVal/=dataPerFeb.nEntries;
167 dataPerFeb.pedRef/=dataPerFeb.nEntries;
168 dataPerFeb.rmsVal/=dataPerFeb.nEntries;
169 dataPerFeb.rmsRef/=dataPerFeb.nEntries;
170
171
172 const Identifier id=cabling->cnvToIdentifier(dataPerFeb.chid);
173 const float& pedToleranceFEB=m_pedToleranceFEB.valuesForCell(id)[dataPerFeb.gain];
174 const float& rmsToleranceFEB=m_rmsToleranceFEB.valuesForCell(id)[dataPerFeb.gain];
175
176 if (fabs(dataPerFeb.pedVal-dataPerFeb.pedRef)>pedToleranceFEB ||
177 fabs(dataPerFeb.rmsVal-dataPerFeb.rmsRef)>rmsToleranceFEB) {
178
179 msg() << m_myMsgLvl << "Deviating!" <<channelDescription(dataPerFeb.febid, cabling, bcCont, dataPerFeb.gain, true)
180 << "Average Ped: " << dataPerFeb.pedVal << " (" << dataPerFeb.pedRef << ")"
181 << " RMS: " << dataPerFeb.rmsVal << " (" << dataPerFeb.rmsRef << ")" << endmsg;
182 ATH_MSG_DEBUG ( "Pdestal FEB Tolerance: " << pedToleranceFEB << " RMS FEB Tolerance:" << rmsToleranceFEB ) ;
183 ++nBadFebs;
184 }
185 }
186
187 if (nBadFebs) {
188 msg() << m_myMsgLvl << "Found " << nBadFebs << " out of " << m_vDataPerFEB.size() << " FEBs devating from reference" << endmsg;
189 return false;
190 }
191 else {
192 ATH_MSG_INFO ( "All " << m_vDataPerFEB.size() << " FEBs withing given tolerance." ) ;
193 return true;
194 }
195}
#define endmsg
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
const std::string channelDescription(const HWIdentifier &chid, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont, const unsigned gain=99, bool isFeb=false) const
std::vector< DataPerFEB > m_vDataPerFEB

◆ finalize()

StatusCode LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::finalize ( )
inlineinherited

Definition at line 76 of file LArCalibValidationAlg.h.

76{return StatusCode::SUCCESS;}

◆ findFailedPatterns()

void LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::findFailedPatterns ( const LArOnOffIdMapping * cabling,
const LArCalibLineMapping * clCont,
const LArBadChannelCont * bcCont )
privateinherited

◆ getRefObj()

LArPedestalValidationAlg::LArCondObj LArPedestalValidationAlg::getRefObj ( const HWIdentifier chid,
const int gain ) const
finaloverrideprivatevirtual

Method implmented in derived class to get the reference object from ref-container.

Implements LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >.

Definition at line 223 of file LArPedestalValidationAlg.cxx.

223 {
224 return LArCondObj(m_reference->pedestal(chid,gain),m_reference->pedestalRMS(chid,gain));
225
226}

◆ initialize()

StatusCode LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::initialize ( )
inherited

Standard initialization method.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ patchMissingCalibBoards()

bool LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::patchMissingCalibBoards ( const CBANDCHANANDGAIN_t & CBAndGain,
const LArOnOffIdMapping * cabling,
const LArBadChannelCont * bcCont )
privateinherited

Fills channels of missing calib boards.

Parameters
febAndGainA vector of (CalibId,gain) pairs
Returns
True on success, false otherwise Inserts the corresponding channel from the reference container as correction channel to the validation container

◆ patchMissingFEBs()

bool LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::patchMissingFEBs ( const FEBANDGAIN_t & febAndGain,
const LArOnOffIdMapping * cabling,
const LArBadChannelCont * bcCont )
privateinherited

Fills channels of missing FEBs.

Parameters
febAndGainA vector of (febId,gain) pairs
Returns
True on success, false otherwise Inserts the corresponding channel from the reference container as correction channel to the validation container

◆ preLoop()

StatusCode LArPedestalValidationAlg::preLoop ( )
overrideprivatevirtual

Executed before the loop over all channels to reset global sums.

Reimplemented from LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >.

Definition at line 28 of file LArPedestalValidationAlg.cxx.

28 {
34
35 bool stat;
36
37
38 ATH_MSG_INFO ( "Initialize Pedestal Tolerances (CaloCellGroup)" ) ;
40 if (!stat) {
41 ATH_MSG_ERROR ( "Failed to initialize CaloCellGroup of pedestal tolerances!" ) ;
42 return StatusCode::FAILURE;
43 }
44 if (m_pedTolerance.getDefaults().size()!=3) {
45 ATH_MSG_ERROR ( "Configuration error: Expected three pedestal tolerance values (one per gain), got "
46 << m_pedTolerance.getDefaults().size() ) ;
47 return StatusCode::FAILURE;
48 }
49 if (this->msgLvl(MSG::DEBUG)) m_pedTolerance.printDef();//for debugging....
50
51
52 ATH_MSG_INFO ( "Initialize Pedestal RMS Tolerances (CaloCellGroup)" ) ;
54 if (!stat) {
55 ATH_MSG_ERROR ( "Failed to initialize CaloCellGroup of rms tolerances!" ) ;
56 return StatusCode::FAILURE;
57 }
58 if (m_rmsTolerance.getDefaults().size()!=3) {
59 ATH_MSG_ERROR ( "Configuration error: Expected three rms tolerance values (one per gain), got "
60 << m_rmsTolerance.getDefaults().size() ) ;
61 return StatusCode::FAILURE;
62 }
63 if (this->msgLvl(MSG::DEBUG)) m_rmsTolerance.printDef();//for debugging...
64
65
66 ATH_MSG_INFO ( "Initialize FEB Pedestal Tolerances (CaloCellGroup)" ) ;
68 if (!stat) {
69 ATH_MSG_ERROR ( "Failed to initialize CaloCellGroup of pedestal tolerances!" ) ;
70 return StatusCode::FAILURE;
71 }
72 if (m_pedToleranceFEB.getDefaults().size()!=3) {
73 ATH_MSG_ERROR ( "Configuration error: Expected three pedestal tolerance values (one per gain), got "
74 << m_pedToleranceFEB.getDefaults().size() ) ;
75 return StatusCode::FAILURE;
76 }
77 if (this->msgLvl(MSG::DEBUG)) m_pedToleranceFEB.printDef();//for debugging....
78
79 ATH_MSG_INFO ( "Initialize FEB Pedestal RMS Tolerances (CaloCellGroup)" ) ;
81 if (!stat) {
82 ATH_MSG_ERROR ( "Failed to initialize CaloCellGroup of rms tolerances!" ) ;
83 return StatusCode::FAILURE;
84 }
85 if (m_rmsToleranceFEB.getDefaults().size()!=3) {
86 ATH_MSG_ERROR ( "Configuration error: Expected three rms tolerance values (one per gain), got "
87 << m_rmsToleranceFEB.getDefaults().size() ) ;
88 return StatusCode::FAILURE;
89 }
90 if (this->msgLvl(MSG::DEBUG)) m_rmsToleranceFEB.printDef();//for debugging...
91
92 return StatusCode::SUCCESS;
93}
#define ATH_MSG_ERROR(x)

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ stop()

StatusCode LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::stop ( )
inherited

Standard finalize method Loops over all channels and all gains and calls the validateChannel method.

◆ summary()

StatusCode LArPedestalValidationAlg::summary ( const LArOnOffIdMapping * cabling,
const LArBadChannelCont * bcCont )
overrideprivatevirtual

Summary method executed after the loop over all channels.

Reimplemented from LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >.

Definition at line 196 of file LArPedestalValidationAlg.cxx.

196 {
197 StatusCode sc=StatusCode::SUCCESS;
198 //1nd step: Check the FEB-averages:
199 if (m_doFebAverages && !febSummary(cabling,bcCont))
200 sc=StatusCode::RECOVERABLE;
201
202 //2st step: Call the summary method from base-class (single-channel summary)
203 if (!LArPedestalValidationBase::summary(cabling, bcCont).isSuccess())
204 sc=StatusCode::RECOVERABLE;
205
206 //3rd step: Check the gobal averages:
207 if (m_nEntriesGlobal) {
212 }
213 msg().precision(3);
214 msg().setf(std::ios::fixed,std::ios::floatfield);
215 ATH_MSG_INFO ( "Global pedestal average: " << m_pedGlobalVal << " Reference:" << m_pedGlobalRef
216 << " Deviation:" << m_pedGlobalVal-m_pedGlobalRef ) ;
217 ATH_MSG_INFO ( "Global elec noise average: " << m_rmsGlobalVal << " Reference:" << m_rmsGlobalRef
218 << " Deviation:" << m_rmsGlobalVal-m_rmsGlobalRef ) ;
219 return sc;
220}
static Double_t sc
virtual StatusCode summary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
bool febSummary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
Method to compare FEB averages.
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Definition at line 61 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_WARNING(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

◆ validateChannel()

bool LArPedestalValidationAlg::validateChannel ( const LArCondObj & ref,
const LArCondObj & val,
const HWIdentifier chid,
const int gain,
const LArOnOffIdMapping * cabling,
const LArBadChannelCont * bcCont )
finaloverrideprivatevirtual

Method to validate the pedestal single readout channels.

Implements LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >.

Definition at line 95 of file LArPedestalValidationAlg.cxx.

95 {
96
97 if (gain<0 || gain>2) {
98 ATH_MSG_ERROR ( "Unexpected gain value " << gain ) ;
99 return false;
100 }
101
102 const float& pedVal=val.m_Pedestal;
103 const float& pedRef=ref.m_Pedestal;
104
105 const float& rmsVal=val.m_PedestalRMS;
106 const float& rmsRef=ref.m_PedestalRMS;
107
108 const Identifier id=cabling->cnvToIdentifier(chid);
109
110 const float pedTolerance=m_pedTolerance.valuesForCell(id)[gain];
111 const float rmsTolerance=m_rmsTolerance.valuesForCell(id)[gain];
112
113
114 const HWIdentifier febid=m_onlineHelper->feb_Id(chid);
115
116 DataPerFEB* dataPerFEB = m_vDataPerFEB.empty() ? nullptr : &(m_vDataPerFEB.back());
117 if (!dataPerFEB || dataPerFEB->febid!=febid) {//Got to new FEB
118 m_vDataPerFEB.push_back(DataPerFEB(chid,febid,gain));
119 dataPerFEB=&(m_vDataPerFEB.back());
120 }
121
122 dataPerFEB->pedVal+=pedVal;
123 dataPerFEB->pedRef+=pedRef;
124 dataPerFEB->rmsVal+=rmsVal;
125 dataPerFEB->rmsRef+=rmsRef;
126 ++(dataPerFEB->nEntries);
127
128
129 m_pedGlobalVal+=pedVal;
130 m_rmsGlobalVal+=rmsVal;
131 m_pedGlobalRef+=pedRef;
132 m_rmsGlobalRef+=rmsRef;
134
135
136 if (fabs(pedVal-pedRef)> pedTolerance ||
137 fabs(rmsVal-rmsRef)> rmsTolerance){
139 msg().precision(2);
140 msg().setf(std::ios::fixed,std::ios::floatfield);
141 msg() << this->m_myMsgLvl << "Deviating! " << channelDescription(chid,cabling,bcCont,gain) << " Ped: " << val.m_Pedestal
142 << " (" << ref.m_Pedestal << ", " << val.m_Pedestal-ref.m_Pedestal << " ADC)"
143 << " RMS: " << val.m_PedestalRMS << " (" << ref.m_PedestalRMS << ", "
144 << ((val.m_PedestalRMS-ref.m_PedestalRMS)/ref.m_PedestalRMS)*100 << "%)" << endmsg;
145
146 ATH_MSG_DEBUG ( "Pedestal Tolerance: " << pedTolerance << " RMS Tolerance:" << rmsTolerance ) ;
147 }
149 msg() << this->m_myMsgLvl << "Channel deviation message has already been printed " << m_maxmessages << " times. Now silent..." << endmsg;
150 return false;
151 }
152 else
153 return true;
154}
const boost::regex ref(r_ef)

Member Data Documentation

◆ m_BCKey

Definition at line 168 of file LArCalibValidationAlg.h.

168{this, "BadChanKey", "LArBadChannel", "SG bad channels key"};

◆ m_bcMask

Definition at line 170 of file LArCalibValidationAlg.h.

◆ m_cablingKey

Definition at line 167 of file LArCalibValidationAlg.h.

167{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};

◆ m_caloId

Definition at line 178 of file LArCalibValidationAlg.h.

◆ m_chanFile

std::ofstream LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_chanFile
protectedinherited

File name to store list of deviating channels.

Definition at line 240 of file LArCalibValidationAlg.h.

◆ m_chanFileName

std::string LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_chanFileName
protectedinherited

File name to store list of deviating channels.

Definition at line 237 of file LArCalibValidationAlg.h.

◆ m_checkCompleteness

bool LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_checkCompleteness
protectedinherited

wether completeness shall be checked or not (job-property)

Definition at line 201 of file LArCalibValidationAlg.h.

◆ m_checkedIds

std::vector<CHECKEDID_t> LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_checkedIds
protectedinherited

Definition at line 234 of file LArCalibValidationAlg.h.

◆ m_CLKey

Definition at line 169 of file LArCalibValidationAlg.h.

169{this, "CalibLineKey", "LArCalibLineMap", "SG calib line key"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doFebAverages

bool LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_doFebAverages
protectedinherited

wether to compare feb-averages (used only by derived class)

Definition at line 210 of file LArCalibValidationAlg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_febFile

std::ofstream LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_febFile
protectedinherited

File name to store list of FEBs with deviating channels.

Definition at line 246 of file LArCalibValidationAlg.h.

◆ m_febFileName

std::string LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_febFileName
protectedinherited

File name to store list of FEBs with deviating channels.

Definition at line 243 of file LArCalibValidationAlg.h.

◆ m_gainMap

std::vector<std::string> LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_gainMap
privateinherited

Definition at line 159 of file LArCalibValidationAlg.h.

◆ m_isSC

BooleanProperty LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_isSC
protectedinherited

Definition at line 173 of file LArCalibValidationAlg.h.

173{this, "SuperCells", false, "Working on SuperCells ?"};

◆ m_maxmessages

unsigned LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_maxmessages
protectedinherited

Limit for the number of messages about indiviual deviating channels (usd only by derived class)

Definition at line 213 of file LArCalibValidationAlg.h.

◆ m_myMsgLvl

MSG::Level LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_myMsgLvl
protectedinherited

Message level for reporting deviations.

Definition at line 163 of file LArCalibValidationAlg.h.

◆ m_myMsgLvlProp

int LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_myMsgLvlProp
protectedinherited

Definition at line 164 of file LArCalibValidationAlg.h.

◆ m_nBad

unsigned LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_nBad
protectedinherited

Number of channels known to be bad according to the bad-channel tool.

Definition at line 227 of file LArCalibValidationAlg.h.

◆ m_nc_validation

Non-const pointer to container to be validated (for FEB patching)

Definition at line 188 of file LArCalibValidationAlg.h.

◆ m_nChecked

unsigned LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_nChecked
protectedinherited

Number of channels that where checked (grand-total)

Definition at line 218 of file LArCalibValidationAlg.h.

◆ m_nEntriesGlobal

unsigned LArPedestalValidationAlg::m_nEntriesGlobal
private

Definition at line 115 of file LArPedestalValidationAlg.h.

◆ m_nFailedValidation

unsigned LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_nFailedValidation
protectedinherited

Number of channels for which vaildateChannel returned false.

Definition at line 221 of file LArCalibValidationAlg.h.

◆ m_nNoReference

unsigned LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_nNoReference
protectedinherited

Number of channels for which not reference channel could be found.

Definition at line 230 of file LArCalibValidationAlg.h.

◆ m_nValidated

unsigned LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_nValidated
protectedinherited

Number of channels for which vaildateChannel returned true.

Definition at line 224 of file LArCalibValidationAlg.h.

◆ m_onlineHelper

const LArOnlineID_Base* LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_onlineHelper
protectedinherited

Definition at line 177 of file LArCalibValidationAlg.h.

◆ m_patchCBs

Gaudi::Property<std::vector<unsigned int> > LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_patchCBs
protectedinherited

Definition at line 172 of file LArCalibValidationAlg.h.

172{this, "PatchCBs", {}, "List of missing CalibBoards to patch using values from reference container."};

◆ m_patchMissingFEBs

bool LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_patchMissingFEBs
protectedinherited

wether missing FEBS (incomplete COOL channels) should be patched

Definition at line 204 of file LArCalibValidationAlg.h.

◆ m_pedGlobalRef

double LArPedestalValidationAlg::m_pedGlobalRef
private

Definition at line 114 of file LArPedestalValidationAlg.h.

◆ m_pedGlobalVal

double LArPedestalValidationAlg::m_pedGlobalVal
private

Definition at line 113 of file LArPedestalValidationAlg.h.

◆ m_pedTolerance

CaloCellGroupList LArPedestalValidationAlg::m_pedTolerance
private

Definition at line 70 of file LArPedestalValidationAlg.h.

◆ m_pedToleranceFEB

CaloCellGroupList LArPedestalValidationAlg::m_pedToleranceFEB
private

Definition at line 82 of file LArPedestalValidationAlg.h.

◆ m_pedToleranceFEBInit

std::vector<std::string> LArPedestalValidationAlg::m_pedToleranceFEBInit
private

Tolerance fro the average pedestal of one FEB (in ADC counts) (job-Property)

Definition at line 81 of file LArPedestalValidationAlg.h.

◆ m_pedToleranceInit

std::vector<std::string> LArPedestalValidationAlg::m_pedToleranceInit
private

Pedestal tolerance (in ADC counts) (job-Property)

Pedestal RMS tolerance (in ADC counts) (job-Property) Pedestal tolerances as CaloCellGroupList (job-Properties)

Definition at line 69 of file LArPedestalValidationAlg.h.

◆ m_printFailedPattern

bool LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_printFailedPattern
protectedinherited

wether to check for FEBs and Calib-lines with many deviating channels

Definition at line 207 of file LArCalibValidationAlg.h.

◆ m_problemsToMask

Gaudi::Property<std::vector<std::string> > LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_problemsToMask
protectedinherited

Definition at line 171 of file LArCalibValidationAlg.h.

171{this,"ProblemsToMask",{}, "Bad-Channel categories to mask"};

◆ m_reference

const ILArPedestal* LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_reference
protectedinherited

Pointer to container with reference values.

Definition at line 182 of file LArCalibValidationAlg.h.

◆ m_referenceKey

SG key of the reference container (job-property)

Definition at line 194 of file LArCalibValidationAlg.h.

194{this,"ReferenceKey","", "SG key of the LArConditionsContainer used as reference"};

◆ m_rmsGlobalRef

double LArPedestalValidationAlg::m_rmsGlobalRef
private

Definition at line 114 of file LArPedestalValidationAlg.h.

◆ m_rmsGlobalVal

double LArPedestalValidationAlg::m_rmsGlobalVal
private

Definition at line 113 of file LArPedestalValidationAlg.h.

◆ m_rmsTolerance

CaloCellGroupList LArPedestalValidationAlg::m_rmsTolerance
private

Definition at line 76 of file LArPedestalValidationAlg.h.

◆ m_rmsToleranceFEB

CaloCellGroupList LArPedestalValidationAlg::m_rmsToleranceFEB
private

Definition at line 87 of file LArPedestalValidationAlg.h.

◆ m_rmsToleranceFEBInit

std::vector<std::string> LArPedestalValidationAlg::m_rmsToleranceFEBInit
private

Tolerance fro the average pedestal RMS (noise) of one FEB (in ADC counts) (job-Property)

Definition at line 86 of file LArPedestalValidationAlg.h.

◆ m_rmsToleranceInit

std::vector<std::string> LArPedestalValidationAlg::m_rmsToleranceInit
private

Pedestal RMS tolerances as CaloCellGroupList (job-Properties)

Definition at line 75 of file LArPedestalValidationAlg.h.

◆ m_useBCInfo

bool LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_useBCInfo
protectedinherited

Flag set to true in order to use bad-channel info for the channel description as well as to ingore some types of bad-channels via the masking tool.

Definition at line 198 of file LArCalibValidationAlg.h.

◆ m_useCorrChannel

bool LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_useCorrChannel
protectedinherited

Definition at line 248 of file LArCalibValidationAlg.h.

◆ m_validation

const LArPedestalComplete* LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_validation
protectedinherited

Pointer to container to be validated.

Definition at line 185 of file LArCalibValidationAlg.h.

◆ m_validationKey

std::string LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >::m_validationKey
protectedinherited

SG key of the container to be validated (job-property)

Definition at line 191 of file LArCalibValidationAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vDataPerFEB

std::vector<DataPerFEB> LArPedestalValidationAlg::m_vDataPerFEB
private

Definition at line 110 of file LArPedestalValidationAlg.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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