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

#include <LArReadCells.h>

Inheritance diagram for LArReadCells:
Collaboration diagram for LArReadCells:

Public Member Functions

 LArReadCells (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~LArReadCells ()
 
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 > &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

Gaudi::Property< double > m_etcut {this,"etCut",7500.,"Et cut to dump cells"}
 
Gaudi::Property< double > m_etcut2 {this,"etCut2",7500.,"Et cut to dump cells from second layer"}
 
Gaudi::Property< std::string > m_outStream {this, "output","SPLASH", "to which stream write the ntuple"}
 
const CaloCell_IDm_calo_id = nullptr
 
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_TCell
 
std::vector< float > m_EtaCell
 
std::vector< float > m_PhiCell
 
std::vector< int > m_LayerCell
 
std::vector< int > m_ProvCell
 
std::vector< int > m_QuaCell
 
std::vector< int > m_GainCell
 
std::vector< int > m_ChidCell
 
std::vector< int > m_HwidCell
 
std::vector< std::array< float,32 > > m_ADC
 
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
 
SG::ReadCondHandleKey< ILArPedestalm_pedestalKey {this,"PedestalKey","LArPedestal","SG Key of Pedestal conditions object"}
 
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
 
const LArOnlineIDm_lar_online_id = nullptr
 
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 21 of file LArReadCells.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

◆ LArReadCells()

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

Definition at line 29 of file LArReadCells.cxx.

29  : AthAlgorithm( name, pSvcLocator ){
30  m_ECell.reserve(250000);
31  m_TCell.reserve(250000);
32  m_EtaCell.reserve(250000);
33  m_PhiCell.reserve(250000);
34  m_LayerCell.reserve(250000);
35  m_ProvCell.reserve(250000);
36  m_QuaCell.reserve(250000);
37  m_GainCell.reserve(250000);
38  m_ChidCell.reserve(250000);
39  m_HwidCell.reserve(250000);
40  m_ADC.reserve(250000);
41 }

◆ ~LArReadCells()

LArReadCells::~LArReadCells ( )
virtual

Definition at line 44 of file LArReadCells.cxx.

44 {}

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 LArReadCells::execute ( )
virtual

Definition at line 93 of file LArReadCells.cxx.

93  {
94  ATH_MSG_DEBUG ("Executing " << name() << "...");
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 CaloDetDescrManager* 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  ATH_MSG_INFO( " run number " << eventInfo->runNumber() );
114 
115  m_runNumber = eventInfo->runNumber();
116  m_eventNumber = eventInfo->eventNumber();
117  m_lbNumber = eventInfo->lumiBlock();
118  m_bcid = eventInfo->bcid();
119  m_error = 0;
121 
122  std::vector<const LArDigit*> IndexDigit;
123  int nCell = m_calo_id->calo_cell_hash_max();
124  IndexDigit.resize(nCell,nullptr);
125 
126  const LArDigitContainer* digit_container;
127  if (evtStore()->contains<LArDigitContainer>("FREE")) {
128  CHECK(evtStore()->retrieve(digit_container,"FREE"));
129  LArDigitContainer::const_iterator first_digit = digit_container->begin();
130  LArDigitContainer::const_iterator end_digit = digit_container->end();
131  for (; first_digit != end_digit; ++first_digit)
132  {
133  HWIdentifier hwid = (*first_digit)->hardwareID();
134  Identifier id = cabling->cnvToIdentifier(hwid);
135  int index = (int) (m_calo_id->calo_cell_hash(id));
136  if (index>=0 && index<nCell) IndexDigit[index]=(*first_digit);
137  }
138  }
139 
140 
141  const CaloCellContainer* cell_container;
142  CHECK( evtStore()->retrieve(cell_container,"AllCalo"));
143 
144  std::vector<int> iflag_cell;
145  iflag_cell.resize(nCell,0);
146 
147  CaloCellContainer::const_iterator first_cell = cell_container->begin();
148  CaloCellContainer::const_iterator end_cell = cell_container->end();
149  m_ncells=0;
150  for (; first_cell != end_cell; ++first_cell)
151  {
152  Identifier cellID = (*first_cell)->ID();
153  int index = (int) (m_calo_id->calo_cell_hash(cellID));
154  double et = (*first_cell)->et();
155 
156  if (et > m_etcut && !(m_calo_id->is_tile(cellID)) ){
157  iflag_cell[index]=1;
158 
160  && et>m_etcut2) {
161 
162  CaloCellList myList(caloDDMgr, cell_container);
163  myList.select((*first_cell)->eta(),(*first_cell)->phi(),0.10);
164  for (const CaloCell* cell : myList) {
165  Identifier cellID2 =cell->ID();
166  int index2 = (int)(m_calo_id->calo_cell_hash(cellID2));
167  iflag_cell[index2]=1;
168  }
169  }// second layer
170  }// above first etcut
171  }// over cells
172 
173  first_cell = cell_container->begin();
174  for (; first_cell != end_cell; ++first_cell) {
175 
176  Identifier cellID = (*first_cell)->ID();
177  int index = (int) (m_calo_id->calo_cell_hash(cellID));
178 
179  if (iflag_cell[index]==1 ){
180  m_ECell[m_ncells]= (*first_cell)->energy();
181  m_TCell[m_ncells]= (*first_cell)->time();
182  m_EtaCell[m_ncells]= (*first_cell)->eta();
183  m_PhiCell[m_ncells]= (*first_cell)->phi();
185  m_ProvCell[m_ncells]=(*first_cell)->provenance();
186  m_QuaCell[m_ncells]=(*first_cell)->quality();
187  m_GainCell[m_ncells]=(*first_cell)->gain();
188 
189  for (int i=0;i<32;i++) m_ADC[m_ncells][i]=0.;
190  float pedestal=0.;
191  int myid=0;
192  if (!(m_calo_id->is_tile(cellID))) {
193  HWIdentifier hwid = cabling->createSignalChannelID(cellID);
194  int barrel_ec = m_lar_online_id->barrel_ec(hwid);
195  int pos_neg = m_lar_online_id->pos_neg(hwid);
196  int FT = m_lar_online_id->feedthrough(hwid);
197  int slot = m_lar_online_id->slot(hwid);
198  int channel = m_lar_online_id->channel(hwid);
199  if (barrel_ec<2 && pos_neg<2 && FT<32 && slot<16 && channel<128)
200  myid = (channel) | (slot << 7) | (FT<<11) | (pos_neg << 16) | (barrel_ec << 17);
201  if (myid < 128) {
202  ATH_MSG_WARNING("Why we have such cell: "<<barrel_ec<<" "<<pos_neg<<" "<<FT<<" "<<slot<<" "<<channel<<" | "<<myid);
203  ATH_MSG_WARNING("from: "<<hwid.get_identifier32().get_compact());
204  }
205 
206  if (larPedestal) {
207  pedestal = larPedestal->pedestal(hwid,(*first_cell)->gain());
208  }
209 
210  m_HwidCell[m_ncells]=myid;
212  int index = (int) (m_calo_id->calo_cell_hash(cellID));
213  if (IndexDigit[index]) {
214  const std::vector<short>& vSamples=(IndexDigit[index])->samples();
215  int nsamples = vSamples.size();
216  for (int i=0;i<std::min(32,nsamples);i++) {
217  m_ADC[m_ncells][i]=(float)(vSamples[i])-pedestal;
218  }
219  }
220  } // not Tile
221  m_ncells++;
222  }// iflag
223  } // over cells
224 
225  ATH_MSG_INFO("Number of cells read " << m_ncells );
226 
227  m_tree->Fill();
228 
229  return StatusCode::SUCCESS;
230 }

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

Definition at line 87 of file LArReadCells.cxx.

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

◆ initialize()

StatusCode LArReadCells::initialize ( )
virtual

Definition at line 47 of file LArReadCells.cxx.

47  {
48  ATH_MSG_INFO ("Initializing " << name() << "...");
49 
50  ServiceHandle<ITHistSvc> histSvc("THistSvc",name());
51  CHECK( histSvc.retrieve() );
52  m_tree = new TTree("myTree","myTree");
53  std::string out("/"+m_outStream+"/myTree");
54  CHECK( histSvc->regTree(out.c_str(),m_tree) );
55  ATH_MSG_INFO("Registered tree: " << out);
56  m_tree->Branch("RunNumber",&m_runNumber,"RunNumber/I");
57  m_tree->Branch("LBNumber",&m_lbNumber,"LBNumber/I");
58  m_tree->Branch("EventNumber",&m_eventNumber,"EventNumber/I");
59  m_tree->Branch("BCID",&m_bcid,"BCID/I");
60  m_tree->Branch("LArError",&m_error,"LArError/I");
61  m_tree->Branch("ncells",&m_ncells,"ncells/I");
62  m_tree->Branch("ECell",m_ECell.data(),"eCell[ncells]/F");
63  m_tree->Branch("TCell",m_TCell.data(),"tCell[ncells]/F");
64  m_tree->Branch("EtaCell",m_EtaCell.data(),"etaCell[ncells]/F");
65  m_tree->Branch("PhiCell",m_PhiCell.data(),"phiCell[ncells]/F");
66  m_tree->Branch("LayerCell",m_LayerCell.data(),"layerCell[ncells]/I");
67  m_tree->Branch("ProvCell", m_ProvCell.data(),"provCell[ncells]/I");
68  m_tree->Branch("QuaCell", m_QuaCell.data(),"quaCell[ncells]/I");
69  m_tree->Branch("GainCell", m_GainCell.data(),"gainCell[ncells]/I");
70  m_tree->Branch("ChidCell", m_ChidCell.data(),"chidCell[ncells]/I");
71  m_tree->Branch("HwidCell", m_HwidCell.data(),"hwidCell[ncells]/I");
72  m_tree->Branch("ADC",m_ADC.data(),"ADC[ncells][32]/F");
73 
74  const CaloIdManager* caloIdMgr = nullptr;
75  ATH_CHECK(detStore()->retrieve(caloIdMgr));
76  m_calo_id = caloIdMgr->getCaloCell_ID();
77  ATH_CHECK( detStore()->retrieve(m_lar_online_id, "LArOnlineID") );
78 
82  ATH_MSG_INFO("Energy cut for time and quality computation: " << m_etcut);
83 
84  return StatusCode::SUCCESS;
85 }

◆ 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> > LArReadCells::m_ADC
private

Definition at line 56 of file LArReadCells.h.

◆ m_bcid

int LArReadCells::m_bcid = 0
private

Definition at line 43 of file LArReadCells.h.

◆ m_cablingKey

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

Definition at line 58 of file LArReadCells.h.

◆ m_calo_id

const CaloCell_ID* LArReadCells::m_calo_id = nullptr
private

Definition at line 36 of file LArReadCells.h.

◆ m_caloMgrKey

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

Definition at line 60 of file LArReadCells.h.

◆ m_ChidCell

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

Definition at line 54 of file LArReadCells.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> LArReadCells::m_ECell
private

Definition at line 46 of file LArReadCells.h.

◆ m_error

int LArReadCells::m_error = 0
private

Definition at line 44 of file LArReadCells.h.

◆ m_EtaCell

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

Definition at line 48 of file LArReadCells.h.

◆ m_etcut

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

Definition at line 32 of file LArReadCells.h.

◆ m_etcut2

Gaudi::Property<double> LArReadCells::m_etcut2 {this,"etCut2",7500.,"Et cut to dump cells from second layer"}
private

Definition at line 33 of file LArReadCells.h.

◆ m_eventNumber

int LArReadCells::m_eventNumber = 0
private

Definition at line 42 of file LArReadCells.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_GainCell

std::vector<int> LArReadCells::m_GainCell
private

Definition at line 53 of file LArReadCells.h.

◆ m_HwidCell

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

Definition at line 55 of file LArReadCells.h.

◆ m_lar_online_id

const LArOnlineID* LArReadCells::m_lar_online_id = nullptr
private

Definition at line 62 of file LArReadCells.h.

◆ m_LayerCell

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

Definition at line 50 of file LArReadCells.h.

◆ m_lbNumber

int LArReadCells::m_lbNumber = 0
private

Definition at line 41 of file LArReadCells.h.

◆ m_ncells

int LArReadCells::m_ncells = 0
private

Definition at line 45 of file LArReadCells.h.

◆ m_outStream

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

Definition at line 34 of file LArReadCells.h.

◆ m_pedestalKey

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

Definition at line 59 of file LArReadCells.h.

◆ m_PhiCell

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

Definition at line 49 of file LArReadCells.h.

◆ m_ProvCell

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

Definition at line 51 of file LArReadCells.h.

◆ m_QuaCell

std::vector<int> LArReadCells::m_QuaCell
private

Definition at line 52 of file LArReadCells.h.

◆ m_runNumber

int LArReadCells::m_runNumber = 0
private

Definition at line 40 of file LArReadCells.h.

◆ m_TCell

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

Definition at line 47 of file LArReadCells.h.

◆ m_tree

TTree* LArReadCells::m_tree = nullptr
private

Definition at line 39 of file LArReadCells.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
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
LArReadCells::m_etcut
Gaudi::Property< double > m_etcut
Definition: LArReadCells.h:32
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
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.
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LArReadCells::m_runNumber
int m_runNumber
Definition: LArReadCells.h:40
index
Definition: index.py:1
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ILArPedestal
Definition: ILArPedestal.h:12
LArReadCells::m_GainCell
std::vector< int > m_GainCell
Definition: LArReadCells.h:53
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArReadCells::m_lar_online_id
const LArOnlineID * m_lar_online_id
Definition: LArReadCells.h:62
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:1961
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
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:141
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LArReadCells::m_pedestalKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Definition: LArReadCells.h:59
CaloCell_Base_ID::is_tile
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
LArReadCells::m_ncells
int m_ncells
Definition: LArReadCells.h:45
LArReadCells::m_bcid
int m_bcid
Definition: LArReadCells.h:43
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:1942
xAOD::EventInfo_v1::LAr
@ LAr
The LAr calorimeter.
Definition: EventInfo_v1.h:335
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
LArReadCells::m_ADC
std::vector< std::array< float,32 > > m_ADC
Definition: LArReadCells.h:56
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArReadCells::m_error
int m_error
Definition: LArReadCells.h:44
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
xAOD::EventInfo_v1::Error
@ Error
The sub-detector issued an error.
Definition: EventInfo_v1.h:349
LArReadCells::m_outStream
Gaudi::Property< std::string > m_outStream
Definition: LArReadCells.h:34
LArReadCells::m_ProvCell
std::vector< int > m_ProvCell
Definition: LArReadCells.h:51
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:1967
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
LArReadCells::m_ECell
std::vector< float > m_ECell
Definition: LArReadCells.h:46
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
Identifier32::get_compact
value_type get_compact(void) const
Get the compact id.
Definition: Identifier32.h:171
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:92
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
LArReadCells::m_LayerCell
std::vector< int > m_LayerCell
Definition: LArReadCells.h:50
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:1954
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
LArReadCells::m_lbNumber
int m_lbNumber
Definition: LArReadCells.h:41
LArReadCells::m_tree
TTree * m_tree
Definition: LArReadCells.h:39
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
LArReadCells::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArReadCells.h:60
min
#define min(a, b)
Definition: cfImp.cxx:40
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
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
LArReadCells::m_ChidCell
std::vector< int > m_ChidCell
Definition: LArReadCells.h:54
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LArReadCells::m_calo_id
const CaloCell_ID * m_calo_id
Definition: LArReadCells.h:36
CaloIdManager::getCaloCell_ID
const CaloCell_ID * getCaloCell_ID(void) const
Access to IdHelper.
Definition: CaloIdManager.cxx:63
LArReadCells::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArReadCells.h:58
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
LArReadCells::m_EtaCell
std::vector< float > m_EtaCell
Definition: LArReadCells.h:48
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
LArReadCells::m_TCell
std::vector< float > m_TCell
Definition: LArReadCells.h:47
LArReadCells::m_eventNumber
int m_eventNumber
Definition: LArReadCells.h:42
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.
LArNewCalib_Delay_OFC_Cali.FT
FT
Definition: LArNewCalib_Delay_OFC_Cali.py:120
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
DeMoScan.index
string index
Definition: DeMoScan.py:362
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:1948
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArReadCells::m_HwidCell
std::vector< int > m_HwidCell
Definition: LArReadCells.h:55
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:616
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
LArReadCells::m_QuaCell
std::vector< int > m_QuaCell
Definition: LArReadCells.h:52
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LArReadCells::m_PhiCell
std::vector< float > m_PhiCell
Definition: LArReadCells.h:49
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Identifier::get_identifier32
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
readCCLHist.float
float
Definition: readCCLHist.py:83
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
LArReadCells::m_etcut2
Gaudi::Property< double > m_etcut2
Definition: LArReadCells.h:33
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
CaloCell_Base_ID::calo_cell_hash_max
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size
ServiceHandle< ITHistSvc >
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20