5#ifndef LARONLINEID_BASE_H
6#define LARONLINEID_BASE_H
105 using id_range = std::ranges::subrange<id_iterator>;
111 const std::string&
group,
546 std::vector<HWIdentifier>::const_iterator it = std::lower_bound(
m_feb_vec.begin(),
m_feb_vec.end(),febId);
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
static const int s_lar_online_field_value
static const int s_lar_onlineCalib_field_value
int lar_field_value() const
const std::string & group() const
Group name for this helper.
AtlasDetectorID(const std::string &name, const std::string &group)
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
This is a "hash" representation of an Identifier.
std::vector< int > m_slot_values
Helper for the Liquid Argon Calorimeter cell identifiers.
bool isValidId(const HWIdentifier id) const
Returns false if the identifier is not a LAr-online id or any of the sub-fields is out of range.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
bool isNotWarmCableConnected(const HWIdentifier id) const
MultiRange m_full_laronline_range
std::string feedthrough_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
std::ranges::subrange< id_iterator > id_range
Type for range over identifiers.
HWIdentifier feedthrough_Id(int barrel_ec, int pos_neg, int feedthrough) const
Create a feedthrough identifier from fields.
virtual bool isEMECchannel(const HWIdentifier id) const =0
std::vector< HWIdentifier > m_channel_vec
bool isHecOnline(const HWIdentifier id) const
bool isFcalOnline(const HWIdentifier id) const
size_type m_calibModuleHashMax
id_iterator feedthrough_begin() const
Return an iterator pointing to Feedthrough identifiers collection.
bool isPS(const HWIdentifier id) const
int get_expanded_calib_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
bool isEndcapOnline(const HWIdentifier id) const
bool isEMBchannel(const HWIdentifier id) const
IdentifierHash calib_channel_Hash(HWIdentifier channelId) const
IdContext cryostatEndContext() const
Define context for cryostat (obsolete)
std::vector< HWIdentifier >::const_iterator id_iterator
Type for iterators over identifiers.
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
HWIdentifier calib_channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create calibration channel identifiers from fields
virtual bool isEMECIW(const HWIdentifier id) const =0
const IdDictDictionary * m_dict
size_type m_channel_in_slot_index
id_iterator calib_module_end() const
IdDictFieldImplementation m_channel_in_slot_impl
size_type m_feedthrough_index
bool isEmBarrelOnline(const HWIdentifier id) const
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
id_range channel_range() const
void feb_Id_checks(int barrel_ec, int pos_neg, int feedthrough, int slot) const
id_iterator calib_channel_begin() const
Return an iterator pointing to a collection of calibration channel identifiers.
size_type calibChannelHashMax() const
Define calibration channel hash tables max size.
MultiRange m_full_calib_laronline_range
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
std::vector< HWIdentifier > m_calib_channel_vec
MultiRange m_full_channel_range
IdContext channelContext() const
Define context for channel.
int get_expanded_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded HWIdentifier from HWIdentifier (return == 0 for OK)
IdContext febContext() const
Define context for feb.
id_iterator channel_end() const
virtual bool isEMECOW(const HWIdentifier id) const =0
IdentifierHash channel_Hash_binary_search(HWIdentifier channelId) const
HWIdentifier calib_module_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Build calibration module identifier from fields.
IdentifierHash feb_Hash_binary_search(HWIdentifier channelId) const
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
id_range feb_range() const
int is_slar(const HWIdentifier id) const
Return whether the channel is in slar or not is_ slar = [0,1] in all FEB.
id_iterator feb_begin() const
Returns an iterator pointing to a feb identifier collection.
size_type m_channelHashMax
size_type m_laronline_index
std::vector< HWIdentifier > m_calib_module_vec
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.
MultiRange m_full_feb_range
IdDictFieldImplementation m_bec_ft_impl
size_type febHashMax() const
define feb hash tables max size
bool isEmEndcapStandardOnline(const HWIdentifier id) const
size_type channelHashMax() const
Define channel hash tables max size.
LArOnlineID_Base(const std::string &name, const std::string &group, bool is_slar)
Default constructor.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
size_type calibModuleHashMax() const
Define calibration module hash tables max size.
bool isEmEndcapSpecialOnline(const HWIdentifier id) const
IdDictFieldImplementation m_feedthrough_impl
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
IdentifierHash feb_Hash(HWIdentifier febId) const
Create feb hash identifiers from feb identifiers.
IdContext feedthroughContext() const
Define context for feedthroughs.
IdDictFieldImplementation m_slot_impl
void channel_Id_checks(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
IdDictFieldImplementation m_laronline_impl
IdentifierHash calib_module_Hash(HWIdentifier calibModuleId) const
create calibration module_hash identifier from module Identifier
id_range calib_module_range() const
IdentifierHash feedthrough_Hash(HWIdentifier feedthroughId) const
Create hash id from feedthrough identifiers.
size_type m_feedthroughHashMax
virtual ~LArOnlineID_Base()
Default destructor.
IdDictFieldImplementation m_side_impl
id_iterator feb_end() const
size_type m_laronlineRegion_index
std::vector< HWIdentifier > m_feb_vec
std::vector< HashCalcFeb > m_feb_hash_calcs
int initLevelsFromDict(const std::string &group_name)
bool isEMECPS(const HWIdentifier id) const
Identifier::size_type size_type
IdDictFieldImplementation m_bec_impl
std::vector< HWIdentifier > m_feedthrough_vec
bool isCalibration(const HWIdentifier id) const
bool isHecOnlineFebId(const HWIdentifier febId) const
bool isFCALchannel(const HWIdentifier id) const
IdDictFieldImplementation m_bec_slot_impl
id_iterator feedthrough_end() const
virtual bool isHECchannel(const HWIdentifier id) const =0
id_iterator calib_channel_end() const
bool isEMECinHECchannel(const HWIdentifier id) const
IdDictFieldImplementation m_lar_impl
Field Implementation.
size_type feedthroughHashMax() const
Define feedthrough hash tables max size.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
bool isEMBPS(const HWIdentifier id) const
MultiRange m_full_calib_module_range
id_range feedthrough_range() const
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
size_type m_calibChannelHashMax
int channelInSlotMax(const HWIdentifier Id) const
Return the Maximum channel number of a given feb slot.
bool isEmEndcapOnline(const HWIdentifier id) const
IdDictFieldImplementation m_slar_impl
id_iterator calib_module_begin() const
Return an iterator pointing to a calibFeb identifier 's collection.
MultiRange m_full_feedthrough_range
id_range calib_channel_range() const
std::vector< HashCalc > m_chan_hash_calcs
void feedthrough_Id_checks(int barrel_ec, int pos_neg, int feedthrough) const
A MultiRange combines several Ranges.