1 #ifndef CalibTracker_SiPixelQuality_SiPixelStatusProducer_h
2 #define CalibTracker_SiPixelQuality_SiPixelStatusProducer_h
66 edm::RunCache<SiPixelTopoFinder>,
67 edm::LuminosityBlockSummaryCache<std::vector<SiPixelDetectorStatus>>,
68 edm::EndLuminosityBlockProducer,
80 psd0.
add<std::vector<edm::InputTag>>(
"badPixelFEDChannelCollections",
86 descriptions.
add(
"siPixelStatusProducer", desc);
106 edm::LogInfo(
"SiPixelStatusProducer") <<
"Init global Cache " << std::endl;
107 return std::make_unique<SiPixelStatusCache>();
123 return std::make_shared<std::vector<SiPixelDetectorStatus>>();
129 std::vector<SiPixelDetectorStatus>*) {
136 std::vector<SiPixelDetectorStatus>
const* siPixelDetectorStatusVtr) {
137 edm::LogInfo(
"SiPixelStatusProducer") <<
"Global endlumi producer " << std::endl;
140 if (!siPixelDetectorStatusVtr->empty()) {
153 std::string outTxt = Form(
"SiPixelDetectorStatus_Run%d_Lumi%d.txt", run, lumi);
155 outFile.open(outTxt.c_str(), std::ios::app);
161 auto result = std::make_unique<SiPixelDetectorStatus>();
162 *
result = siPixelDetectorStatus;
166 <<
" lumi-based data stored for run " << run <<
" lumi " << lumi << std::endl;
171 virtual int indexROC(
int irow,
int icol,
int nROCcolumns)
final;
191 std::unordered_map<uint32_t, unsigned int>
fFedIds_;
static void globalEndJob(SiPixelStatusCache const *)
static std::shared_ptr< SiPixelTopoFinder > globalBeginRun(edm::Run const &iRun, edm::EventSetup const &iSetup, GlobalCache const *iCache)
void updateDetectorStatus(SiPixelDetectorStatus newData)
std::map< int, std::pair< int, int > > fSensors_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static void globalEndLuminosityBlockProduce(edm::LuminosityBlock &iLumi, edm::EventSetup const &, LuminosityBlockContext const *iContext, std::vector< SiPixelDetectorStatus > const *siPixelDetectorStatusVtr)
static PFTauRenderPlugin instance
std::vector< int > fDetIds_
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > siPixelFedCablingMapToken_
static std::shared_ptr< std::vector< SiPixelDetectorStatus > > globalBeginLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
void dumpToFile(std::ofstream &outFile)
unsigned long int ftotalevents_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
~SiPixelStatusProducer() override
std::unordered_map< uint32_t, unsigned int > fFedIds_
LuminosityBlockNumber_t luminosityBlock() const
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) final
SiPixelDetectorStatus fDet_
void put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< edm::EDGetTokenT< PixelFEDChannelCollection > > theBadPixelFEDChannelsTokens_
static void globalEndRun(edm::Run const &iRun, edm::EventSetup const &, RunContext const *iContext)
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > fSiPixelClusterToken_
void setLSRange(int ls0, int ls1)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
typename CacheTypes::GlobalCache GlobalCache
Log< level::Info, false > LogInfo
edm::InputTag fPixelClusterLabel_
std::map< int, std::vector< PixelFEDChannel > > fFEDerror25_
static void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *iContext, std::vector< SiPixelDetectorStatus > *)
static std::unique_ptr< SiPixelStatusCache > initializeGlobalCache(edm::ParameterSet const &iPSet)
std::map< int, std::pair< int, int > > fSensorLayout_
void accumulate(edm::Event const &iEvent, edm::EventSetup const &iSetup) final
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void setRunRange(int run0, int run1)
SiPixelStatusProducer(edm::ParameterSet const &iPSet, SiPixelStatusCache const *)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void beginRun(edm::Run const &, edm::EventSetup const &) final
void endLuminosityBlockSummary(edm::LuminosityBlock const &iLumi, edm::EventSetup const &, std::vector< SiPixelDetectorStatus > *siPixelDetectorStatusVtr) const final
std::map< int, std::map< int, int > > fRocIds_
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) final
virtual int indexROC(int irow, int icol, int nROCcolumns) final