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

#include <CBNT_CaloH6.h>

Inheritance diagram for CBNT_CaloH6:
Collaboration diagram for CBNT_CaloH6:

Public Member Functions

 CBNT_CaloH6 (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~CBNT_CaloH6 ()
virtual StatusCode CBNT_initialize () override
virtual StatusCode CBNT_execute () override
virtual StatusCode CBNT_finalize () override
virtual StatusCode CBNT_clear () override
virtual StatusCode initialize () override
virtual StatusCode execute () override
virtual StatusCode finalize () override
virtual StatusCode pre_execute ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Types

enum  { NOT_VALID = -999 }

Protected Member Functions

template<class T>
void addBranch (const std::string &branchname, T &obj, const std::string &leaflist)
template<class T>
void addBranch (const std::string &branchname, T *&obj)
template<class T>
void addBranch (const std::string &branchname, T *&obj, int bufferSize, int splitLevel)
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

std::string m_ntpath
std::string m_ntTitle
TTree * m_nt
MsgStream * m_log
const LArEM_IDm_emId
const LArHEC_IDm_hecId
const LArFCAL_IDm_fcalId
const LArOnlineIDm_onlineId

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

const LArEM_IDm_emecID_help
const LArHEC_IDm_hecID_help
const LArFCAL_IDm_fcalID_help
SG::ReadCondHandleKey< CaloNoisem_elecNoiseKey { this, "ElecNoiseKey", "electronicNoise", "SG key for electronic noise" }
float m_noiseSigma
std::string m_det_type
int m_numchan
std::vector< float > * m_energy
std::vector< float > * m_NoiseRMS
std::vector< float > * m_ieta
std::vector< float > * m_iphi
std::vector< float > * m_eta
std::vector< float > * m_phi
std::vector< float > * m_sampling
std::vector< float > * m_region
bool m_initialized
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 33 of file CBNT_CaloH6.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
NOT_VALID 

Definition at line 56 of file CBNT_TBRecBase.h.

56{NOT_VALID = -999};

Constructor & Destructor Documentation

◆ CBNT_CaloH6()

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

Definition at line 24 of file CBNT_CaloH6.cxx.

24 :
25 CBNT_TBRecBase(name, pSvcLocator),
27 m_hecID_help(0),
29{
30 declareProperty("Det_Type", m_det_type);
31 declareProperty("Max_Chan", m_numchan);
32 m_noiseSigma = 0;
33
34 m_NoiseRMS = 0;
35 m_energy = 0;
36 m_eta = 0;
37 m_ieta = 0;
38 m_iphi = 0;
39 m_phi = 0;
40 m_region = 0;
41 m_sampling = 0;
42}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< float > * m_energy
Definition CBNT_CaloH6.h:65
std::vector< float > * m_ieta
Definition CBNT_CaloH6.h:67
const LArFCAL_ID * m_fcalID_help
Definition CBNT_CaloH6.h:52
const LArHEC_ID * m_hecID_help
Definition CBNT_CaloH6.h:51
float m_noiseSigma
Definition CBNT_CaloH6.h:57
std::vector< float > * m_iphi
Definition CBNT_CaloH6.h:68
const LArEM_ID * m_emecID_help
Definition CBNT_CaloH6.h:50
std::vector< float > * m_region
Definition CBNT_CaloH6.h:72
std::vector< float > * m_eta
Definition CBNT_CaloH6.h:69
std::vector< float > * m_phi
Definition CBNT_CaloH6.h:70
std::vector< float > * m_NoiseRMS
Definition CBNT_CaloH6.h:66
std::vector< float > * m_sampling
Definition CBNT_CaloH6.h:71
std::string m_det_type
Definition CBNT_CaloH6.h:60
CBNT_TBRecBase(const std::string &name, ISvcLocator *pSvcLocator)

◆ ~CBNT_CaloH6()

CBNT_CaloH6::~CBNT_CaloH6 ( )
virtual

Definition at line 44 of file CBNT_CaloH6.cxx.

44{}

Member Function Documentation

◆ addBranch() [1/3]

template<class T>
void CBNT_TBRecBase::addBranch ( const std::string & branchname,
T & obj,
const std::string & leaflist )
inlineprotectedinherited

Definition at line 44 of file CBNT_TBRecBase.h.

44 {
45 m_nt->Branch(branchname.c_str(), &obj, leaflist.c_str());
46 }
str branchname
Definition RTTAlgmain.py:60

◆ addBranch() [2/3]

template<class T>
void CBNT_TBRecBase::addBranch ( const std::string & branchname,
T *& obj )
inlineprotectedinherited

Definition at line 47 of file CBNT_TBRecBase.h.

47 {
48 obj = new T();
49 m_nt->Branch(branchname.c_str(), &obj);
50 }
unsigned long long T

◆ addBranch() [3/3]

template<class T>
void CBNT_TBRecBase::addBranch ( const std::string & branchname,
T *& obj,
int bufferSize,
int splitLevel )
inlineprotectedinherited

Definition at line 51 of file CBNT_TBRecBase.h.

51 {
52 obj = new T();
53 m_nt->Branch(branchname.c_str(), &obj, bufferSize, splitLevel);
54 }

◆ CBNT_clear()

StatusCode CBNT_CaloH6::CBNT_clear ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 186 of file CBNT_CaloH6.cxx.

187{
188 if(m_energy) m_energy->clear();
189 if(m_NoiseRMS) m_NoiseRMS->clear();
190 if(m_eta) m_eta->clear();
191 if(m_phi) m_phi->clear();
192 if(m_ieta) m_ieta->clear();
193 if(m_iphi) m_iphi->clear();
194 if(m_sampling) m_sampling->clear();
195 if(m_region) m_region->clear();
196
197 return StatusCode::SUCCESS;
198}

◆ CBNT_execute()

StatusCode CBNT_CaloH6::CBNT_execute ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 103 of file CBNT_CaloH6.cxx.

104{ //execute
105 ATH_MSG_DEBUG ( "execute()");
106
107 //Accesing the CaloCellContainer
108 const CaloCellContainer* cellContainer;
109
110 ATH_CHECK( evtStore()->retrieve(cellContainer) );
111
112 SG::ReadCondHandle<CaloNoise> elecNoise (m_elecNoiseKey);
113
114 for (const CaloCell* cell_ptr : *cellContainer) {
115
116 //obtaining dde pointer
117 const CaloDetDescrElement* caloDDE_ptr = cell_ptr->caloDDE();
118
119 //obtaining SubCalo
120 const CaloCell_ID::SUBCALO subcalo = caloDDE_ptr->getSubCalo();
121
122 //obtaining sampling (layer)
123 const CaloCell_ID::CaloSample sampling = caloDDE_ptr->getSampling();
124 if (m_det_type=="HEC" && subcalo==CaloCell_ID::LARHEC) {
125
126 const Identifier hecid=cell_ptr->ID();
127
128 float noise = elecNoise->getNoise(hecid, cell_ptr->gain());
129 ATH_MSG_DEBUG("noiseRMS HEC"<<noise);
130
131 m_energy->push_back(cell_ptr->energy());
132 m_NoiseRMS->push_back(noise);
133 m_eta->push_back(caloDDE_ptr->eta());
134 m_phi->push_back(caloDDE_ptr->phi());
135 m_ieta->push_back(m_hecID_help->eta(hecid));
136 m_iphi->push_back(m_hecID_help->phi(hecid));
137 m_sampling->push_back(sampling);
138 m_region->push_back(m_hecID_help->region(hecid));
139 }
140
141 if (m_det_type=="EMEC" && subcalo==CaloCell_ID::LAREM) {
142
143 const Identifier emecid=cell_ptr->ID();
144
145 float noise = elecNoise->getNoise(emecid, cell_ptr->gain());
146 ATH_MSG_DEBUG("noiseRMS EMEC"<<noise);
147
148 m_energy->push_back(cell_ptr->energy());
149 m_NoiseRMS->push_back(noise);
150 m_eta->push_back(caloDDE_ptr->eta());
151 m_phi->push_back(caloDDE_ptr->phi());
152 m_ieta->push_back(m_emecID_help->eta(emecid));
153 m_iphi->push_back(m_emecID_help->phi(emecid));
154 m_sampling->push_back(sampling);
155 }
156 if (m_det_type=="FCAL" && subcalo==CaloCell_ID::LARFCAL) {
157
158 const Identifier fcalid=cell_ptr->ID();
159
160 float noise = elecNoise->getNoise(fcalid, cell_ptr->gain());
161 ATH_MSG_DEBUG("noiseRMS FCAL"<<noise);
162
163 m_energy->push_back(cell_ptr->energy());
164 m_NoiseRMS->push_back(noise);
165 m_eta->push_back(caloDDE_ptr->eta());
166 m_phi->push_back(caloDDE_ptr->phi());
167 m_ieta->push_back(m_fcalID_help->eta(fcalid));
168 m_iphi->push_back(m_fcalID_help->phi(fcalid));
169 m_sampling->push_back(sampling);
170 }
171 }
172
173 return StatusCode::SUCCESS;
174
175} //execute
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
SG::ReadCondHandleKey< CaloNoise > m_elecNoiseKey
Definition CBNT_CaloH6.h:55
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
CaloCell_ID::CaloSample getSampling() const
cell sampling
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ CBNT_finalize()

StatusCode CBNT_CaloH6::CBNT_finalize ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 179 of file CBNT_CaloH6.cxx.

180{ //finalize
181 ATH_MSG_INFO ( "finalize()" );
182 return StatusCode::SUCCESS;
183
184} //finalize
#define ATH_MSG_INFO(x)

◆ CBNT_initialize()

StatusCode CBNT_CaloH6::CBNT_initialize ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 46 of file CBNT_CaloH6.cxx.

47{ //initialize
48 ATH_MSG_DEBUG( "initialize()" );
49
50 m_hecID_help = NULL;
51 m_emecID_help = NULL;
52 m_fcalID_help = NULL;
53
54 // Identifier helpers
55 const CaloCell_ID* idHelper = nullptr;
56 ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
57 m_hecID_help = idHelper->hec_idHelper();
58 if (!m_hecID_help) {
59 ATH_MSG_ERROR ( "unable to obtain hec id " );
60 return StatusCode::FAILURE;
61 }
62
63 m_emecID_help = idHelper->em_idHelper();
64 if (!m_emecID_help) {
65 ATH_MSG_ERROR ( "unable to obtain emec id " );
66 return StatusCode::FAILURE;
67 }
68
69 m_fcalID_help = idHelper->fcal_idHelper();
70 if (!m_fcalID_help) {
71 ATH_MSG_ERROR ( "unable to obtain fcal id " );
72 return StatusCode::FAILURE;
73 }
74
75 ATH_MSG_DEBUG("Got to before p_toolSvc");
76
77 ATH_CHECK( m_elecNoiseKey.initialize() );
78
79 ATH_MSG_DEBUG ( "Before Booking Ntuple" );
80
81 //hec, 241 channels
82 //emec, 113 channels
83 //fcal, 347 channels
84
85 addBranch(m_det_type+"_energy",m_energy);
86 addBranch(m_det_type+"_noiseRMS",m_NoiseRMS);
91 addBranch(m_det_type+"_sampling",m_sampling);
92
93 if(m_det_type=="HEC") {
94 addBranch(m_det_type+"_region",m_region);
95 } else m_region = 0;
96
97 return StatusCode::SUCCESS;
98
99} //initialize
#define ATH_MSG_ERROR(x)
const ServiceHandle< StoreGateSvc > & detStore() const
void addBranch(const std::string &branchname, T &obj, const std::string &leaflist)
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
Definition CaloCell_ID.h:75
const LArEM_ID * em_idHelper() const
access to EM idHelper
Definition CaloCell_ID.h:63
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
Definition CaloCell_ID.h:69

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode CBNT_TBRecBase::execute ( )
overridevirtualinherited

Definition at line 154 of file CBNT_TBRecBase.cxx.

154 {
155
157
158 // run pre-execution
159 try {
160 sc = this->pre_execute();
161 }
162
163 catch( const std::exception& Exception ) {
164 *m_log << MSG::ERROR << " Standard exception "
165 << Exception.what()
166 << " caught from sub-algorithm::CBNT_pre_execute (). Disable !" << endmsg ;
167 sc = this->setProperty(BooleanProperty( "Enable",false ) );
168 return StatusCode::FAILURE;
169
170 }
171 catch (...) {
172 *m_log << MSG::ERROR << " Unknown exception "
173 << " caught from sub-algorithm::CBNT_pre_execute (). Disable !" << endmsg ;
174 sc = this->setProperty(BooleanProperty( "Enable",false ) );
175 return StatusCode::FAILURE;
176 }
177
178 if (sc.isFailure()) {
179 *m_log << MSG::ERROR << "CBNT_pre_execute() failed. Disable !" << endmsg;
180 sc = this->setProperty(BooleanProperty( "Enable",false ) );
181 return sc;
182 }
183
184 // now subalgorithm execution
185 try {
186 sc = this->CBNT_execute();
187 }
188
189 catch( const std::exception& Exception ) {
190 *m_log << MSG::ERROR << " Standard exception "
191 << Exception.what()
192 << " caught from sub-algorithm::CBNT_execute () :" << endmsg ;
193 return StatusCode::FAILURE;
194 }
195 catch (...) {
196 *m_log << MSG::ERROR << " Unknown exception "
197 << " caught from sub-algorithm::CBNT_execute () :" << endmsg ;
198 return StatusCode::FAILURE;
199 }
200
201 return sc;
202}
#define endmsg
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
virtual StatusCode CBNT_execute()
MsgStream * m_log
virtual StatusCode pre_execute()
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

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

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 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

◆ finalize()

StatusCode CBNT_TBRecBase::finalize ( )
overridevirtualinherited

Definition at line 205 of file CBNT_TBRecBase.cxx.

205 {
206
208
209 //now subalgorithm finalisation
210 try {
211 sc = this->CBNT_finalize();
212 }
213 catch( const std::exception& Exception ) {
214 *m_log << MSG::ERROR << " Standard exception "
215 << Exception.what()
216 << " caught from sub-algorithm::CBNT_finalize () :" << endmsg ;
217 }
218 catch (...) {
219 *m_log << MSG::ERROR << " Unknown exception "
220 << " caught from sub-algorithm::CBNT_finalize () :" << endmsg ;
221 }
222
223 return sc;
224}
virtual StatusCode CBNT_finalize()

◆ initialize()

StatusCode CBNT_TBRecBase::initialize ( )
overridevirtualinherited

Definition at line 22 of file CBNT_TBRecBase.cxx.

22 {
23 m_log=new MsgStream(msgSvc(), name());
24
25 *m_log << MSG::DEBUG << "Initializing CBNT_TBRecBase base class" << endmsg;
26
27 const CaloCell_ID* idHelper = nullptr;
28 ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
29 m_emId=idHelper->em_idHelper();
30 m_fcalId=idHelper->fcal_idHelper();
31 m_hecId=idHelper->hec_idHelper();
32
33
34 if (!m_emId) {
35 (*m_log) << MSG::ERROR << "Could not access lar EM ID helper" << endmsg;
36 return StatusCode::FAILURE;
37 }
38 if (!m_fcalId) {
39 (*m_log) << MSG::ERROR << "Could not access lar FCAL ID helper" << endmsg;
40 return StatusCode::FAILURE;
41 }
42 if (!m_hecId) {
43 (*m_log) << MSG::ERROR << "Could not access lar HEC ID helper" << endmsg;
44 return StatusCode::FAILURE;
45 }
46
47 StatusCode sc = detStore()->retrieve(m_onlineId, "LArOnlineID");
48 if (sc.isFailure()) {
49 (*m_log) << MSG::ERROR << "Could not get LArOnlineID helper !" << endmsg;
50 return StatusCode::FAILURE;
51 }
52 else {
53 (*m_log) << MSG::DEBUG << " Found the LArOnlineID helper. " << endmsg;
54 }
55
56
57 m_initialized=true;
58 return StatusCode::SUCCESS;
59}
const LArOnlineID * m_onlineId
const LArFCAL_ID * m_fcalId
const LArEM_ID * m_emId
const LArHEC_ID * m_hecId
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ inputHandles()

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

Return this algorithm's input handles.

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

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

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

◆ pre_execute()

StatusCode CBNT_TBRecBase::pre_execute ( )
virtualinherited

Definition at line 61 of file CBNT_TBRecBase.cxx.

61 {
62
64
65 if(!m_initialized) {
66
67 if (m_ntpath.size()==0 || m_ntTitle.size()==0) {
68 *m_log << MSG::ERROR << "Need to set variable 'm_ntpath' and 'm_ntTitle' in constructor of deriving class!" << endmsg;
69 return StatusCode::FAILURE;
70 }
71
72 size_t i=m_ntpath.rfind('/');
73 if (i==std::string::npos) {
74 *m_log << MSG::ERROR << "Expected at least on '/' in path " << m_ntpath << endmsg;
75 return StatusCode::FAILURE;
76 }
77 std::string basepath(m_ntpath.begin(),m_ntpath.begin()+i);
78 //std::cout << "Basepath" << basepath << std::endl;
79
80 // retrieve pointer to THistSvc
81 ServiceHandle<ITHistSvc> tHistSvc("THistSvc", name());
82 ATH_CHECK( tHistSvc.retrieve() );
83
84 // get TTree
85 sc = tHistSvc->getTree(m_ntpath,m_nt);
86 if (sc.isFailure()) {
87 *m_log << MSG::ERROR << "Unable to retrieve TTree : " << m_ntpath << endmsg;
88 return sc;
89 }
90 /*
91 NTupleFilePtr file1(ntupleSvc(),basepath);
92 if (!file1){
93 (*m_log) << MSG::ERROR << "Could not get NTupleFilePtr with path " << basepath << " failed" << endmsg;
94 return StatusCode::FAILURE;
95 }
96 NTuplePtr nt(ntupleSvc(),m_ntpath);
97 if (!nt) {
98 nt=ntupleSvc()->book(m_ntpath,CLID_ColumnWiseTuple,m_ntTitle);
99 }
100 if (!nt){
101 (*m_log) << MSG::ERROR << "Booking of NTuple at "<< m_ntpath << " and name " << m_ntTitle << " failed" << endmsg;
102 return StatusCode::FAILURE;
103 }
104 m_nt=nt;
105 */
106 //std::cout << "Ntuple ptr:" << m_nt << std::endl;
107
108 // subalgorithm initialisation
109 try {
110 sc = this->CBNT_initialize();
111 }
112 catch( const std::exception& Exception ) {
113 *m_log << MSG::ERROR << " Standard exception "
114 << Exception.what()
115 << " caught from sub-algorithm::CBNT_initialize () :" << endmsg ;
116 }
117 catch (...) {
118 *m_log << MSG::ERROR << " Unknown exception "
119 << " caught from sub-algorithm::CBNT_initialize () :" << endmsg ;
120 }
121
122 if (sc.isFailure())
123 {
124 *m_log << MSG::ERROR << "CBNT_initialize() failed" << endmsg;
125 return sc;
126 }
127
128 m_initialized=true;
129 }
130
131 // clear data members
132 try {
133 sc = this->CBNT_clear();
134 }
135 catch( const std::exception& Exception ) {
136 *m_log << MSG::ERROR << " Standard exception "
137 << Exception.what()
138 << " caught from sub-algorithm::CBNT_clear () :" << endmsg ;
139 }
140 catch (...) {
141 *m_log << MSG::ERROR << " Unknown exception "
142 << " caught from sub-algorithm::CBNT_clear () :" << endmsg ;
143 }
144
145 if (sc.isFailure()) {
146 *m_log << MSG::ERROR << "CBNT_clear() failed" << endmsg;
147 return sc;
148 }
149
150 return StatusCode::SUCCESS ;
151}
std::string m_ntTitle
virtual StatusCode CBNT_clear()
std::string m_ntpath
virtual StatusCode CBNT_initialize()

◆ renounce()

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

Definition at line 380 of file AthCommonDataStore.h.

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

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ 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< 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)
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< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_det_type

std::string CBNT_CaloH6::m_det_type
private

Definition at line 60 of file CBNT_CaloH6.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_elecNoiseKey

SG::ReadCondHandleKey<CaloNoise> CBNT_CaloH6::m_elecNoiseKey { this, "ElecNoiseKey", "electronicNoise", "SG key for electronic noise" }
private

Definition at line 54 of file CBNT_CaloH6.h.

55{ this, "ElecNoiseKey", "electronicNoise", "SG key for electronic noise" };

◆ m_emecID_help

const LArEM_ID* CBNT_CaloH6::m_emecID_help
private

Definition at line 50 of file CBNT_CaloH6.h.

◆ m_emId

const LArEM_ID* CBNT_TBRecBase::m_emId
protectedinherited

Definition at line 65 of file CBNT_TBRecBase.h.

◆ m_energy

std::vector<float>* CBNT_CaloH6::m_energy
private

Definition at line 65 of file CBNT_CaloH6.h.

◆ m_eta

std::vector<float>* CBNT_CaloH6::m_eta
private

Definition at line 69 of file CBNT_CaloH6.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_fcalId

const LArFCAL_ID* CBNT_TBRecBase::m_fcalId
protectedinherited

Definition at line 67 of file CBNT_TBRecBase.h.

◆ m_fcalID_help

const LArFCAL_ID* CBNT_CaloH6::m_fcalID_help
private

Definition at line 52 of file CBNT_CaloH6.h.

◆ m_hecId

const LArHEC_ID* CBNT_TBRecBase::m_hecId
protectedinherited

Definition at line 66 of file CBNT_TBRecBase.h.

◆ m_hecID_help

const LArHEC_ID* CBNT_CaloH6::m_hecID_help
private

Definition at line 51 of file CBNT_CaloH6.h.

◆ m_ieta

std::vector<float>* CBNT_CaloH6::m_ieta
private

Definition at line 67 of file CBNT_CaloH6.h.

◆ m_initialized

bool CBNT_TBRecBase::m_initialized
privateinherited

Definition at line 40 of file CBNT_TBRecBase.h.

◆ m_iphi

std::vector<float>* CBNT_CaloH6::m_iphi
private

Definition at line 68 of file CBNT_CaloH6.h.

◆ m_log

MsgStream* CBNT_TBRecBase::m_log
protectedinherited

Definition at line 63 of file CBNT_TBRecBase.h.

◆ m_NoiseRMS

std::vector<float>* CBNT_CaloH6::m_NoiseRMS
private

Definition at line 66 of file CBNT_CaloH6.h.

◆ m_noiseSigma

float CBNT_CaloH6::m_noiseSigma
private

Definition at line 57 of file CBNT_CaloH6.h.

◆ m_nt

TTree* CBNT_TBRecBase::m_nt
protectedinherited

Definition at line 61 of file CBNT_TBRecBase.h.

◆ m_ntpath

std::string CBNT_TBRecBase::m_ntpath
protectedinherited

Definition at line 58 of file CBNT_TBRecBase.h.

◆ m_ntTitle

std::string CBNT_TBRecBase::m_ntTitle
protectedinherited

Definition at line 58 of file CBNT_TBRecBase.h.

◆ m_numchan

int CBNT_CaloH6::m_numchan
private

Definition at line 61 of file CBNT_CaloH6.h.

◆ m_onlineId

const LArOnlineID* CBNT_TBRecBase::m_onlineId
protectedinherited

Definition at line 68 of file CBNT_TBRecBase.h.

◆ m_phi

std::vector<float>* CBNT_CaloH6::m_phi
private

Definition at line 70 of file CBNT_CaloH6.h.

◆ m_region

std::vector<float>* CBNT_CaloH6::m_region
private

Definition at line 72 of file CBNT_CaloH6.h.

◆ m_sampling

std::vector<float>* CBNT_CaloH6::m_sampling
private

Definition at line 71 of file CBNT_CaloH6.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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