33 return StatusCode::SUCCESS;
58 ATH_MSG_WARNING(
"The file name must contain either 'caliboutput' or 'erroroutput' ");
64 ATH_MSG_INFO(
" Spot check of T0 in every 10'th straw_layer in phi_modules 0, 10, 20 and 30");
65 for (std::vector<Identifier>::const_iterator it =
m_trtid->straw_layer_begin(); it !=
m_trtid->straw_layer_end(); ++it)
68 if (
m_trtid->phi_module(
id) % 10 == 0 &&
m_trtid->straw_layer(
id) % 10 == 0)
79 for (std::vector<Identifier>::const_iterator it =
m_trtid->straw_layer_begin(); it !=
m_trtid->straw_layer_end(); ++it)
81 int nStrawsInLayer =
m_trtid->straw_max(*it);
82 for (
int i = 0; i <= nStrawsInLayer; i++)
88 <<
" phi: " <<
m_trtid->phi_module(strid) <<
" slay: " <<
m_trtid->straw_layer(strid) <<
" straw: " <<
m_trtid->straw(strid));
96 ATH_MSG_INFO(
" Several cases of T0=0. Check the input text file and assign default T0 values instead of zero ");
100 return StatusCode::SUCCESS;
105 return StatusCode::SUCCESS;
114 outfile <<
"# Rtrelation" << std::endl;
116 rtContainer->
getall(rtrelations);
120 outfile << it->first <<
" : ";
123 outfile << std::endl;
127 outfile <<
"# StrawT0" << std::endl;
129 t0Container->
getall(packedstrawdata);
130 float t0(0), t0err(0);
131 for (TRTCond::StrawT0Container::FlatContainer::iterator it = packedstrawdata.begin(); it != packedstrawdata.end(); ++it)
134 t0Container->
unpack(calid, *it->second, t0, t0err);
135 outfile << calid <<
" : " << t0 <<
" " << t0err << std::endl;
138 return StatusCode::SUCCESS;
147 outfile <<
"# RtErrors" << std::endl;
149 errContainer->
getall(errors);
151 it != errors.end(); ++it)
154 outfile << it->first <<
" : ";
157 outfile << std::endl;
161 outfile <<
"# RtSlopes" << std::endl;
163 slopeContainer->
getall(slopes);
165 it != slopes.end(); ++it)
168 outfile << it->first <<
" : ";
171 outfile << std::endl;
174 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Algorithm to read TRT calibration constants from db and dump them to a text file.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
DataModel_detail::iterator< DataVector > iterator
ToolHandle< ITRT_CalDbTool > m_TRTCalDbTool
virtual StatusCode execute(void) override
TRTCond::RtRelationMultChanContainer RtRelationContainer
virtual StatusCode initialize(void) override
virtual StatusCode finalize(void) override
TRTCond::StrawT0MultChanContainer StrawT0Container
TRTCondRead(const std::string &name, ISvcLocator *pSvcLocator)
constructor
const TRT_ID * m_trtid
trt id helper
virtual StatusCode writeCalibTextFile(std::ostream &) const
write calibration constants or errors to flat text file
Gaudi::Property< std::string > m_par_caloutputfile
virtual TRTCond::ExpandedIdentifier trtcondid(const Identifier &id, int level=TRTCond::ExpandedIdentifier::STRAW) const
create an TRTCond::ExpandedIdentifier from a TRTID identifier
virtual StatusCode writeErrorTextFile(std::ostream &) const
Identifier for TRT detector elements in the conditions code.
void getall(typename DaughterContainer::FlatContainer &entries) const
get a flat vector with all values.
static void writeToFile(std::ostream &os, const RtRelation &rt)
write method
RtRelationLayerContainer::FlatContainer FlatContainer
typedef
void unpack(const ExpandedIdentifier &id, const StrawT0 &sd, float &t0, float &t0err) const
public method to unpack a StrawT0 object
StrawT0ContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::FlatContainer FlatContainer
typedefs