|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   14 #include "GaudiKernel/ISvcLocator.h" 
   15 #include "GaudiKernel/IToolSvc.h" 
   16 #include "GaudiKernel/Bootstrap.h" 
   17 #include "GaudiKernel/ServiceHandle.h" 
   25 #if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE)) 
   30 #include "GeoModelKernel/CellBinning.h" 
   38     for(
int iSide=0; iSide<2; ++iSide) {
 
   44     if (StatusCode::SUCCESS!=
detStore->retrieve(
elecId, 
"LArElectrodeID")) {
 
   45       throw std::runtime_error(
"EMECPresamplerHVManager failed to retrieve LArElectrodeID");
 
   48     if (StatusCode::SUCCESS!=
detStore->retrieve(
hvId,
"LArHVLineID")) {
 
   49       throw std::runtime_error(
"EMECPresamplerHVManager failed to retrieve LArHVLineID");
 
   54   std::unique_ptr<const EMECPresamplerHVModule> 
moduleArray[2][64];  
 
   72   (std::unique_ptr<Payload> 
payload)
 
   73   : m_payload (std::move (
payload))
 
   81     m_payload = std::move (
other.m_payload);
 
  101   return m_payload->m_payloadArray[
index(
module)].voltage;
 
  108   return m_payload->m_payloadArray[
index(
module)].current;
 
  115   return m_payload->m_payloadArray[
index(
module)].hvLineNo;
 
  123   unsigned int sideIndex         = 
module.getSideIndex();
 
  139   return &(
m_c->phiBinning);
 
  144   return m_c->phiBinning.getFirstDivisionNumber();
 
  149   return m_c->phiBinning.getFirstDivisionNumber() + 
m_c->phiBinning.getNumDivisions();
 
  154   return *(
m_c->moduleArray[iSide][
iPhi]);
 
  169                                   const std::vector<const CondAttrListCollection*>& attrLists)
 const 
  171   auto payload = std::make_unique<EMECPresamplerHVData::Payload>();
 
  172   payload->m_payloadArray.reserve(2*64);
 
  173   for (
unsigned int i=0;
i<64;
i++) {
 
  183       unsigned int chanID = (*citr).first;
 
  184       int cannode = chanID/1000;
 
  185       int line = chanID%1000;
 
  191       const std::vector<HWIdentifier>& electrodeIdVec = idfunc(
id);
 
  193       for(
size_t i=0;
i<electrodeIdVec.size();
i++) {
 
  200           unsigned int sideIndex=1-
m_c->elecId->zside(elecHWID);
 
  201           unsigned int phiIndex=
m_c->elecId->module(elecHWID);        
 
  216           unsigned int gapIndex=
m_c->elecId->gap(elecHWID);
 
  222           if (!((*citr).second)[
"R_VMEAS"].isNull()) voltage = ((*citr).second)[
"R_VMEAS"].data<float>();
 
  224           if (!((*citr).second)[
"R_IMEAS"].isNull()) 
current = ((*citr).second)[
"R_IMEAS"].data<
float>();
 
  239 #if !(defined(SIMULATIONBASE) || defined(GENERATIONBASE)) 
  242                                   const std::vector<const CondAttrListCollection*>& attrLists)
 const 
  244   auto idfunc = [&] (
HWIdentifier id) -> 
const std::vector<HWIdentifier>
 
  246   return getData (idfunc, attrLists);
 
  252   int sideIndex = 
module.getSideIndex();
 
  257   int id_zside = 1 - sideIndex;
 
  272   int id_gap = 
module.getPhiIndex()%2;
 
  287   if(hvlId) *hvlId = 
id;
 
  290   return m_c->hvId->can_node(
id)*1000 + 
m_c->hvId->hv_line(
id);
 
  
This class provides direct access to information on the HV electrodes within the EMEC....
EMECPresamplerHVManager()
std::unique_ptr< const EMECPresamplerHVModule > moduleArray[2][64]
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
double current(const EMECPresamplerHVModule &module, const int &iGap) const
double voltage(const EMECPresamplerHVModule &module, const int &iGap) const
static unsigned int endSideIndex()
static unsigned int beginSideIndex()
Helper for the Liquid Argon Calorimeter cell at the electrode level.
EMECPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
const LArElectrodeID * elecId
const HWIdentifier getLArHVLineID(HWIdentifier &electrodeId) const
Return the LArHVLineID corresponding to a given LArElectrodeId.
~EMECPresamplerHVManager()
This class is a collection of AttributeLists where each one is associated with a channel number....
unsigned int beginPhiIndex() const
const EMECPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iPhi) const
bool hvOn(const EMECPresamplerHVModule &module, const int &iGap) const
static int index(const EMECPresamplerHVModule &module)
static constexpr double INVALID
const CellBinning * getPhiBinning() const
std::vector< EMECPresamplerHVPayload > m_payloadArray
Clockwork(const EMECPresamplerHVManager *manager)
int hvLineNo(const EMECPresamplerHVModule &module, const int &iGap) const
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
std::unique_ptr< const Clockwork > m_c
ChanAttrListMap::const_iterator const_iterator
int hvLineNo(const EMECPresamplerHVModule &module, const LArHVIdMapping *hvIdMapping, HWIdentifier *hvlineId=nullptr) const
Describes one HV Module within the EMEc Presampler.
EMECPresamplerHVData & operator=(EMECPresamplerHVData &&other) noexcept
unsigned int endPhiIndex() const
std::function< std::vector< HWIdentifier >(HWIdentifier)> idfunc_t
const std::vector< HWIdentifier > & getLArElectrodeIDvec(HWIdentifier &hvlineId) const
Return a vector of LArElectrodeID corresponding to a given LArHVLineID.
Helper for the Liquid Argon Calorimeter High-Voltage identifiers.