Go to the documentation of this file.00001 #ifndef L1RCTProducer_h
00002 #define L1RCTProducer_h
00003
00004 #include "FWCore/Framework/interface/EDProducer.h"
00005
00006 #include "DataFormats/Common/interface/Handle.h"
00007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00008 #include "FWCore/Framework/interface/EventSetup.h"
00009 #include "FWCore/Framework/interface/Event.h"
00010 #include "FWCore/Framework/interface/ESHandle.h"
00011
00012 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
00013 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
00014 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00015
00016
00017 #include "CondFormats/L1TObjects/interface/L1CaloEcalScale.h"
00018 #include "CondFormats/DataRecord/interface/L1CaloEcalScaleRcd.h"
00019 #include "CondFormats/L1TObjects/interface/L1CaloHcalScale.h"
00020 #include "CondFormats/DataRecord/interface/L1CaloHcalScaleRcd.h"
00021
00022
00023 #include "CondFormats/L1TObjects/interface/L1RCTParameters.h"
00024 #include "CondFormats/DataRecord/interface/L1RCTParametersRcd.h"
00025 #include "CondFormats/L1TObjects/interface/L1RCTChannelMask.h"
00026 #include "CondFormats/DataRecord/interface/L1RCTChannelMaskRcd.h"
00027 #include "CondFormats/L1TObjects/interface/L1RCTNoisyChannelMask.h"
00028 #include "CondFormats/DataRecord/interface/L1RCTNoisyChannelMaskRcd.h"
00029
00030 #include "CondFormats/RunInfo/interface/RunInfo.h"
00031 #include "CondFormats/DataRecord/interface/RunSummaryRcd.h"
00032
00033
00034 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCT.h"
00035 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h"
00036
00037 #include "CondFormats/L1TObjects/interface/L1CaloEtScale.h"
00038 #include "CondFormats/DataRecord/interface/L1EmEtScaleRcd.h"
00039
00040
00041 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00042 #include <string>
00043
00044 class L1RCT;
00045 class L1RCTLookupTables;
00046
00047 class L1RCTProducer : public edm::EDProducer
00048 {
00049 public:
00050 explicit L1RCTProducer(const edm::ParameterSet& ps);
00051 virtual ~L1RCTProducer();
00052 virtual void beginRun(edm::Run& r, const edm::EventSetup& c);
00053 virtual void beginLuminosityBlock(edm::LuminosityBlock& lumiSeg,
00054 const edm::EventSetup& context) ;
00055 virtual void produce(edm::Event& e, const edm::EventSetup& c);
00056
00057
00058 void updateConfiguration(const edm::EventSetup&);
00059
00060 void updateFedVector(const edm::EventSetup&, bool getFromOmds, int);
00061 const std::vector<int> getFedVectorFromRunInfo(const edm::EventSetup&);
00062 const std::vector<int> getFedVectorFromOmds(const edm::EventSetup&);
00063
00064 void printFedVector(const std::vector<int>);
00065 void printUpdatedFedMask();
00066 void printUpdatedFedMaskVerbose();
00067
00068 private:
00069 L1RCTLookupTables* rctLookupTables;
00070 L1RCT* rct;
00071 bool useEcal;
00072 bool useHcal;
00073 std::vector<edm::InputTag> ecalDigis;
00074 std::vector<edm::InputTag> hcalDigis;
00075 std::vector<int> bunchCrossings;
00076 bool getFedsFromOmds;
00077 unsigned int queryDelayInLS;
00078 unsigned int queryIntervalInLS;
00079
00080
00081 L1RCTChannelMask* fedUpdatedMask;
00082
00083
00084 enum crateSection{
00085 c_min,
00086 ebOddFed = c_min,
00087 ebEvenFed,
00088 eeFed,
00089 hbheFed,
00090 hfFed,
00091 c_max = hfFed
00092 };
00093
00094
00095
00096 static const int crateFED[18][5];
00097 static const int minBarrel = 1;
00098 static const int maxBarrel = 17;
00099 static const int minEndcap = 17;
00100 static const int maxEndcap = 28;
00101 static const int minHF = 29;
00102 static const int maxHF =32;
00103
00104
00105 };
00106
00107
00108 #endif