![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
65 <<
" counts, high gain: " <<
m_threshold[1] <<
" counts" );
87 return StatusCode::SUCCESS;
102 auto outputCont = std::make_unique<TileDigitsContainer>(
false,
SG::VIEW_ELEMENTS);
104 ATH_MSG_FATAL(
"Could not create a new TileDigitsContainer instance as requested!" );
105 return StatusCode::FAILURE;
110 collItr = lastColl = outputCont->end();
116 if (inputDigitsContainer.
isValid()) {
117 collItr = inputDigitsContainer->
begin();
118 lastColl = inputDigitsContainer->
end();
129 bool emptyRch =
true;
135 if (inputRawChannelContainer.
isValid()) {
136 collRchItr = firstRchColl = inputRawChannelContainer->
begin();
137 lastRchColl = inputRawChannelContainer->
end();
138 emptyRch = (firstRchColl == lastRchColl);
152 for (; collItr != lastColl; ++collItr) {
155 std::set<HWIdentifier>
ids;
157 auto outColl = std::make_unique<ConstDataVector<TileDigitsCollection> >
162 float smin = 99999., smax = -99999.;
163 for (
float samp :
digit->samples()) {
169 outColl->push_back(
digit);
177 for (
float samp :
digit->samples()) {
198 ATH_CHECK( outputCont->addCollection (outColl.release()->asDataVector(),
201 if (
ids.size() == 0 || emptyRch)
204 while (collRchItr != lastRchColl
205 && (*collRchItr)->identify() < (*collItr)->identify()) {
208 if (collRchItr == lastRchColl) {
210 <<
"TileDigitsCollection ID 0x" << (*collItr)->identify()
211 <<
" but corresponding TileRawChannelCollection is missing"
214 }
else if ((*collItr)->identify() != (*collRchItr)->identify()) {
216 <<
"TileDigitsCollection ID 0x" << (*collItr)->identify()
217 <<
" and TileRawChannelCollection ID 0x" << (*collRchItr)->identify()
218 <<
" do not match " << MSG::dec );
222 auto outRchColl = std::make_unique<ConstDataVector<TileRawChannelCollection> >
228 if (
ids.find(adcId) !=
ids.end()) {
229 outRchColl->push_back (rch);
233 <<
" amp=" << rch->amplitude() );
236 ATH_CHECK( outRchCont->addCollection (outRchColl.release()->asDataVector(),
242 << rchCounter <<
" raw channels stored in output containers");
258 ATH_MSG_DEBUG(
"TileRawChannelContainer registered successfully ("
265 return StatusCode::SUCCESS;
272 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
SG::ReadHandleKey< TileDigitsContainer > m_inputDigitsContainerKey
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
DataVector adapter that acts like it holds const pointers.
Gaudi::Property< int > m_lowGainThreashold
bool msgLvl(const MSG::Level lvl) const
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
An algorithm that can be simultaneously executed in multiple threads.
Handle class for recording to StoreGate.
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
const TileHWID * m_tileHWID
Gaudi::Property< int > m_highGainThreashold
virtual StatusCode initialize() override
initialize method
virtual ~TileDigitsFilter()
::StatusCode StatusCode
StatusCode definition for legacy code.
int m_threshold[2]
Threshold value for low and high gain.
SG::WriteHandleKey< TileRawChannelContainer > m_outputRawChannelContainerKey
TileDigitsFilter(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode finalize() override
finalize method
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandleKey< TileRawChannelContainer > m_inputRawChannelContainerKey
IdentifierHash hashId() const
hashId of the pointed-to element
Helpers for checking error return status codes and reporting errors.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
virtual StatusCode execute(const EventContext &ctx) const override
execute method
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
Handle class for reading from StoreGate.
SG::WriteHandleKey< TileDigitsContainer > m_outputDigitsContainerKey