22 ISvcLocator* pSvcLocator) :
56 return StatusCode::SUCCESS;
65 unsigned int thisrun=ctx.eventID().run_number();
85 for (
const TBBPCRaw * bpcraw : *bpcrawCont) {
86 std::string name = bpcraw->getDetectorName();
121 ATH_MSG_DEBUG (
"BPC " << name <<
" PosX = " << xpos <<
" PosY = " <<ypos );
122 ATH_MSG_DEBUG (
"BPC " << name <<
" PosXR = " << xposR <<
" PosYR = " << yposR );
129 bpc->
setXPulse(1.*bpcraw->getADCHorizontal());
130 bpc->
setYPulse(1.*bpcraw->getADCVertical());
167 if (bpcraw->getTDCLeft()+bpcraw->getTDCRight() <
m_tdccutlr[ind])
170 ATH_MSG_INFO (
"TDC left+right sum below cutoff for BPC " << ind );
174 if (bpcraw->getTDCUp()+bpcraw->getTDCDown() <
m_tdccutud[ind])
177 ATH_MSG_INFO (
"TDC up+down sum below cutoff for BPC " << ind );
192 if (
sc.isFailure( ) ) {
197 if (
sc.isFailure( ) ) {
203 return StatusCode::SUCCESS;
211 return StatusCode::SUCCESS;
244 std::ifstream calibfile;
246 calibfile.open(filename.c_str());
247 if(!calibfile.good()){
249 return StatusCode::FAILURE;
255 pos = calibfile.tellg();
260 pos = calibfile.tellg();
262 for(
int j=0;j<bpcnumber+1;j++) calibfile.ignore(5000,
'\n');
276 calibfile.seekg(pos);
278 for(
int j=0;j<bpcnumber;j++)
303 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
raw data class for BPC measurement
std::vector< float > m_tdccutmin
std::vector< float > m_bpc_invY
std::vector< float > m_tdccutmax
std::vector< float > m_bpc_updown
std::vector< float > m_bpc_leftright
std::vector< float > m_bpc_invX
virtual StatusCode initialize() override
std::vector< float > m_bpc_lroffset
virtual StatusCode finalize() override
std::vector< float > m_tdccutlr
std::vector< float > m_bpc_udoffset
std::vector< float > m_rotation
std::vector< float > m_bpc_calibY
std::vector< float > m_bpc_calibX
std::vector< float > m_tdccutud
TBBPCRec(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< std::string > m_bpc_names
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
std::string m_SGrecordkey
std::string m_calib_filename
void setYPos(signal_type theSignal)
void setXPos(signal_type theSignal)
void setXPulseOverflow(bool overflow=true)
void setYPulseOverflow(bool overflow=true)
void setYPosOverflow(bool overflow=true)
void setYPulse(signal_type theSignal)
void setXPosOverflow(bool overflow=true)
void setXPulse(signal_type theSignal)
static std::vector< uint32_t > runnumber