CMS 3D CMS Logo

SiStripTrackerMapCreator.h
Go to the documentation of this file.
1 #ifndef _SiStripTrackerMapCreator_h_
2 #define _SiStripTrackerMapCreator_h_
3 
10 
11 #include <TTree.h>
12 #include <fstream>
13 #include <map>
14 #include <memory>
15 #include <string>
16 #include <vector>
17 
18 class DQMStore;
19 class TkDetMap;
20 class TrackerTopology;
21 class MonitorElement;
22 namespace edm { class EventSetup; }
23 
25 public:
27  bool readConfiguration();
28 
29  void create(edm::ParameterSet const& tkmapPset,
30  DQMStore& dqm_store,
31  std::string const& htype,
32  edm::EventSetup const& eSetup);
33  void createForOffline(edm::ParameterSet const& tkmapPset,
34  DQMStore& dqm_store,
35  std::string& htype,
36  edm::EventSetup const& eSetup);
37  void createInfoFile(std::vector<std::string> const& map_names,
38  TTree* tkinfo_tree,
39  DQMStore& dqm_store,
40  std::vector<uint32_t> const& detidList);
41 
42 private:
43  void paintTkMapFromAlarm(uint32_t det_id,
44  const TrackerTopology* tTopo,
45  DQMStore& dqm_store,
46  bool isBad,
47  std::map<unsigned int, std::string>& badmodmap);
48  void setTkMapFromHistogram(DQMStore& dqm_store,
49  std::string const& htype,
50  edm::EventSetup const& eSetup);
51  void setTkMapFromAlarm(DQMStore& dqm_store, edm::EventSetup const& eSetup);
52  uint16_t getDetectorFlagAndComment(DQMStore* dqm_store,
53  uint32_t det_id,
54  TrackerTopology const* tTopo,
55  std::ostringstream& comment);
56 
57  void
58  paintTkMapFromHistogram(MonitorElement const* me,
59  std::string const& map_type,
60  std::vector<std::pair<float, uint32_t>>* topNmodVec);
61  void setTkMapRange(std::string const& map_type);
62  void setTkMapRangeOffline();
63  uint16_t
64  getDetectorFlag(uint32_t const det_id)
65  {
66  return detFlag_.find(det_id) != detFlag_.end() ? detFlag_[det_id] : 0;
67  }
68  void printBadModuleList(std::map<unsigned int, std::string> const& badmodmap,
69  edm::EventSetup const& eSetup);
70  void printTopModules(std::vector<std::pair<float, uint32_t>>& topNmodVec,
71  edm::EventSetup const& eSetup);
72 
73  std::unique_ptr<TrackerMap> trackerMap_{nullptr};
76  std::string stripTopLevelDir_{};
77 
78  float tkMapMax_;
79  float tkMapMin_;
80  float meanToMaxFactor_{2.5};
84  int nDet_;
88  DetId cachedDetId_{};
89  int16_t cachedLayer_{};
90  std::map<uint32_t, uint16_t> detFlag_;
93  uint32_t numTopModules_;
95 };
96 #endif
uint16_t getDetectorFlag(uint32_t const det_id)
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: DetId.h:18
edm::ESHandle< SiStripDetCabling > detCabling_
HLT enums.
std::map< uint32_t, uint16_t > detFlag_
edm::EventSetup const & eSetup_
#define comment(par)
Definition: vmac.h:163