Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-03 23:51:40

0001 // $Id: EcalStatusAnalyzer.h
0002 
0003 #include <vector>
0004 #include <map>
0005 
0006 #include <memory>
0007 #include <FWCore/Framework/interface/one/EDAnalyzer.h>
0008 
0009 class Timestamp;
0010 
0011 class EcalStatusAnalyzer : public edm::one::EDAnalyzer<> {
0012 public:
0013   explicit EcalStatusAnalyzer(const edm::ParameterSet& iConfig);
0014   ~EcalStatusAnalyzer() override;
0015 
0016   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0017   void beginJob() override;
0018   void endJob() override;
0019 
0020   enum EcalLaserColorType {
0021     iBLUE = 0,
0022     iGREEN = 1,
0023     iRED = 3,  // in fact should be 2
0024     iIR = 2    // in fact should be 3
0025   };
0026 
0027 private:
0028   int iEvent;
0029 
0030   std::string resdir_;
0031   std::string statusfile_;
0032   std::string eventHeaderCollection_;
0033   std::string eventHeaderProducer_;
0034 
0035   std::map<int, int> isFedLasCreated;
0036   std::map<int, int> isFedTPCreated;
0037   std::map<int, int> isFedPedCreated;
0038 
0039   std::vector<int> fedIDsLas;
0040   std::vector<int> fedIDsTP;
0041   std::vector<int> fedIDsPed;
0042   std::vector<int> dccIDsLas;
0043   std::vector<int> dccIDsTP;
0044   std::vector<int> dccIDsPed;
0045 
0046   std::string _dataType;
0047 
0048   // Identify run type
0049 
0050   int runType;
0051   int runNum;
0052   int event;
0053   int nSM;
0054   int fedID;
0055   int dccID;
0056 
0057   unsigned long long timeStampCur;
0058 
0059   std::map<int, unsigned long long> timeStampBegLas;
0060   std::map<int, unsigned long long> timeStampEndLas;
0061 
0062   std::map<int, unsigned long long> timeStampBegTP;
0063   std::map<int, unsigned long long> timeStampEndTP;
0064 
0065   std::map<int, unsigned long long> timeStampBegPed;
0066   std::map<int, unsigned long long> timeStampEndPed;
0067 
0068   std::map<int, short> MGPAGainLas;
0069   std::map<int, short> MEMGainLas;
0070 
0071   std::map<int, short> MGPAGainTP;
0072   std::map<int, short> MEMGainTP;
0073 
0074   std::map<int, short> MGPAGainPed;
0075   std::map<int, short> MEMGainPed;
0076 
0077   std::map<int, int> laserPowerBlue;
0078   std::map<int, int> laserFilterBlue;
0079   std::map<int, int> laserDelayBlue;
0080 
0081   std::map<int, int> laserPowerRed;
0082   std::map<int, int> laserFilterRed;
0083   std::map<int, int> laserDelayRed;
0084 
0085   std::map<int, int> nEvtsLas;
0086   std::map<int, int> nBlueLas;
0087   std::map<int, int> nRedLas;
0088   std::map<int, int> runTypeLas;
0089 
0090   std::map<int, int> nEvtsTP;
0091   std::map<int, int> runTypeTP;
0092 
0093   std::map<int, int> nEvtsPed;
0094   std::map<int, int> runTypePed;
0095 };