 |
ATLAS Offline Software
|
Go to the documentation of this file.
31 m_groupType(SubDetectorGrouping),
32 m_onlineHelper(nullptr),
33 m_offlineHelper(nullptr),
34 m_isInitialized(false)
40 m_onlineHelper(nullptr),
41 m_offlineHelper(nullptr),
42 m_isInitialized(false)
85 return (StatusCode::SUCCESS);
99 if (groupingStr ==
"Single")
101 return StatusCode::SUCCESS;
103 else if (groupingStr ==
"SubDetector")
105 return StatusCode::SUCCESS;
107 else if (groupingStr ==
"ExtendedSubDetector")
109 return StatusCode::SUCCESS;
111 else if (groupingStr ==
"FeedThrough")
113 return StatusCode::SUCCESS;
115 else if (groupingStr ==
"ExtendedFeedThrough") {
117 return StatusCode::SUCCESS;
119 else if (groupingStr ==
"SuperCells") {
121 return StatusCode::SUCCESS;
124 logStr << MSG::ERROR <<
"Unknown COOL Channel Grouping '"<< groupingStr <<
"'. Allowed values are:" <<
endmsg;
125 logStr << MSG::ERROR <<
"'Single','SubDetector', 'ExtendedSubDetector','FeedThrough','ExtendedFeedThrough'" <<
endmsg;
126 return StatusCode::FAILURE;
139 log << MSG::ERROR <<
"Unknown grouping "<<
endmsg;
151 for (; febIt != febEnd; ++febIt) {
152 febIds.push_back((*febIt).get_identifier32().get_compact());
155 unsigned int nChanPerGain = 1;
156 unsigned int minGain = 0;
157 unsigned int nGains = 3;
174 for (; febIt != febEnd; ++febIt) {
175 unsigned int febId = (*febIt).get_identifier32().get_compact();
177 emBarrel.push_back(febId);
180 emEndcap.push_back(febId);
183 hec.push_back(febId);
186 fcal.push_back(febId);
190 << MSG::hex << (febId) << MSG::dec
197 unsigned int nChanPerGain = 4;
198 unsigned int minGain = 0;
199 unsigned int nGains = 3;
252 for (; febIt != febEnd; ++febIt) {
255 if(iside <0 || iside > 1) {
256 log << MSG::ERROR <<
"Wrong side id: "<< iside <<
" from: "
257 << MSG::hex << *febIt << MSG::dec <<
endmsg;
258 return (StatusCode::FAILURE);
260 unsigned int febId = (*febIt).get_identifier32().get_compact();
262 emBarrelPS[iside].push_back(febId);
265 emEndcapPS[iside].push_back(febId);
268 emBarrel[iside].push_back(febId);
271 emEndcap[iside].push_back(febId);
274 hec[iside].push_back(febId);
277 fcal[iside].push_back(febId);
281 << MSG::hex << (febId) << MSG::dec
288 unsigned int nChanPerGain = 12;
289 unsigned int minGain = 0;
290 unsigned int nGains = 3;
292 for (
int iside=0; iside<2; ++iside) {
312 for (; febIt != febEnd; ++febIt) {
320 if (fthash <
ft.size()) {
324 log << MSG::ERROR <<
"Feedthru hash > channel map size: id, hash, size "
325 << MSG::hex << febId << MSG::dec <<
" "
326 << ftid <<
" " <<
ft.size()
328 return (StatusCode::FAILURE);
332 unsigned int nChanPerGain =
ft.size();
333 unsigned int minGain = 0;
334 unsigned int nGains = 3;
336 for (
unsigned int i = 0;
i <
ft.size(); ++
i) {
342 log <<
MSG::DEBUG <<
"Extended FeedThrough grouping (PS goes seperatly, EMEC in HEC as well)"<<
endmsg;
354 std::vector<LArCondFEBIdChanMap::FEBIdVector> ftSpecial(8);
356 for (; febIt != febEnd; ++febIt) {
366 if (fthash >=
ft.size()) {
367 log << MSG::ERROR <<
"Feedthru hash > channel map size: id, hash, size "
368 << MSG::hex << febId << MSG::dec <<
" "
369 << ftid <<
" " <<
ft.size()
371 return (StatusCode::FAILURE);
411 unsigned int nChanPerGain =
ft.size()+ftPS.size()+ftSpecial.size();
412 unsigned int minGain = 0;
413 unsigned int nGains = 3;
414 unsigned int iCoolChannel=0;
416 for (
unsigned int i = 0;
i <
ft.size(); ++
i) {
419 for (
unsigned int i = 0;
i < ftPS.size(); ++
i) {
422 for (
unsigned int i = 0;
i < ftSpecial.size(); ++
i) {
427 return StatusCode::FAILURE;
453 return (StatusCode::SUCCESS);
465 return (
"SingleGroup");
467 return (
"SubDetectorGrouping");
469 return (
"FeedThroughGrouping");
471 return (
"ExtendedFTGrouping");
473 return (
"ExtendedSubDetGrouping");
475 return (
"SuperCells");
495 unsigned int coolChannel)
const
504 unsigned int& coolChannel)
512 log << MSG::ERROR <<
"correctionIndex> Could not get online id helper!" <<
endmsg;
543 log << MSG::ERROR <<
"correctionIndex> coolChannel not found! Online ids: "
551 coolChannel += gainOffset;
555 log << MSG::ERROR <<
"correctionIndex> coolChannel larger than lookup table: chan, size "
571 static std::atomic<bool> applyCorrs =
true;
unsigned int totalChannels() const
Total number of channels for all gains and includes special offset channels.
void setGroupingType(GroupingType type)
allow group type to be set externally - need to (re)initialize after setting grouping type
const FEBIdVector & febIdVector(unsigned int gain, unsigned int coolChannel) const
Access to a FEB ID vector for a given gain and COOL channel.
LArCondFEBIdChanMap::FEBIdVector FEBIdVector
unsigned int channelsPerGain() const
Number of cool channels per gain.
This file contain an implementation base class for LArConditionsContainer.
StatusCode initializeBase()
initialize
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
id_iterator feb_begin() const
Returns an iterator pointing to a feb identifier collection.
StatusCode initGrouping()
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
unsigned int nOffsetChannels() const
Number of offset channels - i.e. correction channels.
value_type get_compact() const
Get the compact id.
IMessageSvc * getMessageSvc(bool quiet=false)
void correctionIndexAndCoolChannel(HWIdentifier id, unsigned int gain, unsigned int &index, unsigned int &coolChannel)
bool isFCALchannel(const HWIdentifier id) const
unsigned int minGain() const
Mininum gain value.
IdentifierHash feedthrough_Hash(HWIdentifier feedthroughId) const
Create hash id from feedthrough identifiers.
GroupingType
Grouping type.
Helper class for offline supercell identifiers.
virtual bool isHECchannel(const HWIdentifier id) const =0
::StatusCode StatusCode
StatusCode definition for legacy code.
bool isEMECPS(const HWIdentifier id) const
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...
Helper class for offline supercell identifiers.
#define CHECK(...)
Evaluate an expression and check for errors.
Helper class for offline cell identifiers.
const LArOnlineID_Base * m_onlineHelper
void setFlag(TrigPassFlags *flags, const T *obj, const CONTAINER *container, const std::vector< bool > &flag)
Set the flag at index position.
const FEBIdVector & febIdVector(unsigned int gain, unsigned int coolChannel) const
Access to a FEB ID vector for a given gain and COOL channel.
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
std::string groupingTypeToString() const
id_iterator feb_end() const
LArConditionsContainerBase()
Default constructor.
Helper for the Liquid Argon Calorimeter cell identifiers.
std::vector< unsigned int > m_channelToMultChanCollIndex
virtual bool isEMECchannel(const HWIdentifier id) const =0
size_type feedthroughHashMax() const
Define feedthrough hash tables max size.
Helpers for checking error return status codes and reporting errors.
const CaloCell_Base_ID * m_offlineHelper
bool isCalibration(const HWIdentifier id) const
bool isEMBchannel(const HWIdentifier id) const
std::vector< FEBId > FEBIdVector
unsigned int nGains() const
Number of gain values.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
void addFEBIdVector(unsigned int channel, const FEBIdVector &febIdVec)
Add in a FEBIdVector - channel number should be from 0 to NChannelsPerGain-1
bool isEMBPS(const HWIdentifier id) const
This class maps FEB IDs to/from COOL channel ids.
bool isPS(const HWIdentifier id) const
const CaloCell_Base_ID * offlineHelper() const
provide access to offline id helper
LArCondFEBIdChanMap m_febIdChanMap
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Helper base class for offline cell identifiers.
virtual ~LArConditionsContainerBase()
destructor
static bool applyCorrectionsAtInit(bool setFlag=false, bool flag=true)
provide access to flag which determines corrections are applied at initialize, i.e.
bool isEMECinHECchannel(const HWIdentifier id) const
const LArOnlineID_Base * onlineHelper() const
provide access to online id helper
HWIdentifier feedthrough_Id(int barrel_ec, int pos_neg, int feedthrough) const
Create a feedthrough identifier from fields.