diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/ATLAS_CHECK_THREAD_SAFETY b/LArCalorimeter/LArRawConditions/LArRawConditions/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..3b2c20822cc4207ae0babe9abf5f51ccb2fc588b --- /dev/null +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +LArCalorimeter/LArRawConditions diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArCondFEBIdChanMap.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArCondFEBIdChanMap.h index 5f241bb9594e29dd49deea399754c887acab6c7e..a420d5d4c5918c5e20b4465fd70bd7f3e368b262 100755 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArCondFEBIdChanMap.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArCondFEBIdChanMap.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @@ -147,10 +147,10 @@ private: void fillMap(unsigned int channel, const FEBIdVector& febIdVec); /// File map from existing ChannelMap - e.g. on read back - void fillMap() const; + //void fillMap() const; ChannelMap m_febIdVecs; - mutable FEBIdMap m_channelMap; + FEBIdMap m_channelMap; unsigned int m_chansPerGain; unsigned int m_totalChannels; unsigned int m_minGain; @@ -202,18 +202,22 @@ LArCondFEBIdChanMap::fillMap(unsigned int channel, const FEBIdVector& febIdVec) } } +#if 0 inline void LArCondFEBIdChanMap::fillMap() const { // loop over existing vector of feb id vectors and set up map for // each feb id. This is needed, for example on readback + // Though these objects are not read directly, so this should + // no longer be needed. for (unsigned int i = 0; i < m_febIdVecs.size(); ++i) { for (unsigned int j = 0; j < m_febIdVecs[i].size(); ++j) { m_channelMap[m_febIdVecs[i][j]] = i; } } } +#endif @@ -244,9 +248,7 @@ LArCondFEBIdChanMap::getChannel (FEBId febId, return (true); } coolChannel = 9999; - // Make sure that the map has been filled, e.g. after readback - if (!m_channelMap.size()) fillMap(); - FEBIdMap::iterator it = m_channelMap.find(febId); + FEBIdMap::const_iterator it = m_channelMap.find(febId); if (it != m_channelMap.end()) { if (m_minGain <= gain && gain <= m_maxGain) { coolChannel = (gain - m_minGain)*m_chansPerGain + (*it).second + m_numOffsetChannels; diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsContainer.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsContainer.h index 54f11db4f3ae94c132895bcc3d2aa51de468ab44..b33c7f5d81fca7a9989efd4ba87011e97718532c 100755 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsContainer.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsContainer.h @@ -1,7 +1,7 @@ //Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @@ -320,8 +320,8 @@ private: typedef typename SubsetDV::iterator iterator; - mutable CorrectionVectors m_correctionsUndo; - mutable bool m_correctionsApplied; + /*mutable*/ CorrectionVectors m_correctionsUndo; + /*mutable*/ bool m_correctionsApplied; CorrectionVector m_emptyCorrectionVec; #endif }; diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsSubset.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsSubset.h index d79b454483b9fca73fb0eb6980778c730d61a1ec..39f16ed5b486f005869dc383bfb257eaa024f3b3 100755 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsSubset.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsSubset.h @@ -236,11 +236,13 @@ public: //Get NCHANNELPERFEB unsigned channelVectorSize() const; -private: - /// Fill map from vector - void fillMap() const; + // This is also called from a ROOT read rule after an object is read. + // (Nominally private, but needs to be public to be callable + // from a ROOT read rule.) + void fillMap(); +private: /// Size of channel vector enum Subset_size { NCHANNELPERFEB = 128 @@ -256,7 +258,7 @@ private: typedef typename std::map<FebId, unsigned int> SubsetMap; - mutable SubsetMap m_subsetMap; + SubsetMap m_subsetMap; SubsetVector m_subset; unsigned int m_gain; unsigned int m_channel; @@ -270,9 +272,10 @@ private: template<class T> inline void -LArConditionsSubset<T>::fillMap() const +LArConditionsSubset<T>::fillMap() { // Fill map from subset + m_subsetMap.clear(); // std::cout << "fillMap: subset size, map size " // << m_subset.size() << " " << m_subsetMap.size() @@ -354,6 +357,8 @@ void LArConditionsSubset<T>::assign (const LArConditionsSubset<U>& other, m_correctionVec[i].first = otherCorr[i].first; copier (otherCorr[i].second, m_correctionVec[i].second); } + + fillMap(); } @@ -374,7 +379,6 @@ LArConditionsSubset<T>::findChannelVector(FebId febID) // << std::endl; - if (!m_subsetMap.size()) fillMap(); typename SubsetMap::const_iterator it = m_subsetMap.find(febID); if (it != m_subsetMap.end()) { unsigned int index = (*it).second; @@ -395,7 +399,6 @@ inline typename LArConditionsSubset<T>::ConstSubsetIt LArConditionsSubset<T>::findChannelVector(FebId febID) const { - if (!m_subsetMap.size()) fillMap(); typename SubsetMap::const_iterator it = m_subsetMap.find(febID); if (it != m_subsetMap.end()) { unsigned int index = (*it).second; diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_CphiComplete.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_CphiComplete.h index 97ce98e5ede25f30f21b2077f855a541817da777..61438daa0ef63f64ec7cf6f763a0bf3d1f79eb9d 100644 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_CphiComplete.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_CphiComplete.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef LARRAWCONDITIONS_LAREMEC_CPHICOMPLETE_H @@ -38,8 +38,6 @@ class LArEMEC_CphiComplete: public ILArEMEC_Cphi, virtual const float& EMEC_Cphi(const HWIdentifier& CellID) const ; - static float dummy; - // set method filling the data members individually (if one // wants to fill this class not using the DB) void set(const HWIdentifier& CellID, float vEMEC_Cphi); diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_HValphaComplete.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_HValphaComplete.h index ecec505dfa28e770ea12ce31d68096609cf2d0b3..c1b58736e2e613383a546f33363134db121910d8 100644 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_HValphaComplete.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_HValphaComplete.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef LARRAWCONDITIONS_LAREMEC_HVALPHACOMPLETE_H @@ -38,8 +38,6 @@ class LArEMEC_HValphaComplete: public ILArEMEC_HValpha, virtual const float& EMEC_HValpha(const HWIdentifier& CellID) const ; - static float dummy; - // set method filling the data members individually (if one // wants to fill this class not using the DB) void set(const HWIdentifier& CellID, float vEMEC_HValpha); diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_HVbetaComplete.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_HVbetaComplete.h index a6aa353fa98ed9948ae99a38bbd5b2ae0b04bb32..9dc10c926ddad9abeca09a28daa2344cd3e2f818 100644 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_HVbetaComplete.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArEMEC_HVbetaComplete.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef LARRAWCONDITIONS_LAREMEC_HVBETACOMPLETE_H @@ -38,8 +38,6 @@ class LArEMEC_HVbetaComplete: public ILArEMEC_HVbeta, virtual const float& EMEC_HVbeta(const HWIdentifier& CellID) const ; - static float dummy; - // set method filling the data members individually (if one // wants to fill this class not using the DB) void set(const HWIdentifier& CellID, float vEMEC_HVbeta); diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasAverageMC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasAverageMC.h index 06785576a3e5c990fd1170e70ca01c4b58b1dada..ce73a141d3f0326e36f689b4635b6732c0af3d94 100755 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasAverageMC.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasAverageMC.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef LARRAWCONDITIONS_LArMinBiasAverageMC_H @@ -28,9 +28,6 @@ class LArMinBiasAverageMC: public LArMinBiasAverageComplete { // retrieving Average of E in Minimum Bias events , using online ID virtual const float& minBiasAverage(const HWIdentifier& CellID) const ; - - static float dummy; - }; #include "AthenaKernel/CondCont.h" diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasMC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasMC.h index 128eadd0653844f556159ea07f94774f07f260bf..166932e29f45f0d619de39368e0f0482553cecf5 100755 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasMC.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArMinBiasMC.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef LARRAWCONDITIONS_LARMINBIASMC_H @@ -28,9 +28,6 @@ class LArMinBiasMC: public LArMinBiasComplete { // retrieving RMS of E in Minimum Bias events , using online ID virtual const float& minBiasRMS(const HWIdentifier& CellID) const ; - - static float dummy; - }; diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArNoiseMC.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArNoiseMC.h index 5f846d50ac1bd55c58740b5ec361372af9448fb9..7039e39f8e3da99b20c607d2b96c07052c986968 100644 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArNoiseMC.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArNoiseMC.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef LARRAWCONDITIONS_LARNOISEMC_H @@ -29,8 +29,6 @@ class LArNoiseMC: public LArNoiseComplete { // retrieving Noise using online ID virtual const float& noise(const HWIdentifier& CellID, int gain) const ; - - static float dummy; }; #include "AthenaKernel/CondCont.h" diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArWFParamsComplete.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArWFParamsComplete.h index 7aa15ccab213adfcb69239fe794d4e6cefa83e3f..12d572a062a5ba433656461db0758a68650713df 100644 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArWFParamsComplete.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArWFParamsComplete.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef LARRAWCONDITIONS_LARWFPARAMSCOMPLETE_H @@ -39,11 +39,6 @@ class LArWFParamsComplete :public LArConditionsContainer<LArWFParams> // set method filling the data members individually (if one // wants to fill this class not using the DB) void set(const HWIdentifier& CellID, int gain, LArWFParams theParams); - - private: - - static LArWFParams s_dummyParams ; - }; CLASS_DEF( LArWFParamsComplete, 243713630, 1) diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/selection1.xml b/LArCalorimeter/LArRawConditions/LArRawConditions/selection1.xml index 97db14a07f943d45103f925056c5346ecb60de90..64f2dac1a6aca2ba20aa4344c3ce561c2e589f65 100644 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/selection1.xml +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/selection1.xml @@ -19,6 +19,14 @@ <class name="LArConditionsSubset<LArAutoCorrP>" id="4E7E36E9-2121-4327-88C5-8A516D6D6D2A" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArAutoCorrP>" version="[1-]" + targetClass="LArConditionsSubset<LArAutoCorrP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int,LArAutoCorrP>"/> <class name="std::pair<unsigned int,std::vector<LArAutoCorrP> >"/> @@ -35,6 +43,14 @@ <class name="LArConditionsSubset<LArCaliPulseParamsP>" id="D1D15524-04F0-4A75-ABC7-948D90491504" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArCaliPulseParamsP>" version="[1-]" + targetClass="LArConditionsSubset<LArCaliPulseParamsP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArCaliPulseParamsP>"/> <class name="std::pair<unsigned int, std::vector<LArCaliPulseParamsP> >"/> @@ -51,6 +67,14 @@ <class name="LArConditionsSubset<LArDAC2uAP>" id="00BB980F-D174-4AD7-A5C7-DC66BA71C4D2" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArDAC2uAP>" version="[1-]" + targetClass="LArConditionsSubset<LArDAC2uAP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArDAC2uAP>"/> <class name="std::pair<unsigned int, std::vector<LArDAC2uAP> >"/> @@ -67,6 +91,14 @@ <class name="LArConditionsSubset<LArDetCellParamsP>" id="11272A20-3A6B-4E1B-B96C-27117868ED09" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArDetCellParamsP>" version="[1-]" + targetClass="LArConditionsSubset<LArDetCellParamsP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArDetCellParamsP>"/> <class name="std::pair<unsigned int, std::vector<LArDetCellParamsP> >"/> @@ -83,6 +115,14 @@ <class name="LArConditionsSubset<LArfSamplP>" id="6E808031-FCAD-4DB6-9246-E5D926790FED" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArfSamplP>" version="[1-]" + targetClass="LArConditionsSubset<LArfSamplP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArfSamplP>"/> <class name="std::pair<unsigned int, std::vector<LArfSamplP> >"/> @@ -98,6 +138,14 @@ <class name="LArConditionsSubset<LArH6OscillationP>" id="425EBF82-9EC7-4A2E-A112-49439F26E45B" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArH6OscillationP>" version="[1-]" + targetClass="LArConditionsSubset<LArH6OscillationP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArH6OscillationP>"/> <class name="std::pair<unsigned int, std::vector<LArH6OscillationP> >"/> @@ -113,6 +161,16 @@ <!-- picked up by iterator pattern below. --> <!-- <class name="LArSingleFloatP" /> --> <class name="LArConditionsSubset<LArSingleFloatP>" /> + <!-- ??? why isn't m_subsetMap declared transient here? ---> + <read sourceClass="LArConditionsSubset<LArSingleFloatP>" version="[1-]" + targetClass="LArConditionsSubset<LArSingleFloatP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> + <class name="std::pair<unsigned int, LArSingleFloatP>"/> <class name="std::pair<unsigned int, std::vector<LArSingleFloatP> >"/> <class name="std::vector<LArSingleFloatP>"/> @@ -129,6 +187,14 @@ <class name="LArConditionsSubset<LArMinBiasP>" id="71652545-4809-45A5-9125-5ACA8FB5AC0C" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArMinBiasP>" version="[1-]" + targetClass="LArConditionsSubset<LArMinBiasP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArMinBiasP>"/> <class name="std::pair<unsigned int, std::vector<LArMinBiasP> >"/> @@ -145,6 +211,14 @@ <class name="LArConditionsSubset<LArMinBiasAverageP>" id="3235F39A-7C1D-4FB9-9F56-6A6251AC3360" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArMinBiasAverageP>" version="[1-]" + targetClass="LArConditionsSubset<LArMinBiasAverageP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArMinBiasAverageP>"/> @@ -163,6 +237,14 @@ <class name="LArConditionsSubset<LArMphysOverMcalP>" id="9C53AC43-3FD6-470F-A6FF-1DF80E85ACBF" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArMphysOverMcalP>" version="[1-]" + targetClass="LArConditionsSubset<LArMphysOverMcalP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArMphysOverMcalP>"/> <class name="std::pair<unsigned int, std::vector<LArMphysOverMcalP> >"/> @@ -179,6 +261,14 @@ <class name="LArConditionsSubset<LArNoiseP>" id="A96F4520-9C5E-49E6-89A3-5E26A781CE11" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArNoiseP>" version="[1-]" + targetClass="LArConditionsSubset<LArNoiseP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArNoiseP>"/> <class name="std::pair<unsigned int, std::vector<LArNoiseP> >"/> @@ -200,6 +290,14 @@ <class name="LArConditionsSubset<LArOFCP>" id="3E5389EF-D163-4099-91D9-D3F0EE06C1CD" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArOFCP>" version="[1-]" + targetClass="LArConditionsSubset<LArOFCP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArOFCP>"/> <class name="std::pair<unsigned int, std::vector<LArOFCP> >"/> @@ -219,6 +317,14 @@ <class name="LArConditionsSubset<LArPedestalP>" id="E17191DD-4C0A-4B1A-AE49-7D587C6BE3EE" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArPedestalP>" version="[1-]" + targetClass="LArConditionsSubset<LArPedestalP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArPedestalP>"/> <class name="std::pair<unsigned int, std::vector<LArPedestalP> >"/> @@ -236,6 +342,14 @@ <class name="LArConditionsSubset<LArPhysCaliTdiffP>" id="A7FB91FF-4535-4EB7-87F8-A34BA477ECE0" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArPhysCaliTdiffP>" version="[1-]" + targetClass="LArConditionsSubset<LArPhysCaliTdiffP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArPhysCaliTdiffP>"/> <class name="std::pair<unsigned int, std::vector<LArPhysCaliTdiffP> >"/> @@ -254,6 +368,15 @@ <class name="LArConditionsSubset<LArRampP>" id="4019776D-D528-4401-9CBD-7956C4B00607" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArRampP>" version="[1-]" + targetClass="LArConditionsSubset<LArRampP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> + <class name="std::pair<unsigned int, LArRampP>"/> <class name="std::pair<unsigned int, std::vector<LArRampP> >"/> <class name="std::vector<LArRampP>"/> @@ -270,6 +393,14 @@ <class name="LArConditionsSubset<LAruA2MeVP>" id="CBF815A2-F18C-4C18-9E93-A8EE67CEE59F" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LAruA2MeVP>" version="[1-]" + targetClass="LArConditionsSubset<LAruA2MeVP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LAruA2MeVP>"/> <class name="std::pair<unsigned int, std::vector<LAruA2MeVP> >"/> diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/selection2.xml b/LArCalorimeter/LArRawConditions/LArRawConditions/selection2.xml index 8f238cb9e2bb6ecf7ee6fbc0526f99bcbc51d6d4..6cff6be1cdea5a42242055ea24a3271c0b5bea59 100644 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/selection2.xml +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/selection2.xml @@ -15,6 +15,14 @@ <class name="LArConditionsSubset<LArShapeP>" id="055CF2F5-08D0-4EAA-B154-8CE5B1A599E7" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArShapeP>" version="[1-]" + targetClass="LArConditionsSubset<LArShapeP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArShapeP>"/> <class name="std::pair<unsigned int, std::vector<LArShapeP> >"/> @@ -30,6 +38,14 @@ <class name="LArConditionsSubset<LArTdriftP>" id="18AE4F30-F828-4715-85AA-6A69DD3C048C" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArTdriftP>" version="[1-]" + targetClass="LArConditionsSubset<LArTdriftP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArTdriftP>"/> <class name="std::pair<unsigned int, std::vector<LArTdriftP> >"/> @@ -46,6 +62,14 @@ <class name="LArConditionsSubset<LArRinjP>" id="D697FEFD-1CA5-427A-9958-C9B9D620DE7F" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArRinjP>" version="[1-]" + targetClass="LArConditionsSubset<LArRinjP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArRinjP>"/> <class name="std::pair<unsigned int, std::vector<LArRinjP> >"/> @@ -61,6 +85,14 @@ <class name="LArConditionsSubset<LArCableLengthP>" id="338E681C-344B-440D-A3C7-5C4F6455A180" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArCableLengthP>" version="[1-]" + targetClass="LArConditionsSubset<LArCableLengthP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArCableLengthP>"/> <class name="std::pair<unsigned int, std::vector<LArCableLengthP> >"/> @@ -76,6 +108,14 @@ <class name="LArConditionsSubset<LArCableAttenuationP>" id="2D460185-63EB-429B-A870-FC850B5A9D0B" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArCableAttenuationP>" version="[1-]" + targetClass="LArConditionsSubset<LArCableAttenuationP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArCableAttenuationP>"/> <class name="std::pair<unsigned int, std::vector<LArCableAttenuationP> >"/> @@ -91,6 +131,14 @@ <class name="LArConditionsSubset<LArTshaperP>" id="8B95ED9B-9F18-43D1-87B0-ABEC64E93B9C" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArTshaperP>" version="[1-]" + targetClass="LArConditionsSubset<LArTshaperP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArTshaperP>"/> <class name="std::pair<unsigned int, std::vector<LArTshaperP> >"/> @@ -106,6 +154,14 @@ <class name="LArConditionsSubset<LArOFCBinP>" id="35090C66-1740-419B-9410-21DA24A5C7CE" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArOFCBinP>" version="[1-]" + targetClass="LArConditionsSubset<LArOFCBinP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArOFCBinP>"/> <class name="std::pair<unsigned int, std::vector<LArOFCBinP> >"/> @@ -121,6 +177,14 @@ <class name="LArConditionsSubset<LArEMEC_CphiP>" id="7587DA6F-280F-4EB5-9113-5122CF3B0AC4" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArEMEC_CphiP>" version="[1-]" + targetClass="LArConditionsSubset<LArEMEC_CphiP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArEMEC_CphiP>"/> <class name="std::pair<unsigned int, std::vector<LArEMEC_CphiP> >"/> @@ -136,6 +200,14 @@ <class name="LArConditionsSubset<LArEMEC_HValphaP>" id="438C0CE6-BABD-483B-A61A-73F1E7781E63" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArEMEC_HValphaP>" version="[1-]" + targetClass="LArConditionsSubset<LArEMEC_HValphaP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArEMEC_HValphaP>"/> <class name="std::pair<unsigned int, std::vector<LArEMEC_HValphaP> >"/> @@ -151,6 +223,14 @@ <class name="LArConditionsSubset<LArEMEC_HVbetaP>" id="E3A6D99F-3D6F-420C-BF4A-8B6FAF2527CE" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArEMEC_HVbetaP>" version="[1-]" + targetClass="LArConditionsSubset<LArEMEC_HVbetaP>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArEMEC_HVbetaP>"/> <class name="std::pair<unsigned int, std::vector<LArEMEC_HVbetaP> >"/> @@ -168,6 +248,14 @@ <class name="LArConditionsSubset<LArCaliWaveVec>" id="ECB4AD6C-FF3A-4255-A0E3-7BD566B96A77" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArCaliWaveVec>" version="[1-]" + targetClass="LArConditionsSubset<LArCaliWaveVec>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::vector<LArCaliWave>" /> <!-- <class name="std::vector<std::vector<LArCaliWaveVec> >" /> --> @@ -186,6 +274,14 @@ id="C1108D27-6D30-41E8-892D-2AB127B868C9" > <field name="m_subsetMap" transient="true" /> </class> + <read sourceClass="LArConditionsSubset<LArPhysWave>" version="[1-]" + targetClass="LArConditionsSubset<LArPhysWave>" source="" + target="" > + <![CDATA[ + // Need to build the map before the object can be used. + if (newObj) newObj->fillMap(); + ]]> + </read> <class name="std::pair<unsigned int, LArPhysWave>"/> <class name="std::pair<unsigned int, std::vector<LArPhysWave> >"/> diff --git a/LArCalorimeter/LArRawConditions/src/LArConditionsContainerBase.cxx b/LArCalorimeter/LArRawConditions/src/LArConditionsContainerBase.cxx index 671cbef5b4eaf59aa41dfa4d05e2715f2d90a1fa..02f961c7181e7559858615c738fcbeaac666824c 100755 --- a/LArCalorimeter/LArRawConditions/src/LArConditionsContainerBase.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArConditionsContainerBase.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @@ -26,6 +26,7 @@ #include "StoreGate/StoreGateSvc.h" #include "StoreGate/DataHandle.h" #include "AthenaKernel/getMessageSvc.h" +#include <atomic> LArConditionsContainerBase::LArConditionsContainerBase( ) : @@ -570,7 +571,7 @@ LArConditionsContainerBase::applyCorrectionsAtInit(bool setFlag, bool flag) // return current value // Default value is true - static bool applyCorrs = true; + static std::atomic<bool> applyCorrs = true; if (setFlag) applyCorrs = flag; diff --git a/LArCalorimeter/LArRawConditions/src/LArEMEC_CphiComplete.cxx b/LArCalorimeter/LArRawConditions/src/LArEMEC_CphiComplete.cxx index 11641d7248ceb1268d4014359634ac6957b93954..c5cf44f68f35f08cdb7c71a671794524281b05b9 100644 --- a/LArCalorimeter/LArRawConditions/src/LArEMEC_CphiComplete.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArEMEC_CphiComplete.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "LArRawConditions/LArEMEC_CphiComplete.h" @@ -15,8 +15,6 @@ #include <iostream> using namespace std ; -float LArEMEC_CphiComplete::dummy = ERRORCODE; - LArEMEC_CphiComplete::LArEMEC_CphiComplete() {} LArEMEC_CphiComplete::~LArEMEC_CphiComplete() {} diff --git a/LArCalorimeter/LArRawConditions/src/LArEMEC_HValphaComplete.cxx b/LArCalorimeter/LArRawConditions/src/LArEMEC_HValphaComplete.cxx index acaf8f5eb04317784722399ffc3d6b6fe8d46153..4c8801f4c4067624da950e052eaf13ef4ebcfe86 100644 --- a/LArCalorimeter/LArRawConditions/src/LArEMEC_HValphaComplete.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArEMEC_HValphaComplete.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "LArRawConditions/LArEMEC_HValphaComplete.h" @@ -15,8 +15,6 @@ #include <iostream> using namespace std ; -float LArEMEC_HValphaComplete::dummy = ERRORCODE; - LArEMEC_HValphaComplete::LArEMEC_HValphaComplete() {} LArEMEC_HValphaComplete::~LArEMEC_HValphaComplete() {} diff --git a/LArCalorimeter/LArRawConditions/src/LArEMEC_HVbetaComplete.cxx b/LArCalorimeter/LArRawConditions/src/LArEMEC_HVbetaComplete.cxx index bf96786a4bf0892c7eb9a199f833d8b4d64ea7f8..1c33b58a8b66113a76f7fe1ba1438e2a39576ff7 100644 --- a/LArCalorimeter/LArRawConditions/src/LArEMEC_HVbetaComplete.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArEMEC_HVbetaComplete.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "LArRawConditions/LArEMEC_HVbetaComplete.h" @@ -15,8 +15,6 @@ #include <iostream> using namespace std ; -float LArEMEC_HVbetaComplete::dummy = ERRORCODE; - LArEMEC_HVbetaComplete::LArEMEC_HVbetaComplete() {} LArEMEC_HVbetaComplete::~LArEMEC_HVbetaComplete() {} diff --git a/LArCalorimeter/LArRawConditions/src/LArMinBiasAverageMC.cxx b/LArCalorimeter/LArRawConditions/src/LArMinBiasAverageMC.cxx index b66dec8395b0d4629a3b0b63a29337a3db2a530c..d31b5a99ff740745f69328700be658dfb43f5cea 100755 --- a/LArCalorimeter/LArRawConditions/src/LArMinBiasAverageMC.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArMinBiasAverageMC.cxx @@ -1,11 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "LArRawConditions/LArMinBiasAverageMC.h" -float LArMinBiasAverageMC::dummy = ERRORCODE; - LArMinBiasAverageMC::LArMinBiasAverageMC() :LArMinBiasAverageComplete() {} @@ -22,6 +20,5 @@ const float& LArMinBiasAverageMC::minBiasAverage(const HWIdentifier&) const { std::cout << "LArMinBiasAverageMC is deprecated. Use LArMinBiasAverageSym" << std::endl; std::abort(); - return LArMinBiasAverageMC::dummy; } diff --git a/LArCalorimeter/LArRawConditions/src/LArMinBiasMC.cxx b/LArCalorimeter/LArRawConditions/src/LArMinBiasMC.cxx index ee83de99dbf2c60d4fc6bc741c527dec5dee1a2b..c4bc5f687b2684d846be0bf40e894f4d49980f8f 100755 --- a/LArCalorimeter/LArRawConditions/src/LArMinBiasMC.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArMinBiasMC.cxx @@ -1,11 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "LArRawConditions/LArMinBiasMC.h" -float LArMinBiasMC::dummy = ERRORCODE; - LArMinBiasMC::LArMinBiasMC() :LArMinBiasComplete() {} @@ -22,5 +20,4 @@ const float& LArMinBiasMC::minBiasRMS(const HWIdentifier&) const { std::cout << "LArMinBiasMC is deprecated. Use LArMinBiasSym!" << std::endl; std::abort(); - return LArMinBiasMC::dummy; } diff --git a/LArCalorimeter/LArRawConditions/src/LArNoiseMC.cxx b/LArCalorimeter/LArRawConditions/src/LArNoiseMC.cxx index 7b37f30eba97152bae5f762302b6cb32cf94417e..beb0fcab3e89560e34e51b85a19aa7cb52d940b7 100755 --- a/LArCalorimeter/LArRawConditions/src/LArNoiseMC.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArNoiseMC.cxx @@ -1,10 +1,8 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "LArRawConditions/LArNoiseMC.h" -float LArNoiseMC::dummy=LArElecCalib::ERRORCODE; - LArNoiseMC::LArNoiseMC() : LArNoiseComplete() {} @@ -23,6 +21,5 @@ const float& LArNoiseMC::noise(const HWIdentifier&, int) const { std::cout << "LArNoiseMC is deprecated. Use LArNoiseSym" << std::endl; std::abort(); - return dummy; } diff --git a/LArCalorimeter/LArRawConditions/src/LArWFParamsComplete.cxx b/LArCalorimeter/LArRawConditions/src/LArWFParamsComplete.cxx index 3df54e38dfd1ae38936d08f8276b657039f656a0..8544b086ce706069eb71b59c2893f964a77eb302 100755 --- a/LArCalorimeter/LArRawConditions/src/LArWFParamsComplete.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArWFParamsComplete.cxx @@ -1,10 +1,9 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "LArRawConditions/LArWFParamsComplete.h" -LArWFParams LArWFParamsComplete::s_dummyParams = LArWFParams() ; LArWFParamsComplete::LArWFParamsComplete() { diff --git a/LArCalorimeter/LArRawConditions/src/LArWaveHelper.cxx b/LArCalorimeter/LArRawConditions/src/LArWaveHelper.cxx index 5b2ca368cd24ddf2f738232c443736b7833b9e3d..b13363d1c20a0d89da0459e472d19ea5d8a4fcb7 100755 --- a/LArCalorimeter/LArRawConditions/src/LArWaveHelper.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArWaveHelper.cxx @@ -273,7 +273,7 @@ LArWave LArWaveHelper::derive_smooth(const LArWave& theWave) const * 7 points first derivative * using Savitsky-Golay smoothing filtering (m = polynomial order) * ================================================================ */ - static double c[3][4][7] = + static const double c[3][4][7] = { { { -0.107, -0.071, -0.036, 0.000, 0.036, 0.071, 0.107 } , { 0.012, -0.071, -0.107, -0.095, -0.036, 0.071, 0.226 } , { 0.131, -0.071, -0.179, -0.190, -0.107, 0.071, 0.345 } , @@ -598,8 +598,10 @@ std::vector<double> LArWaveHelper::polyfit(const std::vector<double>& X, unsigned Ndeg) const { // to be implemented - return to avoid compiler warning RDS - static std::vector<double> dummy; - if(Ndeg > 2 || (Y.size() == 0) || (X.size() != Y.size())) return (dummy); + std::vector<double> dummy; + if(Ndeg > 2 || (Y.size() == 0) || (X.size() != Y.size())) { + return dummy; + } switch (Ndeg) { case 0: { dummy.resize(1); double sum = 0.;