5#ifndef ITKPIXELBYTESTREAMCNV_ITKPIXELCSVWAFERIDALG_H
6#define ITKPIXELBYTESTREAMCNV_ITKPIXELCSVWAFERIDALG_H
9#include "GaudiKernel/EventContext.h"
10#include "GaudiKernel/ISvcLocator.h"
11#include "Identifier/Identifier.h"
33 virtual StatusCode
execute(
const EventContext& ctx)
const override;
35 const std::vector<CsvRow>&
rows()
const {
return m_rows; }
38 std::pair<Identifier,int>
waferId(
const CsvRow& row)
const;
41 static std::string
trim(
const std::string& input);
42 static std::vector<std::string>
splitCsvLine(
const std::string& line);
43 static std::vector<std::string>
parseSPChain(
const std::string& spChain);
46 int barrel_ec(
const std::vector<std::string>& spchain)
const;
47 int layer_disk(
const std::vector<std::string>& spchain)
const;
48 int phi_module(
const std::vector<std::string>& spchain,
const std::string& mod,
int fe)
const;
49 int eta_module(
const std::vector<std::string>& spchain,
const std::string& mod,
int fe)
const;
50 int feID(
const std::vector<std::string>& spchain,
int fe)
const;
53 "AT2-IP-ES-0016_v1.41_INCOMPLETE-ModuleA_slim.csv",
54 "CSV file containing SP chain, Module and FE columns"};
57 "ITkPixelWaferIds.txt",
58 "Output text file for one 32-bit waferID per line"};
69 mutable std::atomic<bool>
m_done{
false};
This is an Identifier helper class for the Pixel subdetector.
An algorithm that can be simultaneously executed in multiple threads.
virtual ~ITkPixelCsvWaferIdAlg()=default
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &ctx) const override
static std::string trim(const std::string &input)
std::atomic< bool > m_done
static std::vector< std::string > splitCsvLine(const std::string &line)
const PixelID * m_pixIdHelper
std::vector< CsvRow > m_rows
int phi_module(const std::vector< std::string > &spchain, const std::string &mod, int fe) const
Gaudi::Property< std::string > m_outputFile
static std::vector< std::string > parseSPChain(const std::string &spChain)
int feID(const std::vector< std::string > &spchain, int fe) const
Gaudi::Property< std::string > m_csvFile
int barrel_ec(const std::vector< std::string > &spchain) const
std::pair< Identifier, int > waferId(const CsvRow &row) const
int eta_module(const std::vector< std::string > &spchain, const std::string &mod, int fe) const
ITkPixelCsvWaferIdAlg(const std::string &name, ISvcLocator *pSvcLocator)
int layer_disk(const std::vector< std::string > &spchain) const
const std::vector< CsvRow > & rows() const
This is an Identifier helper class for the Pixel subdetector.