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

#include <LArCaliWaveBuilder.h>

Inheritance diagram for LArCaliWaveBuilder:
Collaboration diagram for LArCaliWaveBuilder:

Public Member Functions

 LArCaliWaveBuilder (const std::string &name, ISvcLocator *pSvcLocator)
 ~LArCaliWaveBuilder ()
StatusCode initialize ()
StatusCode execute (const EventContext &ctx)
 Execute method with EventContext.
virtual StatusCode stop ()
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual StatusCode execute ()
 Execute method without EventContext (deprecated).
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
const EventContext & getContext () const
 Deprecated methods (use the ones with EventContext).
bool filterPassed () const
void setFilterPassed (bool state) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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.

Private Types

typedef std::map< int, LArCaliWaveWaveMap
typedef LArConditionsContainer< WaveMapWaveContainer
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode executeWithAccumulatedDigits (const LArCalibParams *calibParams, const LArCalibLineMapping *clcabling)
StatusCode executeWithStandardDigits (const LArCalibParams *calibParams, const LArCalibLineMapping *clcabling)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKeySC {this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"}
SG::ReadCondHandleKey< LArCalibLineMappingm_calibMapKey {this,"CalibLineKey","LArCalibLineMap","SG Key of calib. line mapping object"}
SG::ReadCondHandleKey< ILArPedestalm_pedKey {this,"PedestalKey","Pedestal","SG Key of pedestal object"}
bool m_useAccumulatedDigits
std::vector< std::string > m_keylist
std::vector< std::string > m_keylistproperty
std::string m_keyoutput
std::string m_groupingType
WaveContainer m_waves
bool m_pedSub
unsigned m_baseline
bool m_recAll
bool m_isSC
bool m_useDacAndIsPulsedIndex
int m_ADCsatur
bool m_checkEmptyPhases
const LArOnlineID_Basem_onlineID
unsigned m_event_counter
int m_NStep
float m_SamplingPeriod
float m_dt
uint16_t m_fatalFebErrorPattern
int m_usePatt
bool m_useParams
bool m_useParamsSel
int m_NSubStep
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 28 of file LArCaliWaveBuilder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ WaveContainer

◆ WaveMap

typedef std::map<int, LArCaliWave> LArCaliWaveBuilder::WaveMap
private

Definition at line 56 of file LArCaliWaveBuilder.h.

Constructor & Destructor Documentation

◆ LArCaliWaveBuilder()

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

Definition at line 25 of file LArCaliWaveBuilder.cxx.

26 : AthAlgorithm(name, pSvcLocator),
27 m_groupingType("ExtendedFeedThrough"), // SubDetector, Single, FeedThrough
28 m_onlineID(nullptr),
30{
31 declareProperty("UseAccumulatedDigits", m_useAccumulatedDigits=true);
33 declareProperty("KeyOutput", m_keyoutput="LArCaliWave");
34 declareProperty("SubtractPed", m_pedSub=true);
35 declareProperty("NBaseline", m_baseline=1);
36 declareProperty("SamplingPeriod", m_SamplingPeriod=1./(40.08*megahertz));
37 declareProperty("NSteps", m_NStep=24); // Number of Delay Steps. FIXME: Try to get this information for somewhere else
38 declareProperty("ADCsaturation", m_ADCsatur=0) ;
39 declareProperty("GroupingType", m_groupingType);
40 declareProperty("UseDacAndIsPulsedIndex", m_useDacAndIsPulsedIndex=false);
41 declareProperty("CheckEmptyPhases", m_checkEmptyPhases=false);
42 declareProperty("RecAllCells", m_recAll=false);
43 declareProperty("UsePattern", m_usePatt=-1);
44 declareProperty("UseParams", m_useParams=false); // Read LArCalibParams from DetStore ?
45 declareProperty("UseParamsSel", m_useParamsSel=false); // Use LArCalibParams from DetStore for event selection ?
46 declareProperty("isSC", m_isSC=false);
47 declareProperty("NumSubStep", m_NSubStep=1);
48
49
51
53
54}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const LArOnlineID_Base * m_onlineID
std::vector< std::string > m_keylistproperty

◆ ~LArCaliWaveBuilder()

LArCaliWaveBuilder::~LArCaliWaveBuilder ( )
default

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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() [1/2]

virtual StatusCode AthAlgorithm::execute ( )
inlinevirtualinherited

Execute method without EventContext (deprecated).

Override this method if the EventContext is not needed.

Reimplemented in AthenaMonManager, AthPrescaler, BuildVertexPointingAlg, CP::AsgClassificationDecorationAlg, CP::AsgEnergyDecoratorAlg, CP::AsgEventScaleFactorAlg, CP::AsgLeptonTrackDecorationAlg, CP::AsgObjectScaleFactorAlg, CP::AsgPriorityDecorationAlg, CP::AsgSelectionAlg, CP::AsgShallowCopyAlg, CP::AsgUnionPreselectionAlg, CP::AsgUnionSelectionAlg, CP::AsgViewFromSelectionAlg, CP::AsgxAODNTupleMakerAlg, CP::BJetCalibrationAlg, CP::BootstrapGeneratorAlg, CP::BTaggingEfficiencyAlg, CP::BTaggingInformationDecoratorAlg, CP::BTaggingTriggerEfficiencyAlg, CP::BTaggingTriggerMatchingAlg, CP::ChargeSelectorAlg, CP::CopyNominalSelectionAlg, CP::DileptonInvariantMassSelectorAlg, CP::DileptonInvariantMassWindowSelectorAlg, CP::DileptonOSSFInvariantMassWindowSelectorAlg, CP::DiTauEfficiencyCorrectionsAlg, CP::DiTauMassCalculatorAlg, CP::DiTauSmearingAlg, CP::DiTauTruthMatchingAlg, CP::EgammaCalibrationAndSmearingAlg, CP::EgammaFSRForMuonsCollectorAlg, CP::EgammaIsolationCorrectionAlg, CP::EgammaIsolationSelectionAlg, CP::ElectronEfficiencyCorrectionAlg, CP::ElectronSiHitDecAlg, CP::EventCutFlowHistAlg, CP::EventFlagSelectionAlg, CP::EventSelectionByObjectFlagAlg, CP::EventStatusSelectionAlg, CP::FakeBkgCalculatorAlg, CP::InDetTrackBiasingAlg, CP::InDetTrackExtraVarDecoratorAlg, CP::InDetTrackSelectionAlg, CP::InDetTrackSmearingAlg, CP::JetCalibAlg, CP::JetCalibrationAlg, CP::JetDecoratorAlg, CP::JetFFSmearingAlg, CP::JetGhostMuonAssociationAlg, CP::JetModifierAlg, CP::JetNGhostSelectorAlg, CP::JetReclusteringAlg, CP::JetSelectionAlg, CP::JetTriggerDecoratorAlg, CP::JetUncertaintiesAlg, CP::JvtEfficiencyAlg, CP::JvtUpdateAlg, CP::KinematicHistAlg, CP::LeptonSFCalculatorAlg, CP::MCTCDecorationAlg, CP::MetadataHistAlg, CP::MetBuilderAlg, CP::MetMakerAlg, CP::MetSignificanceAlg, CP::MissingETPlusTransverseMassSelectorAlg, CP::MissingETSelectorAlg, CP::MuonCalibrationAndSmearingAlg, CP::MuonEfficiencyScaleFactorAlg, CP::MuonIsolationAlg, CP::MuonSelectionAlgV2, CP::MuonTriggerEfficiencyScaleFactorAlg, CP::NJetDecoratorAlg, CP::NLargeRJetMassWindowSelectorAlg, CP::NObjectMassSelectorAlg, CP::NObjectPtSelectorAlg, CP::ObjectCutFlowHistAlg, CP::OverlapRemovalAlg, CP::PhotonEfficiencyCorrectionAlg, CP::PhotonExtraVariablesAlg, CP::PhotonShowerShapeFudgeAlg, CP::PileupReweightingAlg, CP::PileupReweightingProvider, CP::PMGTruthWeightAlg, CP::RNtupleTreeMakerAlg, CP::RunNumberSelectorAlg, CP::RunPartonHistoryAlg, CP::SaveFilterAlg, CP::SecVertexTruthMatchAlg, CP::SSVWeightsAlg, CP::SumNLeptonPtSelectorAlg, CP::SysListDumperAlg, CP::SysTruthWeightAlg, CP::TauCombineMuonRMTausAlg, CP::TauEfficiencyCorrectionsAlg, CP::TauSmearingAlg, CP::TauTruthMatchingAlg, CP::TransverseMassSelectorAlg, CP::TreeFillerAlg, CP::TreeMakerAlg, CP::TrigEventSelectionAlg, CP::TrigGlobalEfficiencyAlg, CP::TrigMatchingAlg, CP::TrigPrescalesAlg, CP::VGammaORAlg, CP::xAODWriterAlg, CP::XbbEfficiencyAlg, CP::XbbInformationDecoratorAlg, DecoratePhotonPointingAlg, DecorateVertexScoreAlg, DumpGeo, EL::AnaAlgorithm, EL::UnitTestAlg2, EL::UnitTestAlg3, EL::UnitTestAlg4, EL::UnitTestAlg5, EL::UnitTestAlg7, EventReco::KLFitterFinalizeOutputAlg, EventReco::RunKLFitterAlg, GRLSelectorAlg, IdDictCnvTest, InDetUpdateCaches, JetGlobalEventSetup, LArAutoCorrAlgToDB, LArAutoCorrFromStdNtuple, LArBadChannelHunter, LArBlockCorrections, LArCalibCopyAlg< CONDITIONSCONTAINER >, LArCalibCopyAlg< LArDAC2uAMC >, LArCalibCopyAlg< LArPhysWaveContainer >, LArCalibCopyAlg< LArTdriftComplete >, LArCalibPatchingAlg< CONDITIONSCONTAINER >, LArCalibPatchingAlg< LArAutoCorrComplete >, LArCalibPatchingAlg< LArCaliWaveContainer >, LArCalibPatchingAlg< LArMphysOverMcalComplete >, LArCalibPatchingAlg< LArRampComplete >, LArCalibValidationAlg< CONDITIONSCONTAINER, REFCONTAINER >, LArCalibValidationAlg< LArAutoCorrComplete, LArAutoCorrComplete >, LArCalibValidationAlg< LArCaliWaveContainer, LArCaliWaveContainer >, LArCalibValidationAlg< LArPedestalComplete, ILArPedestal >, LArCalibValidationAlg< LArRampComplete, ILArRamp >, LArCaliWaveSelector, LArCompleteToFlat, LArDeltaRespPredictor, LArDSPThresholdFillInline, LArDuplicateConstants, LArFillDSPConfig, LArFlatFromFile, LArGeoWeightsFill, LArMasterWaveBuilder, LArMphysOverMcalFromTuple, LArOFCAlg, LArOFCBin_PhysCaliTdiffFromStdNtuple, LArOFCtoOFC, LArOFPhaseFill, LArParamsFromStdNtuple, LArPhysWaveFromAscii, LArPhysWaveFromStdNtuple, LArPhysWaveFromTuple, LArPhysWavePredictor, LArPhysWaveShifter, LArRampAdHocPatchingAlg, LArReadParamsFromFile< DATA >, LArReadParamsFromFile< LArCableAttenuationComplete >, LArReadParamsFromFile< LArCableLengthComplete >, LArReadParamsFromFile< LArCaliPulseParamsComplete >, LArReadParamsFromFile< LArDetCellParamsComplete >, LArReadParamsFromFile< LArEMEC_CphiComplete >, LArReadParamsFromFile< LArEMEC_HValphaComplete >, LArReadParamsFromFile< LArEMEC_HVbetaComplete >, LArReadParamsFromFile< LArMphysOverMcalComplete >, LArReadParamsFromFile< LArPhysCaliTdiffComplete >, LArReadParamsFromFile< LArRinjComplete >, LArReadParamsFromFile< LArTdriftComplete >, LArReadParamsFromFile< LArTshaperComplete >, LArRTMParamExtractor, LArShapeFromStdNtuple, LArTimePhysPrediction, LisNtuple, LVL1::eFEXDriver, LVL1::L1CaloTriggerTowerDecoratorAlg, LVL1::L1TopoSimulation, LVL1::TrigT1MBTS, OverlapRemovalGenUseAlg, PyAthena::Alg, SGInputLoader, SUSYToolsAlg, TBBPCRec, TBMWPCRec, TBScintillatorRec, TBTailCatcherRec, TBTrackInfoFromTag, Trig::TrigMatchTestAlg, TrkEDMTestAlg, ZdcLEDNtuple, and ZdcNtuple.

Definition at line 76 of file AthAlgorithm.h.

76 {
77 throw GaudiException( "execute() or execute(const EventContext&) needs to be implemented", name(),
78 StatusCode::FAILURE );
79 }

◆ execute() [2/2]

StatusCode LArCaliWaveBuilder::execute ( const EventContext & )
virtual

Execute method with EventContext.

Override this method if acccess to the EventContext is needed.

Reimplemented from AthAlgorithm.

Definition at line 119 of file LArCaliWaveBuilder.cxx.

120{
121 // using EvtId
122 m_event_counter=ctx.eventID().event_number()+1;// evt. starts from 0
123
124 const LArCalibParams* calibParams = nullptr;
125 const LArCalibLineMapping *clcabling=nullptr;
126 if(m_useParamsSel || m_useParams) { // we have to check in which event we are, reading only ones corresponding
127 // to our pattern
128 ATH_CHECK(detStore()->retrieve(calibParams,"LArCalibParams"));
129 unsigned numPatt=calibParams->getNumberPatterns(HWIdentifier(0));
130
131 unsigned counter=m_event_counter;
133 if (counter % calibParams->NTrigger(HWIdentifier(1007091712)) != 0U) return StatusCode::SUCCESS;
134 }
135
136 counter /= calibParams->NTrigger(HWIdentifier(1007091712));
137 unsigned iDAC;
138 unsigned iDel;
139 for(iDAC=1; iDAC<=calibParams->getNumberDACs(HWIdentifier(0)); ++iDAC) {
140 for(iDel=0; iDel<calibParams->getNumberDelays(HWIdentifier(0)); ++iDel) {
141 if(counter <= m_NSubStep*iDAC*iDel*numPatt + m_NSubStep*m_usePatt && counter > m_NSubStep*iDAC*iDel*numPatt+ m_NSubStep*(m_usePatt-1) ) {
142 break;
143 }
144 }
145 if(iDel<calibParams->getNumberDelays(HWIdentifier(0))) break;
146 }
147 if(iDAC>calibParams->getNumberDACs(HWIdentifier(0))) return StatusCode::SUCCESS;
148
149 ATH_MSG_DEBUG("Good event "<<m_event_counter<<" : "<<counter<<" for pattern " << m_usePatt << " out of " << numPatt << " patterns " << calibParams->NTrigger(HWIdentifier(1007091712)) <<" triggers "<<iDAC<<" iDAC "<<iDel<<" iDel");
150 ATH_MSG_DEBUG("Good event "<<m_NSubStep*iDAC*iDel*numPatt+ m_NSubStep*(m_usePatt-1) <<" : " << m_NSubStep*iDAC*iDel*numPatt + m_NSubStep*m_usePatt);
151
152 SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey, ctx};
153 clcabling =*clHdl;
154 if(!clcabling) {
155 ATH_MSG_WARNING( "Do not have calib line mapping from key " << m_calibMapKey.key() );
156 return StatusCode::FAILURE;
157 }
158
159 }
160
161 if ( m_event_counter < 100 || m_event_counter%100==0 )
162 ATH_MSG_INFO( "Processing event " << m_event_counter );
163
164 if (m_keylist.empty()) {
165 ATH_MSG_ERROR( "Key list is empty! No containers to process!" );
166 return StatusCode::FAILURE;
167 }
168
169
170 // execute() method...
172 return executeWithAccumulatedDigits(calibParams, clcabling);
173 else
174 return executeWithStandardDigits(calibParams, clcabling);
175}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
const ServiceHandle< StoreGateSvc > & detStore() const
SG::ReadCondHandleKey< LArCalibLineMapping > m_calibMapKey
StatusCode executeWithStandardDigits(const LArCalibParams *calibParams, const LArCalibLineMapping *clcabling)
std::vector< std::string > m_keylist
StatusCode executeWithAccumulatedDigits(const LArCalibParams *calibParams, const LArCalibLineMapping *clcabling)
unsigned getNumberDelays(const HWIdentifier calibModuleID) const
unsigned getNumberPatterns(const HWIdentifier calibModuleID) const
unsigned getNumberDACs(const HWIdentifier calibModuleID) const
unsigned NTrigger(const HWIdentifier calibModuleID) const

◆ executeWithAccumulatedDigits()

StatusCode LArCaliWaveBuilder::executeWithAccumulatedDigits ( const LArCalibParams * calibParams,
const LArCalibLineMapping * clcabling )
private

Definition at line 177 of file LArCaliWaveBuilder.cxx.

178{
180
181 const LArAccumulatedCalibDigitContainer* larAccumulatedCalibDigitContainer = nullptr;
182
183 std::vector<std::string>::const_iterator key_it=m_keylist.begin();
184 std::vector<std::string>::const_iterator key_it_e=m_keylist.end();
185 int foundkey = 0;
186 for (;key_it!=key_it_e; ++key_it) { //Loop over all containers that are to be processed (e.g. different gains)
187
188 sc = evtStore()->retrieve(larAccumulatedCalibDigitContainer,*key_it);
189 if (sc.isFailure()) {
190 ATH_MSG_WARNING( "Cannot read LArAccumulatedCalibDigitContainer from StoreGate! key=" << *key_it );
191 if ( (std::next(key_it) == key_it_e) && foundkey==0 ){
192 ATH_MSG_ERROR("None of the provided LArAccumulatedDigitContainer keys could be read");
193 return StatusCode::FAILURE;
194 }else{
195 continue;
196 }
197 }
198 foundkey+=1;
199
200 const LArFebErrorSummary* febErrSum=nullptr;
201 if (evtStore()->contains<LArFebErrorSummary>("LArFebErrorSummary")) {
202 sc=evtStore()->retrieve(febErrSum);
203 if (sc.isFailure()) {
204 ATH_MSG_ERROR( "Failed to retrieve FebErrorSummary object!" );
205 return sc;
206 }
207 }
208 else
209 if (m_event_counter==0)
210 ATH_MSG_WARNING( "No FebErrorSummaryObject found! Feb errors not checked!" );
211
212 HWIdentifier lastFailedFEB(0);
213 LArAccumulatedCalibDigitContainer::const_iterator it=larAccumulatedCalibDigitContainer->begin();
214 LArAccumulatedCalibDigitContainer::const_iterator it_end=larAccumulatedCalibDigitContainer->end();
215
216 if (it == it_end) {
217 ATH_MSG_DEBUG("LArAccumulatedCalibDigitContainer with key=" << *key_it << " is empty ");
218 continue; // at this event LArAccumulatedCalibDigitContainer is empty, do not even try to loop on it...
219 }
220
221 const float delayScale = larAccumulatedCalibDigitContainer->getDelayScale();
222 const float deltaDelay = 25*ns/(delayScale*m_NStep);
223
224 for (;it!=it_end; ++it) { // Loop over all cells
225
226 bool ispulsed=false;
227 if(m_useParams && calibParams && clcabling) { // got LArCalibParams from DetStore
228 const std::vector<HWIdentifier>& calibLineLeg = clcabling->calibSlotLine((*it)->hardwareID());
229 for (const HWIdentifier &calibLineHWID : calibLineLeg) {// loop calib lines
230 ispulsed |= calibParams->isPulsed(m_event_counter,calibLineHWID);
231 }
232 } else {
233 ispulsed=(*it)->isPulsed();
234 }
235 if ( (!m_recAll) && !ispulsed ) {
236 ATH_MSG_DEBUG( "Non pulsed cell " << m_onlineID->channel_name((*it)->hardwareID())<<" in evt. "<<m_event_counter );
237 continue; // Check if cell is pulsed
238 }
239 HWIdentifier chid=(*it)->hardwareID();
240 HWIdentifier febid=m_onlineID->feb_Id(chid);
241 if (febErrSum) {
242 const uint16_t febErrs=febErrSum->feb_error(febid);
243 if (febErrs & m_fatalFebErrorPattern) {
244 if (febid!=lastFailedFEB) {
245 lastFailedFEB=febid;
246 ATH_MSG_ERROR( "Event " << m_event_counter << " Feb " << m_onlineID->channel_name(febid)
247 << " reports error(s):" << febErrSum->error_to_string(febErrs) << ". Data ignored." );
248 }
249 continue;
250 }
251 }
252 CaloGain::CaloGain gain=(*it)->gain();
253
254 if (gain<0 || gain>CaloGain::LARNGAIN) {
255 ATH_MSG_ERROR( "Found not-matching gain number ("<< (int)gain <<")" );
256 return StatusCode::FAILURE;
257 }
258
259 // transform sampleSum vector from uint32_t to double
260 std::vector<double> samplesum;
261 std::vector < uint64_t >::const_iterator samplesum_it=(*it)->sampleSum().begin();
262 std::vector < uint64_t >::const_iterator samplesum_it_e=(*it)->sampleSum().end();
263 for (;samplesum_it!=samplesum_it_e; ++samplesum_it)
264 samplesum.push_back((double)(*samplesum_it));
265
266 // transform sample2Sum vector from uint32_t to double
267 std::vector<double> sample2sum;
268 std::vector < uint64_t >::const_iterator sample2sum_it=(*it)->sample2Sum().begin();
269 std::vector < uint64_t >::const_iterator sample2sum_it_e=(*it)->sample2Sum().end();
270 for (;sample2sum_it!=sample2sum_it_e; ++sample2sum_it)
271 sample2sum.push_back((double)(*sample2sum_it));
272
273 WaveMap& waveMap = m_waves.get(chid,gain);
274
275 //make dacPulsed which has dac and four bits of is pulsed info
276 int dacPulsed;
277 float delay = (*it)->delay();
278 int dac=(*it)->DAC();
279 int index;
280 int pulsed=0;
281 if(m_useParams && calibParams && clcabling) { // get LArCalibParams from DetStore
282 const std::vector<HWIdentifier>& calibLineLeg = clcabling->calibSlotLine((*it)->hardwareID());
283 if(calibLineLeg.empty()) {
284 ATH_MSG_WARNING("Why do not have calib lines for "<<(*it)->hardwareID()<<" ?");
285 continue;
286 }
287 dac=calibParams->DAC(m_event_counter,calibLineLeg[0]);
288 dacPulsed=dac;
289 delay = calibParams->Delay(m_event_counter,calibLineLeg[0]);
290 for (unsigned i=0; i<calibLineLeg.size(); ++i) {// loop calib lines
291 if(calibParams->isPulsed(m_event_counter,calibLineLeg[i])){
292 ATH_MSG_DEBUG((*it)->hardwareID().get_identifier32().get_compact() << " GR: line pulsed true, line="<<i+1);
293 dacPulsed=(dacPulsed | (0x1 << (15+i+1)));
294 pulsed=(pulsed | (0x1 << (15+i+1)));
295 }
296
297 }
298 } else {
299 dacPulsed=(*it)->DAC();
300 for(int iLine=1;iLine<5;iLine++){
301 if((*it)->isPulsed(iLine)){
302 ATH_MSG_DEBUG((*it)->hardwareID().get_identifier32().get_compact() <<" GRAV: line pulsed true, line="<<iLine);
303 dacPulsed=(dacPulsed | (0x1 << (15+iLine)));
304 pulsed=(pulsed | (0x1 << (15+iLine)));
305 }
306 }
307 }
308
309 if(m_useDacAndIsPulsedIndex){//switch used to turn on the option to have indexs that are DAC and isPulsed info
310 index = dacPulsed;
311 } else {
312 index = dac;
313 }
314
315 ATH_MSG_DEBUG( "Cell " << m_onlineID->channel_name(chid) << " gain: "<<gain );
316 ATH_MSG_DEBUG( "with " << (*it)->sampleSum().size() << " samples " << index << " DAC " << delay << " delay " << dacPulsed << " dacPulsed " << pulsed << " pulsed");
317
318 WaveMap::iterator itm = waveMap.find(index);
319
320 if ( itm == waveMap.end() ) { // A new LArCaliWave is booked
321 LArCaliWave wave(samplesum.size()*m_NStep, m_dt, dac, pulsed, LArWave::meas);
322 itm = (waveMap.insert(WaveMap::value_type(index,wave))).first;
323 ATH_MSG_DEBUG("index: "<<index<<" new wave inserted");
324 }
325 (*itm).second.addAccumulatedEvent(int(std::roundf(delay/deltaDelay)), m_NStep,
326 samplesum, sample2sum, (*it)->nTriggers());
327
328 } //End loop over all cells
329 } //End loop over all containers
330
331 return StatusCode::SUCCESS;
332}
double delay(std::size_t d)
static Double_t sc
LArFebErrorSummary
Definition LArTPCnv.cxx:56
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
double getDelayScale() const
get the delay Scale
std::map< int, LArCaliWave > WaveMap
const std::vector< HWIdentifier > & calibSlotLine(const HWIdentifier id) const
unsigned Delay(const unsigned event, const HWIdentifier calibLineID) const
bool isPulsed(const unsigned event, const HWIdentifier calibLineID) const
unsigned DAC(const unsigned event, const HWIdentifier calibLineID) const
static std::string error_to_string(uint16_t error)
interpret the error in string
uint16_t feb_error(HWIdentifier febid) const
get error for feb
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:116
@ LARNGAIN
Definition CaloGain.h:19
str index
Definition DeMoScan.py:362
::StatusCode StatusCode
StatusCode definition for legacy code.
setWord1 uint16_t

◆ executeWithStandardDigits()

StatusCode LArCaliWaveBuilder::executeWithStandardDigits ( const LArCalibParams * calibParams,
const LArCalibLineMapping * clcabling )
private

Definition at line 335 of file LArCaliWaveBuilder.cxx.

336{
338
339 const LArCalibDigitContainer* larCalibDigitContainer = nullptr;
340
341 std::vector<std::string>::const_iterator key_it=m_keylist.begin();
342 std::vector<std::string>::const_iterator key_it_e=m_keylist.end();
343
344 for (;key_it!=key_it_e; ++key_it) { //Loop over all containers that are to be processed (e.g. different gains)
345
346 sc = evtStore()->retrieve(larCalibDigitContainer,*key_it);
347 if (sc.isFailure()) {
348 ATH_MSG_WARNING( "Cannot read LArCalibDigitContainer from StoreGate! key=" << *key_it );
349 continue; // Try next container
350 }
351
352 LArCalibDigitContainer::const_iterator it=larCalibDigitContainer->begin();
353 LArCalibDigitContainer::const_iterator it_end=larCalibDigitContainer->end();
354
355 if (it == it_end) {
356 ATH_MSG_INFO( "LArCalibDigitContainer with key=" << *key_it << " is empty " );
357 continue; // at this event LArCalibDigitContainer is empty, do not even try to loop on it...
358 }
359
360 const float delayScale = larCalibDigitContainer->getDelayScale();
361 const float deltaDelay = 25*ns/(delayScale*m_NStep);
362
363 for (;it!=it_end; ++it) { // Loop over all cells
364
365 bool pulsed=false;
366 int dac = (*it)->DAC();
367 float delay= (*it)->delay();
368 if(m_useParams && calibParams && clcabling) { // get LArCalibParams from DetStore
369 const std::vector<HWIdentifier>& calibLineLeg = clcabling->calibSlotLine((*it)->hardwareID());
370 dac=calibParams->DAC(m_event_counter,calibLineLeg[0]); // assuming all calib. boards configured equally
371 delay = calibParams->Delay(m_event_counter,calibLineLeg[0]);
372 for (const HWIdentifier &calibLineHWID : calibLineLeg) {// loop calib lines
373 pulsed |= calibParams->isPulsed(m_event_counter,calibLineHWID);
374 }
375 } else {
376 pulsed=(*it)->isPulsed();
377 }
378 if ((!m_recAll) && !pulsed ) continue ; // Check if cell is pulsed
379
380 HWIdentifier chid=(*it)->hardwareID();
381 CaloGain::CaloGain gain=(*it)->gain();
382
383 if (gain<0 || gain>CaloGain::LARNGAIN) {
384 ATH_MSG_ERROR( "Found not-matching gain number ("<< (int)gain <<")" );
385 return StatusCode::FAILURE;
386 }
387
388 // transform samples vector from uint32_t to double
389 std::vector<double> samples;
390 for (short sample : (*it)->samples())
391 samples.push_back((double)(sample));
392
393 WaveMap& waveMap = m_waves.get(chid,gain);
394 WaveMap::iterator itm = waveMap.find(dac);
395
396 if ( itm == waveMap.end() ) { // A new LArCaliWave is booked
397 LArCaliWave wave(samples.size()*m_NStep, m_dt, (*it)->DAC(), 0x1, LArWave::meas );
398 itm = (waveMap.insert(WaveMap::value_type((*it)->DAC(),wave))).first;
399 }
400
401 (*itm).second.addEvent((int)roundf(delay/deltaDelay), m_NStep, samples);
402
403 } //End loop over all cells
404 } //End loop over all containers
405
406 return StatusCode::SUCCESS;
407}
double getDelayScale() const
get delay scale

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::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 50 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 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ filterPassed()

bool AthAlgorithm::filterPassed ( ) const
inherited

Definition at line 94 of file AthAlgorithm.cxx.

94 {
95 return execState( Gaudi::Hive::currentContext() ).filterPassed();
96}

◆ finalize()

StatusCode LArCaliWaveBuilder::finalize ( )
inline

Definition at line 37 of file LArCaliWaveBuilder.h.

37{return StatusCode::SUCCESS;}

◆ getContext()

const EventContext & AthAlgorithm::getContext ( ) const
inherited

Deprecated methods (use the ones with EventContext).

Definition at line 90 of file AthAlgorithm.cxx.

90 {
91 return Gaudi::Hive::currentContext();
92}

◆ initialize()

StatusCode LArCaliWaveBuilder::initialize ( )

Definition at line 59 of file LArCaliWaveBuilder.cxx.

60{
61 if (m_keylistproperty.empty()) {
62 m_keylistproperty.emplace_back("HIGH");
63 m_keylistproperty.emplace_back("MEDIUM");
64 m_keylistproperty.emplace_back("LOW");
65 }
67
68 //FIXME probably useless because m_wave isn't written anywhere
69 StatusCode sc=m_waves.setGroupingType(m_groupingType,msg());
70 if (sc.isFailure()) {
71 ATH_MSG_ERROR( "Failed to set groupingType for LArCaliWave intermediate object" );
72 return sc;
73 }
74
75 ATH_MSG_INFO( "Initialize intermediate Wave object" );
76 sc=m_waves.initialize();
77 if (sc.isFailure()) {
78 ATH_MSG_ERROR( "Failed initialize LArCaliWave intermediate object" );
79 return sc;
80 }
81
84
85
87 ATH_MSG_INFO( "Empty phases check selected." );
88
89 //Get pedestal from CondStore
90 ATH_CHECK( m_pedKey.initialize(m_pedSub) );
91
92 //Get Online helper from DetStore
93 if ( m_isSC ) {
94 const LArOnline_SuperCellID* ll;
95 ATH_CHECK( detStore()->retrieve(ll, "LArOnline_SuperCellID") );
96 m_onlineID = static_cast<const LArOnlineID_Base*>(ll);
97 ATH_MSG_DEBUG(" Found the LArOnline_SuperCellID helper. ");
98 } else { // m_isSC
99 const LArOnlineID* ll;
100 ATH_CHECK( detStore()->retrieve(ll, "LArOnlineID") );
101 m_onlineID = static_cast<const LArOnlineID_Base*>(ll);
102 ATH_MSG_DEBUG(" Found the LArOnlineID helper. ");
103 }
104
105 ATH_CHECK( m_cablingKey.initialize() );
106 ATH_CHECK( m_cablingKeySC.initialize(m_isSC) );
107
108 if(m_usePatt >= 0 && !m_useParamsSel) {
109 ATH_MSG_ERROR("Inconsistent configuration, for UsePattern > 0 the UseParams must be true");
110 return StatusCode::FAILURE;
111 }
112
114
115 return StatusCode::SUCCESS;
116}
SG::ReadCondHandleKey< ILArPedestal > m_pedKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
long long ll

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 118 of file AthAlgorithm.h.

118{ return false; }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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< Gaudi::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.

◆ 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< Gaudi::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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

void AthAlgorithm::setFilterPassed ( bool state) const
inherited

Definition at line 98 of file AthAlgorithm.cxx.

98 {
99 execState( Gaudi::Hive::currentContext() ).setFilterPassed(state);
100}

◆ stop()

StatusCode LArCaliWaveBuilder::stop ( )
virtual

get iterator for all channels for a gain

Definition at line 411 of file LArCaliWaveBuilder.cxx.

412{
413 // Create wave container using feedthru grouping and initialize
414 auto caliWaveContainer = std::make_unique<LArCaliWaveContainer>();
415
416 StatusCode sc=caliWaveContainer->setGroupingType(m_groupingType,msg());
417 if (sc.isFailure()) {
418 ATH_MSG_ERROR( "Failed to set groupingType for LArCaliWaveContainer object" );
419 return sc;
420 }
421
422 ATH_MSG_INFO( "Initialize final Wave object" );
423 sc=caliWaveContainer->initialize();
424 if (sc.isFailure()) {
425 ATH_MSG_ERROR( "Failed initialize LArCaliWaveContainer object" );
426 return sc;
427 }
428
429 const EventContext& ctx = Gaudi::Hive::currentContext();
430 const LArOnOffIdMapping* cabling(nullptr);
431 if( m_isSC ){
432 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKeySC, ctx};
433 cabling = {*cablingHdl};
434 if(!cabling) {
435 ATH_MSG_ERROR("Do not have mapping object " << m_cablingKeySC.key());
436 return StatusCode::FAILURE;
437 }
438
439 }else{
440 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey, ctx};
441 cabling = {*cablingHdl};
442 if(!cabling) {
443 ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
444 return StatusCode::FAILURE;
445 }
446 }
447 SG::ReadCondHandle<ILArPedestal> pedHdl{m_pedKey, ctx};
448 const ILArPedestal* larPedestal{*pedHdl};
449 if(m_pedSub && !larPedestal) {
450 ATH_MSG_DEBUG("No pedestal(s) found ");
451 ATH_MSG_INFO( "Using fake (baseline) pedestal subtraction..." );
452 }
453
454 LArWaveHelper wHelper;
455 int NCaliWave=0;
456
457 // Loop over all gains
458 for (unsigned k=0;k<(int)CaloGain::LARNGAIN;k++) {
459
461
463 WaveContainer::ConditionsMapIterator cell_it = m_waves.begin(gain) ;
464 WaveContainer::ConditionsMapIterator cell_it_e = m_waves.end(gain);
465
466 HWIdentifier lastId;
467
468 for (; cell_it!=cell_it_e; ++cell_it) {
469
470
471 // Get id of this cell - use id from first cell in map
472 //
473 // Some accumulations may be empty and we must skip this
474 // cell. WaveContainer has all 128 channels for each FEB
475 // with at least ONE being read out.
476 //
477
478 const HWIdentifier hwId = cell_it.channelId();
479 if ((!m_recAll) && (!cabling->isOnlineConnected(hwId))) {
480
481 //ATH_MSG_INFO( "Skipping disconnected channel: "<<MSG::hex<<hwId<<MSG::dec );
482 continue; //Ignore disconnected channels
483 }
484
485 const WaveMap& waveMap = (*cell_it);
486 if (waveMap.empty()) {
487 ATH_MSG_INFO( "Empty accumulated wave. Last id: " << MSG::hex
488 //<< lastId << " " << emId->show_to_string(lastId) );
489 << lastId << " this id: "<<hwId<<MSG::dec );
490 continue;
491 }
492
493 lastId = hwId; // save previous id for debug printout
494
495 // Get the vector of waves for this chid,gain
496 LArCaliWaveContainer::LArCaliWaves& dacWaves = caliWaveContainer->get(hwId, gain);
497
498 std::map<int, LArCaliWave>::const_iterator dac_it = cell_it->begin();
499 std::map<int, LArCaliWave>::const_iterator dac_it_e = cell_it->end();
500
501 HWIdentifier chid = cell_it.channelId();
502
503 for (; dac_it != dac_it_e; ++dac_it) {
504
505 const LArCaliWave& thisWave = dac_it->second ;
506
507 if (m_checkEmptyPhases) {
508 const std::vector<int>& thisTriggers = thisWave.getTriggers();
509 for (unsigned i=0;i<thisTriggers.size();++i) {
510 if (thisTriggers[i]==0) {
511 ATH_MSG_FATAL( "Empty phase found in channel 0x" << MSG::hex << chid << MSG::dec
512 << "., aborting reconstruction. Sorry." );
513 return StatusCode::FAILURE;
514 }
515 }
516 }
517
518 float pedAve = 0.;
519
520 if ( m_pedSub ) {
521 if ( larPedestal ) {
522 float pedestal = larPedestal->pedestal(chid,gain);
523 if (pedestal <= (1.0+LArElecCalib::ERRORCODE)) {
524 ATH_MSG_DEBUG("No pedestal(s) found for channel 0x" << MSG::hex << chid << MSG::dec);
525 ATH_MSG_INFO( "Using fake (baseline) pedestal subtraction..." );
526 pedAve = wHelper.getBaseline(thisWave,m_baseline) ;
527 } else {
528 pedAve = pedestal;
529 }
530 } else {
531 pedAve = wHelper.getBaseline(thisWave,m_baseline) ;
532 }
533 ATH_MSG_DEBUG("Pedestal for channel 0x" << MSG::hex << chid << MSG::dec << " is = " << pedAve << " ADC");
534 }
535
536 double waveMax = thisWave.getSample( wHelper.getMax(thisWave) ) ;
537 if ( (!m_recAll) && m_ADCsatur>0 && waveMax>=m_ADCsatur ) {
538 ATH_MSG_INFO( "Absolute ADC saturation at DAC = " << thisWave.getDAC() << " ... skip!" ) ;
539 continue ;
540 } else {
541 dacWaves.emplace_back(((thisWave)+(-pedAve)).getWave() ,
542 thisWave.getErrors(),
543 thisWave.getTriggers(),
544 thisWave.getDt(),
545 thisWave.getDAC(),
546 thisWave.getIsPulsedInt(),
547 thisWave.getFlag() );
548
549 NCaliWave++;
550 }
551
552 } // end of loop DACs
553
554 // intermediate map cleanup (save memory)
555 cell_it->clear();
556
557 } //end loop cells
558
559 } //end loop over m_keyList
560
561 ATH_MSG_INFO( " Summary : Number of cells with a CaliWave reconstructed : " << NCaliWave );
562 ATH_MSG_INFO( " Summary : Number of Barrel PS cells side A or C (connected+unconnected): 3904+ 192 = 4096 " );
563 ATH_MSG_INFO( " Summary : Number of Barrel cells side A or C (connected+unconnected): 50944+2304 = 53248 " );
564 ATH_MSG_INFO( " Summary : Number of EMEC cells side A or C (connected+unconnected): 31872+3456 = 35328 " );
565 ATH_MSG_INFO( " Summary : Number of HEC cells side A or C (connected+unconnected): 2816+ 256 = 3072 " );
566 ATH_MSG_INFO( " Summary : Number of FCAL cells side A or C (connected+unconnected): 1762+ 30 = 1792 " );
567
568 // Record in detector store with key (m_keyoutput)
569 ATH_CHECK( detStore()->record(std::move(caliWaveContainer), m_keyoutput) );
570
571 ATH_MSG_INFO( "LArCaliWaveBuilder has finished." );
572 return StatusCode::SUCCESS;
573}
#define ATH_MSG_FATAL(x)
virtual float pedestal(const HWIdentifier &id, int gain) const =0
int getIsPulsedInt() const
isPulsed value
int getDAC() const
DAC value.
ConditionsMap::iterator ConditionsMapIterator
const std::vector< int > & getTriggers() const
trigger vector
const std::vector< double > & getErrors() const
error vector
double getBaseline(const LArWave &theWave, unsigned nBase) const
unsigned int getMax(const LArWave &theWave) const
return index of maximum sample
const double & getSample(const unsigned int i) const
Amplitude per time bin.
Definition LArWave.h:53
const double & getDt() const
delta time
Definition LArWave.h:50
unsigned getFlag() const
flag: ...
Definition LArWave.h:178

◆ 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

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 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");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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 }

Member Data Documentation

◆ m_ADCsatur

int LArCaliWaveBuilder::m_ADCsatur
private

Definition at line 74 of file LArCaliWaveBuilder.h.

◆ m_baseline

unsigned LArCaliWaveBuilder::m_baseline
private

Definition at line 62 of file LArCaliWaveBuilder.h.

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArCaliWaveBuilder::m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
private

Definition at line 41 of file LArCaliWaveBuilder.h.

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

◆ m_cablingKeySC

SG::ReadCondHandleKey<LArOnOffIdMapping> LArCaliWaveBuilder::m_cablingKeySC {this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"}
private

Definition at line 42 of file LArCaliWaveBuilder.h.

42{this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"};

◆ m_calibMapKey

SG::ReadCondHandleKey<LArCalibLineMapping> LArCaliWaveBuilder::m_calibMapKey {this,"CalibLineKey","LArCalibLineMap","SG Key of calib. line mapping object"}
private

Definition at line 43 of file LArCaliWaveBuilder.h.

43{this,"CalibLineKey","LArCalibLineMap","SG Key of calib. line mapping object"};

◆ m_checkEmptyPhases

bool LArCaliWaveBuilder::m_checkEmptyPhases
private

Definition at line 77 of file LArCaliWaveBuilder.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dt

float LArCaliWaveBuilder::m_dt
private

Definition at line 84 of file LArCaliWaveBuilder.h.

◆ m_event_counter

unsigned LArCaliWaveBuilder::m_event_counter
private

Definition at line 81 of file LArCaliWaveBuilder.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::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 121 of file AthAlgorithm.h.

◆ m_fatalFebErrorPattern

uint16_t LArCaliWaveBuilder::m_fatalFebErrorPattern
private

Definition at line 86 of file LArCaliWaveBuilder.h.

◆ m_groupingType

std::string LArCaliWaveBuilder::m_groupingType
private

Definition at line 53 of file LArCaliWaveBuilder.h.

◆ m_isSC

bool LArCaliWaveBuilder::m_isSC
private

Definition at line 68 of file LArCaliWaveBuilder.h.

◆ m_keylist

std::vector<std::string> LArCaliWaveBuilder::m_keylist
private

Definition at line 50 of file LArCaliWaveBuilder.h.

◆ m_keylistproperty

std::vector<std::string> LArCaliWaveBuilder::m_keylistproperty
private

Definition at line 51 of file LArCaliWaveBuilder.h.

◆ m_keyoutput

std::string LArCaliWaveBuilder::m_keyoutput
private

Definition at line 52 of file LArCaliWaveBuilder.h.

◆ m_NStep

int LArCaliWaveBuilder::m_NStep
private

Definition at line 82 of file LArCaliWaveBuilder.h.

◆ m_NSubStep

int LArCaliWaveBuilder::m_NSubStep
private

Definition at line 91 of file LArCaliWaveBuilder.h.

◆ m_onlineID

const LArOnlineID_Base* LArCaliWaveBuilder::m_onlineID
private

Definition at line 79 of file LArCaliWaveBuilder.h.

◆ m_pedKey

SG::ReadCondHandleKey<ILArPedestal> LArCaliWaveBuilder::m_pedKey {this,"PedestalKey","Pedestal","SG Key of pedestal object"}
private

Definition at line 44 of file LArCaliWaveBuilder.h.

44{this,"PedestalKey","Pedestal","SG Key of pedestal object"};

◆ m_pedSub

bool LArCaliWaveBuilder::m_pedSub
private

Definition at line 61 of file LArCaliWaveBuilder.h.

◆ m_recAll

bool LArCaliWaveBuilder::m_recAll
private

Definition at line 65 of file LArCaliWaveBuilder.h.

◆ m_SamplingPeriod

float LArCaliWaveBuilder::m_SamplingPeriod
private

Definition at line 83 of file LArCaliWaveBuilder.h.

◆ m_useAccumulatedDigits

bool LArCaliWaveBuilder::m_useAccumulatedDigits
private

Definition at line 46 of file LArCaliWaveBuilder.h.

◆ m_useDacAndIsPulsedIndex

bool LArCaliWaveBuilder::m_useDacAndIsPulsedIndex
private

Definition at line 71 of file LArCaliWaveBuilder.h.

◆ m_useParams

bool LArCaliWaveBuilder::m_useParams
private

Definition at line 89 of file LArCaliWaveBuilder.h.

◆ m_useParamsSel

bool LArCaliWaveBuilder::m_useParamsSel
private

Definition at line 90 of file LArCaliWaveBuilder.h.

◆ m_usePatt

int LArCaliWaveBuilder::m_usePatt
private

Definition at line 88 of file LArCaliWaveBuilder.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_waves

WaveContainer LArCaliWaveBuilder::m_waves
private

Definition at line 58 of file LArCaliWaveBuilder.h.


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