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

#include <LArReadSC.h>

Inheritance diagram for LArReadSC:
Collaboration diagram for LArReadSC:

Public Member Functions

 LArReadSC (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~LArReadSC ()
 
virtual StatusCode initialize ()
 
virtual StatusCode execute ()
 
virtual StatusCode finalize ()
 
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, V, H > &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, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

Gaudi::Property< double > m_etcut {this,"etCut",7500.,"Et cut to dump cells"}
 
Gaudi::Property< std::string > m_outStream {this, "output","SPLASH", "to which stream write the ntuple"}
 
const CaloCell_SuperCell_IDm_calo_id = nullptr
 
const LArOnline_SuperCellIDm_lar_online_id = nullptr
 
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMapSC","SG Key of LArOnOffIdMapping object"}
 
SG::ReadCondHandleKey< ILArPedestalm_pedestalKey {this,"PedestalKey","LArPedestalSC","SG Key of Pedestal conditions object"}
 
SG::ReadCondHandleKey< CaloSuperCellDetDescrManagerm_caloMgrKey {this,"CaloDetDescrManager", "CaloSuperCellDetDescrManager"}
 
SG::ReadHandleKey< LArDigitContainerm_contKey {this, "DigitsKey", "", "key for LArDigitContainer"}
 
SG::ReadHandleKey< CaloCellContainerm_SCKey {this, "SCContainerKey", "", "key for SC cell container from raw"}
 
SG::ReadHandleKey< CaloCellContainerm_SCRecoKey {this, "SCRecoContainerKey", "", "key for SC reco cell container"}
 
TTree * m_tree = nullptr
 
int m_runNumber = 0
 
int m_lbNumber = 0
 
int m_eventNumber = 0
 
int m_bcid = 0
 
int m_error = 0
 
int m_ncells = 0
 
std::vector< float > m_ECell
 
std::vector< float > m_EtaCell
 
std::vector< float > m_PhiCell
 
std::vector< int > m_LayerCell
 
std::vector< int > m_ProvCell
 
std::vector< int > m_ChidCell
 
std::vector< int > m_HwidCell
 
std::vector< std::array< float,32 > > m_ADC
 
std::vector< float > m_TCell
 
std::vector< float > m_ErecoCell
 
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 24 of file LArReadSC.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

◆ LArReadSC()

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

Definition at line 23 of file LArReadSC.cxx.

23  : AthAlgorithm( name, pSvcLocator ){
24  m_ECell.reserve(35000);
25  m_EtaCell.reserve(35000);
26  m_PhiCell.reserve(35000);
27  m_LayerCell.reserve(35000);
28  m_ProvCell.reserve(35000);
29  m_ChidCell.reserve(35000);
30  m_HwidCell.reserve(35000);
31  m_ADC.reserve(35000);
32  m_TCell.reserve(35000);
33  m_ErecoCell.reserve(35000);
34 }

◆ ~LArReadSC()

LArReadSC::~LArReadSC ( )
virtual

Definition at line 37 of file LArReadSC.cxx.

37 {}

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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 LArReadSC::execute ( )
virtual

Definition at line 92 of file LArReadSC.cxx.

92  {
93  ATH_MSG_DEBUG ("Executing " << name() << "...");
94  const EventContext& ctx = Gaudi::Hive::currentContext();
95 
97  const LArOnOffIdMapping* cabling=*cablingHdl;
98  if(!cabling) {
99  ATH_MSG_ERROR( "Do not have cabling object LArOnOffIdMapping" );
100  return StatusCode::FAILURE;
101  }
102 
104  const CaloSuperCellDetDescrManager* caloDDMgr = *caloMgrHandle;
105 
106  //Get Conditions input
108  const ILArPedestal* larPedestal=*pedHdl;
109 
110 
111  const xAOD::EventInfo* eventInfo = nullptr;
112  ATH_CHECK( evtStore()->retrieve( eventInfo) );
113 
114  m_runNumber = eventInfo->runNumber();
115  m_eventNumber = eventInfo->eventNumber();
116  m_lbNumber = eventInfo->lumiBlock();
117  m_bcid = eventInfo->bcid();
118  m_error = 0;
120 
121  std::vector<const LArDigit*> IndexDigit;
122  int nCell = m_calo_id->calo_cell_hash_max();
123  IndexDigit.resize(nCell,nullptr);
124 
125  const LArDigitContainer* digit_container=nullptr;
126  if( m_contKey.key().size() ) { // fill from standard digits
128  if(!hdlDigit.isValid()) {
129  ATH_MSG_WARNING( "Unable to retrieve LArDigitContainer with key " << m_contKey.key() << " from EventStore. " );
130  } else {
131  digit_container = hdlDigit.cptr();
132  }
133  }
134 
135  if(digit_container) { // build digits index
136  LArDigitContainer::const_iterator first_digit = digit_container->begin();
137  LArDigitContainer::const_iterator end_digit = digit_container->end();
138  for (; first_digit != end_digit; ++first_digit) {
139  HWIdentifier hwid = (*first_digit)->hardwareID();
140  Identifier id = cabling->cnvToIdentifier(hwid);
141  int index = (int) (m_calo_id->calo_cell_hash(id));
142  if (index>=0 && index<nCell) IndexDigit[index]=(*first_digit);
143  }
144  }
145 
146 
148  if(!cells.isValid()){
149  ATH_MSG_ERROR("Could not get SC container with key "<<m_SCKey.key());
150  return StatusCode::FAILURE;
151  }
152  const CaloCellContainer* cell_container=cells.cptr();
153 
154  const CaloCellContainer* recocell_container=nullptr;
155  if(m_SCRecoKey.key().size()){
157  if(recocells.isValid()) recocell_container=recocells.cptr();
158  }
159 
160  std::vector<int> iflag_cell;
161  iflag_cell.resize(nCell,0);
162 
163  CaloCellList myList(caloDDMgr, cell_container);
164 
165  m_ncells=0;
166  for (CaloCellContainer::const_iterator cell = cell_container->begin();
167  cell != cell_container->end(); ++cell) {
168  Identifier cellID = (*cell)->ID();
169  int index = (int) (m_calo_id->calo_cell_hash(cellID));
170  double et = (*cell)->et();
171 
172  if (et > m_etcut ){
173  iflag_cell[index]=1;
174 
175 
176  myList.select((*cell)->eta(),(*cell)->phi(),0.10);
177  for (const CaloCell* cell : myList) {
178  Identifier cellID2 =cell->ID();
179  int index2 = (int)(m_calo_id->calo_cell_hash(cellID2));
180  iflag_cell[index2]=1;
181  }
182  }// above first etcut
183  }// over cells
184 
185  for (CaloCellContainer::const_iterator cell = cell_container->begin();
186  cell != cell_container->end(); ++cell) {
187 
188  Identifier cellID = (*cell)->ID();
189  IdentifierHash hcell=m_calo_id->calo_cell_hash(cellID);
190  unsigned int index = hcell.value();
191 
192  if (iflag_cell[index]==1 ){
193  m_ECell[m_ncells]= (*cell)->energy();
194  m_EtaCell[m_ncells]= (*cell)->eta();
195  m_PhiCell[m_ncells]= (*cell)->phi();
197  m_ProvCell[m_ncells]=(*cell)->provenance();
198 
199  HWIdentifier hwid=cabling->createSignalChannelID(cellID);
202 
203  if(m_contKey.key().size()) { // fill samples
204  for (int i=0;i<32;i++) m_ADC[m_ncells][i]=0.;
205  float pedestal=0.;
206  if (larPedestal) {
207  pedestal = larPedestal->pedestal(hwid,(*cell)->gain());
208  }
209 
210  unsigned int index = (m_calo_id->calo_cell_hash(cellID)).value();
211  if (IndexDigit[index]) {
212  const std::vector<short>& vSamples=(IndexDigit[index])->samples();
213  int nsamples = vSamples.size();
214  for (int i=0;i<std::min(32,nsamples);i++) {
215  m_ADC[m_ncells][i]=(float)(vSamples[i])-pedestal;
216  }
217  }
218  } // samples
219  m_TCell[m_ncells]=0.;
220  m_ErecoCell[m_ncells]=0.;
221  if(recocell_container) {
222  const CaloCell *rcell= recocell_container->findCell(hcell);
223  if(rcell) {
224  m_TCell[m_ncells]=rcell->time();
225  m_ErecoCell[m_ncells]=rcell->energy();
226  }
227  }
228  m_ncells++;
229  }// iflag
230  } // over cells
231 
232  ATH_MSG_INFO("Number of cells read " << m_ncells );
233 
234  m_tree->Fill();
235 
236  return StatusCode::SUCCESS;
237 }

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

Definition at line 86 of file LArReadSC.cxx.

86  {
87  ATH_MSG_INFO ("Finalizing " << name() << "...");
88 
89  return StatusCode::SUCCESS;
90 }

◆ initialize()

StatusCode LArReadSC::initialize ( )
virtual

Definition at line 40 of file LArReadSC.cxx.

40  {
41  ATH_MSG_INFO ("Initializing " << name() << "...");
42 
43  ServiceHandle<ITHistSvc> histSvc("THistSvc",name());
44  CHECK( histSvc.retrieve() );
45  m_tree = new TTree("myTree","myTree");
46  std::string out("/"+m_outStream+"/myTree");
47  CHECK( histSvc->regTree(out.c_str(),m_tree) );
48  ATH_MSG_INFO("Registered tree: " << out);
49  m_tree->Branch("RunNumber",&m_runNumber,"RunNumber/I");
50  m_tree->Branch("LBNumber",&m_lbNumber,"LBNumber/I");
51  m_tree->Branch("EventNumber",&m_eventNumber,"EventNumber/I");
52  m_tree->Branch("BCID",&m_bcid,"BCID/I");
53  m_tree->Branch("LArError",&m_error,"LArError/I");
54  m_tree->Branch("ncells",&m_ncells,"ncells/I");
55  m_tree->Branch("ECell",m_ECell.data(),"eCell[ncells]/F");
56  m_tree->Branch("EtaCell",m_EtaCell.data(),"etaCell[ncells]/F");
57  m_tree->Branch("PhiCell",m_PhiCell.data(),"phiCell[ncells]/F");
58  m_tree->Branch("LayerCell",m_LayerCell.data(),"layerCell[ncells]/I");
59  m_tree->Branch("ProvCell", m_ProvCell.data(),"provCell[ncells]/I");
60  m_tree->Branch("ChidCell", m_ChidCell.data(),"chidCell[ncells]/I");
61  m_tree->Branch("HwidCell", m_HwidCell.data(),"hwidCell[ncells]/I");
62  if(m_contKey.key().size()) m_tree->Branch("ADC",m_ADC.data(),"ADC[ncells][32]/F");
63  if(m_SCRecoKey.key().size()) {
64  m_tree->Branch("TCell",m_TCell.data(),"tCell[ncells]/F");
65  m_tree->Branch("ErecoCell",m_ErecoCell.data(),"ErecoCell[ncells]/F");
66  }
67 
68  const CaloIdManager* caloIdMgr = nullptr;
69  ATH_CHECK(detStore()->retrieve(caloIdMgr));
70  m_calo_id = caloIdMgr->getCaloCell_SuperCell_ID();
71  ATH_CHECK( detStore()->retrieve(m_lar_online_id, "LArOnline_SuperCellID") );
72 
76 
80 
81  ATH_MSG_INFO("Energy cut for time computation: " << m_etcut);
82 
83  return StatusCode::SUCCESS;
84 }

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

std::vector<std::array<float ,32> > LArReadSC::m_ADC
private

Definition at line 63 of file LArReadSC.h.

◆ m_bcid

int LArReadSC::m_bcid = 0
private

Definition at line 53 of file LArReadSC.h.

◆ m_cablingKey

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

Definition at line 41 of file LArReadSC.h.

◆ m_calo_id

const CaloCell_SuperCell_ID* LArReadSC::m_calo_id = nullptr
private

Definition at line 38 of file LArReadSC.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloSuperCellDetDescrManager> LArReadSC::m_caloMgrKey {this,"CaloDetDescrManager", "CaloSuperCellDetDescrManager"}
private

Definition at line 43 of file LArReadSC.h.

◆ m_ChidCell

std::vector<int> LArReadSC::m_ChidCell
private

Definition at line 61 of file LArReadSC.h.

◆ m_contKey

SG::ReadHandleKey<LArDigitContainer> LArReadSC::m_contKey {this, "DigitsKey", "", "key for LArDigitContainer"}
private

Definition at line 45 of file LArReadSC.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_ECell

std::vector<float> LArReadSC::m_ECell
private

Definition at line 56 of file LArReadSC.h.

◆ m_ErecoCell

std::vector<float> LArReadSC::m_ErecoCell
private

Definition at line 65 of file LArReadSC.h.

◆ m_error

int LArReadSC::m_error = 0
private

Definition at line 54 of file LArReadSC.h.

◆ m_EtaCell

std::vector<float> LArReadSC::m_EtaCell
private

Definition at line 57 of file LArReadSC.h.

◆ m_etcut

Gaudi::Property<double> LArReadSC::m_etcut {this,"etCut",7500.,"Et cut to dump cells"}
private

Definition at line 35 of file LArReadSC.h.

◆ m_eventNumber

int LArReadSC::m_eventNumber = 0
private

Definition at line 52 of file LArReadSC.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_HwidCell

std::vector<int> LArReadSC::m_HwidCell
private

Definition at line 62 of file LArReadSC.h.

◆ m_lar_online_id

const LArOnline_SuperCellID* LArReadSC::m_lar_online_id = nullptr
private

Definition at line 39 of file LArReadSC.h.

◆ m_LayerCell

std::vector<int> LArReadSC::m_LayerCell
private

Definition at line 59 of file LArReadSC.h.

◆ m_lbNumber

int LArReadSC::m_lbNumber = 0
private

Definition at line 51 of file LArReadSC.h.

◆ m_ncells

int LArReadSC::m_ncells = 0
private

Definition at line 55 of file LArReadSC.h.

◆ m_outStream

Gaudi::Property< std::string > LArReadSC::m_outStream {this, "output","SPLASH", "to which stream write the ntuple"}
private

Definition at line 36 of file LArReadSC.h.

◆ m_pedestalKey

SG::ReadCondHandleKey<ILArPedestal> LArReadSC::m_pedestalKey {this,"PedestalKey","LArPedestalSC","SG Key of Pedestal conditions object"}
private

Definition at line 42 of file LArReadSC.h.

◆ m_PhiCell

std::vector<float> LArReadSC::m_PhiCell
private

Definition at line 58 of file LArReadSC.h.

◆ m_ProvCell

std::vector<int> LArReadSC::m_ProvCell
private

Definition at line 60 of file LArReadSC.h.

◆ m_runNumber

int LArReadSC::m_runNumber = 0
private

Definition at line 50 of file LArReadSC.h.

◆ m_SCKey

SG::ReadHandleKey<CaloCellContainer> LArReadSC::m_SCKey {this, "SCContainerKey", "", "key for SC cell container from raw"}
private

Definition at line 46 of file LArReadSC.h.

◆ m_SCRecoKey

SG::ReadHandleKey<CaloCellContainer> LArReadSC::m_SCRecoKey {this, "SCRecoContainerKey", "", "key for SC reco cell container"}
private

Definition at line 47 of file LArReadSC.h.

◆ m_TCell

std::vector<float> LArReadSC::m_TCell
private

Definition at line 64 of file LArReadSC.h.

◆ m_tree

TTree* LArReadSC::m_tree = nullptr
private

Definition at line 49 of file LArReadSC.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
ILArPedestal::pedestal
virtual float pedestal(const HWIdentifier &id, int gain) const =0
LArReadSC::m_bcid
int m_bcid
Definition: LArReadSC.h:53
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:281
LArReadSC::m_ncells
int m_ncells
Definition: LArReadSC.h:55
et
Extra patterns decribing particle interation process.
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
CaloCellList
Definition: CaloCellList.h:40
CaloCell_Base_ID::calo_cell_hash
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
LArReadSC::m_ProvCell
std::vector< int > m_ProvCell
Definition: LArReadSC.h:60
SG::ReadCondHandle
Definition: ReadCondHandle.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
LArReadSC::m_error
int m_error
Definition: LArReadSC.h:54
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
index
Definition: index.py:1
ILArPedestal
Definition: ILArPedestal.h:12
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
LArReadSC::m_lar_online_id
const LArOnline_SuperCellID * m_lar_online_id
Definition: LArReadSC.h:39
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArReadSC::m_runNumber
int m_runNumber
Definition: LArReadSC.h:50
athena.value
value
Definition: athena.py:124
CaloCell_Base_ID::calo_sample
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
Definition: CaloCell_Base_ID.cxx:140
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LArReadSC::m_SCKey
SG::ReadHandleKey< CaloCellContainer > m_SCKey
Definition: LArReadSC.h:46
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
CaloCell::time
float time() const
get time (data member)
Definition: CaloCell.h:368
HWIdentifier
Definition: HWIdentifier.h:13
xAOD::EventInfo_v1::LAr
@ LAr
The LAr calorimeter.
Definition: EventInfo_v1.h:335
LArReadSC::m_eventNumber
int m_eventNumber
Definition: LArReadSC.h:52
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
LArReadSC::m_ChidCell
std::vector< int > m_ChidCell
Definition: LArReadSC.h:61
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
LArReadSC::m_PhiCell
std::vector< float > m_PhiCell
Definition: LArReadSC.h:58
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
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
CaloCell::energy
double energy() const
get energy (data member)
Definition: CaloCell.h:327
xAOD::EventInfo_v1::Error
@ Error
The sub-detector issued an error.
Definition: EventInfo_v1.h:349
CaloSuperCellDetDescrManager
Definition: CaloDetDescrManager.h:486
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
LArReadSC::m_contKey
SG::ReadHandleKey< LArDigitContainer > m_contKey
Definition: LArReadSC.h:45
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
LArReadSC::m_ErecoCell
std::vector< float > m_ErecoCell
Definition: LArReadSC.h:65
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
LArReadSC::m_TCell
std::vector< float > m_TCell
Definition: LArReadSC.h:64
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
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
CaloCell_Base_ID::calo_cell_hash_max
size_type calo_cell_hash_max() const
cell 'global' hash table max size
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArReadSC::m_etcut
Gaudi::Property< double > m_etcut
Definition: LArReadSC.h:35
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
MuonSegmentReaderConfig.histSvc
histSvc
Definition: MuonSegmentReaderConfig.py:96
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
CaloCellContainer::findCell
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
Definition: CaloCellContainer.cxx:345
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
LArReadSC::m_SCRecoKey
SG::ReadHandleKey< CaloCellContainer > m_SCRecoKey
Definition: LArReadSC.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
LArReadSC::m_lbNumber
int m_lbNumber
Definition: LArReadSC.h:51
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
IdentifierHash::value
value_type value() const
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
LArReadSC::m_ECell
std::vector< float > m_ECell
Definition: LArReadSC.h:56
LArReadSC::m_pedestalKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Definition: LArReadSC.h:42
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
ReadOfcFromCool.nsamples
nsamples
Definition: ReadOfcFromCool.py:115
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
LArReadSC::m_ADC
std::vector< std::array< float,32 > > m_ADC
Definition: LArReadSC.h:63
DeMoScan.index
string index
Definition: DeMoScan.py:362
LArReadSC::m_EtaCell
std::vector< float > m_EtaCell
Definition: LArReadSC.h:57
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArReadSC::m_LayerCell
std::vector< int > m_LayerCell
Definition: LArReadSC.h:59
LArReadSC::m_caloMgrKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloMgrKey
Definition: LArReadSC.h:43
CaloIdManager::getCaloCell_SuperCell_ID
const CaloCell_SuperCell_ID * getCaloCell_SuperCell_ID(void) const
Definition: CaloIdManager.cxx:110
xAOD::EventInfo_v1::errorState
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
Definition: EventInfo_v1.cxx:817
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
LArReadSC::m_calo_id
const CaloCell_SuperCell_ID * m_calo_id
Definition: LArReadSC.h:38
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LArReadSC::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArReadSC.h:41
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
LArReadSC::m_tree
TTree * m_tree
Definition: LArReadSC.h:49
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
LArReadSC::m_HwidCell
std::vector< int > m_HwidCell
Definition: LArReadSC.h:62
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
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:66
ServiceHandle< ITHistSvc >
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20
LArReadSC::m_outStream
Gaudi::Property< std::string > m_outStream
Definition: LArReadSC.h:36
Identifier
Definition: IdentifierFieldParser.cxx:14