Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "CoralBase/AttributeListException.h"
13 #include "CoralBase/Blob.h"
26 #include "TBufferFile.h"
55 m_klass = TClass::GetClass(
"LArHVPathologiesDb");
58 return StatusCode::FAILURE;
65 return StatusCode::SUCCESS;
70 return StatusCode::SUCCESS;
78 if (writeHandle.isValid()) {
80 return StatusCode::SUCCESS;
87 ATH_MSG_ERROR(
"Do not have AthenaAttributeList for pathology");
88 return StatusCode::FAILURE;
90 writeHandle.addDependency(fldrHdl);
94 writeHandle.addDependency(caloMgrHandle);
97 const unsigned blobVersion=(*attrList)[
"blobVersion"].data<
unsigned int>();
102 return StatusCode::FAILURE;
107 TBufferFile buf(TBuffer::kRead,
blob.size(), blob_data,
false);
108 std::unique_ptr<LArHVPathologiesDb> hvpathdb
111 auto hvpath = std::make_unique<LArHVPathology>(hvpathdb.get());
113 fillElectMap(calodetdescrmgr, hvpath.get(), writeHandle);
116 if(writeHandle.record(std::move(hvpath)).isFailure()) {
119 <<
" with EventRange " << writeHandle.getRange()
120 <<
" into Conditions Store");
121 return StatusCode::FAILURE;
124 return StatusCode::SUCCESS;
126 }
catch (coral::AttributeListException &
e) {
128 return StatusCode::FAILURE;
131 return StatusCode::SUCCESS;
142 ATH_MSG_WARNING(
"Do not have HV mapping, will not fill LArHVPathology electIndMap !!!");
147 std::lock_guard<std::mutex> lock(
m_mut);
149 std::map<std::pair<Identifier, unsigned int>, std::vector<unsigned short> > &elecMap = hvpath->
getElecMap();
151 std::vector<unsigned short>
list;
152 std::vector<HWIdentifier> hwlineId;
153 unsigned int HVline = 0;
157 m_hvmapTool->GetHVLines(
id,calodetdescrmgr, hwlineId);
162 unsigned int nelec =
cell->getNumElectrodes();
163 for(
auto hwid:hwlineId) {
166 for (
unsigned int i=0;
i<nelec;
i++) {
168 for (
unsigned int igap=0;igap<2;igap++) {
169 if ((
unsigned)electrode.
hvLineNo(igap,hvCabling)==HVline) {
170 list.push_back(2*
i+igap);
175 elecMap.insert(std::make_pair(std::make_pair(
id,HVline) ,
list));
183 unsigned int nelec =
cell->getNumElectrodes();
184 for(
auto hwid:hwlineId) {
187 for (
unsigned int i=0;
i<nelec;
i++) {
189 for (
unsigned int igap=0;igap<2;igap++) {
190 if ((
unsigned)electrode.
hvLineNo(igap,hvCabling)==HVline) {
191 list.push_back(2*
i+igap);
196 elecMap.insert(std::make_pair(std::make_pair(
id,HVline),
list));
205 for(
auto hwid:hwlineId) {
208 for (
unsigned int igap=0;igap<2;igap++) {
209 if ((
unsigned)hvmodule.
hvLineNo(igap,hvCabling)==HVline) {
210 list.push_back(igap);
213 elecMap.insert(std::make_pair(std::make_pair(
id,HVline),
list));
223 for(
auto hwid:hwlineId) {
226 for (
unsigned int igap=0;igap<2;igap++) {
227 if ((
unsigned)hvmodule.
hvLineNo(igap,hvCabling)==HVline) {
228 list.push_back(igap);
231 elecMap.insert(std::make_pair(std::make_pair(
id,HVline),
list));
240 m_hvmapTool->GetHVLines(
id,calodetdescrmgr,hwlineId);
243 unsigned int nsubgaps =
cell->getNumSubgaps();
244 for(
auto hwid:hwlineId) {
247 for (
unsigned int i=0;
i<nsubgaps;
i++) {
249 if ((
unsigned)subgap.
hvLineNo(hvCabling)==HVline) {
253 elecMap.insert(std::make_pair(std::make_pair(
id,HVline),
list));
261 m_hvmapTool->GetHVLines(
id,calodetdescrmgr, hwlineId);
264 unsigned int nlines =
tile->getNumHVLines();
265 for(
auto hwid:hwlineId) {
268 for (
unsigned int i=0;
i<nlines;
i++) {
271 if ((
unsigned)
line2->hvLineNo(hvCabling)==HVline) {
276 elecMap.insert(std::make_pair(std::make_pair(
id,HVline),
list));
def retrieve(aClass, aKey=None)
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
virtual StatusCode initialize() override
ToolHandle< ILArHVMapTool > m_hvmapTool
GeoIntrusivePtr< const HECCell > HECCellConstLink
@Class: HECCellConstLink
const LArFCAL_ID * m_larfcal_id
LAr EMEC Detector Element.
Smart Pointer to EMEC Cells. This reference counted link allocates on demand. It audits the total poi...
LArHVPathologyDbCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
const LArEM_ID * em_idHelper() const
access to EM idHelper
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
int hv_line(const HWIdentifier id) const
Return the HV line number from an HighVoltage line identifier.
std::map< std::pair< Identifier, unsigned int >, std::vector< unsigned short > > & getElecMap()
void fillElectMap(const CaloDetDescrManager *calodetdescrmgr, LArHVPathology *hvpath, SG::WriteCondHandle< LArHVPathology > &writeHandle) const
int sampling(const Identifier id) const
return sampling according to :
LAr EMB Detector Element.
virtual StatusCode execute(const EventContext &ctx) const override
GeoIntrusivePtr< const EMBCell > EMBCellConstLink
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
LAr HEC Detector Element.
An algorithm that can be simultaneously executed in multiple threads.
A tile of the forward calorimeter readout geometry.
const LArEM_ID * m_larem_id
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
const std::vector< Identifier > & channel_ids() const
provide acces to channel id vector, accessed via hash
SG::ReadCondHandleKey< AthenaAttributeList > m_pathologyFolderKey
::StatusCode StatusCode
StatusCode definition for legacy code.
LAr FCAL Detector Element.
int hvLineNo(const LArHVIdMapping *hvIdMapping) const
const LArHVLineID * m_hvlineHelper
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Helper class for offline cell identifiers.
virtual StatusCode finalize() override
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
int barrel_ec(const Identifier id) const
return barrel_ec according to :
StatusCode initialize(bool used=true)
virtual ~LArHVPathologyDbCondAlg()
This class provides the client interface for accessing the detector description information common to...
#define ATH_MSG_WARNING(x)
Describes one HV Module within the EMEc Presampler.
#define ATLAS_THREAD_SAFE
const LArOnlineID * m_laronline_id
const std::vector< Identifier > & channel_ids() const
provide access to channel id vector, accessed via hash
const std::vector< Identifier > & channel_ids() const
provide access to channel id vector, accessed via hash
Define macros for attributes used to control the static checker.
SG::WriteCondHandleKey< LArHVPathology > m_hvPathologyKey
const LArHEC_ID * m_larhec_id
int hvLineNo(int iGap, const LArHVIdMapping *hvIdMapping) const
Describes one HV Module within the EMB Presampler.
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
Calo Subsystem specific Detector Elements + Dummy element for testing.
SG::ReadCondHandleKey< LArHVIdMapping > m_hvMappingKey
void addDependency(const EventIDRange &range)