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

CTB: code to read digits. More...

#include <ReadLArDigits.h>

Inheritance diagram for ReadLArDigits:
Collaboration diagram for ReadLArDigits:

Classes

class  SortDigits
 CTB: code to read digits. More...

Public Member Functions

 ReadLArDigits (const std::string &name, ISvcLocator *pSvcLocator)
 ~ReadLArDigits ()
StatusCode initialize ()
StatusCode execute (const EventContext &ctx)
 Execute method with EventContext.
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 ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

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, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"}
int m_count
const LArEM_IDm_emId
const LArOnlineIDm_onlineHelper
std::ofstream m_outfile
SG::ReadHandleKey< LArDigitContainerm_containerKey { this, "ContainerKey", "FREE", "" }
std::string m_dumpFile
bool m_printCellLoc
bool m_printFebChan
NTuple::Tuple * m_ntuplePtr
NTuple::Item< long > m_cellIndex
NTuple::Array< long > m_layer
NTuple::Array< long > m_eta
NTuple::Array< long > m_phi
NTuple::Array< long > m_gain
NTuple::Array< long > m_barrel_ec
NTuple::Array< long > m_pos_neg
NTuple::Array< long > m_FT
NTuple::Array< long > m_slot
NTuple::Array< long > m_channel
NTuple::Matrix< long > m_samples
NTuple::Item< long > m_Nsamples
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

CTB: code to read digits.

Author
Walter Lampl

Definition at line 33 of file ReadLArDigits.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ReadLArDigits()

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

Definition at line 17 of file ReadLArDigits.cxx.

17 : AthAlgorithm(name, pSvcLocator),
18 m_emId(nullptr),
19 m_onlineHelper(nullptr),
20 m_ntuplePtr(nullptr)
21
22{m_count=0;
23 declareProperty("DumpFile",m_dumpFile="");
24 declareProperty("PrintCellLocation",m_printCellLoc=false);
25 declareProperty("PrintFebChan",m_printFebChan=true);
26
27}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const LArEM_ID * m_emId
NTuple::Tuple * m_ntuplePtr
const LArOnlineID * m_onlineHelper
std::string m_dumpFile

◆ ~ReadLArDigits()

ReadLArDigits::~ReadLArDigits ( )

Definition at line 29 of file ReadLArDigits.cxx.

30{//empty
31}

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 ReadLArDigits::execute ( const EventContext & )
virtual

Execute method with EventContext.

Override this method if acccess to the EventContext is needed.

Reimplemented from AthAlgorithm.

Definition at line 85 of file ReadLArDigits.cxx.

86{
87 m_count++;
88 ATH_MSG_VERBOSE( "======== executing event "<< m_count << " ========" );
89 ATH_MSG_VERBOSE( "Retrieving LArDigitContainer. Key= " << m_containerKey.key() );
90 SG::ReadHandle<LArDigitContainer> larDigitContIn (m_containerKey, ctx);
91
92 // View container copy.
93 LArDigitContainer larDigitCont (*larDigitContIn);
94
95 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey, ctx};
96 const LArOnOffIdMapping* cabling{*cablingHdl};
97 if(!cabling) {
98 ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
99 return StatusCode::FAILURE;
100 }
101
102
103 if (m_outfile.is_open()) {
104 SortDigits sortDigits(m_onlineHelper);
105 std::sort(larDigitCont.begin(),larDigitCont.end(),sortDigits);
106 }
107 unsigned cellCounter=0;
108 m_cellIndex=0;
109 if (!larDigitCont.empty())
110 m_Nsamples=larDigitCont.front()->samples().size();
111 else
112 m_Nsamples=0;
113 for (const LArDigit* digit : larDigitCont) {
114 HWIdentifier chid=digit->hardwareID();
115 const std::vector<short>& vSamples=digit->samples();
116 m_cellIndex++;
117 try {
118 const Identifier id=cabling->cnvToIdentifier(chid);
119 if (m_emId->is_lar_em(id))
120 {m_eta[cellCounter]=m_emId->eta(id);
121 m_phi[cellCounter]=m_emId->phi(id);
122 m_layer[cellCounter]=m_emId->sampling(id);
123 }
124 else {
125 m_eta[cellCounter]=0;
126 m_phi[cellCounter]=0;
127 m_layer[cellCounter]=0;
128 }
129 }
130 catch (LArID_Exception & except) {
131 m_eta[cellCounter]=-999;
132 m_phi[cellCounter]=-999;
133 m_layer[cellCounter]=-999;
134 }
135 m_barrel_ec[cellCounter]=m_onlineHelper->barrel_ec(chid);
136 m_pos_neg[cellCounter] = m_onlineHelper->pos_neg(chid);
137 m_FT[cellCounter] = m_onlineHelper->feedthrough(chid);
138 m_slot[cellCounter] = m_onlineHelper->slot(chid);
139 m_channel[cellCounter] = m_onlineHelper->channel(chid);
140 m_gain[cellCounter]=digit->gain();
141
142 int nSamples=vSamples.size();
143 for (int i=0;i<nSamples && i<32;i++)
144 m_samples[cellCounter][i]=vSamples[i];
145
146 if (m_outfile.is_open()) {
147 if (m_printCellLoc) {
148 if (m_eta[cellCounter]==-999 && m_phi[cellCounter]==-999 && m_layer[cellCounter]==-999)
149 m_outfile << "Cell l/e/p= <ILLEGAL IDENTIFIER> ";
150 else
151 m_outfile << "Cell l/e/p= " << m_layer[cellCounter] << "/" << m_eta[cellCounter]
152 << "/" << m_phi[cellCounter] << " ";
153 }
154 if (m_printFebChan)
155 m_outfile << "FebId= 0x" << std::hex << m_onlineHelper->feb_Id(chid).get_compact()
156 << std::dec << " Ch= " << m_channel[cellCounter] << " ";
157 for (int i=0;i<nSamples;i++) {
158 m_outfile << " " << vSamples[i];
159 }
160 m_outfile << " G=" << m_gain[cellCounter] << std::endl;
161 }
162 cellCounter++;
163 }
164 ATH_CHECK( ntupleSvc()->writeRecord(m_ntuplePtr) );
165
166 if (m_count%1000==0)
167 ATH_MSG_INFO( "Event " << m_count << " contains " << cellCounter << " channels" );
168 return StatusCode::SUCCESS;
169}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
INTupleSvc * ntupleSvc()
CTB: code to read digits.
NTuple::Array< long > m_channel
NTuple::Matrix< long > m_samples
NTuple::Array< long > m_phi
NTuple::Array< long > m_layer
NTuple::Array< long > m_barrel_ec
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
NTuple::Array< long > m_gain
NTuple::Item< long > m_cellIndex
SG::ReadHandleKey< LArDigitContainer > m_containerKey
NTuple::Array< long > m_slot
NTuple::Array< long > m_pos_neg
NTuple::Array< long > m_eta
std::ofstream m_outfile
NTuple::Array< long > m_FT
NTuple::Item< long > m_Nsamples
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ 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 ReadLArDigits::finalize ( )

Definition at line 171 of file ReadLArDigits.cxx.

172{
173 if (m_outfile.is_open())
174 m_outfile.close();
175 ATH_MSG_INFO( "finalize ReadLarDigits" );
176 return StatusCode::SUCCESS;
177}

◆ 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 ReadLArDigits::initialize ( )

Definition at line 33 of file ReadLArDigits.cxx.

34{
35 ATH_MSG_INFO( "Initialize" );
36
37 const CaloCell_ID* idHelper = nullptr;
38 ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
39 m_emId=idHelper->em_idHelper();
40
41 ATH_CHECK(m_cablingKey.initialize());
42 ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
43
44 if (!m_dumpFile.empty())
45 m_outfile.open(m_dumpFile.c_str(),std::ios::out);
46 //Ntuple booking
47
48
49 NTupleFilePtr file1(ntupleSvc(),"/NTUPLES/FILE1");
50 if (!file1) {
51 ATH_MSG_ERROR( "Booking of NTuple failed" );
52 return StatusCode::FAILURE;
53 }
54 NTuplePtr nt(ntupleSvc(),"/NTUPLES/FILE1/LARDIGITS");
55 if (!nt) {
56 nt=ntupleSvc()->book("/NTUPLES/FILE1/LARDIGITS",CLID_ColumnWiseTuple,"LArDigits");
57 }
58 if (!nt) {
59 ATH_MSG_ERROR( "Booking of NTuple failed" );
60 return StatusCode::FAILURE;
61 }
62
63 ATH_CHECK( nt->addItem("icell",m_cellIndex,0,3600) );
64 ATH_CHECK( nt->addItem("layer",m_cellIndex,m_layer) );
65 ATH_CHECK( nt->addItem("ieta",m_cellIndex,m_eta) );
66 ATH_CHECK( nt->addItem("iphi",m_cellIndex,m_phi) );
67 ATH_CHECK( nt->addItem("barrel_ec",m_cellIndex,m_barrel_ec) );
68 ATH_CHECK( nt->addItem("pos_neg",m_cellIndex,m_pos_neg) );
69 ATH_CHECK( nt->addItem("FT",m_cellIndex,m_FT) );
70 ATH_CHECK( nt->addItem("slot",m_cellIndex,m_slot) );
71 ATH_CHECK( nt->addItem("channel",m_cellIndex,m_channel) );
72 ATH_CHECK( nt->addItem("gain",m_cellIndex,m_gain) );
73 ATH_CHECK( nt->addItem("NSamples",m_Nsamples,0,32) );
74 ATH_CHECK( nt->addItem("Samples",m_cellIndex,m_samples,32) );
75
76 ATH_CHECK( m_containerKey.initialize() );
77
79 m_count=0;
80 ATH_MSG_INFO( "======== ReadLArDigits initialize successfully ========" );
81 return StatusCode::SUCCESS;
82}
const ServiceHandle< StoreGateSvc > & detStore() const
const LArEM_ID * em_idHelper() const
access to EM idHelper
Definition CaloCell_ID.h:63

◆ 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}

◆ 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}
#define ATH_MSG_WARNING(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ 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_barrel_ec

NTuple::Array<long> ReadLArDigits::m_barrel_ec
private

Definition at line 62 of file ReadLArDigits.h.

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> ReadLArDigits::m_cablingKey {this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"}
private

Definition at line 46 of file ReadLArDigits.h.

46{this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"};

◆ m_cellIndex

NTuple::Item<long> ReadLArDigits::m_cellIndex
private

Definition at line 60 of file ReadLArDigits.h.

◆ m_channel

NTuple::Array<long> ReadLArDigits::m_channel
private

Definition at line 62 of file ReadLArDigits.h.

◆ m_containerKey

SG::ReadHandleKey<LArDigitContainer> ReadLArDigits::m_containerKey { this, "ContainerKey", "FREE", "" }
private

Definition at line 51 of file ReadLArDigits.h.

52{ this, "ContainerKey", "FREE", "" };

◆ m_count

int ReadLArDigits::m_count
private

Definition at line 47 of file ReadLArDigits.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_dumpFile

std::string ReadLArDigits::m_dumpFile
private

Definition at line 53 of file ReadLArDigits.h.

◆ m_emId

const LArEM_ID* ReadLArDigits::m_emId
private

Definition at line 48 of file ReadLArDigits.h.

◆ m_eta

NTuple::Array<long> ReadLArDigits::m_eta
private

Definition at line 61 of file ReadLArDigits.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_FT

NTuple::Array<long> ReadLArDigits::m_FT
private

Definition at line 62 of file ReadLArDigits.h.

◆ m_gain

NTuple::Array<long> ReadLArDigits::m_gain
private

Definition at line 61 of file ReadLArDigits.h.

◆ m_layer

NTuple::Array<long> ReadLArDigits::m_layer
private

Definition at line 61 of file ReadLArDigits.h.

◆ m_Nsamples

NTuple::Item<long> ReadLArDigits::m_Nsamples
private

Definition at line 64 of file ReadLArDigits.h.

◆ m_ntuplePtr

NTuple::Tuple* ReadLArDigits::m_ntuplePtr
private

Definition at line 58 of file ReadLArDigits.h.

◆ m_onlineHelper

const LArOnlineID* ReadLArDigits::m_onlineHelper
private

Definition at line 49 of file ReadLArDigits.h.

◆ m_outfile

std::ofstream ReadLArDigits::m_outfile
private

Definition at line 50 of file ReadLArDigits.h.

◆ m_phi

NTuple::Array<long> ReadLArDigits::m_phi
private

Definition at line 61 of file ReadLArDigits.h.

◆ m_pos_neg

NTuple::Array<long> ReadLArDigits::m_pos_neg
private

Definition at line 62 of file ReadLArDigits.h.

◆ m_printCellLoc

bool ReadLArDigits::m_printCellLoc
private

Definition at line 54 of file ReadLArDigits.h.

◆ m_printFebChan

bool ReadLArDigits::m_printFebChan
private

Definition at line 55 of file ReadLArDigits.h.

◆ m_samples

NTuple::Matrix<long> ReadLArDigits::m_samples
private

Definition at line 63 of file ReadLArDigits.h.

◆ m_slot

NTuple::Array<long> ReadLArDigits::m_slot
private

Definition at line 62 of file ReadLArDigits.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.


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