30 EcalWeightXtalGroupsPlot() :
cond::payloadInspector::PlotImage<
EcalWeightXtalGroups>(
"Ecal Weight Xtal Groups - map ") {
34 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
39 auto iov = iovs.front();
41 unsigned int run = std::get<0>(iov);
45 if (payload->barrelItems().empty())
51 std::vector<EcalXtalGroupId>::const_iterator value_ptr = payload->find(rawid);
53 if (value_ptr == payload->end())
56 unsigned int weight = (
unsigned int)((*value_ptr).id());
57 Double_t
phi = (Double_t)(
EBDetId(rawid)).iphi() - 0.5;
58 Double_t
eta = (Double_t)(
EBDetId(rawid)).ieta();
67 barrel->Fill(phi, eta, weight);
70 if (payload->endcapItems().empty())
74 for(
int iz = -1; iz < 2; iz = iz + 2)
79 uint32_t rawid = myEEId.
rawId();
81 std::vector<EcalXtalGroupId>::const_iterator value_ptr = payload->find(rawid);
83 if (value_ptr == payload->end())
86 unsigned int weight = (
unsigned int)((*value_ptr).id());
89 endc_p->Fill(ix, iy, weight);
91 endc_m->Fill(ix, iy, weight);
95 gStyle->SetPalette(1);
96 gStyle->SetOptStat(0);
97 TCanvas
canvas(
"CC map",
"CC map", 1600, 450);
101 t1.SetTextSize(0.05);
102 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Weight Xtal Groups, IOV %i", run));
104 float xmi[3] = {0.0 , 0.24, 0.76};
105 float xma[3] = {0.24, 0.76, 1.00};
106 TPad** pad =
new TPad*;
108 pad[
obj] =
new TPad(Form(
"p_%i",
obj),Form(
"p_%i",
obj), xmi[
obj], 0.0, xma[obj], 0.94);
123 canvas.SaveAs(ImageName.c_str());
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
constexpr uint32_t rawId() const
get the raw id
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
virtual bool fill(const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)=0
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
void setSingleIov(bool flag)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays