ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ReadTBLArDigits Class Reference

#include <ReadTBLArDigits.h>

Inheritance diagram for ReadTBLArDigits:
Collaboration diagram for ReadTBLArDigits:

Classes

class  SortDigits
 

Public Member Functions

 ReadTBLArDigits (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~ReadTBLArDigits ()
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

int m_count
 
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
 
const LArEM_IDm_emId
 
const LArFCAL_IDm_fcalId
 
const LArHEC_IDm_hecId
 
const LArOnlineIDm_onlineHelper
 
std::ofstream m_outfile
 
std::string m_containerKey
 
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) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 25 of file ReadTBLArDigits.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ReadTBLArDigits()

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

Definition at line 18 of file ReadTBLArDigits.cxx.

19  : AthAlgorithm(name, pSvcLocator),
20  m_count(0),
21  m_emId(0),
22  m_fcalId(0),
23  m_hecId(0),
24  m_onlineHelper(0),
25  m_ntuplePtr(0)
26 {
27  declareProperty("ContainerKey",m_containerKey="");
28  declareProperty("DumpFile",m_dumpFile="");
29  declareProperty("PrintCellLocation",m_printCellLoc=false);
30  declareProperty("PrintFebChan",m_printFebChan=true);
31 
32 }

◆ ~ReadTBLArDigits()

ReadTBLArDigits::~ReadTBLArDigits ( )

Definition at line 34 of file ReadTBLArDigits.cxx.

35 {//empty
36 }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

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

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode ReadTBLArDigits::execute ( )
overridevirtual

Definition at line 91 of file ReadTBLArDigits.cxx.

92 {
93  const EventContext& ctx = Gaudi::Hive::currentContext();
94 
95  MsgStream log(msgSvc(), name());
96  m_count++;
97  StatusCode sc;
98  log << MSG::DEBUG << "======== executing event "<< m_count << " ========" << endmsg;
99  log << MSG::DEBUG << "Retrieving TBLArDigitContainer. Key= " << m_containerKey << endmsg;
100  TBLArDigitContainer* larDigitCont = nullptr;
101  if (m_containerKey.size())
102  sc = evtStore()->retrieve(larDigitCont ,m_containerKey);
103  else
104  sc = evtStore()->retrieve(larDigitCont);
105  if (sc.isFailure())
106  {log << MSG::FATAL << " Cannot read TBLArDigitContainer from StoreGate! key=" << m_containerKey << endmsg;
107  return StatusCode::FAILURE;
108  }
109 
110 
111  if (m_outfile.is_open()) {
112  log << MSG::DEBUG << "Sorting digits" << endmsg;
113  SortDigits sortDigits(m_onlineHelper);
114  std::sort(larDigitCont->begin(),larDigitCont->end(),sortDigits);
115  }
116 
118 
119  log << MSG::DEBUG << "Finished sorting" << endmsg;
120  unsigned cellCounter=0;
121  if (larDigitCont->size()>0)
122  m_Nsamples=larDigitCont->front()->samples().size();
123  else
124  m_Nsamples=0;
125  log << MSG::DEBUG << "Now loop over digits" << endmsg;
126  for (const LArDigit* digit : *larDigitCont) {
127  HWIdentifier chid=digit->hardwareID();
128  log << MSG::DEBUG << "Get offline ID" << endmsg;
129  const Identifier id=cabling->cnvToIdentifier(chid);
130  const std::vector<short>& vSamples=digit->samples();
131  m_cellIndex=cellCounter;
132  log << MSG::DEBUG << "Now find eta/phi (EM only right now)" << endmsg;
133  if (m_emId->is_lar_em(id)) {
134  m_eta[m_cellIndex]=m_emId->eta(id);
135  m_phi[m_cellIndex]=m_emId->phi(id);
137  } else if (m_fcalId->is_lar_fcal(id)) {
138  m_eta[m_cellIndex]=m_fcalId->eta(id);
141  } else if (m_hecId->is_lar_hec(id)) {
142  m_eta[m_cellIndex]=m_hecId->eta(id);
145  } else {
146  m_eta[m_cellIndex]=0;
147  m_phi[m_cellIndex]=0;
148  m_layer[m_cellIndex]=0;
149  }
150  log << MSG::DEBUG << "Store identifier arrays" << endmsg;
156  m_gain[m_cellIndex]=digit->gain();
157 
158  log << MSG::DEBUG << "Loop over samples" << endmsg;
159  int nSamples=vSamples.size();
160  for (int i=0;i<nSamples && i<32;i++)
161  m_samples[m_cellIndex][i]=vSamples[i];
162 
163  if (m_outfile.is_open()) {
164  m_outfile << "Evt="<< m_count << " ";
165  if (m_printCellLoc)
166  m_outfile << "Cell l/e/p= " << m_layer[m_cellIndex] << "/" << m_eta[m_cellIndex]
167  << "/" << m_phi[m_cellIndex] << " ";
168  if (m_printFebChan)
169  m_outfile << "FebId= 0x" << std::hex << m_onlineHelper->feb_Id(chid).get_compact()
170  << std::dec << " Ch= " << m_onlineHelper->channel(chid) << " ";
171  for (int i=0;i<nSamples;i++) {
172  m_outfile << " " << vSamples[i];
173  }
174  m_outfile << " G=" << m_gain[m_cellIndex] << std::endl;
175  }
176  cellCounter++;
177  }
178  sc=ntupleSvc()->writeRecord(m_ntuplePtr);
179  if (sc!=StatusCode::SUCCESS) {
180  log << MSG::ERROR << "writeRecord failed" << endmsg;
181  return StatusCode::FAILURE;
182  }
183 
184  if (m_count%1000==0)
185  log << MSG::INFO << "Event " << m_count << " contains " << cellCounter << " channels\n";
186  return StatusCode::SUCCESS;
187 }

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

◆ finalize()

StatusCode ReadTBLArDigits::finalize ( )
overridevirtual

Definition at line 189 of file ReadTBLArDigits.cxx.

190 { MsgStream log(msgSvc(), name());
191  if (m_outfile.is_open())
192  m_outfile.close();
193  log << MSG::INFO << "finalize ReadTBLArDigits" << endmsg;
194  return StatusCode::SUCCESS;
195 }

◆ initialize()

StatusCode ReadTBLArDigits::initialize ( )
overridevirtual

Definition at line 38 of file ReadTBLArDigits.cxx.

39 { MsgStream log(msgSvc(), name());
40  log << MSG::INFO << "Initialize" << endmsg;
41 
42  const CaloCell_ID* idHelper = nullptr;
43  ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
44  m_emId=idHelper->em_idHelper();
45  m_fcalId=idHelper->fcal_idHelper();
46  m_hecId=idHelper->hec_idHelper();
47 
48  ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
49 
50  if (m_dumpFile.size()>0)
51  m_outfile.open(m_dumpFile.c_str(),std::ios::out);
52  //Ntuple booking
53 
54 
55  NTupleFilePtr file1(ntupleSvc(),"/NTUPLES/FILE1");
56  if (!file1)
57  {log << MSG::ERROR << "Booking of NTuple failed" << endmsg;
58  return StatusCode::FAILURE;
59  }
60  NTuplePtr nt(ntupleSvc(),"/NTUPLES/FILE1/LARDIGITS");
61  if (!nt) {
62  nt=ntupleSvc()->book("/NTUPLES/FILE1/LARDIGITS",CLID_ColumnWiseTuple,"LArDigits");
63  }
64  if (!nt)
65  {log << MSG::ERROR << "Booking of NTuple failed" << endmsg;
66  return StatusCode::FAILURE;
67  }
68 
69  ATH_CHECK( nt->addItem("icell",m_cellIndex,0,3600) );
70  ATH_CHECK( nt->addItem("layer",m_cellIndex,m_layer) );
71  ATH_CHECK( nt->addItem("ieta",m_cellIndex,m_eta) );
72  ATH_CHECK( nt->addItem("iphi",m_cellIndex,m_phi) );
73  ATH_CHECK( nt->addItem("barrel_ec",m_cellIndex,m_barrel_ec) );
74  ATH_CHECK( nt->addItem("pos_neg",m_cellIndex,m_pos_neg) );
75  ATH_CHECK( nt->addItem("FT",m_cellIndex,m_FT) );
76  ATH_CHECK( nt->addItem("slot",m_cellIndex,m_slot) );
77  ATH_CHECK( nt->addItem("channel",m_cellIndex,m_channel) );
78  ATH_CHECK( nt->addItem("gain",m_cellIndex,m_gain) );
79  ATH_CHECK( nt->addItem("NSamples",m_Nsamples,0,32) );
80  ATH_CHECK( nt->addItem("Samples",m_cellIndex,m_samples,32) );
81 
83 
85  m_count=0;
86  log << MSG::INFO << "======== ReadTBLArDigits initialize successfully ========" << endmsg;
87  return StatusCode::SUCCESS;
88 }

◆ 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() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

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

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
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, PyAthena::Alg, and AthHistogramAlgorithm.

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 }

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_barrel_ec

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

Definition at line 56 of file ReadTBLArDigits.h.

◆ m_cablingKey

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

Definition at line 39 of file ReadTBLArDigits.h.

◆ m_cellIndex

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

Definition at line 54 of file ReadTBLArDigits.h.

◆ m_channel

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

Definition at line 56 of file ReadTBLArDigits.h.

◆ m_containerKey

std::string ReadTBLArDigits::m_containerKey
private

Definition at line 46 of file ReadTBLArDigits.h.

◆ m_count

int ReadTBLArDigits::m_count
private

Definition at line 38 of file ReadTBLArDigits.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_dumpFile

std::string ReadTBLArDigits::m_dumpFile
private

Definition at line 47 of file ReadTBLArDigits.h.

◆ m_emId

const LArEM_ID* ReadTBLArDigits::m_emId
private

Definition at line 41 of file ReadTBLArDigits.h.

◆ m_eta

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

Definition at line 55 of file ReadTBLArDigits.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* ReadTBLArDigits::m_fcalId
private

Definition at line 42 of file ReadTBLArDigits.h.

◆ m_FT

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

Definition at line 56 of file ReadTBLArDigits.h.

◆ m_gain

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

Definition at line 55 of file ReadTBLArDigits.h.

◆ m_hecId

const LArHEC_ID* ReadTBLArDigits::m_hecId
private

Definition at line 43 of file ReadTBLArDigits.h.

◆ m_layer

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

Definition at line 55 of file ReadTBLArDigits.h.

◆ m_Nsamples

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

Definition at line 58 of file ReadTBLArDigits.h.

◆ m_ntuplePtr

NTuple::Tuple* ReadTBLArDigits::m_ntuplePtr
private

Definition at line 52 of file ReadTBLArDigits.h.

◆ m_onlineHelper

const LArOnlineID* ReadTBLArDigits::m_onlineHelper
private

Definition at line 44 of file ReadTBLArDigits.h.

◆ m_outfile

std::ofstream ReadTBLArDigits::m_outfile
private

Definition at line 45 of file ReadTBLArDigits.h.

◆ m_phi

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

Definition at line 55 of file ReadTBLArDigits.h.

◆ m_pos_neg

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

Definition at line 56 of file ReadTBLArDigits.h.

◆ m_printCellLoc

bool ReadTBLArDigits::m_printCellLoc
private

Definition at line 48 of file ReadTBLArDigits.h.

◆ m_printFebChan

bool ReadTBLArDigits::m_printFebChan
private

Definition at line 49 of file ReadTBLArDigits.h.

◆ m_samples

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

Definition at line 57 of file ReadTBLArDigits.h.

◆ m_slot

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

Definition at line 56 of file ReadTBLArDigits.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:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ReadTBLArDigits::m_layer
NTuple::Array< long > m_layer
Definition: ReadTBLArDigits.h:55
ReadTBLArDigits::m_gain
NTuple::Array< long > m_gain
Definition: ReadTBLArDigits.h:55
LArEM_Base_ID::phi
int phi(const Identifier id) const
return phi according to :
LArHEC_Base_ID::eta
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
CaloCell_ID::em_idHelper
const LArEM_ID * em_idHelper() const
access to EM idHelper
Definition: CaloCell_ID.h:63
AtlasDetectorID::is_lar_fcal
bool is_lar_fcal(Identifier id) const
Definition: AtlasDetectorID.h:839
ReadTBLArDigits::m_dumpFile
std::string m_dumpFile
Definition: ReadTBLArDigits.h:47
ReadTBLArDigits::m_hecId
const LArHEC_ID * m_hecId
Definition: ReadTBLArDigits.h:43
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ReadTBLArDigits::m_phi
NTuple::Array< long > m_phi
Definition: ReadTBLArDigits.h:55
ReadTBLArDigits::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: ReadTBLArDigits.h:40
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArDigit::samples
const std::vector< short > & samples() const
Definition: LArDigit.h:78
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
LArOnlineID_Base::slot
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
Definition: LArOnlineID_Base.cxx:1957
ReadTBLArDigits::m_outfile
std::ofstream m_outfile
Definition: ReadTBLArDigits.h:45
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArFCAL_Base_ID::module
int module(const Identifier id) const
module [1,3]
Identifier::get_compact
value_type get_compact() const
Get the compact id.
LArEM_Base_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
ReadTBLArDigits::m_Nsamples
NTuple::Item< long > m_Nsamples
Definition: ReadTBLArDigits.h:58
ReadTBLArDigits::m_cellIndex
NTuple::Item< long > m_cellIndex
Definition: ReadTBLArDigits.h:54
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
HWIdentifier
Definition: HWIdentifier.h:13
LArOnlineID_Base::barrel_ec
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
Definition: LArOnlineID_Base.cxx:1938
ReadTBLArDigits::m_emId
const LArEM_ID * m_emId
Definition: ReadTBLArDigits.h:41
LArEM_Base_ID::eta
int eta(const Identifier id) const
return eta according to :
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArFCAL_Base_ID::eta
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
CaloCell_ID::hec_idHelper
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
Definition: CaloCell_ID.h:69
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
ReadTBLArDigits::m_count
int m_count
Definition: ReadTBLArDigits.h:38
ReadTBLArDigits::m_samples
NTuple::Matrix< long > m_samples
Definition: ReadTBLArDigits.h:57
ReadTBLArDigits::m_containerKey
std::string m_containerKey
Definition: ReadTBLArDigits.h:46
LArFCAL_Base_ID::phi
int phi(const Identifier id) const
phi [0,15]
ReadTBLArDigits::m_slot
NTuple::Array< long > m_slot
Definition: ReadTBLArDigits.h:56
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
LArOnlineID_Base::channel
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
Definition: LArOnlineID_Base.cxx:1963
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
LArDigit
Liquid Argon digit base class.
Definition: LArDigit.h:25
lumiFormat.i
int i
Definition: lumiFormat.py:85
ReadTBLArDigits::m_FT
NTuple::Array< long > m_FT
Definition: ReadTBLArDigits.h:56
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
LArOnlineID_Base::pos_neg
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
Definition: LArOnlineID_Base.cxx:1950
ReadTBLArDigits::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: ReadTBLArDigits.h:44
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AtlasDetectorID::is_lar_hec
bool is_lar_hec(Identifier id) const
Definition: AtlasDetectorID.h:829
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
ReadTBLArDigits::m_eta
NTuple::Array< long > m_eta
Definition: ReadTBLArDigits.h:55
LArOnlineID_Base::feb_Id
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
Definition: LArOnlineID_Base.cxx:1479
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ReadTBLArDigits::m_fcalId
const LArFCAL_ID * m_fcalId
Definition: ReadTBLArDigits.h:42
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
ReadTBLArDigits::m_pos_neg
NTuple::Array< long > m_pos_neg
Definition: ReadTBLArDigits.h:56
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
ReadTBLArDigits::m_printFebChan
bool m_printFebChan
Definition: ReadTBLArDigits.h:49
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
LArOnlineID_Base::feedthrough
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
Definition: LArOnlineID_Base.cxx:1944
a
TList * a
Definition: liststreamerinfos.cxx:10
h
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ReadTBLArDigits::m_ntuplePtr
NTuple::Tuple * m_ntuplePtr
Definition: ReadTBLArDigits.h:52
DEBUG
#define DEBUG
Definition: page_access.h:11
LArHEC_Base_ID::sampling
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
ReadTBLArDigits::m_printCellLoc
bool m_printCellLoc
Definition: ReadTBLArDigits.h:48
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
ReadTBLArDigits::m_barrel_ec
NTuple::Array< long > m_barrel_ec
Definition: ReadTBLArDigits.h:56
LArDigits2NtupleDumper.nSamples
nSamples
Definition: LArDigits2NtupleDumper.py:70
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
TBLArDigitContainer
Gaudi Class ID.
Definition: TBLArDigitContainer.h:40
beamspotnt.nt
def nt
Definition: bin/beamspotnt.py:1063
ntupleSvc
INTupleSvc * ntupleSvc()
Definition: ServiceAccessor.h:14
AtlasDetectorID::is_lar_em
bool is_lar_em(Identifier id) const
Definition: AtlasDetectorID.h:818
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
ReadTBLArDigits::m_channel
NTuple::Array< long > m_channel
Definition: ReadTBLArDigits.h:56
CaloCell_ID::fcal_idHelper
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
Definition: CaloCell_ID.h:75
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
LArHEC_Base_ID::phi
int phi(const Identifier id) const
return phi[0,63] outer part [0,31] inner part
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14