 |
ATLAS Offline Software
|
Make a dummy supercell LArRawChannelContainer
from a CaloCallContainer
.
More...
#include <LArHITtoCell.h>
|
| LArHITtoCell (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Gaudi algorithm constructor. More...
|
|
| ~LArHITtoCell () |
|
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 |
|
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingKey {this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"} |
|
SG::ReadCondHandleKey< ILArfSampl > | m_fracSKey {this, "FracSKey", "LArfSamplSC", "SG Key of fSamplS conditions object"} |
| Property: Fraction of Energy Sampled (conditions input). More...
|
|
SG::ReadCondHandleKey< CaloDetDescrManager > | m_caloMgrKey {this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" } |
|
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > | m_caloSuperCellMgrKey {this, "CaloSuperCellDetDescrManager", "CaloSuperCellDetDescrManager", "SG key of the resulting CaloSuperCellDetDescrManager" } |
|
ToolHandle< ICaloSuperCellIDTool > | m_scidtool |
| Property: Offline / supercell mapping tool. More...
|
|
SG::ReadHandleKey< LArHitEMap > | m_hitMapKey {this,"LArHitEMapKey","LArHitEMap"} |
| hit map More...
|
|
SG::WriteHandleKey< CaloCellContainer > | m_cellKey |
| Property Output Container. More...
|
|
Gaudi::Property< bool > | m_isSC |
| if is SuperCell More...
|
|
const CaloIdManager * | m_calo_id_manager |
| Entry point for calorimeter ID helpers. More...
|
|
const CaloCell_SuperCell_ID * | m_scHelper = nullptr |
| pointer to the offline TT helper More...
|
|
const CaloCell_ID * | m_OflHelper = nullptr |
| pointer to the offline id helper
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 |
|
Make a dummy supercell LArRawChannelContainer
from a CaloCallContainer
.
Definition at line 45 of file LArHITtoCell.h.
◆ StoreGateSvc_t
◆ LArHITtoCell()
LArHITtoCell::LArHITtoCell |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArHITtoCell()
LArHITtoCell::~LArHITtoCell |
( |
| ) |
|
|
inline |
◆ 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.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode LArHITtoCell::execute |
( |
const EventContext & |
context | ) |
const |
Algorithm execute method.
Definition at line 72 of file LArHITtoCell.cxx.
82 return StatusCode::FAILURE;
88 return StatusCode::FAILURE;
94 ATH_CHECK(caloSuperCellMgrHandle.isValid());
95 dd_mgr = *caloSuperCellMgrHandle;
100 dd_mgr = *caloMgrHandle;
105 std::vector< std::pair<float,float> > energy_time;
109 energy_time.assign(
max,std::pair<float,float>(0.0,0.0));
110 for( ;
it!=it_end;++
it) {
113 const std::vector<std::pair<float,float> >& timeE = hitlist.
getData();
114 if (timeE.empty() )
continue;
119 if ( scHash.
value() == 999999 )
continue;
122 std::vector<std::pair<float,float> >::const_iterator
first = timeE.begin();
123 std::vector<std::pair<float,float> >::const_iterator last = timeE.end();
125 float time = (*first).second;;
126 float energy = (*first).first;
127 if ( (std::abs(
time) < 13) ) {
135 auto outputContainerCellPtr = std::make_unique<CaloCellContainer>();
139 outputContainerCellPtr->reserve(
max );
141 float energy = energy_time[
i].first;
149 hw =
cabling->createSignalChannelID(scId);
150 dde = dd_mgr->get_element (scId);
153 hw =
cabling->createSignalChannelID(cellId);
154 dde = dd_mgr->get_element (cellId);
158 if ( fracS->FSAMPL(hw) < 0.00001 )
continue;
159 ss->setEnergy(
energy/fracS->FSAMPL(hw));
164 ss->setProvenance(prov);
168 outputContainerCellPtr->push_back(
ss);
172 ATH_CHECK(outputContainer.record(std::move(outputContainerCellPtr) ) );
174 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ initialize()
StatusCode LArHITtoCell::initialize |
( |
| ) |
|
Standard Gaudi initialize method.
Definition at line 38 of file LArHITtoCell.cxx.
60 ATH_MSG_ERROR(
"Could not access CaloCell_SuperCell_ID helper");
61 return StatusCode::FAILURE;
63 ATH_MSG_DEBUG(
"Successfully accessed CaloCell_SuperCell_ID helper");
66 return StatusCode::SUCCESS;
◆ inputHandles()
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 |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ retrieve()
Definition at line 99 of file LArHITtoCell.h.
101 if ( not handle.isValid() ) {
104 }
else return handle.cptr();
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ 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.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ 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.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_cablingKey
◆ m_calo_id_manager
Entry point for calorimeter ID helpers.
Definition at line 90 of file LArHITtoCell.h.
◆ m_caloMgrKey
◆ m_caloSuperCellMgrKey
◆ m_cellKey
Initial value:{this,"CaloCellKey","SCellHITs",
"SG key of the output CaloCellContainer"}
Property Output Container.
Definition at line 82 of file LArHITtoCell.h.
◆ m_detStore
◆ m_evtStore
◆ 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_fracSKey
◆ m_hitMapKey
◆ m_isSC
Gaudi::Property<bool> LArHITtoCell::m_isSC |
|
private |
Initial value:{ this, "IsSuperCell",true,
"Is Super Cell" }
if is SuperCell
Definition at line 86 of file LArHITtoCell.h.
◆ m_OflHelper
◆ m_scHelper
◆ m_scidtool
Initial value:{ this, "SCIDTool", "CaloSuperCellIDTool" ,
"Offline / supercell mapping tool."}
Property: Offline / supercell mapping tool.
Definition at line 74 of file LArHITtoCell.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
unsigned int value() const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
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)
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const CaloIdManager * m_calo_id_manager
Entry point for calorimeter ID helpers.
void reserve(unsigned int size)
Set the desired capacity.
ToolHandle< ICaloSuperCellIDTool > m_scidtool
Property: Offline / supercell mapping tool.
SG::WriteHandleKey< CaloCellContainer > m_cellKey
Property Output Container.
const LArHitList & GetCell(const unsigned int index) const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
const T * retrieve(const EventContext &context, SG::ReadCondHandleKey< T > handleKey) const
const LARLIST & getData() const
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
const CaloCell_ID * m_OflHelper
pointer to the offline id helper
AthReentrantAlgorithm()
Default constructor:
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
#define CHECK(...)
Evaluate an expression and check for errors.
SG::ReadHandleKey< LArHitEMap > m_hitMapKey
hit map
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual StatusCode sysInitialize() override
Override sysInitialize.
StatusCode initialize(bool used=true)
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
Data object for each calorimeter readout cell.
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
const CaloCell_SuperCell_ID * m_scHelper
pointer to the offline TT helper
const CaloCell_SuperCell_ID * getCaloCell_SuperCell_ID(void) const
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int GetNbCells(void) const
Gaudi::Property< bool > m_isSC
if is SuperCell
SG::ReadCondHandleKey< ILArfSampl > m_fracSKey
Property: Fraction of Energy Sampled (conditions input).
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
unsigned int allocated()
return size already allocated OK
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size