Skip to content
Snippets Groups Projects
Commit d687134e authored by Ahmed Tarek's avatar Ahmed Tarek
Browse files

Merge branch 'tbdetdescr' into '24.0'

TBDetDescrAlg: delete legacy config and cleanup

See merge request atlas/athena!69988
parents cc605c8b f47cf472
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TBDetDescrAlg )
# Component(s) in the package:
atlas_add_library( TBDetDescrAlgLib
src/TB*.cxx
PUBLIC_HEADERS TBDetDescrAlg
LINK_LIBRARIES AthenaBaseComps
PRIVATE_LINK_LIBRARIES DetDescrCnvSvcLib GaudiKernel TBDetDescr )
atlas_add_component( TBDetDescrAlg
src/*.cxx
src/components/*.cxx
LINK_LIBRARIES TBDetDescrAlgLib )
PRIVATE_LINK_LIBRARIES AthenaBaseComps DetDescrCnvSvcLib GaudiKernel TBDetDescr )
# Install files from the package:
atlas_install_joboptions( share/*.py )
# Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
from TBDetDescrAlg.TBDetDescrAlgConf import *
theTBDetDescrLoader=TBDetDescrLoader()
theTBDetDescrLoader.TBElementContainer = "TBElementCnt"
theTBDetDescrLoader.TBDetDescrManager = "TBDetDescrMgr"
from AthenaCommon.DetFlags import DetFlags
if not 'doSim' in dir():
# apparently we are not running RecExTB,
# most probably running simulation or digitization
Stream1.ItemList+=["TBElementContainer#*"]
if DetFlags.writeRDOPool.any_on():
# looks like this is digitization job
# just copy container from input file to output file
theTBDetDescrLoader.ReadAction = 1
theTBDetDescrLoader.WriteAction = 0
else:
# looks like this is simulation job
# need to initialize TBDetDesrManager in Detector Store from FADS
include( "TBDetDescrCnv/TBDetDescrCnv_jobOptions.py" )
# do not read anything from StoreGate
theTBDetDescrLoader.ReadAction = 0
# and write TBDetDescrContainer to StoreGate every event
theTBDetDescrLoader.WriteAction = 2
else:
# doSim can be set to False by TileCal jobOptions
# make independent cross-check
if DetFlags.writeRDOPool.any_on():
# looks like this is digitization job
# just copy container from input file to output file
Stream1.ItemList+=["TBElementContainer#*"]
theTBDetDescrLoader.ReadAction = 1
theTBDetDescrLoader.WriteAction = 0
else:
# reconstruction job
# reading ByteStream or POOL file with digits
if doSim:
# data from simulation, read TBDetDescr just once
theTBDetDescrLoader.ReadAction = 1
theTBDetDescrLoader.WriteAction = 0
else:
# real data, create dummy TBDetDescrManager
theTBDetDescrLoader.ReadAction = -1
theTBDetDescrLoader.WriteAction = 0
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
topSequence += theTBDetDescrLoader
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
//Gaudi Includes
//#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/IDataProviderSvc.h"
#include "GaudiKernel/SmartDataPtr.h"
......@@ -12,7 +11,7 @@
//TBDetDescr includes
#include "TBDetDescr/TBElementContainer.h"
#include "TBDetDescr/TBDetDescrManager.h"
#include "TBDetDescrAlg/TBDetDescrLoader.h"
#include "TBDetDescrLoader.h"
// Constructor & destructor
TBDetDescrLoader::TBDetDescrLoader(const std::string& name, ISvcLocator* pSvcLocator)
......
#include "TBDetDescrAlg/TBDetDescrLoader.h"
#include "../TBDetDescrLoader.h"
DECLARE_COMPONENT( TBDetDescrLoader )
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