 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef LARONLINEID_BASE_H
6 #define LARONLINEID_BASE_H
16 #include "boost/range/iterator_range.hpp"
113 typedef boost::iterator_range<id_iterator>
id_range;
119 const std::string&
group,
544 static const int s_lar_online_field_value = 4 ;
545 static const int s_lar_onlineCalib_field_value = 5 ;
554 std::vector<HWIdentifier>::const_iterator
it = std::lower_bound(m_feb_vec.begin(),m_feb_vec.end(),febId);
555 if (
it != m_feb_vec.end() ){
556 return (
it - m_feb_vec.begin());
565 std::vector<HWIdentifier>::const_iterator
it = std::lower_bound(m_channel_vec.begin(),m_channel_vec.end(),
channelId);
566 if (
it != m_channel_vec.end() ){
567 return (
it - m_channel_vec.begin());
576 int feedthrough,
int slot )
const
581 m_lar_impl.pack (lar_field_value(),
result);
582 m_laronline_impl.pack (5 ,
result);
583 m_bec_impl.pack (barrel_ec ,
result);
584 m_side_impl.pack (pos_neg ,
result);
585 m_feedthrough_impl.pack(feedthrough ,
result);
586 m_slot_impl.pack (slot ,
result);
595 m_slot_impl.reset (
result);
596 m_slot_impl.pack (slot ,
result);
604 m_channel_in_slot_impl.reset(
result);
611 return(m_calib_module_vec[calibModuleHashId]);
617 std::vector<HWIdentifier>::const_iterator
it = std::lower_bound(m_calib_module_vec.begin(),m_calib_module_vec.end(),calibModuleId);
618 if (
it != m_calib_module_vec.end() ){
619 return (
it - m_calib_module_vec.begin());
630 m_lar_impl.pack (lar_field_value() ,
result);
631 m_laronline_impl.pack (5 ,
result);
632 m_bec_impl.pack (barrel_ec ,
result);
633 m_side_impl.pack (pos_neg ,
result);
634 m_feedthrough_impl.pack (feedthrough ,
result);
635 m_slot_impl.pack (slot ,
result);
646 m_slot_impl.reset (
result);
647 m_channel_in_slot_impl.reset(
result);
648 m_slot_impl.pack (slot ,
result);
659 m_channel_in_slot_impl.reset(
result);
667 return(m_calib_channel_vec[channelHashId]);
673 std::vector<HWIdentifier>::const_iterator
it = std::lower_bound(m_calib_channel_vec.begin(),m_calib_channel_vec.end(),
channelId);
674 if (
it != m_calib_channel_vec.end() ){
675 return (
it - m_calib_channel_vec.begin());
736 #endif // LARONLINE_ID_BASE_H
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
LArOnlineID_Base(const std::string &name, const std::string &group, bool is_slar)
Default constructor.
id_range feedthrough_range() const
IdDictFieldImplementation m_slar_impl
std::string feedthrough_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
Identifier::size_type size_type
std::vector< int > m_slot_values
IdDictFieldImplementation m_feedthrough_impl
virtual bool isEMECIW(const HWIdentifier id) const =0
bool isHecOnlineFebId(const HWIdentifier febId) const
void feb_Id_checks(int barrel_ec, int pos_neg, int feedthrough, int slot) const
std::vector< HWIdentifier > m_channel_vec
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...
IdDictFieldImplementation m_slot_impl
Define the Hash identifier for channels and febs.
IdDictFieldImplementation m_laronline_impl
size_type calibChannelHashMax() const
Define calibration channel hash tables max size.
id_iterator feb_begin() const
Returns an iterator pointing to a feb identifier collection.
id_iterator feedthrough_begin() const
Return an iterator pointing to Feedthrough identifiers collection.
bool isFcalOnline(const HWIdentifier id) const
HWIdentifier calib_module_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Build calibration module identifier from fields.
size_type m_laronline_index
const IdDictDictionary * m_dict
bool const RAWDATA *ch2 const
IdContext feedthroughContext() const
Define context for feedthroughs.
IdDictFieldImplementation m_side_impl
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
id_iterator channel_end() const
std::vector< HWIdentifier >::const_iterator id_iterator
Type for iterators over identifiers.
size_type m_feedthroughHashMax
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
std::vector< HWIdentifier > m_calib_channel_vec
IdDictFieldImplementation m_bec_slot_impl
size_type m_calibModuleHashMax
~LArOnlineID_Base()
Default destructor.
Identifier::size_type size_type
std::vector< HashCalcFeb > m_feb_hash_calcs
size_type channelHashMax() const
Define channel hash tables max size.
bool isFCALchannel(const HWIdentifier id) const
int is_slar(const HWIdentifier id) const
Return whether the channel is in slar or not is_ slar = [0,1] in all FEB.
IdDictFieldImplementation m_channel_in_slot_impl
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
boost::iterator_range< id_iterator > id_range
Type for range over identifiers.
MultiRange m_full_feedthrough_range
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
IdentifierHash feedthrough_Hash(HWIdentifier feedthroughId) const
Create hash id from feedthrough identifiers.
id_range channel_range() const
int channelInSlotMax(const HWIdentifier Id) const
Return the Maximum channel number of a given feb slot.
virtual bool isHECchannel(const HWIdentifier id) const =0
size_type m_calibChannelHashMax
IdContext channelContext() const
Define context for channel.
virtual bool isEMECOW(const HWIdentifier id) const =0
bool isEMECPS(const HWIdentifier id) const
int get_expanded_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded HWIdentifier from HWIdentifier (return == 0 for OK)
IdentifierHash calib_module_Hash(HWIdentifier calibModuleId) const
create calibration module_hash identifier from module Identifier
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
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...
bool isEmEndcapStandardOnline(const HWIdentifier id) const
int initLevelsFromDict(const std::string &group_name)
const std::string & group() const
Group name for this helper.
size_type m_channelHashMax
MultiRange m_full_calib_laronline_range
bool isEndcapOnline(const HWIdentifier id) const
IdContext febContext() const
Define context for feb.
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.
bool isHecOnline(const HWIdentifier id) const
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
size_type m_feedthrough_index
IdentifierHash channel_Hash_binary_search(HWIdentifier channelId) const
size_type febHashMax() const
define feb hash tables max size
id_iterator feb_end() const
std::vector< HWIdentifier > m_feedthrough_vec
IdDictFieldImplementation m_lar_impl
Field Implementation.
Helper for the Liquid Argon Calorimeter cell identifiers.
IdentifierHash feb_Hash_binary_search(HWIdentifier channelId) const
A MultiRange combines several Ranges.
virtual bool isEMECchannel(const HWIdentifier id) const =0
size_type feedthroughHashMax() const
Define feedthrough hash tables max size.
id_iterator calib_channel_end() const
bool isCalibration(const HWIdentifier id) const
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
id_iterator calib_channel_begin() const
Return an iterator pointing to a collection of calibration channel identifiers.
size_type calibModuleHashMax() const
Define calibration module hash tables max size.
IdContext cryostatEndContext() const
Define context for cryostat (obsolete)
bool isEmEndcapSpecialOnline(const HWIdentifier id) const
bool isEMBchannel(const HWIdentifier id) const
std::vector< HashCalc > m_chan_hash_calcs
IdDictFieldImplementation m_bec_impl
id_range calib_channel_range() const
void channel_Id_checks(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
int get_expanded_calib_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
void feedthrough_Id_checks(int barrel_ec, int pos_neg, int feedthrough) const
MultiRange m_full_feb_range
std::vector< HWIdentifier > m_feb_vec
MultiRange m_full_channel_range
id_iterator feedthrough_end() const
id_iterator calib_module_begin() const
Return an iterator pointing to a calibFeb identifier 's collection.
MultiRange m_full_laronline_range
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
bool isEMBPS(const HWIdentifier id) const
bool isPS(const HWIdentifier id) const
MultiRange m_full_calib_module_range
id_iterator calib_module_end() const
bool isEmEndcapOnline(const HWIdentifier id) const
bool isNotWarmCableConnected(const HWIdentifier id) const
size_type m_channel_in_slot_index
unsigned long long size_type
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
id_range calib_module_range() const
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
IdentifierHash calib_channel_Hash(HWIdentifier channelId) const
std::vector< HWIdentifier > m_calib_module_vec
size_type m_laronlineRegion_index
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
HWIdentifier calib_channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create calibration channel identifiers from fields
macros to associate a CLID to a type
bool isEMECinHECchannel(const HWIdentifier id) const
IdDictFieldImplementation m_bec_ft_impl
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.
IdentifierHash feb_Hash(HWIdentifier febId) const
Create feb hash identifiers from feb identifiers.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
bool isEmBarrelOnline(const HWIdentifier id) const
HWIdentifier feedthrough_Id(int barrel_ec, int pos_neg, int feedthrough) const
Create a feedthrough identifier from fields.