![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
This is a non-template implementation base class for LArConditionsContainer.
More...
#include <LArConditionsContainerBase.h>
|
static bool | applyCorrectionsAtInit (bool setFlag=false, bool flag=true) |
| provide access to flag which determines corrections are applied at initialize, i.e. More...
|
|
This is a non-template implementation base class for LArConditionsContainer.
This class contains implementation details in a non-template form allowing it code to be compiled into a library.
Definition at line 39 of file LArConditionsContainerBase.h.
◆ FEBIdVector
◆ GroupingType
Grouping type.
Enumerator |
---|
Unknown | |
SingleGroup | |
SubDetectorGrouping | |
FeedThroughGrouping | |
ExtendedFTGrouping | |
ExtendedSubDetGrouping | |
SuperCells | |
Definition at line 44 of file LArConditionsContainerBase.h.
◆ LArConditionsContainerBase() [1/2]
LArConditionsContainerBase::LArConditionsContainerBase |
( |
| ) |
|
◆ LArConditionsContainerBase() [2/2]
LArConditionsContainerBase::LArConditionsContainerBase |
( |
GroupingType |
type | ) |
|
◆ ~LArConditionsContainerBase()
LArConditionsContainerBase::~LArConditionsContainerBase |
( |
| ) |
|
|
virtual |
◆ applyCorrectionsAtInit()
bool LArConditionsContainerBase::applyCorrectionsAtInit |
( |
bool |
setFlag = false , |
|
|
bool |
flag = true |
|
) |
| |
|
static |
provide access to flag which determines corrections are applied at initialize, i.e.
when conditions are read in. Default is true. This is a class (static) variable which applied to ALL conditions in a job! If one wants to change the value of the flag, pass in arguments:
Definition at line 603 of file LArConditionsContainerBase.cxx.
609 static std::atomic<bool> applyCorrs =
true;
◆ correctionIndexAndCoolChannel()
void LArConditionsContainerBase::correctionIndexAndCoolChannel |
( |
HWIdentifier |
id, |
|
|
unsigned int |
gain, |
|
|
unsigned int & |
index, |
|
|
unsigned int & |
coolChannel |
|
) |
| |
|
protected |
Definition at line 539 of file LArConditionsContainerBase.cxx.
550 log << MSG::ERROR <<
"correctionIndex> Could not get online id helper!" <<
endmsg;
581 log << MSG::ERROR <<
"correctionIndex> coolChannel not found! Online ids: "
589 coolChannel += gainOffset;
593 log << MSG::ERROR <<
"correctionIndex> coolChannel larger than lookup table: chan, size "
◆ febIdVector()
◆ groupingTypeToString()
std::string LArConditionsContainerBase::groupingTypeToString |
( |
| ) |
const |
|
protected |
Definition at line 496 of file LArConditionsContainerBase.cxx.
503 return (
"SingleGroup");
505 return (
"SubDetectorGrouping");
507 return (
"FeedThroughGrouping");
509 return (
"ExtendedFTGrouping");
511 return (
"ExtendedSubDetGrouping");
513 return (
"SuperCells");
◆ initGrouping()
StatusCode LArConditionsContainerBase::initGrouping |
( |
| ) |
|
|
protected |
Definition at line 169 of file LArConditionsContainerBase.cxx.
177 log << MSG::ERROR <<
"Unknown grouping "<<
endmsg;
189 for (; febIt != febEnd; ++febIt) {
190 febIds.push_back((*febIt).get_identifier32().get_compact());
193 unsigned int nChanPerGain = 1;
194 unsigned int minGain = 0;
195 unsigned int nGains = 3;
212 for (; febIt != febEnd; ++febIt) {
213 unsigned int febId = (*febIt).get_identifier32().get_compact();
215 emBarrel.push_back(febId);
218 emEndcap.push_back(febId);
221 hec.push_back(febId);
224 fcal.push_back(febId);
228 << MSG::hex << (febId) << MSG::dec
235 unsigned int nChanPerGain = 4;
236 unsigned int minGain = 0;
237 unsigned int nGains = 3;
290 for (; febIt != febEnd; ++febIt) {
293 if(iside <0 || iside > 1) {
294 log << MSG::ERROR <<
"Wrong side id: "<< iside <<
" from: "
295 << MSG::hex << *febIt << MSG::dec <<
endmsg;
296 return (StatusCode::FAILURE);
298 unsigned int febId = (*febIt).get_identifier32().get_compact();
300 emBarrelPS[iside].push_back(febId);
303 emEndcapPS[iside].push_back(febId);
306 emBarrel[iside].push_back(febId);
309 emEndcap[iside].push_back(febId);
312 hec[iside].push_back(febId);
315 fcal[iside].push_back(febId);
319 << MSG::hex << (febId) << MSG::dec
326 unsigned int nChanPerGain = 12;
327 unsigned int minGain = 0;
328 unsigned int nGains = 3;
330 for (
int iside=0; iside<2; ++iside) {
350 for (; febIt != febEnd; ++febIt) {
358 if (fthash <
ft.size()) {
362 log << MSG::ERROR <<
"Feedthru hash > channel map size: id, hash, size "
363 << MSG::hex << febId << MSG::dec <<
" "
364 << ftid <<
" " <<
ft.size()
366 return (StatusCode::FAILURE);
370 unsigned int nChanPerGain =
ft.size();
371 unsigned int minGain = 0;
372 unsigned int nGains = 3;
374 for (
unsigned int i = 0;
i <
ft.size(); ++
i) {
380 log <<
MSG::DEBUG <<
"Extended FeedThrough grouping (PS goes seperatly, EMEC in HEC as well)"<<
endmsg;
392 std::vector<LArCondFEBIdChanMap::FEBIdVector> ftSpecial(8);
394 for (; febIt != febEnd; ++febIt) {
404 if (fthash >=
ft.size()) {
405 log << MSG::ERROR <<
"Feedthru hash > channel map size: id, hash, size "
406 << MSG::hex << febId << MSG::dec <<
" "
407 << ftid <<
" " <<
ft.size()
409 return (StatusCode::FAILURE);
449 unsigned int nChanPerGain =
ft.size()+ftPS.size()+ftSpecial.size();
450 unsigned int minGain = 0;
451 unsigned int nGains = 3;
452 unsigned int iCoolChannel=0;
454 for (
unsigned int i = 0;
i <
ft.size(); ++
i) {
457 for (
unsigned int i = 0;
i < ftPS.size(); ++
i) {
460 for (
unsigned int i = 0;
i < ftSpecial.size(); ++
i) {
465 return StatusCode::FAILURE;
491 return (StatusCode::SUCCESS);
◆ initializeBase()
StatusCode LArConditionsContainerBase::initializeBase |
( |
| ) |
|
initialize
Definition at line 56 of file LArConditionsContainerBase.cxx.
63 return (StatusCode::SUCCESS);
67 ISvcLocator* svcLoc = Gaudi::svcLocator( );
71 log << MSG::ERROR <<
"Cannot get DetectorStore!" <<
endmsg;
78 sc =
detStore->retrieve(onlID,
"LArOnline_SuperCellID");
80 log << MSG::ERROR <<
"Cannot get LArOnline_SuperCellID!" <<
endmsg;
86 sc =
detStore->retrieve(oflID,
"CaloCell_SuperCell_ID");
88 log << MSG::ERROR <<
"Cannot get CaloCell_SuperCell_ID!" <<
endmsg;
98 log << MSG::ERROR <<
"Cannot get LArOnlineID!" <<
endmsg;
105 if (
sc.isFailure()) {
106 log << MSG::ERROR <<
"Cannot get CaloCell_ID!" <<
endmsg;
114 if (
sc.isFailure()) {
115 log << MSG::ERROR <<
"Cannot initialize the Grouping" <<
endmsg;
123 return (StatusCode::SUCCESS);
◆ offlineHelper()
◆ onlineHelper()
◆ setGroupingType() [1/2]
StatusCode LArConditionsContainerBase::setGroupingType |
( |
const std::string & |
groupingStr, |
|
|
MsgStream & |
logStr |
|
) |
| |
allow group type to be set externally based on a string returns an FAILURE and a message to logStr if unknown string is supplied
Definition at line 134 of file LArConditionsContainerBase.cxx.
137 if (groupingStr ==
"Single")
139 return StatusCode::SUCCESS;
141 else if (groupingStr ==
"SubDetector")
143 return StatusCode::SUCCESS;
145 else if (groupingStr ==
"ExtendedSubDetector")
147 return StatusCode::SUCCESS;
149 else if (groupingStr ==
"FeedThrough")
151 return StatusCode::SUCCESS;
153 else if (groupingStr ==
"ExtendedFeedThrough") {
155 return StatusCode::SUCCESS;
157 else if (groupingStr ==
"SuperCells") {
159 return StatusCode::SUCCESS;
162 logStr << MSG::ERROR <<
"Unknown COOL Channel Grouping '"<< groupingStr <<
"'. Allowed values are:" <<
endmsg;
163 logStr << MSG::ERROR <<
"'Single','SubDetector', 'ExtendedSubDetector','FeedThrough','ExtendedFeedThrough'" <<
endmsg;
164 return StatusCode::FAILURE;
◆ setGroupingType() [2/2]
void LArConditionsContainerBase::setGroupingType |
( |
GroupingType |
type | ) |
|
◆ m_channelToMultChanCollIndex
std::vector<unsigned int> LArConditionsContainerBase::m_channelToMultChanCollIndex |
|
protected |
◆ m_febIdChanMap
◆ m_groupType
◆ m_isInitialized
bool LArConditionsContainerBase::m_isInitialized |
|
protected |
◆ m_offlineHelper
◆ m_onlineHelper
The documentation for this class was generated from the following files:
size_type feedthroughHashMax(void) const
Define feedthrough hash tables max size.
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
unsigned int channelsPerGain() const
Number of cool channels per gain.
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.
IMessageSvc * getMessageSvc(bool quiet=false)
bool isFCALchannel(const HWIdentifier id) const
The Athena Transient Store API.
unsigned int minGain() const
Mininum gain value.
IdentifierHash feedthrough_Hash(HWIdentifier feedthroughId) const
Create hash id from feedthrough identifiers.
value_type get_compact(void) const
Get the compact id.
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 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.
id_iterator feb_end() const
std::vector< unsigned int > m_channelToMultChanCollIndex
virtual bool isEMECchannel(const HWIdentifier id) const =0
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
LArCondFEBIdChanMap m_febIdChanMap
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
bool isEMECinHECchannel(const HWIdentifier id) const
HWIdentifier feedthrough_Id(int barrel_ec, int pos_neg, int feedthrough) const
Create a feedthrough identifier from fields.