|
ATLAS Offline Software
|
#include <LArCalibShortCorrector.h>
|
| LArCalibShortCorrector (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~LArCalibShortCorrector () |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
StatusCode | stop () |
|
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 |
|
Definition at line 25 of file LArCalibShortCorrector.h.
◆ SHORT_IT
◆ StoreGateSvc_t
◆ LArCalibShortCorrector()
LArCalibShortCorrector::LArCalibShortCorrector |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Definition at line 16 of file LArCalibShortCorrector.cxx.
22 "List of input keys (normally the 'HIGH','MEDIUM','LOW')");
24 "Key of the pedestal object (to be subtracted)");
◆ ~LArCalibShortCorrector()
LArCalibShortCorrector::~LArCalibShortCorrector |
( |
| ) |
|
|
default |
◆ 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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 LArCalibShortCorrector::execute |
( |
| ) |
|
Definition at line 120 of file LArCalibShortCorrector.cxx.
136 ATH_MSG_WARNING (
"Cannot read LArAccumulatedCalibDigitContainer from StoreGate! key=" <<
key );
141 std::vector<std::pair<const LArAccumulatedCalibDigit*, const LArAccumulatedCalibDigit*> > shortedDigits;
142 shortedDigits.resize(nShorts);
147 ATH_MSG_VERBOSE (
"LArAccumulatedCalibDigitContainer with key = " <<
key <<
" is empty " );
151 ATH_MSG_DEBUG (
"Processing LArAccumulatedCalibDigitContainer with key = " <<
key
152 <<
". Size: " << larAccumulatedCalibDigitContainer->
size() );
155 for(;
it!=it_e;++
it) {
158 for (ii=0;ii<nShorts;ii++)
160 if (ii==nShorts)
continue;
163 if ((*it)->isPulsed())
164 shortedDigits[ii].first=*
it;
166 shortedDigits[ii].second=*
it;
170 for (
size_t ii=0;ii<nShorts;ii++) {
171 if (shortedDigits[ii].
first==NULL)
continue;
172 if (shortedDigits[ii].
second==NULL) {
173 ATH_MSG_WARNING (
"Second channel of a shorted pair not found in data. Try factor 2 correction." );
174 shortedDigits[ii].second=shortedDigits[ii].first;
177 const std::vector<uint64_t>& sampleSumsPulsed=shortedDigits[ii].first->sampleSum();
178 const std::vector<uint64_t>& sampleSumsNeighbor=shortedDigits[ii].second->sampleSum();
180 std::vector<uint64_t> newSampleSum(sampleSumsPulsed.size());
183 if (sampleSumsPulsed.size() != sampleSumsNeighbor.size()) {
185 return StatusCode::FAILURE;
188 if (shortedDigits[ii].
first->nTriggers() != shortedDigits[ii].second->nTriggers()) {
190 return StatusCode::FAILURE;
195 shortedDigits[ii].second->gain());
198 <<
", gain=" << shortedDigits[ii].second->gain() );
199 return StatusCode::FAILURE;
201 const unsigned int ped=(
unsigned)
round(
double(pedestal)*shortedDigits[ii].second->nTriggers());
204 for (
size_t is=0;is<sampleSumsPulsed.size();++is) {
206 newSampleSum[is]=sampleSumsPulsed[is]+(sampleSumsNeighbor[is]-
ped);
213 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 & 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.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode LArCalibShortCorrector::finalize |
( |
| ) |
|
|
inline |
◆ findShortedNeighbors()
StatusCode LArCalibShortCorrector::findShortedNeighbors |
( |
| ) |
|
|
private |
Definition at line 39 of file LArCalibShortCorrector.cxx.
48 return StatusCode::FAILURE;
53 ATH_MSG_ERROR(
"Do not have cabling object LArOnOffIdMapping");
54 return StatusCode::FAILURE;
60 if (bcCont->status(chid1).shortProblem()) {
64 for (;sit!=sit_e && sit->second!=chid1;++sit)
66 if (sit!=sit_e)
continue;
70 ATH_MSG_DEBUG (
"Channel " << chid1.get_compact() <<
" marked as short" );
72 std::vector<IdentifierHash> neighbors;
75 if (neighbors.empty()) {
77 return StatusCode::FAILURE;
83 std::vector<IdentifierHash>::const_iterator nbrit=neighbors.begin();
84 std::vector<IdentifierHash>::const_iterator nbrit_e=neighbors.end();
85 for (;nbrit!=nbrit_e;++nbrit) {
87 if (bcCont->status(chid_nbr).shortProblem()) {
89 ATH_MSG_ERROR (
"Found more than one neighbor with short bit set! Identifiers: "
93 return StatusCode::FAILURE;
102 ATH_MSG_ERROR (
"No neighbor with 'short' bit set for channel with id: " << chid1.get_compact() );
103 return StatusCode::FAILURE;
115 return StatusCode::SUCCESS;
◆ initialize()
StatusCode LArCalibShortCorrector::initialize |
( |
| ) |
|
◆ 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.
◆ 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()
◆ stop()
StatusCode LArCalibShortCorrector::stop |
( |
| ) |
|
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_BCKey
◆ m_cablingKey
◆ m_caloCellId
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_keylist
std::vector<std::string> LArCalibShortCorrector::m_keylist |
|
private |
◆ m_larPedestal
◆ m_onlineId
◆ m_pedKey
std::string LArCalibShortCorrector::m_pedKey |
|
private |
◆ m_shortedNeighbors
◆ m_shortsCached
bool LArCalibShortCorrector::m_shortsCached |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
virtual float pedestal(const HWIdentifier &id, int gain) const =0
Data class for calibration ADC samples preprocessed by the DSP.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
std::vector< std::string > m_keylist
Const iterator class for DataVector/DataList.
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
float round(const float toRound, const unsigned int decimals)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
#define ATH_MSG_VERBOSE(x)
const DataHandle< ILArPedestal > m_larPedestal
bool is_valid() const
Check if id is in a valid state.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize() override
Override sysInitialize.
id_range channel_range() const
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
const CaloCell_ID * m_caloCellId
const LArOnlineID * m_onlineId
std::vector< std::pair< HWIdentifier, HWIdentifier > > m_shortedNeighbors
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode findShortedNeighbors()
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
int get_neighbours(const IdentifierHash caloHash, const LArNeighbours::neighbourOption &option, std::vector< IdentifierHash > &neighbourList) const
access to hashes for neighbours return == 0 for neighbours found
StatusCode initialize(bool used=true)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
Container class for LArAccumulatedCalibDigit.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::vector< std::pair< HWIdentifier, HWIdentifier > >::const_iterator SHORT_IT
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.