Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:27

0001 #ifndef DTTPDeadWriter_H
0002 #define DTTPDeadWriter_H
0003 
0004 /* Class to find test-pulse dead channels from a t0 databases:
0005  * wires without t0 value are tp-dead.
0006  
0007  *  \author S. Bolognesi
0008  */
0009 
0010 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0011 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0014 #include "CondFormats/DTObjects/interface/DTT0.h"
0015 #include "CondFormats/DataRecord/interface/DTT0Rcd.h"
0016 
0017 #include <string>
0018 
0019 namespace edm {
0020   class ParameterSet;
0021   class Event;
0022   class EventSetup;
0023 }  // namespace edm
0024 
0025 class DTT0;
0026 class DTDeadFlag;
0027 
0028 class DTTPDeadWriter : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0029 public:
0030   /// Constructor
0031   DTTPDeadWriter(const edm::ParameterSet& pset);
0032 
0033   /// Destructor
0034   ~DTTPDeadWriter() override;
0035 
0036   // Operations
0037 
0038   ///Read t0 map from event
0039   void beginRun(const edm::Run&, const edm::EventSetup& setup) override;
0040 
0041   /// Compute the ttrig by fiting the TB rising edge
0042   void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
0043 
0044   void endRun(const edm::Run&, const edm::EventSetup& setup) override{};
0045 
0046   /// Write ttrig in the DB
0047   void endJob() override;
0048 
0049 protected:
0050 private:
0051   // Debug flag
0052   bool debug;
0053 
0054   //The map of t0 to be read from event
0055   const DTT0* tZeroMap;
0056   edm::ESGetToken<DTT0, DTT0Rcd> t0Token_;
0057 
0058   // The object to be written to DB
0059   DTDeadFlag* tpDeadList;
0060 
0061   //The DTGeometry
0062   edm::ESHandle<DTGeometry> muonGeom;
0063   const edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
0064 };
0065 #endif