22 ISvcLocator* pSvcLocator) :
56 return StatusCode::SUCCESS;
63 const EventContext& ctx = Gaudi::Hive::currentContext();
66 unsigned int thisrun=ctx.eventID().run_number();
86 for (
const TBBPCRaw * bpcraw : *bpcrawCont) {
87 std::string name = bpcraw->getDetectorName();
122 ATH_MSG_DEBUG (
"BPC " << name <<
" PosX = " << xpos <<
" PosY = " <<ypos );
123 ATH_MSG_DEBUG (
"BPC " << name <<
" PosXR = " << xposR <<
" PosYR = " << yposR );
130 bpc->
setXPulse(1.*bpcraw->getADCHorizontal());
131 bpc->
setYPulse(1.*bpcraw->getADCVertical());
168 if (bpcraw->getTDCLeft()+bpcraw->getTDCRight() <
m_tdccutlr[ind])
171 ATH_MSG_INFO (
"TDC left+right sum below cutoff for BPC " << ind );
175 if (bpcraw->getTDCUp()+bpcraw->getTDCDown() <
m_tdccutud[ind])
178 ATH_MSG_INFO (
"TDC up+down sum below cutoff for BPC " << ind );
193 if (
sc.isFailure( ) ) {
198 if (
sc.isFailure( ) ) {
199 setFilterPassed(
false);
201 setFilterPassed(
true);
204 return StatusCode::SUCCESS;
212 return StatusCode::SUCCESS;
245 std::ifstream calibfile;
247 calibfile.open(filename.c_str());
248 if(!calibfile.good()){
250 return StatusCode::FAILURE;
256 pos = calibfile.tellg();
261 pos = calibfile.tellg();
263 for(
int j=0;j<bpcnumber+1;j++) calibfile.ignore(5000,
'\n');
277 calibfile.seekg(pos);
279 for(
int j=0;j<bpcnumber;j++)
304 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 with parameters:
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 execute() override
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
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