Forked from
atlas / athena
134599 commits behind the upstream repository.
-
Atlas-Software Librarian authored
* Tagging LArCalibTools-00-09-60. * Cabling tools moved from LArTools to LArCabling. * Tagging LArCalibTools-00-09-59. * Fix clang warning. * Tagging LArCalibTools-00-09-58. * Do not use using namespace in a header. * Tagging LArCalibTools-00-09-57. * Comply with ATLAS naming conventions. 07-12-2015 Pavol Strizenec <pavol @ mail.cern.ch> * changes in LArWFParams2Ntuple and LArCommConditions2Ntuple * fix in CompletetoFlat for DSPThreshold * tag LArCalibTools-00-09-56 2-12-2015 Pavol Strizenec pavol @ mail.cern.ch * adding the LArOFCBin algo * not tagging yet 2015-08-31 Walter Lampl <walter.lampl@ cern.ch> ... (Long ChangeLog diff - truncated)
Atlas-Software Librarian authored* Tagging LArCalibTools-00-09-60. * Cabling tools moved from LArTools to LArCabling. * Tagging LArCalibTools-00-09-59. * Fix clang warning. * Tagging LArCalibTools-00-09-58. * Do not use using namespace in a header. * Tagging LArCalibTools-00-09-57. * Comply with ATLAS naming conventions. 07-12-2015 Pavol Strizenec <pavol @ mail.cern.ch> * changes in LArWFParams2Ntuple and LArCommConditions2Ntuple * fix in CompletetoFlat for DSPThreshold * tag LArCalibTools-00-09-56 2-12-2015 Pavol Strizenec pavol @ mail.cern.ch * adding the LArOFCBin algo * not tagging yet 2015-08-31 Walter Lampl <walter.lampl@ cern.ch> ... (Long ChangeLog diff - truncated)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
LArMinBias2Ntuple.cxx 2.07 KiB
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "LArCalibTools/LArMinBias2Ntuple.h"
#include "LArRawConditions/LArMinBiasMC.h"
#include "LArRawConditions/LArMinBiasAverageMC.h"
#include "CaloIdentifier/CaloGain.h"
/*
#include "GaudiKernel/INTupleSvc.h"
#include "GaudiKernel/NTuple.h"
#include "GaudiKernel/SmartDataPtr.h"
*/
//#include <fstream>
LArMinBias2Ntuple::LArMinBias2Ntuple(const std::string& name, ISvcLocator* pSvcLocator):
LArCond2NtupleBase(name, pSvcLocator),
m_isPileup(false) {
declareProperty("ContainerKey",m_contKey="LArMinBias");
//declareProperty("IsMC",m_isMC = false);
declareProperty("NtupleTitle",m_ntTitle="MinBias");
declareProperty("NtupleName",m_ntpath="/NTUPLES/FILE1/MINBIAS");
}
LArMinBias2Ntuple::~LArMinBias2Ntuple()
{}
StatusCode LArMinBias2Ntuple::stop() {
const ILArMinBias* LArMinBias = NULL;
const ILArMinBiasAverage* LArMinBiasAv = NULL;
if(m_contKey.find("Pileup") != std::string::npos) m_isPileup=true; else m_isPileup=false;
if(!m_isPileup) ATH_CHECK( m_detStore->retrieve(LArMinBias,m_contKey) );
ATH_CHECK( m_detStore->retrieve(LArMinBiasAv,m_contKey+"Average") );
NTuple::Item<float> minbias;
NTuple::Item<float> minbias_av;
if(!m_isPileup) ATH_CHECK( m_nt->addItem("MinBias",minbias) );
ATH_CHECK( m_nt->addItem("MinBiasAv",minbias_av) );
unsigned cellCounter=0;
std::vector<HWIdentifier>::const_iterator itOnId = m_onlineId->channel_begin();
std::vector<HWIdentifier>::const_iterator itOnIdEnd = m_onlineId->channel_end();
for(; itOnId!=itOnIdEnd;++itOnId){
const HWIdentifier hwid = *itOnId;
if ( m_larCablingSvc->isOnlineConnected(hwid)) {
fillFromIdentifier(hwid);
if(!m_isPileup) minbias = LArMinBias->minBiasRMS(hwid);
minbias_av = LArMinBiasAv->minBiasAverage(hwid);
ATH_CHECK( ntupleSvc()->writeRecord(m_nt) );
}//end if isConnected
cellCounter++;
}//end loop over online ID
ATH_MSG_INFO( "LArMinBias2Ntuple has finished, " << cellCounter << " cells written." );
return StatusCode::SUCCESS;
}// end finalize-method.