|
ATLAS Offline Software
|
Go to the documentation of this file.
18 return StatusCode::SUCCESS;
27 return StatusCode::SUCCESS;
39 auto it_rdoColl = rdoContainer->
begin();
40 auto lastRdoColl = rdoContainer->
end();
42 for (; it_rdoColl != lastRdoColl; ++it_rdoColl) {
ATH_CHECK(this->
decodeCsc(*it_rdoColl, wh_cscDigit.
ptr(), collection, oldId)); }
44 return StatusCode::SUCCESS;
51 const double samplingTime = rdoColl->
rate();
52 const unsigned int numSamples = rdoColl->
numSamples();
67 for (
int j = 0; j <
width; ++j) {
69 std::vector<uint16_t> samples;
70 const bool extractSamples =
data->samples(j, numSamples, samples);
71 if (!extractSamples) {
72 ATH_MSG_WARNING(
"Unable to extract samples for strip " << j <<
" Online Cluster width = " <<
width
73 <<
" for number of Samples = " << numSamples <<
" continuing ...");
76 std::vector<float> charges;
77 const bool adctocharge =
m_cscCalibTool->adcToCharge(samples,
data->hashId(), charges);
80 unsigned int samplingPhase = 0;
84 if (!adctocharge || !errorfindCharge) {
86 <<
"CSC Digit not build ... "
87 <<
" or charge finding failed "
92 const int theCharge =
static_cast<int>(
charge);
99 if (
m_idHelperSvc->cscIdHelper().get_hash(stationId, coll_hash, &cscContext)) {
101 <<
"context begin_index = " << cscContext.
begin_index()
102 <<
" context end_index = " << cscContext.
end_index() <<
" the identifier is ");
106 if (oldId != stationId) {
108 if (
nullptr == coll) {
111 collection = newCollection;
112 if (cscContainer->
addCollection(newCollection, coll_hash).isFailure()) {
113 ATH_MSG_WARNING(
"Couldn't record CscDigitCollection with key=" << coll_hash <<
" in StoreGate!");
118 collection = oldCollection;
126 return StatusCode::SUCCESS;
char data[hepevt_bytes_allocation_ATLAS]
Use IdentifiableContainer with CscDigitCollection.
ToolHandle< ICscCalibTool > m_cscCalibTool
const_pointer_type cptr()
Dereference the pointer.
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
virtual StatusCode execute(const EventContext &ctx) const override final
size_type end_index() const
SG::WriteHandleKey< CscDigitContainer > m_cscDigitKey
size_t size() const
Duplicate of fullSize for backwards compatability.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
An algorithm that can be simultaneously executed in multiple threads.
size_type begin_index() const
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
const_iterator end() const
return const_iterator for end of container
int charge() const
Return the charge.
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.
void show() const
Print out in hex form.
Collection of CSC Raw Hits, arranged according to CSC Detector Elements Author: Ketevi A.
virtual StatusCode initialize() override final
virtual bool isValid() override final
Can the handle be successfully dereferenced?
uint16_t numSamples() const
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
Identifier identify() const
Class to hold the electronic output for a single CSC readout channel: n sampling ADC data + the addre...
ToolHandle< Muon::ICSC_RDO_Decoder > m_cscRdoDecoderTool
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
This container provides access to collections of CSC RDOs and a mechanism for recording them.
CscRdoToCscDigit(const std::string &name, ISvcLocator *pSvcLocator)
#define ATLAS_THREAD_SAFE
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
size_type size() const noexcept
Returns the number of elements in the collection.
SG::ReadHandleKey< CscRawDataContainer > m_cscRdoKey
uint8_t rate() const
the rate could be 25 or 50 ns
StatusCode decodeCsc(const CscRawDataCollection *, CscDigitContainer *, CscDigitCollection *&, Identifier &) const