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

Make a dummy supercell LArRawChannelContainer from a CaloCallContainer. More...

#include <LArSCSimpleMaker.h>

Inheritance diagram for LArSCSimpleMaker:
Collaboration diagram for LArSCSimpleMaker:

Public Member Functions

 LArSCSimpleMaker (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Gaudi algorithm constructor. More...
 
 ~LArSCSimpleMaker ()
 
StatusCode initialize ()
 Standard Gaudi initialize method. More...
 
StatusCode execute (const EventContext &context) const
 Algorithm execute method. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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

ToolHandle< ICaloSuperCellIDToolm_scidtool
 Property: Offline / supercell mapping tool. More...
 
SG::ReadHandleKey< CaloCellContainerm_cellContainerKey
 Property: SG key for the input calorimeter cell container. More...
 
SG::WriteHandleKey< CaloCellContainerm_sCellContainerKey
 Property: SG key for the output supercell LAr channel container. More...
 
SG::ReadCondHandleKey< CaloNoiseSigmaDiffm_noise_per_cell_Key { this, "CaloNoiseSigmaDiff", "CaloNoiseSigmaDiff", "Sigma Diff for CaloNoise with High and Medium gain"}
 Property SG Key for the Expected Noise Sigma diff in diff gains. More...
 
SG::ReadHandleKey< CaloBCIDAveragem_bcidAvgKey {this, "BCIDAvgKey", "CaloBCIDAverage", "" }
 Property SG Key for the CaloLumiBCID. More...
 
Gaudi::Property< bool > m_compNoise {this,"CompNoise",true,"Compensate for Noise difference in LAr between high and medium gain"}
 
Gaudi::Property< bool > m_addBCID {this,"addBCID",true,"Add BCID compensation back to cells prior to sum them up"}
 
SG::ReadCondHandleKey< CaloSuperCellDetDescrManagerm_caloSuperCellMgrKey
 
const CaloIdManagerm_calo_id_manager
 Entry point for calorimeter ID helpers. More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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

Make a dummy supercell LArRawChannelContainer from a CaloCallContainer.

Definition at line 41 of file LArSCSimpleMaker.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArSCSimpleMaker()

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

Standard Gaudi algorithm constructor.

Definition at line 32 of file LArSCSimpleMaker.cxx.

34  : AthReentrantAlgorithm(name, pSvcLocator),
35  m_calo_id_manager(nullptr)
36 {
37 }

◆ ~LArSCSimpleMaker()

LArSCSimpleMaker::~LArSCSimpleMaker ( )
inline

Definition at line 46 of file LArSCSimpleMaker.h.

46 {};

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::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 LArSCSimpleMaker::execute ( const EventContext &  context) const

Algorithm execute method.

Definition at line 53 of file LArSCSimpleMaker.cxx.

54 {
55 
56  // conditions
57  const CaloNoiseSigmaDiff* noise_per_cell = nullptr;
58  if ( m_compNoise ){
59  SG::ReadCondHandle<CaloNoiseSigmaDiff> noise_per_cell_handle(m_noise_per_cell_Key,context);
60  if ( not noise_per_cell_handle.isValid() ) {
61  ATH_MSG_DEBUG("Found invalid read handle for CaloNoiseSigmaDiff");
62  return StatusCode::FAILURE;
63  }
64  noise_per_cell = noise_per_cell_handle.cptr();
65  } // end of if n_compNoise
66 
67  // Not really a condition, but almost
68  const CaloBCIDAverage* caloLumiBCID = nullptr;
69  if (m_addBCID ) {
70  SG::ReadHandle<CaloBCIDAverage> caloLumiBCIDHandle(m_bcidAvgKey, context);
71  if ( not caloLumiBCIDHandle.isValid() ) {
72  ATH_MSG_DEBUG("Found invalid read handle for CaloBCIDAverage");
73  return StatusCode::FAILURE;
74  }
75  caloLumiBCID = caloLumiBCIDHandle.cptr();
76  } // end of if m_addBCID
77 
79  const CaloCell_ID * calo_cell_id = m_calo_id_manager->getCaloCell_ID();
80 
82  const TileID * tile_cell_id = m_calo_id_manager->getTileID();
83 
84  int hash_max = calo_sc_id->calo_cell_hash_max();
85  DataPool<CaloCell> dataPool;
86  if (dataPool.allocated()==0)
87  dataPool.reserve (hash_max);
88 
89  auto cellsHandle = SG::makeHandle( m_cellContainerKey, context );
90  if ( not cellsHandle.isValid() ) {
91  ATH_MSG_ERROR("Did not get CaloCellContainer input");
92  return StatusCode::FAILURE;
93  }
94 
95  const CaloCellContainer* cells = cellsHandle.cptr();
96  ATH_MSG_DEBUG("Got a CaloCellContainer input");
97 
98  std::vector<float> energies (hash_max,0);
99  std::vector<float> enTime (hash_max,0);
100  std::vector<float> enForTime (hash_max,0);
101  std::vector<bool> timeDef (hash_max,false);
102  std::vector<uint16_t> gains (hash_max,0);
103  std::vector<uint16_t> qualities (hash_max,0);
104  std::vector<float> sigma_noise_per_scell(hash_max,0);
105 
106  for (const CaloCell* cell : *cells) {
107  Identifier cell_id = cell->ID();
108  Identifier sCellID = m_scidtool->offlineToSuperCellID (cell_id);
109 
110  if (!sCellID.is_valid()) {
111  // ATH_MSG_WARNING( " SC ID not valid " << sCellID.get_identifier32().get_compact() << " offline id = " << cell->ID().get_identifier32().get_compact() );
112  // calo_sc_id->print(cell->ID());
113  continue;
114  }
115  IdentifierHash hash, cell_hash;
116  hash = calo_sc_id->calo_cell_hash (sCellID);
117  assert (hash < energies.size() );
118  float pedestalshift = 0.0;
119  if ( m_addBCID ) pedestalshift = caloLumiBCID->average(cell_id);
120  energies[hash] += cell->energy() + pedestalshift;
121  if ( m_compNoise && cell->gain() == CaloGain::LARHIGHGAIN ){
122  cell_hash = calo_cell_id->calo_cell_hash(cell_id);
123  sigma_noise_per_scell[hash]+=(*noise_per_cell)[cell_hash];
124  }
125  uint16_t prov = cell->provenance();
126  if ( ((prov & 0x2000) == 0x2000) && (cell->et()>50) ) {
127  // time defined for one of the cells
128  timeDef[hash] = true;
129  enForTime[hash] += cell->energy();
130  enTime[hash] += cell->energy()*cell->time();
131  }
132 
133  gains[hash] = std::max(gains[hash],(uint16_t)cell->gain());
134  if ( qualities[hash] + (int) cell->quality() > 65535 ){
135  qualities[hash] = 65535 ;
136  }else
137  {
138  qualities[hash] += cell->quality();
139  }
140 
141  if ( calo_cell_id->is_tile(cell_id) && tile_cell_id->sampling(cell_id)==TileID::SAMP_D){
142  // Special case for SAMP_D in tile. Signal is split into two SCs
143  int section = tile_cell_id->section (cell_id);
144  int side = tile_cell_id->side (cell_id);
145  int module = tile_cell_id->module (cell_id);
146  int tower = tile_cell_id->tower (cell_id);
147 
148  int section1 = section;
149  int section2 = section;
150  int side1 = side;
151  int side2 = side;
152  int tower1= tower;
153  int tower2= tower-1;
154 
155  if (tower ==0){
156  side1 = -1;
157  side2 = 1;
158  tower1=0;
159  tower2=0;
160  }
161  if (tower==10){
162  section2 = TileID::BARREL;
163  section1 = TileID::EXTBAR;
164  }
165 
166 
167  Identifier sc_id1 = tile_sc_id->cell_id(section1,side1,module,tower1,0);
168  Identifier sc_id2 = tile_sc_id->cell_id(section2,side2,module,tower2,0);
169 
170 
171  int hash1 = calo_sc_id->calo_cell_hash (sc_id1);
172  int hash2 = calo_sc_id->calo_cell_hash (sc_id2);
173 
174  energies[hash1] += cell->energy()*0.5;
175  energies[hash2] += cell->energy()*0.5;
176  }
177 
178 
179  }
180 
181  SG::WriteHandle<CaloCellContainer> scellContainerHandle( m_sCellContainerKey, context);
182  auto superCellContainer = std::make_unique<CaloCellContainer> ();
183 
185  const CaloSuperCellDetDescrManager* caloMgr = *caloSuperCellMgrHandle;
186 
187  superCellContainer->reserve(energies.size());
188 
189  std::default_random_engine generator;
190  for (unsigned int i=0; i < energies.size(); i++) {
191 
192  const CaloDetDescrElement* dde = caloMgr->get_element (i);
193  if (!dde) {
194  // ATH_MSG_WARNING( " Not valid DDE, hash index = "<< i );
195  continue;
196  }
197 
198  // More noise
199  float add_noise = 0.0;
200  IdentifierHash hash = dde->calo_hash();
201  if ( (!dde->is_tile()) && (sigma_noise_per_scell[hash] > 0.0) ){
202  std::normal_distribution<double> distribution(0.0,sigma_noise_per_scell[hash] );
203  add_noise = distribution(generator);
204  }
205  energies[i]+=add_noise;
206 
207  //CaloCell* ss = dataPool.nextElementPtr();
208  CaloCell* ss = new CaloCell();
209  ss->setCaloDDE( caloMgr->get_element (i));
210  ss->setEnergy( energies[i] );
211  uint16_t prov (0);
212  if ( timeDef[i] ){
213  float time = enTime[i] / enForTime[i]; // if timeDef is true, enForTime is > 10
214  float et = ss->et();
215  ss->setTime( time );
216  prov = LArProv::QTPRESENT;// 0x2000;
217  if(et>10e3 && time>-8 && time<16) prov |= LArProv::SCTIMEPASS;//0x200;
218  else if(et<=10e3 && std::abs(time)<8) prov |= LArProv::SCTIMEPASS;//0x200;
219  } else ss->setTime( 999.0 ); // makes sure it will fail some BCID
220 
221  ss->setQuality( qualities[i] );
222  if (calo_sc_id->is_tile(ss->ID()))
223  {
224  ss->setProvenance( 0 );
225  ss->setGain( (CaloGain::CaloGain) 0 );
226  }
227  else
228  {
229  ss->setProvenance( prov );
230  ss->setGain( CaloGain::LARHIGHGAIN );
231  }
232  superCellContainer->push_back(ss);
233 
234  }
235  ATH_CHECK( scellContainerHandle.record( std::move(superCellContainer) ) );
236 
237  return StatusCode::SUCCESS;
238 }

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ initialize()

StatusCode LArSCSimpleMaker::initialize ( )

Standard Gaudi initialize method.

Definition at line 39 of file LArSCSimpleMaker.cxx.

◆ inputHandles()

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

Return this algorithm's input handles.

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

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::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< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

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

◆ renounce()

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

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_addBCID

Gaudi::Property<bool> LArSCSimpleMaker::m_addBCID {this,"addBCID",true,"Add BCID compensation back to cells prior to sum them up"}
private

Definition at line 82 of file LArSCSimpleMaker.h.

◆ m_bcidAvgKey

SG::ReadHandleKey<CaloBCIDAverage> LArSCSimpleMaker::m_bcidAvgKey {this, "BCIDAvgKey", "CaloBCIDAverage", "" }
private

Property SG Key for the CaloLumiBCID.

Definition at line 76 of file LArSCSimpleMaker.h.

◆ m_calo_id_manager

const CaloIdManager* LArSCSimpleMaker::m_calo_id_manager
private

Entry point for calorimeter ID helpers.

Definition at line 89 of file LArSCSimpleMaker.h.

◆ m_caloSuperCellMgrKey

SG::ReadCondHandleKey<CaloSuperCellDetDescrManager> LArSCSimpleMaker::m_caloSuperCellMgrKey
private
Initial value:
{
this,"CaloSuperCellDetDescrManager","CaloSuperCellDetDescrManager","SG key of the resulting CaloSuperCellDetDescrManager"}

Definition at line 85 of file LArSCSimpleMaker.h.

◆ m_cellContainerKey

SG::ReadHandleKey<CaloCellContainer> LArSCSimpleMaker::m_cellContainerKey
private
Initial value:
{ this, "CellContainer", "AllCalo",
"SG key for the input calorimeter cell container"}

Property: SG key for the input calorimeter cell container.

Definition at line 62 of file LArSCSimpleMaker.h.

◆ m_compNoise

Gaudi::Property<bool> LArSCSimpleMaker::m_compNoise {this,"CompNoise",true,"Compensate for Noise difference in LAr between high and medium gain"}
private

Definition at line 80 of file LArSCSimpleMaker.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_noise_per_cell_Key

SG::ReadCondHandleKey<CaloNoiseSigmaDiff> LArSCSimpleMaker::m_noise_per_cell_Key { this, "CaloNoiseSigmaDiff", "CaloNoiseSigmaDiff", "Sigma Diff for CaloNoise with High and Medium gain"}
private

Property SG Key for the Expected Noise Sigma diff in diff gains.

Definition at line 72 of file LArSCSimpleMaker.h.

◆ m_sCellContainerKey

SG::WriteHandleKey<CaloCellContainer> LArSCSimpleMaker::m_sCellContainerKey
private
Initial value:
{ this, "SCellContainer", "SCellContainer",
"SG key for the output supercell LAr channel container"}

Property: SG key for the output supercell LAr channel container.

Definition at line 67 of file LArSCSimpleMaker.h.

◆ m_scidtool

ToolHandle<ICaloSuperCellIDTool> LArSCSimpleMaker::m_scidtool
private
Initial value:
{ this, "SCIDTool", "CaloSuperCellIDTool" ,
"Offline / supercell mapping tool."}

Property: Offline / supercell mapping tool.

Definition at line 57 of file LArSCSimpleMaker.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
CaloNoiseSigmaDiff
std::vector< float > CaloNoiseSigmaDiff
NAME : CaloNoiseSigmaDiff.h PACKAGE : Calorimeter/CaloConditions.
Definition: CaloNoiseSigmaDiff.h:20
et
Extra patterns decribing particle interation process.
LArSCSimpleMaker::m_noise_per_cell_Key
SG::ReadCondHandleKey< CaloNoiseSigmaDiff > m_noise_per_cell_Key
Property SG Key for the Expected Noise Sigma diff in diff gains.
Definition: LArSCSimpleMaker.h:73
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
LArSCSimpleMaker::m_scidtool
ToolHandle< ICaloSuperCellIDTool > m_scidtool
Property: Offline / supercell mapping tool.
Definition: LArSCSimpleMaker.h:58
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
LArSCSimpleMaker::m_compNoise
Gaudi::Property< bool > m_compNoise
Definition: LArSCSimpleMaker.h:80
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
Tile_Base_ID::side
int side(const Identifier &id) const
Definition: Tile_Base_ID.cxx:153
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
DataPool::reserve
void reserve(unsigned int size)
Set the desired capacity.
Tile_SuperCell_ID
Helper class for Tile offline identifiers for supercells.
Definition: Tile_SuperCell_ID.h:64
Tile_Base_ID::tower
int tower(const Identifier &id) const
Definition: Tile_Base_ID.cxx:165
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CaloIdManager::getTile_SuperCell_ID
const Tile_SuperCell_ID * getTile_SuperCell_ID(void) const
Definition: CaloIdManager.cxx:130
CaloCell_Base_ID::is_tile
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
Tile_Base_ID::BARREL
@ BARREL
Definition: Tile_Base_ID.h:48
Identifier::is_valid
bool is_valid() const
Check if id is in a valid state.
LArSCSimpleMaker::m_sCellContainerKey
SG::WriteHandleKey< CaloCellContainer > m_sCellContainerKey
Property: SG key for the output supercell LAr channel container.
Definition: LArSCSimpleMaker.h:68
LArSCSimpleMaker::m_calo_id_manager
const CaloIdManager * m_calo_id_manager
Entry point for calorimeter ID helpers.
Definition: LArSCSimpleMaker.h:89
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::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
CaloSuperCellDetDescrManager
Definition: CaloDetDescrManager.h:490
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TRT::Hit::side
@ side
Definition: HitInfo.h:83
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
python.PyAthena.module
module
Definition: PyAthena.py:131
Tile_Base_ID::EXTBAR
@ EXTBAR
Definition: Tile_Base_ID.h:48
CaloIdManager::getTileID
const TileID * getTileID(void) const
Definition: CaloIdManager.cxx:100
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CaloDetDescrElement::calo_hash
IdentifierHash calo_hash() const
cell calo hash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:412
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
Tile_Base_ID::module
int module(const Identifier &id) const
Definition: Tile_Base_ID.cxx:159
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
CaloCell_SuperCell_ID
Helper class for offline supercell identifiers.
Definition: CaloCell_SuperCell_ID.h:48
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
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
LArProv::QTPRESENT
@ QTPRESENT
Definition: LArProvenance.h:34
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloBCIDAverage
Definition: CaloBCIDAverage.h:16
Tile_Base_ID::sampling
int sampling(const Identifier &id) const
Definition: Tile_Base_ID.h:164
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
AthCommonDataStore< AthCommonMsg< Gaudi::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
LArProv::SCTIMEPASS
@ SCTIMEPASS
Definition: LArProvenance.h:30
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
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
CaloDetDescrElement::is_tile
bool is_tile() const
cell belongs to Tile
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:442
LArSCSimpleMaker::m_caloSuperCellMgrKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
Definition: LArSCSimpleMaker.h:85
LArSCSimpleMaker::m_cellContainerKey
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
Property: SG key for the input calorimeter cell container.
Definition: LArSCSimpleMaker.h:63
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
LArSCSimpleMaker::m_addBCID
Gaudi::Property< bool > m_addBCID
Definition: LArSCSimpleMaker.h:82
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloIdManager::getCaloCell_ID
const CaloCell_ID * getCaloCell_ID(void) const
Access to IdHelper.
Definition: CaloIdManager.cxx:63
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
CaloBCIDAverage::average
float average(const Identifier &id) const
Definition: CaloBCIDAverage.h:27
Tile_Base_ID::SAMP_D
@ SAMP_D
Definition: Tile_Base_ID.h:55
SG::WriteHandle< CaloCellContainer >
mc.generator
generator
Configure Herwig7 These are the commands corresponding to what would go into the regular Herwig infil...
Definition: mc.MGH7_FxFx_H71-DEFAULT_test.py:18
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloIdManager::getCaloCell_SuperCell_ID
const CaloCell_SuperCell_ID * getCaloCell_SuperCell_ID(void) const
Definition: CaloIdManager.cxx:110
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:63
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Tile_Base_ID::section
int section(const Identifier &id) const
Definition: Tile_Base_ID.cxx:147
LArSCSimpleMaker::m_bcidAvgKey
SG::ReadHandleKey< CaloBCIDAverage > m_bcidAvgKey
Property SG Key for the CaloLumiBCID.
Definition: LArSCSimpleMaker.h:77
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
section
void section(const std::string &sec)
Definition: TestTriggerMenuAccess.cxx:22
Tile_Base_ID::cell_id
Identifier cell_id(const Identifier &any_id) const
Definition: Tile_Base_ID.cxx:581
DataPool::allocated
unsigned int allocated()
return size already allocated OK
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14