|
ATLAS Offline Software
|
Condition algorithm to prepare TileBadChannels and put it into condition store.
More...
#include <TileBadChannelsCondAlg.h>
|
| TileBadChannelsCondAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~TileBadChannelsCondAlg () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | finalize () override |
|
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 |
|
Condition algorithm to prepare TileBadChannels and put it into condition store.
Definition at line 31 of file TileBadChannelsCondAlg.h.
◆ StoreGateSvc_t
◆ TileBadChannelsCondAlg()
TileBadChannelsCondAlg::TileBadChannelsCondAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TileBadChannelsCondAlg()
TileBadChannelsCondAlg::~TileBadChannelsCondAlg |
( |
| ) |
|
◆ 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 TileBadChannelsCondAlg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 74 of file TileBadChannelsCondAlg.cxx.
78 if (badChannels.isValid()) {
79 ATH_MSG_DEBUG(
"Found valid TileBadChannels: " << badChannels.key());
80 return StatusCode::SUCCESS;
83 EventIDRange eventRange;
86 std::unique_ptr<TileCalibData<TileCalibDrawerBch>> onlBchData
87 = std::make_unique<TileCalibData<TileCalibDrawerBch>>();
90 EventIDRange onlBchRange;
95 std::unique_ptr<TileCalibData<TileCalibDrawerBch>> oflBchData
96 = std::make_unique<TileCalibData<TileCalibDrawerBch>>();
99 EventIDRange oflBchRange;
105 std::unique_ptr<TileBadChannels> badChannelsData = std::make_unique<TileBadChannels>();
117 unsigned int drawerIdx(0);
121 for (
IdentifierHash adcHash = 0; adcHash < maxAdcHash; adcHash += 1) {
123 if (tileHWID->
get_id(adcHash, adcId, &adcContext) == 0) {
125 if (tileHWID->
ros(adcId) == 0)
continue;
131 std::vector<const TileCalibDrawerBch*> calibDrawers;
134 calibDrawers.push_back( onlBchData->getCalibDrawer(drawerIdx) );
139 calibDrawers.push_back( oflBchData->getCalibDrawer(drawerIdx) );
148 if (!adcStatus.
isGood()) {
180 if (channelStatus.isAffected()) {
181 ATH_MSG_INFO(
"Updating TileBchStatus::isBad() definition from DB" );
184 ATH_MSG_INFO(
"No TileBchStatus::isBad() definition found in DB, using defaults" );
190 if (channelStatus.isAffected()) {
191 ATH_MSG_INFO(
"Updating TileBchStatus::isNoisy() definition from DB" );
194 ATH_MSG_INFO(
"No TileBchStatus::isNoisy() definition found in DB, using defaults" );
200 if (channelStatus.isAffected()) {
201 ATH_MSG_INFO(
"Updating TileBchStatus::isNoGainL1() definition from DB" );
204 ATH_MSG_INFO(
"No TileBchStatus::isNoGainL1() definition found in DB, using defaults" );
211 if (channelStatus.isAffected()) {
212 ATH_MSG_INFO(
"Updating TileBchStatus::isBadTiming() definition from DB" );
215 ATH_MSG_INFO(
"No TileBchStatus::isBadTiming() definition found in DB, using defaults" );
221 if (channelStatus.isAffected()) {
222 ATH_MSG_INFO(
"Updating TileBchStatus::isWrongBCID() definition from DB" );
225 ATH_MSG_INFO(
"No TileBchStatus::isWrongBCID() definition found in DB, using defaults" );
231 ATH_MSG_INFO(
"TileBchStatus::isNoisy() is defined by: "
233 ATH_MSG_INFO(
"TileBchStatus::isNoGainL1() is defined by: "
235 ATH_MSG_INFO(
"TileBchStatus::isBadTiming() is defined by: "
237 ATH_MSG_INFO(
"TileBchStatus::isWrongBCID() is defined by: "
241 std::vector<int> maskedDrawers;
243 unsigned int maxChannels =
cabling->getMaxChannels();
263 if (!maskedDrawers.empty()) {
264 msg(
MSG::DEBUG) <<
"List of fully masked drawers: " << MSG::hex;
265 for(
int maskedDrawer : maskedDrawers) {
274 if (!maskedDrawers.empty()) badChannelsData->
setMaskedDrawers(std::move(maskedDrawers));
309 ATH_MSG_INFO(
"No drawer trips probabilities found in DB");
314 return StatusCode::FAILURE;
320 if(badChannels.record(eventRange, badChannelsData.release()).isFailure()) {
321 ATH_MSG_ERROR(
"Could not record TileBadChannels object with "
323 <<
" with EventRange " << eventRange
324 <<
" into Conditions Store");
325 return StatusCode::FAILURE;
330 <<
" with EventRange " << eventRange
331 <<
" into Conditions Store");
336 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()
virtual StatusCode TileBadChannelsCondAlg::finalize |
( |
| ) |
|
|
inlineoverridevirtual |
◆ initialize()
StatusCode TileBadChannelsCondAlg::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 34 of file TileBadChannelsCondAlg.cxx.
61 ATH_MSG_INFO(
"ProxyOnlBch and ProxyOflBch will be used for bad channel status");
63 ATH_MSG_INFO(
"Only ProxyOnlBch will be used for bad channel status");
65 ATH_MSG_INFO(
"Only ProxyOflBch will be used for bad channel status");
67 ATH_MSG_INFO(
"ProxyOnlBch and ProxyOflBch will not be used for bad channel status => all channels are good");
70 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.
◆ 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()
◆ 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_badChannelsKey
◆ m_cablingSvc
Initial value:{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service" }
Name of Tile cabling service.
Definition at line 64 of file TileBadChannelsCondAlg.h.
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_oflBchProxy
Initial value:{this, "OflBchProxy", "",
"Tile offline bad channels proxy tool"}
Tool to provide ofline Tile bad channel status If it is provided online and offline Tile bad channel status will be merged.
Definition at line 52 of file TileBadChannelsCondAlg.h.
◆ m_onlBchProxy
Initial value:{this, "OnlBchProxy", "",
"Tile online bad channels proxy tool"}
Tool to provide online Tile bad channel status.
Definition at line 46 of file TileBadChannelsCondAlg.h.
◆ m_tileBchDecoder
◆ m_tileIdTrans
Initial value:{this, "TileCondIdTransforms", "TileCondIdTransforms",
"Tile Id transform helper"}
Definition at line 67 of file TileBadChannelsCondAlg.h.
◆ m_useOflBch
bool TileBadChannelsCondAlg::m_useOflBch {true} |
|
private |
◆ m_useOnlBch
bool TileBadChannelsCondAlg::m_useOnlBch {true} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
double decode(number_type binnedWeight)
Convert weight from unsigned to double.
Class providing the association between TileCal problems and status word bits.
static TileBchStatus getDefinitionBadTiming()
static void initClassifierDefinitions()
virtual int get_id(const IdentifierHash &hash_id, HWIdentifier &id, const IdContext *context=0) const
create compact HW ID from hash id (return == 0 for OK)
static TileBchStatus getDefinitionWrongBCID()
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
void getStatusWords(unsigned int channel, unsigned int adc, uint32_t &adcStatus, uint32_t &chnStatus) const
Extracts the adc and channel status words.
Class holding bad channel problems.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
static const unsigned int NOISY_DEFINITION_CHAN
Channel used for storing of noisy channel definitions.
bool msgLvl(const MSG::Level lvl) const
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
static const unsigned int TRIPS_DRAWERIDX
DrawerIdx used for storing trips probabilities.
TileBchDecoder::BitPatVer getBitPatternVersion() const
Returns the bit pattern version.
#define ATH_MSG_VERBOSE(x)
ToolHandle< ITileCondProxy< TileCalibDrawerBch > > m_oflBchProxy
Tool to provide ofline Tile bad channel status If it is provided online and offline Tile bad channel ...
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
virtual void setOwner(IDataHandleHolder *o)=0
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
static void defineBadTiming(const TileBchStatus &status)
Helper class for TileCal online (hardware) identifiers.
static const unsigned int WRONGBCID_DEFINITION_CHAN
Channel used for storing of wrong BCID channel definitions.
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
static TileBchStatus getDefinitionNoisy()
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
static void defineNoisy(const TileBchStatus &status)
void setTripsProbabilities(std::vector< std::vector< float >> &&tripsProbs)
Store trips probabilities for all Tile drawers.
std::vector< const TileBchDecoder * > m_tileBchDecoder
::StatusCode StatusCode
StatusCode definition for legacy code.
void setMaskedDrawers(std::vector< int > &&maskedDrawers)
Store Tile drawers masked completely.
static const unsigned int DEFINITIONS_DRAWERIDX
Drawer used for storing of bad and noisy channel definitions.
static const unsigned int BADTIMING_DEFINITION_CHAN
Channel used for storing of bad timing channel definitions.
static void defineNoGainL1(const TileBchStatus &status)
size_type adc_hash_max(void) const
ADC hash table max size.
ToolHandle< ITileCondProxy< TileCalibDrawerBch > > m_onlBchProxy
Tool to provide online Tile bad channel status.
#define CHECK(...)
Evaluate an expression and check for errors.
static void defineBad(const TileBchStatus &status)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
TileCalib Exception base class.
static const unsigned int MAX_ROS
Number of ROSs
const TileBchStatus & getChannelStatus(const HWIdentifier channel_id) const
Return Tile channel status.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::WriteCondHandleKey< TileBadChannels > m_badChannelsKey
Name of output TileBadChannels.
ToolHandle< TileCondIdTransforms > m_tileIdTrans
HWIdentifier channel_id(int ros, int drawer, int channel) const
channel HWIdentifer
static void defineWrongBCID(const TileBchStatus &status)
StatusCode initialize(bool used=true)
IdContext adc_context(void) const
idContext for ADCs
DataObjIDColl m_extendedExtraObjects
static TileBchStatus getDefinitionNoGainL1()
static TileBchStatus getDefinitionBad()
void addAdcStatus(const HWIdentifier channel_id, const HWIdentifier adc_id, const TileBchStatus &adcStatus)
Add status for given Tile ADC and corresponding channel.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
#define ATH_MSG_WARNING(x)
static const unsigned int BAD_DEFINITION_CHAN
Channel used for storing of bad channel definitions.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
static const unsigned int NOGAINL1_DEFINITION_CHAN
Channel used for storing of NoGainLevel1 channel definitions.
AthAlgorithm()
Default constructor:
Class for storing a 32 bit status word for each ADC.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>