![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
18 #include "GaudiKernel/IToolSvc.h"
22 #include "Identifier/Identifier.h"
28 ISvcLocator* pSvcLocator )
30 m_detStore(
"DetectorStore",
name),
31 m_par_dxcontainerkey(
"/TRT/Calib/DX"),
32 m_par_strawtextfile(
""),
33 m_par_forcecallback(false),
36 m_streamer(
"AthenaOutputStreamTool/CondStream1")
51 ATH_MSG_INFO (
"TRT_StrawAlignDbSvc initialize method called");
59 if( dxcontainerexists ) {
68 auto dxcontainer = std::make_unique<StrawDxContainer>();
79 return StatusCode::SUCCESS;
85 ATH_MSG_INFO (
"TRT_StrawAlignDbSvc finalize method called");
86 return StatusCode::SUCCESS;
100 dxcontainer->
getall( packedstrawdata ) ;
104 << packedstrawdata.size());
106 for(
auto &
it : packedstrawdata) {
109 float dx1=dxcontainer->
getDx1(calid) ;
110 float dx2=dxcontainer->
getDx2(calid) ;
111 float dxerr=dxcontainer->
getDxErr(calid) ;
113 << std::setprecision(5)
114 << std::setw(12) << dx1 <<
" "
115 << std::setw(12) << dx2 <<
" "
116 << std::setw(12) << dxerr << std::endl ;
119 return StatusCode::SUCCESS ;
137 return StatusCode::FAILURE;
139 dxcontainer->
clear() ;
144 while ((
infile >>
id >> dx1 >> dx2 >> dxerr ) ) {
145 setDx(
id,dx1,dx2,dxerr) ;
146 ATH_MSG_DEBUG (
" read from file: dx1 " << dx1 <<
" dx2 " << dx2 <<
" dxerr " << dxerr);
149 size_t dxfootprint = dxcontainer->
footprint() ;
156 std::list<std::string>
keys ;
159 return StatusCode::SUCCESS ;
181 ATH_MSG_INFO (
" Streamed out and committed " << typeKeys.size() <<
" objects ");
182 return StatusCode::SUCCESS;
194 ATH_CHECK( service(
"IOVRegistrationSvc",regsvc) );
202 return( StatusCode::SUCCESS);
208 for (std::list<std::string>::const_iterator
209 itr=
keys.begin(); itr!=
keys.end(); ++itr)
210 ATH_MSG_INFO (
" IOVCALLBACK for key " << *itr <<
" number " <<
I);
215 return StatusCode::SUCCESS;
const InDetDD::TRT_DetectorManager * m_trtman
id helper
const StrawDxContainer * getConstDxContainer() const
ToolHandle< IAthenaOutputStreamTool > m_streamer
persistifiable container
void setDx(const TRTCond::ExpandedIdentifier &id, float dx1, float dx2, float dxerr)
set endpoints for a TRTCond::ExpandedIdentifier
StatusCode IOVCallBack(IOVSVC_CALLBACK_ARGS)
IOV call back for dx objects. normally this doesn't do anything.
interface to TRT straw alignment constants
bool m_par_forcecallback
input text file
This is an interface to a tool used to register conditions objects in the Interval of Validity (IOV) ...
#define IOVSVC_CALLBACK_ARGS_P(I, K)
short hand for IOVSvc call back argument list, to be used when access to formal arguments is needed,...
virtual StatusCode registerIOV(const std::string &typeName) const =0
Register IOV DB for an object given its typeName - run/LB numbers interval or times interval and tag ...
std::vector< std::pair< ExpandedIdentifier, const StrawDx * > > FlatContainer
fill vector with all entries in the container. needed to dump to Peter's flat file format
virtual StatusCode readTextFile(const std::string &file)
read calibration from text file into TDS
StatusCode writeTextFile(const std::string &file) const
write calibration constants to flat text file
TRT_StrawAlignDbSvc(const std::string &name, ISvcLocator *pSvcLocator)
constructor
const DataHandle< StrawDxContainer > m_dxcontainer
detector manager
virtual ~TRT_StrawAlignDbSvc()
destructor
StatusCode registerObjects(std::string tag, int run1, int event1, int run2, int event2) const
register calibration objects with the IoV service
::StatusCode StatusCode
StatusCode definition for legacy code.
ServiceHandle< StoreGateSvc > m_detStore
This is an interface to a service used to register conditions objects in the Interval of Validity (IO...
std::string m_par_strawtextfile
folder name
float getDx1(const ExpandedIdentifier &id) const
access to unpacked dx
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
static const char * classname()
classname used to talk to iovservice
#define ATH_MSG_WARNING(x)
StrawDxContainer * getDxContainer() const
access to containers
StatusCode streamOutObjects() const
write the calibration objects to output, after cleaning
float getDxErr(const ExpandedIdentifier &id) const
access to unpacked dx error
const TRT_ID * m_trtid
force callback to manager
void clear()
clear entire container
void getall(FlatContainer &entries) const
virtual StatusCode finalize()
tool finalize
Identifier for TRT detector elements in the conditions code.
float getDx2(const ExpandedIdentifier &id) const
size_t footprint() const
return the memory allocated by the container and its daughters
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
virtual StatusCode initialize()
tool initialize
std::string m_par_dxcontainerkey
void crunch()
reduce the footprint as much as possible by removing the extra space allocated by the vectors