Skip to content

Commit a5037ae

Browse files
committed
Merge branch 'develop' of github.com:Mu2e/otsdaq_mu2e_dqm into develop
2 parents 46e3bb1 + f4ca0bc commit a5037ae

11 files changed

+2090
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ add_subdirectory(test)
5858
# Documentation directory
5959
#add_subdirectory(doc)
6060

61+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test/ierc_splines_20250213_DTC0_intcfo100us_pulser.root ${CURRENT_BINARY_DIR} test/ierc_splines_20250213_DTC0_intcfo100us_pulser.root COPYONLY)
62+
63+
install(DIRECTORY test DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/otsdaq-mu2e-dqm)
64+
6165
# Data
6266
#FILE(COPY ConfigurationDataExamples DESTINATION Data)
6367
#INSTALL(DIRECTORY ConfigurationDataExamples DESTINATION ${product}/${version}/Data)

otsdaq-mu2e-dqm/ArtModules/CMakeLists.txt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,52 @@ Offline::BFieldGeom
9595
Offline::TrackerGeom
9696
)
9797

98+
cet_build_plugin(CaloIERCDQM art::module LIBRARIES REG
99+
art_root_io::TFileService_service
100+
artdaq_core_mu2e::artdaq-core-mu2e_Data
101+
otsdaq_mu2e::otsdaq-mu2e_ArtModules
102+
otsdaq::NetworkUtilities
103+
Offline::DataProducts
104+
Offline::RecoDataProducts
105+
Offline::TrkHitReco
106+
ROOT::Hist
107+
ROOT::Tree
108+
ROOT::Core
109+
ROOT::RIO
110+
ROOT::Gui
111+
)
112+
113+
cet_build_plugin(CaloSiDETDQM art::module LIBRARIES REG
114+
art_root_io::TFileService_service
115+
artdaq_core_mu2e::artdaq-core-mu2e_Data
116+
otsdaq_mu2e::otsdaq-mu2e_ArtModules
117+
otsdaq::NetworkUtilities
118+
Offline::DataProducts
119+
Offline::RecoDataProducts
120+
Offline::TrkHitReco
121+
Offline::DAQ
122+
Offline::CaloConditions
123+
ROOT::Hist
124+
ROOT::Tree
125+
ROOT::Core
126+
ROOT::RIO
127+
ROOT::Gui
128+
)
98129

130+
cet_build_plugin(IntegrationDQM art::module LIBRARIES REG
131+
art_root_io::TFileService_service
132+
artdaq_core_mu2e::artdaq-core-mu2e_Data
133+
otsdaq_mu2e::otsdaq-mu2e_ArtModules
134+
otsdaq::NetworkUtilities
135+
Offline::DataProducts
136+
Offline::RecoDataProducts
137+
Offline::TrkHitReco
138+
ROOT::Hist
139+
ROOT::Tree
140+
ROOT::Core
141+
ROOT::RIO
142+
ROOT::Gui
143+
)
99144

100145
install_headers()
101146
install_source()
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#ifndef _CaloIERCDQMHistoContainer_h_
2+
#define _CaloIERCDQMHistoContainer_h_
3+
4+
#include "art/Framework/Services/Registry/ServiceHandle.h"
5+
#include "art_root_io/TFileDirectory.h"
6+
#include "art_root_io/TFileService.h"
7+
#include "otsdaq/Macros/CoutMacros.h"
8+
#include "otsdaq/NetworkUtilities/TCPPublishServer.h"
9+
#include <TH1F.h>
10+
#include <string>
11+
12+
#include "TRACE/tracemf.h"
13+
#define TRACE_NAME "CaloIERCDQM"
14+
15+
namespace ots {
16+
17+
class CaloIERCDQMHistoContainer {
18+
public:
19+
CaloIERCDQMHistoContainer(){};
20+
virtual ~CaloIERCDQMHistoContainer(void){};
21+
struct InfoHist_ {
22+
TH1F *_Hist;
23+
InfoHist_() { _Hist = NULL; }
24+
};
25+
struct InfoGraph_ {
26+
TGraph *_Graph;
27+
InfoGraph_() { _Graph = NULL; }
28+
};
29+
30+
std::map<int, InfoHist_> map_h1_dt_singlechan;
31+
std::map<int, InfoGraph_> map_g_dtevt_singlechan;
32+
33+
std::map<int, InfoHist_> map_h1_dt_sameboard;
34+
std::map<int, InfoGraph_> map_g_dtevt_sameboard;
35+
36+
std::map<int, InfoHist_> map_h1_dt_diffboard;
37+
std::map<int, InfoGraph_> map_g_dtevt_diffboard;
38+
39+
void BookSingleChannel(art::ServiceHandle<art::TFileService> tfs, int mapID,
40+
std::string Name, std::string Title, int nBins,
41+
float min, float max) {
42+
TLOG(TLVL_DEBUG) << "Booking single channel hist for sipmID " << mapID;
43+
map_h1_dt_singlechan[mapID] = InfoHist_();
44+
art::TFileDirectory testDir = tfs->mkdir("SingleChannel");
45+
this->map_h1_dt_singlechan[mapID]._Hist =
46+
testDir.make<TH1F>(Name.c_str(), Title.c_str(), nBins, min, max);
47+
this->map_h1_dt_singlechan[mapID]._Hist->GetXaxis()->SetTitle("dt [ns]");
48+
}
49+
void BookSingleChannelG(art::ServiceHandle<art::TFileService> tfs, int mapID,
50+
std::string Name, std::string Title) {
51+
TLOG(TLVL_DEBUG) << "Booking single channel graph for sipmID " << mapID;
52+
map_g_dtevt_singlechan[mapID] = InfoGraph_();
53+
art::TFileDirectory testDir = tfs->mkdir("SingleChannel");
54+
this->map_g_dtevt_singlechan[mapID]._Graph =
55+
testDir.makeAndRegister<TGraph>(Name.c_str(), Title.c_str());
56+
this->map_g_dtevt_singlechan[mapID]._Graph->GetXaxis()->SetTitle(
57+
"Event number");
58+
this->map_g_dtevt_singlechan[mapID]._Graph->GetYaxis()->SetTitle("dt [ns]");
59+
this->map_g_dtevt_singlechan[mapID]._Graph->SetMarkerStyle(20);
60+
}
61+
void BookSameBoard(art::ServiceHandle<art::TFileService> tfs, int mapID,
62+
std::string Name, std::string Title, int nBins, float min,
63+
float max) {
64+
TLOG(TLVL_DEBUG) << "Booking single board hist for sipmID " << mapID;
65+
map_h1_dt_sameboard[mapID] = InfoHist_();
66+
art::TFileDirectory testDir = tfs->mkdir("SameBoard");
67+
this->map_h1_dt_sameboard[mapID]._Hist =
68+
testDir.make<TH1F>(Name.c_str(), Title.c_str(), nBins, min, max);
69+
this->map_h1_dt_sameboard[mapID]._Hist->GetXaxis()->SetTitle("dt [ns]");
70+
}
71+
void BookSameBoardG(art::ServiceHandle<art::TFileService> tfs, int mapID,
72+
std::string Name, std::string Title) {
73+
TLOG(TLVL_DEBUG) << "Booking single board graph for sipmID " << mapID;
74+
map_g_dtevt_sameboard[mapID] = InfoGraph_();
75+
art::TFileDirectory testDir = tfs->mkdir("SameBoard");
76+
this->map_g_dtevt_sameboard[mapID]._Graph =
77+
testDir.makeAndRegister<TGraph>(Name.c_str(), Title.c_str());
78+
this->map_g_dtevt_sameboard[mapID]._Graph->GetXaxis()->SetTitle(
79+
"Event number");
80+
this->map_g_dtevt_sameboard[mapID]._Graph->GetYaxis()->SetTitle("dt [ns]");
81+
this->map_g_dtevt_sameboard[mapID]._Graph->SetMarkerStyle(20);
82+
}
83+
void BookDiffBoard(art::ServiceHandle<art::TFileService> tfs, int mapID,
84+
std::string Name, std::string Title, int nBins, float min,
85+
float max) {
86+
TLOG(TLVL_DEBUG) << "Booking diff board hist for sipmID " << mapID;
87+
map_h1_dt_diffboard[mapID] = InfoHist_();
88+
art::TFileDirectory testDir = tfs->mkdir("DiffBoard");
89+
this->map_h1_dt_diffboard[mapID]._Hist =
90+
testDir.make<TH1F>(Name.c_str(), Title.c_str(), nBins, min, max);
91+
this->map_h1_dt_diffboard[mapID]._Hist->GetXaxis()->SetTitle("dt [ns]");
92+
}
93+
void BookDiffBoardG(art::ServiceHandle<art::TFileService> tfs, int mapID,
94+
std::string Name, std::string Title) {
95+
TLOG(TLVL_DEBUG) << "Booking diff board graph for sipmID " << mapID;
96+
map_g_dtevt_diffboard[mapID] = InfoGraph_();
97+
art::TFileDirectory testDir = tfs->mkdir("DiffBoard");
98+
this->map_g_dtevt_diffboard[mapID]._Graph =
99+
testDir.makeAndRegister<TGraph>(Name.c_str(), Title.c_str());
100+
this->map_g_dtevt_diffboard[mapID]._Graph->GetXaxis()->SetTitle(
101+
"Event number");
102+
this->map_g_dtevt_diffboard[mapID]._Graph->GetYaxis()->SetTitle("dt [ns]");
103+
this->map_g_dtevt_diffboard[mapID]._Graph->SetMarkerStyle(20);
104+
}
105+
};
106+
107+
} // namespace ots
108+
109+
#endif

0 commit comments

Comments
 (0)