@@ -80,8 +80,7 @@ class CaloSiDETDQM : public art::EDAnalyzer {
8080 void beginJob () override ;
8181 void endJob () override ;
8282
83- void summary_fill (art::Event const &event,
84- CaloSiDETDQMHistoContainer *histos,
83+ void summary_fill (art::Event const &event, CaloSiDETDQMHistoContainer *histos,
8584 const mu2e::CaloDigiCollection *caloDigis);
8685 void PlotRate (art::Event const &e);
8786
@@ -94,7 +93,8 @@ class CaloSiDETDQM : public art::EDAnalyzer {
9493 std::vector<std::string> histType_;
9594 int freqDQM_, diagLevel_, evtCounter_;
9695 art::ServiceHandle<art::TFileService> tfs;
97- CaloSiDETDQMHistoContainer *histo_container = new CaloSiDETDQMHistoContainer();
96+ CaloSiDETDQMHistoContainer *histo_container =
97+ new CaloSiDETDQMHistoContainer();
9898 HistoSender *histSender_;
9999 bool doOnspillHist_, doOffspillHist_;
100100 mu2e::ProditionsHandle<mu2e::CaloDAQMap> _calodaqconds_h;
@@ -123,28 +123,25 @@ ots::CaloSiDETDQM::CaloSiDETDQM(Parameters const &conf)
123123 doOffspillHist_ = true ;
124124 }
125125 }
126-
127126}
128127
129128void ots::CaloSiDETDQM::beginJob () {
130129 __COUT__ << " [CaloSiDETDQM::beginJob] Beginning job" << std::endl;
131130
132131 histo_container->BookHist (histo_container->h1_channel_occupancy , tfs,
133- " h1_channel_occupancy" ,
134- " Channel occupancy;Board*100+Channel;Total hits" ,
135- 16000 ,0 ,16000 ,
136- " summary" );
137-
138- histo_container->BookHist (histo_container->h1_channel_occupancy_lastevent , tfs,
139- " h1_channel_occupancy_lastevent" ,
140- " Channel occupancy in the last event;Board*100+Channel;Total hits" ,
141- 16000 ,0 ,16000 ,
142- " summary" );
143-
144- histo_container->BookGraph (histo_container->g_nhits_event , tfs,
145- " g_nhits_event" ,
146- " Channel occupancy;Board*100+Channel;Total hits" ,
147- " summary" );
132+ " h1_channel_occupancy" ,
133+ " Channel occupancy;Board*100+Channel;Total hits" ,
134+ 16000 , 0 , 16000 , " summary" );
135+
136+ histo_container->BookHist (
137+ histo_container->h1_channel_occupancy_lastevent , tfs,
138+ " h1_channel_occupancy_lastevent" ,
139+ " Channel occupancy in the last event;Board*100+Channel;Total hits" , 16000 ,
140+ 0 , 16000 , " summary" );
141+
142+ histo_container->BookGraph (
143+ histo_container->g_nhits_event , tfs, " g_nhits_event" ,
144+ " Channel occupancy;Board*100+Channel;Total hits" , " summary" );
148145}
149146
150147void ots::CaloSiDETDQM::analyze (art::Event const &event) {
@@ -193,37 +190,40 @@ void ots::CaloSiDETDQM::analyze(art::Event const &event) {
193190
194191 // send the summary hists
195192
196- hists_to_send[moduleTag_ + " :replace" ].push_back ((TH1 *)histo_container->h1_channel_occupancy ._Hist ->Clone ());
197- hists_to_send[moduleTag_ + " :replace" ].push_back ((TH1 *)histo_container->h1_channel_occupancy_lastevent ._Hist ->Clone ());
198- graphs_to_send[moduleTag_ + " :replace" ].push_back ((TGraph *)histo_container->g_nhits_event ._Graph ->Clone ());
193+ hists_to_send[moduleTag_ + " :replace" ].push_back (
194+ (TH1 *)histo_container->h1_channel_occupancy ._Hist ->Clone ());
195+ hists_to_send[moduleTag_ + " :replace" ].push_back (
196+ (TH1 *)histo_container->h1_channel_occupancy_lastevent ._Hist ->Clone ());
197+ graphs_to_send[moduleTag_ + " :replace" ].push_back (
198+ (TGraph *)histo_container->g_nhits_event ._Graph ->Clone ());
199199
200200 histSender_->sendHistograms (hists_to_send);
201201 histSender_->sendGraphs (graphs_to_send);
202202}
203203
204- void ots::CaloSiDETDQM::summary_fill (art::Event const &event,
205- CaloSiDETDQMHistoContainer *histo_container,
206- const mu2e::CaloDigiCollection *caloDigis) {
204+ void ots::CaloSiDETDQM::summary_fill (
205+ art::Event const &event, CaloSiDETDQMHistoContainer *histo_container,
206+ const mu2e::CaloDigiCollection *caloDigis) {
207207
208208 histo_container->h1_channel_occupancy_lastevent ._Hist ->Reset ();
209209
210- mu2e::CaloDAQMap const & calodaqconds = _calodaqconds_h.get (event.id ());
211-
210+ mu2e::CaloDAQMap const &calodaqconds = _calodaqconds_h.get (event.id ());
212211
213212 TLOG (TLVL_DEBUG) << " There are " << caloDigis->size () << " calo digis" ;
214213 for (uint ihit = 0 ; ihit < caloDigis->size (); ihit++) {
215214 int SiPMID = caloDigis->at (ihit).SiPMID ();
216215 int BoardChan = calodaqconds.rawId (mu2e::CaloSiPMId (SiPMID)).id ();
217216 int boardID = BoardChan / 20 ;
218217 int chanID = BoardChan % 20 ;
219- // float thisTime = caloDigis->at(ihit).t0();
218+ // float thisTime = caloDigis->at(ihit).t0();
220219
221- histo_container->h1_channel_occupancy ._Hist ->Fill (boardID*100 +chanID);
222- histo_container->h1_channel_occupancy_lastevent ._Hist ->Fill (boardID*100 +chanID);
220+ histo_container->h1_channel_occupancy ._Hist ->Fill (boardID * 100 + chanID);
221+ histo_container->h1_channel_occupancy_lastevent ._Hist ->Fill (boardID * 100 +
222+ chanID);
223223 }
224224
225- histo_container->g_nhits_event ._Graph ->AddPoint (this_eventNumber, caloDigis-> size ());
226-
225+ histo_container->g_nhits_event ._Graph ->AddPoint (this_eventNumber,
226+ caloDigis-> size ());
227227}
228228
229229void ots::CaloSiDETDQM::endJob () {}
0 commit comments