33 if (!larMphysOverMcal) {
35 larMphysOverMcal=*mpmcHandle;
38 if (!larMphysOverMcal) {
39 ATH_MSG_ERROR(
"Unable to retrieve ILArMphysOverMcal with key "
40 <<
m_contKey.key() <<
" from DetectorStore nor from ConditionsStore");
41 return StatusCode::FAILURE;
47 NTuple::Item<long> cellIndex,gain;
48 NTuple::Item<float> mpmc;
50 sc=
m_nt->addItem(
"icell",cellIndex,0,2000);
51 if (
sc!=StatusCode::SUCCESS)
53 return StatusCode::FAILURE;
56 sc=
m_nt->addItem(
"gain",gain,0,3);
57 if (
sc!=StatusCode::SUCCESS) {
59 return StatusCode::FAILURE;
63 sc=
m_nt->addItem(
"mphysovermcal",mpmc,-1000.,2.);
64 if (
sc!=StatusCode::SUCCESS) {
66 return StatusCode::FAILURE;
76 ATH_MSG_DEBUG(
"LArMphysOverMcal2Ntuple: using LAr cell cabling" );
82 return StatusCode::FAILURE;
89 sc =
detStore()->retrieve(ll,
"LArOnline_SuperCellID");
91 msg(MSG::ERROR) <<
"Could not get LArOnlineID helper !" <<
endmsg;
92 return StatusCode::FAILURE;
101 if (
sc.isFailure()) {
102 msg(MSG::ERROR) <<
"Could not get LArOnlineID helper !" <<
endmsg;
103 return StatusCode::FAILURE;
114 unsigned cellCounter=0;
115 unsigned filledCell=0;
119 if ( cabling->isOnlineConnected(hwid) && !
m_onlineId->isFCALchannel(hwid)) {
121 cellIndex = cellCounter;
125 if (
sc!=StatusCode::SUCCESS) {
127 return StatusCode::FAILURE;
134 ATH_MSG_INFO(
"LArMphysOverMcal2Ntuple: filled "<<filledCell<<
" out of "<<cellCounter);
135 ATH_MSG_INFO(
"LArMphysOverMcal2Ntuple has finished." );
136 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
const ServiceHandle< StoreGateSvc > & detStore() const
virtual const float & MphysOverMcal(const HWIdentifier &id, int gain) const =0
Gaudi::Property< bool > m_isSC
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingSCKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const LArOnlineID_Base * m_onlineId
bool fillFromIdentifier(const HWIdentifier &id)
LArCond2NtupleBase(const std::string &name, ISvcLocator *pSvcLocator)
LArMphysOverMcal2Ntuple(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode stop()
SG::ReadCondHandleKey< ILArMphysOverMcal > m_contKey
~LArMphysOverMcal2Ntuple()
Helper for the Liquid Argon Calorimeter cell identifiers.