Skip to content

Commit 3ae5ad8

Browse files
author
Mu2E
committed
fixed clang format
1 parent 4bc561c commit 3ae5ad8

File tree

2 files changed

+38
-37
lines changed

2 files changed

+38
-37
lines changed

otsdaq-mu2e-dqm/ArtModules/CaloSiDETDQMHistoContainer.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ class CaloSiDETDQMHistoContainer {
4949
h->SetFillColor(kRed - 6);
5050
}
5151

52-
static void BookHist(InfoHist_ &h,
53-
art::ServiceHandle<art::TFileService> tfs,
52+
static void BookHist(InfoHist_ &h, art::ServiceHandle<art::TFileService> tfs,
5453
std::string Name, std::string Title, const int nBins,
5554
const float xmin, const float xmax, const char *folder,
5655
std::string type = "add") {
5756
art::TFileDirectory testDir = tfs->mkdir(folder);
58-
h._Hist = testDir.make<TH1F>(Name.c_str(), Title.c_str(), nBins, xmin, xmax);
57+
h._Hist =
58+
testDir.make<TH1F>(Name.c_str(), Title.c_str(), nBins, xmin, xmax);
5959
h._type = type;
6060

6161
// Initialize histogram style
@@ -66,8 +66,9 @@ class CaloSiDETDQMHistoContainer {
6666
}
6767

6868
static void BookGraph(InfoGraph_ &g,
69-
art::ServiceHandle<art::TFileService> tfs,
70-
std::string Name, std::string Title, const char *folder) {
69+
art::ServiceHandle<art::TFileService> tfs,
70+
std::string Name, std::string Title,
71+
const char *folder) {
7172
art::TFileDirectory testDir = tfs->mkdir(folder);
7273
g._Graph = testDir.makeAndRegister<TGraph>(Name.c_str(), Title.c_str());
7374

otsdaq-mu2e-dqm/ArtModules/CaloSiDETDQM_module.cc

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -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

129128
void 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

150147
void 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

229229
void ots::CaloSiDETDQM::endJob() {}

0 commit comments

Comments
 (0)