![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
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);
◆ 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 TileBadChannelsCondAlg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 75 of file TileBadChannelsCondAlg.cxx.
79 if (badChannels.isValid()) {
80 ATH_MSG_DEBUG(
"Found valid TileBadChannels: " << badChannels.key());
81 return StatusCode::SUCCESS;
84 EventIDRange eventRange;
87 std::unique_ptr<TileCalibData<TileCalibDrawerBch>> onlBchData
88 = std::make_unique<TileCalibData<TileCalibDrawerBch>>();
91 EventIDRange onlBchRange;
96 std::unique_ptr<TileCalibData<TileCalibDrawerBch>> oflBchData
97 = std::make_unique<TileCalibData<TileCalibDrawerBch>>();
100 EventIDRange oflBchRange;
106 std::unique_ptr<TileBadChannels> badChannelsData = std::make_unique<TileBadChannels>();
118 unsigned int drawerIdx(0);
122 for (
IdentifierHash adcHash = 0; adcHash < maxAdcHash; adcHash += 1) {
124 if (tileHWID->
get_id(adcHash, adcId, &adcContext) == 0) {
126 if (tileHWID->
ros(adcId) == 0)
continue;
132 std::vector<const TileCalibDrawerBch*> calibDrawers;
135 calibDrawers.push_back( onlBchData->getCalibDrawer(drawerIdx) );
140 calibDrawers.push_back( oflBchData->getCalibDrawer(drawerIdx) );
149 if (!adcStatus.
isGood()) {
181 if (channelStatus.isAffected()) {
182 ATH_MSG_INFO(
"Updating TileBchStatus::isBad() definition from DB" );
185 ATH_MSG_INFO(
"No TileBchStatus::isBad() definition found in DB, using defaults" );
191 if (channelStatus.isAffected()) {
192 ATH_MSG_INFO(
"Updating TileBchStatus::isNoisy() definition from DB" );
195 ATH_MSG_INFO(
"No TileBchStatus::isNoisy() definition found in DB, using defaults" );
201 if (channelStatus.isAffected()) {
202 ATH_MSG_INFO(
"Updating TileBchStatus::isNoGainL1() definition from DB" );
205 ATH_MSG_INFO(
"No TileBchStatus::isNoGainL1() definition found in DB, using defaults" );
212 if (channelStatus.isAffected()) {
213 ATH_MSG_INFO(
"Updating TileBchStatus::isBadTiming() definition from DB" );
216 ATH_MSG_INFO(
"No TileBchStatus::isBadTiming() definition found in DB, using defaults" );
222 if (channelStatus.isAffected()) {
223 ATH_MSG_INFO(
"Updating TileBchStatus::isWrongBCID() definition from DB" );
226 ATH_MSG_INFO(
"No TileBchStatus::isWrongBCID() definition found in DB, using defaults" );
232 ATH_MSG_INFO(
"TileBchStatus::isNoisy() is defined by: "
234 ATH_MSG_INFO(
"TileBchStatus::isNoGainL1() is defined by: "
236 ATH_MSG_INFO(
"TileBchStatus::isBadTiming() is defined by: "
238 ATH_MSG_INFO(
"TileBchStatus::isWrongBCID() is defined by: "
242 std::vector<int> maskedDrawers;
244 unsigned int maxChannels =
cabling->getMaxChannels();
264 if (!maskedDrawers.empty()) {
265 msg(
MSG::DEBUG) <<
"List of fully masked drawers: " << MSG::hex;
266 for(
int maskedDrawer : maskedDrawers) {
275 if (!maskedDrawers.empty()) badChannelsData->
setMaskedDrawers(std::move(maskedDrawers));
310 ATH_MSG_INFO(
"No drawer trips probabilities found in DB");
315 return StatusCode::FAILURE;
321 if(badChannels.record(eventRange, badChannelsData.release()).isFailure()) {
322 ATH_MSG_ERROR(
"Could not record TileBadChannels object with "
324 <<
" with EventRange " << eventRange
325 <<
" into Conditions Store");
326 return StatusCode::FAILURE;
331 <<
" with EventRange " << eventRange
332 <<
" into Conditions Store");
337 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 35 of file TileBadChannelsCondAlg.cxx.
62 ATH_MSG_INFO(
"ProxyOnlBch and ProxyOflBch will be used for bad channel status");
64 ATH_MSG_INFO(
"Only ProxyOnlBch will be used for bad channel status");
66 ATH_MSG_INFO(
"Only ProxyOflBch will be used for bad channel status");
68 ATH_MSG_INFO(
"ProxyOnlBch and ProxyOflBch will not be used for bad channel status => all channels are good");
71 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 |
|
private |
◆ m_useOnlBch
bool TileBadChannelsCondAlg::m_useOnlBch |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
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 closest approach of two lines.
#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.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>