Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:59

0001 #ifndef CalibCalorimetry_EcalTPGTools_EcalReadoutTools_H
0002 #define CalibCalorimetry_EcalTPGTools_EcalReadoutTools_H
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0008 #include "Geometry/CaloTopology/interface/EcalTrigTowerConstituentsMap.h"
0009 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
0010 #include "Geometry/EcalMapping/interface/EcalMappingRcd.h"
0011 
0012 class EcalReadoutTools {
0013 private:
0014   const EcalTrigTowerConstituentsMap* triggerTowerMap_;
0015   const EcalElectronicsMapping* elecMap_;
0016 
0017 public:
0018   struct ESGetTokens {
0019     ESGetTokens(const edm::ParameterSet&, edm::ConsumesCollector&& iC)
0020         : ecalTrigTowerConstituentsMapToken{iC.esConsumes()}, ecalElectronicsMappingToken{iC.esConsumes()} {}
0021     edm::ESGetToken<EcalTrigTowerConstituentsMap, IdealGeometryRecord> const ecalTrigTowerConstituentsMapToken;
0022     edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> const ecalElectronicsMappingToken;
0023   };
0024 
0025   EcalReadoutTools(const edm::Event&, const edm::EventSetup&, const ESGetTokens&);
0026   EcalReadoutTools(const EcalReadoutTools&) = delete;
0027   EcalReadoutTools& operator=(const EcalReadoutTools&) = delete;
0028 
0029   EcalTrigTowerDetId readOutUnitOf(const EBDetId& xtalId) const;
0030   EcalScDetId readOutUnitOf(const EEDetId& xtalId) const;
0031 };
0032 
0033 #endif