31 EcalWeightXtalGroupsPlot()
36 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
41 auto iov = iovs.front();
43 unsigned int run = std::get<0>(iov);
46 if (
payload->barrelItems().empty())
52 std::vector<EcalXtalGroupId>::const_iterator value_ptr =
payload->find(rawid);
54 if (value_ptr ==
payload->end())
57 unsigned int weight = (
unsigned int)((*value_ptr).id());
69 if (
payload->endcapItems().empty())
73 for (
int iz = -1; iz < 2; iz = iz + 2)
78 uint32_t rawid = myEEId.
rawId();
80 std::vector<EcalXtalGroupId>::const_iterator value_ptr =
payload->find(rawid);
82 if (value_ptr ==
payload->end())
85 unsigned int weight = (
unsigned int)((*value_ptr).id());
88 endc_p->Fill(ix, iy,
weight);
90 endc_m->Fill(ix, iy,
weight);
94 gStyle->SetPalette(1);
95 gStyle->SetOptStat(0);
96 TCanvas
canvas(
"CC map",
"CC map", 1600, 450);
100 t1.SetTextSize(0.05);
101 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Weight Xtal Groups, IOV %i",
run));
103 float xmi[3] = {0.0, 0.24, 0.76};
104 float xma[3] = {0.24, 0.76, 1.00};
105 std::array<std::unique_ptr<TPad>, 3> pad;
107 pad[
obj] = std::make_unique<TPad>(Form(
"p_%i",
obj), Form(
"p_%i",
obj), xmi[
obj], 0.0, xma[
obj], 0.94);
122 canvas.SaveAs(ImageName.c_str());
void DrawEE(TH2F *endc, float min, float max)
void DrawEB(TH2F *ebmap, float min, float max)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
static const int MIN_HASH
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
constexpr uint32_t rawId() const
get the raw id
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)