Skip to content
Snippets Groups Projects
Commit fa86075d authored by Pavol Strizenec's avatar Pavol Strizenec
Browse files

two additional packages fixed

parent c0569065
No related merge requests found
......@@ -15,7 +15,6 @@
#include "DumpAll.h"
#include "CaloEvent/CaloCellContainer.h"
#include "LArRawEvent/LArDigitContainer.h"
#include "LArCabling/LArSuperCellCablingTool.h"
#include "CaloIdentifier/CaloCell_SuperCell_ID.h"
#include "CaloIdentifier/CaloIdManager.h"
#include "xAODTracking/VertexContainer.h"
......@@ -31,7 +30,7 @@
#include "TNtuple.h"
#include <math.h>
DumpAll::DumpAll( const std::string& name, ISvcLocator* pSvcLocator ) : AthAlgorithm (name, pSvcLocator), m_cabling("LArSuperCellCablingTool") {
DumpAll::DumpAll( const std::string& name, ISvcLocator* pSvcLocator ) : AthAlgorithm (name, pSvcLocator) {
declareProperty("InputClusterName", m_inputClusterName = "SCluster" );
declareProperty("InputLvl1Name", m_inputLvl1Name = "LVL1EmTauRoIs" );
}
......@@ -116,11 +115,6 @@ StatusCode DumpAll::initialize(){
m_file->cd("/");
// for cell <-> SCell comparison
if ( m_cabling.retrieve().isFailure() ){
msg << MSG::ERROR << "cannot perform comparisons between SuperCells and digits" << endmsg;
}
return StatusCode::SUCCESS;
}
......
......@@ -26,7 +26,6 @@ class TH1I;
class TH1F;
class TH2F;
class TTree;
class LArSuperCellCablingTool;
class DumpAll : public AthAlgorithm
......@@ -43,8 +42,6 @@ public :
private :
/** For cell <-> SCell comparisons */
ToolHandle<LArSuperCellCablingTool> m_cabling;
/** base file */
TFile* m_file;
/** base histograms about super-cells */
......
......@@ -15,7 +15,6 @@
#include "SimpleLArDigitsChecks.h"
#include "CaloEvent/CaloCellContainer.h"
#include "LArRawEvent/LArDigitContainer.h"
#include "LArCabling/LArSuperCellCablingTool.h"
#include "CaloIdentifier/CaloCell_SuperCell_ID.h"
#include "CaloIdentifier/CaloIdManager.h"
#include "xAODTracking/VertexContainer.h"
......@@ -25,7 +24,7 @@
#include "TH1I.h"
#include <math.h>
SimpleLArDigitsChecks::SimpleLArDigitsChecks( const std::string& name, ISvcLocator* pSvcLocator ) : AthAlgorithm (name, pSvcLocator), m_cabling("LArSuperCellCablingTool") {
SimpleLArDigitsChecks::SimpleLArDigitsChecks( const std::string& name, ISvcLocator* pSvcLocator ) : AthAlgorithm (name, pSvcLocator) {
}
SimpleLArDigitsChecks::~SimpleLArDigitsChecks(){}
......@@ -120,10 +119,7 @@ StatusCode SimpleLArDigitsChecks::initialize(){
m_file->cd("/");
// for cell <-> SCell comparison
if ( m_cabling.retrieve().isFailure() ){
msg << MSG::ERROR << "cannot perform comparisons between SuperCells and digits" << endmsg;
}
CHECK(m_cablingSCKey.initialize());
return StatusCode::SUCCESS;
}
......@@ -139,22 +135,28 @@ StatusCode SimpleLArDigitsChecks::finalize(){
StatusCode SimpleLArDigitsChecks::execute(){
MsgStream msg(msgSvc(), name());
msg << MSG::DEBUG << "execute SimpleLArDigitsChecks" << endmsg;
ATH_MSG_DEBUG( "execute SimpleLArDigitsChecks" );
const CaloCellContainer* scells;
const LArDigitContainer* allcalo(NULL);
if ( evtStore()->retrieve(scells,"SCell").isFailure() ){
msg << MSG::WARNING << "did not find cell container" << endmsg;
ATH_MSG_WARNING( "did not find cell container" );
return StatusCode::SUCCESS;
}
if ( evtStore()->retrieve(allcalo,"LArDigitSCL1").isFailure() ){
msg << MSG::WARNING << "did not find lardigit container for regular cells" << endmsg;
ATH_MSG_WARNING( "did not find lardigit container for regular cells" );
return StatusCode::SUCCESS;
}
const xAOD::VertexContainer* nvtx(NULL);
if ( evtStore()->retrieve(nvtx,"PrimaryVertices").isFailure() ) {
msg << MSG::WARNING << "did not find Vectices container" << endmsg;
ATH_MSG_WARNING( "did not find Vectices container" );
return StatusCode::SUCCESS;
}
SG::ReadCondHandle<LArOnOffIdMapping> scHdl{m_cablingSCKey};
const LArOnOffIdMapping* scCont{*scHdl};
if(!scCont) {
ATH_MSG_WARNING("Do not have mapping object " << m_cablingSCKey.key());
return StatusCode::SUCCESS;
}
unsigned int count_sCells=0;
unsigned int count_sCells_Layer0=0;
unsigned int count_sCells_Layer1=0;
......@@ -235,7 +237,7 @@ StatusCode SimpleLArDigitsChecks::execute(){
if ( index > -1 ) {
m_EtSCells_perLayer [index]->Fill( scell->et() );
if ( scell->et() > thre ) {
HWIdentifier hwid = m_cabling->createSignalChannelIDFromHash( scell->caloDDE()->calo_hash() );
HWIdentifier hwid = scCont->createSignalChannelIDFromHash( scell->caloDDE()->calo_hash() );
for(auto digit : *allcalo) {
if ( digit->hardwareID() != hwid ) continue;
int max=0;
......
......@@ -18,6 +18,9 @@
#include "AthenaBaseComps/AthAlgorithm.h"
#include "GaudiKernel/ToolHandle.h"
#include "LArCabling/LArOnOffIdMapping.h"
#include "StoreGate/ReadCondHandleKey.h"
class CaloCellContainer;
class CaloCell;
class LArDigit;
......@@ -25,8 +28,6 @@ class TFile;
class TH1I;
class TH1F;
class TH2F;
class LArSuperCellCablingTool;
class SimpleLArDigitsChecks : public AthAlgorithm
{
......@@ -41,8 +42,7 @@ public :
private :
/** For cell <-> SCell comparisons */
ToolHandle<LArSuperCellCablingTool> m_cabling;
SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingSCKey{this,"SCCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"};
/** base file */
TFile* m_file;
/** base histograms about super-cells */
......
......@@ -40,7 +40,7 @@
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/IToolSvc.h"
#include "LArCabling/LArCablingService.h"
#include "LArCabling/LArCablingLegacyService.h"
#include "LArIdentifier/LArOnlineID.h"
#include "LArRawEvent/LArDigitContainer.h"
#include "TileEvent/TileDigitsContainer.h"
......@@ -114,7 +114,7 @@ public:
const TileInfo* tile_info;
const TileCablingService* tile_cabling;
LArCablingService* lar_cabling;
LArCablingLegacyService* lar_cabling;
const LArOnlineID* lar_onlineID;
const ICaloBadChanTool* calo_badchannel;
......@@ -538,9 +538,9 @@ void VP1CaloCellSystem::systemcreate(StoreGateSvc* detstore)
m_clockwork->noTileDigitsGlobal = true;
}
status = toolSvc()->retrieveTool("LArCablingService",m_clockwork->lar_cabling);
status = toolSvc()->retrieveTool("LArCablingLegacyService",m_clockwork->lar_cabling);
if (status.isFailure() || m_clockwork->lar_cabling == 0) {
messageDebug("Failed to locate LAr Cabling Service");
messageDebug("Failed to locate LAr Cabling Legacy Service");
m_clockwork->lar_cabling = 0;
m_clockwork->noLArDigitsGlobal = true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment