20#include <trg/cdc/modules/trgcdctsfDQM/TRGCDCTSFDQMModule.h>
22#include <framework/dataobjects/EventMetaData.h>
23#include <framework/datastore/StoreObjPtr.h>
24#include <framework/datastore/StoreArray.h>
26#include <TDirectory.h>
27#include <TPostScript.h>
48 "Genarete postscript file or not",
51 "postscript file name",
68 h_nhit->GetXaxis()->SetTitle(
"Total number of TSF hits/event");
73 h_nhit_tsf->GetYaxis()->SetTitle(
"Total number of hits");
77 h_valid->GetXaxis()->SetTitle(
"Validity");
78 h_valid->GetYaxis()->SetTitle(
"#of tsf hits");
82 h_timing->GetXaxis()->SetTitle(
"Timing");
83 h_timing->GetYaxis()->SetTitle(
"#of tsf hits");
102 _exp = bevt->getExperiment();
103 _run = bevt->getRun();
109 sprintf(c_name,
"TRGCDCTSFUnpackerStore%d",
m_TSFMOD);
110 entAry.isRequired(c_name);
121 gStyle->SetOptStat(0);
122 TCanvas c1(
"c1",
"", 0, 0, 500, 300);
125 TPostScript* ps_nhit =
new TPostScript((
m_postScriptName +
".tsf_total_nhit_superlayer" + to_string(
m_TSFMOD) +
".ps").c_str(),
131 TPostScript* ps_nhit_tsf =
new TPostScript((
m_postScriptName +
".tsf_nhit_superlayer" + to_string(
m_TSFMOD) +
".ps").c_str(), 112);
134 ps_nhit_tsf->Close();
149 for (
int ii = 0; ii <
entAry.getEntries(); ii++) {
150 nhit +=
entAry[ii]->m_netfhit;
160 for (
int ii = 0; ii <
entAry.getEntries(); ii++) {
161 id =
entAry[ii]->m_trackerhit0id;
162 v =
entAry[ii]->m_trackerhit0v;
163 rt =
entAry[ii]->m_trackerhit0rt;
169 id =
entAry[ii]->m_trackerhit1id;
170 v =
entAry[ii]->m_trackerhit1v;
171 rt =
entAry[ii]->m_trackerhit1rt;
177 id =
entAry[ii]->m_trackerhit2id;
178 v =
entAry[ii]->m_trackerhit2v;
179 rt =
entAry[ii]->m_trackerhit2rt;
185 id =
entAry[ii]->m_trackerhit3id;
186 v =
entAry[ii]->m_trackerhit3v;
187 rt =
entAry[ii]->m_trackerhit3rt;
193 id =
entAry[ii]->m_trackerhit4id;
194 v =
entAry[ii]->m_trackerhit4v;
195 rt =
entAry[ii]->m_trackerhit4rt;
201 id =
entAry[ii]->m_trackerhit5id;
202 v =
entAry[ii]->m_trackerhit5v;
203 rt =
entAry[ii]->m_trackerhit5rt;
209 id =
entAry[ii]->m_trackerhit6id;
210 v =
entAry[ii]->m_trackerhit6v;
211 rt =
entAry[ii]->m_trackerhit6rt;
217 id =
entAry[ii]->m_trackerhit7id;
218 v =
entAry[ii]->m_trackerhit7v;
219 rt =
entAry[ii]->m_trackerhit7rt;
225 id =
entAry[ii]->m_trackerhit8id;
226 v =
entAry[ii]->m_trackerhit8v;
227 rt =
entAry[ii]->m_trackerhit8rt;
233 id =
entAry[ii]->m_trackerhit9id;
234 v =
entAry[ii]->m_trackerhit9v;
235 rt =
entAry[ii]->m_trackerhit9rt;
243 if (
entAry[ii]->m_N2DTS == 10)
continue;
245 id =
entAry[ii]->m_trackerhit10id;
246 v =
entAry[ii]->m_trackerhit10v;
247 rt =
entAry[ii]->m_trackerhit10rt;
253 id =
entAry[ii]->m_trackerhit11id;
254 v =
entAry[ii]->m_trackerhit11v;
255 rt =
entAry[ii]->m_trackerhit11rt;
261 id =
entAry[ii]->m_trackerhit12id;
262 v =
entAry[ii]->m_trackerhit12v;
263 rt =
entAry[ii]->m_trackerhit12rt;
269 id =
entAry[ii]->m_trackerhit13id;
270 v =
entAry[ii]->m_trackerhit13v;
271 rt =
entAry[ii]->m_trackerhit13rt;
277 id =
entAry[ii]->m_trackerhit14id;
278 v =
entAry[ii]->m_trackerhit14v;
279 rt =
entAry[ii]->m_trackerhit14rt;
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Type-safe access to single objects in the data store.
TH1I * h_valid
Valid type of TSF hits in each superlayer.
StoreArray< TRGCDCTSFUnpackerStore > entAry
TSF data store.
unsigned _exp
experiment number
virtual void initialize() override
initialize
TDirectory * oldDir
TDirectories.
virtual void event() override
Event.
TH1I * h_timing
Timing of TSF hits in each superlayer.
virtual void endRun() override
End Run.
TH1I * h_nhit_tsf
Total number of hits in each TSF.
TRGCDCTSFDQMModule()
Costructor.
int m_TSFMOD
TSF module number.
virtual void beginRun() override
begin Run
TDirectory * dirDQM
TDirectories.
std::string m_postScriptName
name of ps file
TH1I * h_nhit
Total number of TSF hits per event in each superlayer.
virtual void defineHisto() override
Define Histogram.
bool m_generatePostscript
flag to save ps file
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.