|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
    6 #include "Acts/EventData/TrackStateType.hpp" 
   15                        ISvcLocator* pSvcLocator)
 
   27     return StatusCode::SUCCESS;
 
   33                                 std::array<std::string, kNStat>{
 
   35                                   "N. Pixel Measurements",
 
   36                                   "N. Strip Measurements",
 
   37                                   "N. Hgtd Measurements" 
   39     return StatusCode::SUCCESS;
 
   50     ATH_MSG_DEBUG(
"   \\__ Number of retrieved tracks: " << tracks->size());
 
   58       inputPrdMap = inputPrdMapHandle.
cptr();
 
   59       ATH_MSG_DEBUG(
"   \\__ Number of already used measurement from previous passes: " << inputPrdMap->
size());
 
   64     if (inputPrdMap == 
nullptr) {
 
   65       ATH_CHECK( outputPrdMapHandle.
record( std::make_unique< ActsTrk::PrepRawDataAssociation >() ) );
 
   67       ATH_CHECK( outputPrdMapHandle.
record( std::make_unique< ActsTrk::PrepRawDataAssociation >( *inputPrdMap ) ) );
 
   72     enum class RecordStatus : 
int {UNKNOWN=0, SUCCESS, NOSOURCELINK, NULLSOURCELINK, ALREADYSTORED};   
 
   73     std::size_t nMeasurements = 0
ul;
 
   76     for (std::size_t 
i(0
ul); 
i<tracks->size(); ++
i) {
 
   77       tracks->trackStateContainer().visitBackwards(tracks->getTrack(
i).tipIndex(),
 
   78                            [&prdMap, &nMeasurements, &
status, 
this]
 
   79                            (
const auto state) -> 
bool 
   82                              if (not state.typeFlags().test(Acts::TrackStateFlag::MeasurementFlag)) return true;
 
   85                              if ( not state.hasUncalibratedSourceLink() ) {
 
   86                                status = RecordStatus::NOSOURCELINK;
 
   92                                status = RecordStatus::NULLSOURCELINK;
 
   97                              switch(uncalibMeas.
type()) {
 
  114                                status = RecordStatus::ALREADYSTORED;
 
  117                              status = RecordStatus::SUCCESS;
 
  120       if (
status == RecordStatus::SUCCESS) 
continue;
 
  123       case RecordStatus::NOSOURCELINK:
 
  124     { 
ATH_MSG_ERROR(
"There was a problem when storing the Prd collections");
 
  126     return StatusCode::FAILURE;
 
  127       case RecordStatus::NULLSOURCELINK:
 
  128     { 
ATH_MSG_ERROR(
"There was a problem when storing the Prd collections");
 
  130     return StatusCode::FAILURE;
 
  131       case RecordStatus::ALREADYSTORED:
 
  134     { 
ATH_MSG_DEBUG(
"There was a problem when storing the Prd collections");
 
  138     { 
ATH_MSG_WARNING(
"There was a problem when storing the Prd collections");
 
  144     ATH_MSG_DEBUG(
"Number of used measurements: " << prdMap->size() << 
" from " << tracks->size() << 
" tracks");
 
  145     ATH_MSG_DEBUG(
"   \\__ Found a total of " << nMeasurements << 
" measurements");
 
  147     return StatusCode::SUCCESS;
 
  
DetectorIdentType identifier() const
Returns the full Identifier of the measurement.
const_pointer_type cptr()
Dereference the pointer.
std::pair< typename std::unordered_set< xAOD::DetectorIdentType >::iterator, bool > markAsUsed(xAOD::DetectorIdentType id)
SG::ReadHandleKey< ActsTrk::PrepRawDataAssociation > m_inputPrdMap
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
SG::ReadHandleKey< ActsTrk::TrackContainer > m_inputTrackCollections
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
virtual StatusCode execute(const EventContext &ctx) const override
TableUtils::StatTable< T > makeTable(const std::array< T, N > &counter, const std::array< std::string, N > &label)
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
virtual StatusCode finalize() override
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
SG::WriteHandleKey< ActsTrk::PrepRawDataAssociation > m_outputPrdMap
PrdAssociationAlg(const std::string &name, ISvcLocator *pSvcLocator)
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?
const xAOD::UncalibratedMeasurement & getUncalibratedMeasurement(const ATLASUncalibSourceLink &source_link)
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
virtual StatusCode initialize() override