CMS 3D CMS Logo

StoreEcalCondition.h
Go to the documentation of this file.
1 #ifndef CondTools_Ecal_StoreEcalCondition_h
2 #define CondTools_Ecal_StoreEcalCondition_h
3 
5 
6 #include <string>
7 #include <map>
8 #include <memory>
9 #include <fstream>
10 #include <cstdio>
11 #include <typeinfo>
12 #include <sstream>
13 
28 
29 namespace edm {
30  class ParameterSet;
31  class Event;
32  class EventSetup;
33 } // namespace edm
34 
35 //
36 // class decleration
37 //
38 
40 public:
41  std::shared_ptr<EcalWeightXtalGroups> readEcalWeightXtalGroupsFromFile(const char*);
42  std::shared_ptr<EcalTBWeights> readEcalTBWeightsFromFile(const char*);
43  std::shared_ptr<EcalADCToGeVConstant> readEcalADCToGeVConstantFromFile(const char*);
44  std::shared_ptr<EcalIntercalibConstants> readEcalIntercalibConstantsFromFile(const char*, const char*);
45  std::shared_ptr<EcalPFRecHitThresholds> readEcalPFRecHitThresholdsFromFile(const char*, const char*);
46  std::shared_ptr<EcalIntercalibConstantsMC> readEcalIntercalibConstantsMCFromFile(const char*, const char*);
47  std::shared_ptr<EcalGainRatios> readEcalGainRatiosFromFile(const char*);
48  std::shared_ptr<EcalChannelStatus> readEcalChannelStatusFromFile(const char*);
49  void writeToLogFile(std::string, std::string, unsigned long long);
50  void writeToLogFileResults(char*);
51  int convertFromConstructionSMToSlot(int, int);
52 
53  explicit StoreEcalCondition(const edm::ParameterSet& iConfig);
54  ~StoreEcalCondition() override;
55 
56  void analyze(const edm::Event& evt, const edm::EventSetup& evtSetup) override;
57  void endJob() override;
58 
59 private:
60  void fillHeader(char*);
61 
62  std::vector<std::string> objectName_;
63  // it can be of type: EcalWeightXtalGroups, EcalTBWeights, EcalADCToGeVConstant, EcalIntercalibConstants, EcalGainRatios
64  std::vector<std::string> inpFileName_;
65  std::vector<std::string> inpFileNameEE_;
67  int sm_constr_; // SM number from data file
68  int sm_slot_; // SM slot to map data to
69  std::vector<unsigned long long> since_; // beginning IOV for objects
71 
73  std::ostringstream streamOut;
74  streamOut << value;
75  return streamOut.str();
76  }
77 };
78 #endif
std::vector< std::string > inpFileName_
void writeToLogFileResults(char *)
StoreEcalCondition(const edm::ParameterSet &iConfig)
std::vector< std::string > inpFileNameEE_
std::shared_ptr< EcalChannelStatus > readEcalChannelStatusFromFile(const char *)
std::shared_ptr< EcalIntercalibConstants > readEcalIntercalibConstantsFromFile(const char *, const char *)
std::shared_ptr< EcalADCToGeVConstant > readEcalADCToGeVConstantFromFile(const char *)
void endJob() override
std::vector< unsigned long long > since_
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
Definition: value.py:1
std::shared_ptr< EcalTBWeights > readEcalTBWeightsFromFile(const char *)
std::shared_ptr< EcalIntercalibConstantsMC > readEcalIntercalibConstantsMCFromFile(const char *, const char *)
void writeToLogFile(std::string, std::string, unsigned long long)
std::shared_ptr< EcalWeightXtalGroups > readEcalWeightXtalGroupsFromFile(const char *)
std::string to_string(char value[])
int convertFromConstructionSMToSlot(int, int)
std::shared_ptr< EcalGainRatios > readEcalGainRatiosFromFile(const char *)
HLT enums.
std::shared_ptr< EcalPFRecHitThresholds > readEcalPFRecHitThresholdsFromFile(const char *, const char *)
std::vector< std::string > objectName_