|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "CoralBase/Blob.h"
14 ISvcLocator* pSvcLocator ) :
34 return StatusCode::SUCCESS;
40 return StatusCode::SUCCESS;
52 return StatusCode::FAILURE;
58 return StatusCode::FAILURE;
61 coral::AttributeListSpecification* spec_onOff =
new coral::AttributeListSpecification();
62 spec_onOff->extend(
"OnlineHashToOfflineId",
"blob");
63 spec_onOff->extend<
unsigned>(
"version");
66 (*al_onOff)[
"version"].setValue(0U);
67 blobOnOff.resize(onlHashMax*
sizeof(
uint32_t));
69 spec_onOff->release();
73 coral::AttributeListSpecification* spec_calib =
new coral::AttributeListSpecification();
74 spec_calib->extend(
"OnlineHashToCalibIds",
"blob");
75 spec_calib->extend<
unsigned>(
"version");
78 (*al_calib)[
"version"].setValue(0U);
79 blobCalib.resize(onlHashMax*
sizeof(
uint32_t)*3);
81 spec_calib->release();
91 std::vector<unsigned> calibHist(5,0);
93 std::ofstream
outfile(
"identifiers.txt");
95 outfile <<
"hash id bec pn FT SL chan id calo pn sampl reg eta phi calib" << std::endl;
97 for (
uint32_t onlHash=0;onlHash<onlHashMax;++onlHash) {
101 pBlobOnOff[
index++]=
id.get_identifier32().get_compact();
103 const std::vector<HWIdentifier>& calibIDs=clCont->calibSlotLine(hwid);
104 const size_t nCalibLines=calibIDs.size();
105 (calibHist[nCalibLines])++;
106 pBlobCalib[calibIndex++]=nCalibLines;
107 for(
uint32_t iCalib=0;iCalib<nCalibLines;++iCalib)
108 pBlobCalib[calibIndex++]=calibIDs[iCalib].get_identifier32().get_compact();
111 blobCalib.resize(calibIndex*
sizeof(
uint32_t));
118 msg(MSG::INFO) <<
"nCalib[i] ";
119 for (
unsigned j=0;j<5;++j)
120 msg() << calibHist[j] <<
"/";
127 return StatusCode::SUCCESS;
151 if (
cabling->isOnlineConnected(hwid)) {
153 out << std::hex <<
"0x" <<
id.get_identifier32().get_compact() << std::dec <<
" "
162 out <<
" disconnected ";
164 const std::vector<HWIdentifier>& calibIDs=clCont->calibSlotLine(hwid);
165 for (
size_t i=0;
i<calibIDs.size();++
i) {
166 out << std::hex <<
"0x" << calibIDs[
i].get_identifier32().get_compact() <<
" ";
168 out << std::dec << std::endl;
def retrieve(aClass, aKey=None)
void print(const HWIdentifier &hwid, std::ostream &out=std::cout)
LArIdMapConvert()
Default constructor:
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
virtual StatusCode initialize() override
virtual ~LArIdMapConvert()
Destructor:
const LArOnlineID * m_onlineID
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
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...
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
virtual StatusCode execute() override
const std::string & key() const
Return the StoreGate ID for the referenced object.
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
value_type get_compact() const
Get the compact id.
virtual StatusCode finalize() override
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
::StatusCode StatusCode
StatusCode definition for legacy code.
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...
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
const CaloCell_ID * m_caloCellID
SG::ReadCondHandleKey< LArCalibLineMapping > m_CLKey
size_type channelHashMax(void) const
Define channel hash tables max size.
StatusCode initialize(bool used=true)
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...