|
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;
542 static const int s_lar_online_field_value = 4 ;
543 static const int s_lar_onlineCalib_field_value = 5 ;
552 std::vector<HWIdentifier>::const_iterator
it = std::lower_bound(m_feb_vec.begin(),m_feb_vec.end(),febId);
553 if (
it != m_feb_vec.end() ){
554 return (
it - m_feb_vec.begin());
563 std::vector<HWIdentifier>::const_iterator
it = std::lower_bound(m_channel_vec.begin(),m_channel_vec.end(),
channelId);
564 if (
it != m_channel_vec.end() ){
565 return (
it - m_channel_vec.begin());
574 int feedthrough,
int slot )
const
579 m_lar_impl.pack (lar_field_value(),
result);
580 m_laronline_impl.pack (5 ,
result);
581 m_bec_impl.pack (barrel_ec ,
result);
582 m_side_impl.pack (pos_neg ,
result);
583 m_feedthrough_impl.pack(feedthrough ,
result);
584 m_slot_impl.pack (slot ,
result);
593 m_slot_impl.reset (
result);
594 m_slot_impl.pack (slot ,
result);
602 m_channel_in_slot_impl.reset(
result);
609 return(m_calib_module_vec[calibModuleHashId]);
615 std::vector<HWIdentifier>::const_iterator
it = std::lower_bound(m_calib_module_vec.begin(),m_calib_module_vec.end(),calibModuleId);
616 if (
it != m_calib_module_vec.end() ){
617 return (
it - m_calib_module_vec.begin());
628 m_lar_impl.pack (lar_field_value() ,
result);
629 m_laronline_impl.pack (5 ,
result);
630 m_bec_impl.pack (barrel_ec ,
result);
631 m_side_impl.pack (pos_neg ,
result);
632 m_feedthrough_impl.pack (feedthrough ,
result);
633 m_slot_impl.pack (slot ,
result);
644 m_slot_impl.reset (
result);
645 m_channel_in_slot_impl.reset(
result);
646 m_slot_impl.pack (slot ,
result);
657 m_channel_in_slot_impl.reset(
result);
665 return(m_calib_channel_vec[channelHashId]);
671 std::vector<HWIdentifier>::const_iterator
it = std::lower_bound(m_calib_channel_vec.begin(),m_calib_channel_vec.end(),
channelId);
672 if (
it != m_calib_channel_vec.end() ){
673 return (
it - m_calib_channel_vec.begin());
682 return m_calibModuleHashMax;
687 return m_calibChannelHashMax;
734 #endif // LARONLINE_ID_BASE_H
size_type feedthroughHashMax(void) const
Define feedthrough hash tables max size.
IdContext febContext(void) const
Define context for feb.
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
IdContext cryostatEndContext(void) const
Define context for cryostat (obsolete)
id_range feedthrough_range() const
size_type febHashMax(void) const
define feb hash tables max size
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
int init_calib_hashes(void)
virtual bool isEMECIW(const HWIdentifier id) const =0
size_type calibModuleHashMax(void) const
Define calibration module hash tables max size.
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...
size_type calibChannelHashMax(void) const
Define calibration channel hash tables max size.
IdDictFieldImplementation m_slot_impl
Define the Hash identifier for channels and febs.
IdDictFieldImplementation m_laronline_impl
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.
IdContext feedthroughContext(void) const
Define context for feedthroughs.
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
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
Identifier::size_type size_type
std::vector< HashCalcFeb > m_feb_hash_calcs
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
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)
size_type m_channelHashMax
MultiRange m_full_calib_laronline_range
bool isEndcapOnline(const HWIdentifier id) const
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
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 channelHashMax(void) const
Define channel 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.
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
IdContext channelContext(void) const
Define context for channel.
id_iterator feedthrough_end() const
id_iterator calib_module_begin() const
Return an iterator pointing to a calibFeb identifier 's collection.
~LArOnlineID_Base(void)
Default destructor.
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
LArOnlineID_Base(void)
Default constructor.
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.