@@ -130,54 +130,50 @@ void ZDCRecDataPostProcessing::configure(const boost::property_tree::ptree& conf
130130 PostProcessingConfigZDC zdcConfig (getID (), config);
131131
132132 // ADC summary plot
133- std::vector<std::string> binLabelsADC;
134133 for (auto source : zdcConfig.dataSourcesADC ) {
135134 std::string histName, moName;
136135 splitDataSourceName (source.name , histName, moName);
137136 if (moName.empty ()) {
138137 continue ;
139138 }
140139
141- binLabelsADC .emplace_back (histName);
142- mMOsADC .emplace (binLabelsADC .size (), MOHelper (source.path , moName));
140+ mBinLabelsADC .emplace_back (histName);
141+ mMOsADC .emplace (mBinLabelsADC .size (), MOHelper (source.path , moName));
143142 }
144143
145- mSummaryADCHisto = std::make_unique<TH1F >(" h_summary_ADC" , " Summary ADC" , binLabelsADC.size (), 0 , binLabelsADC.size ());
146- for (size_t bin = 0 ; bin < binLabelsADC.size (); bin++) {
147- mSummaryADCHisto ->GetXaxis ()->SetBinLabel (bin + 1 , binLabelsADC[bin].c_str ());
148- }
149- publishHisto (mSummaryADCHisto .get (), false , " E" , " " );
150-
151144 // TDC summary plot
152- std::vector<std::string> binLabelsTDC;
153145 for (auto source : zdcConfig.dataSourcesTDC ) {
154146 std::string histName, moName;
155147 splitDataSourceName (source.name , histName, moName);
156148 if (moName.empty ()) {
157149 continue ;
158150 }
159151
160- binLabelsTDC .emplace_back (histName);
161- mMOsTDC .emplace (binLabelsTDC .size (), MOHelper (source.path , moName));
152+ mBinLabelsTDC .emplace_back (histName);
153+ mMOsTDC .emplace (mBinLabelsTDC .size (), MOHelper (source.path , moName));
162154 }
163-
164- mSummaryTDCHisto = std::make_unique<TH1F >(" h_summary_TDC" , " Summary TDC" , binLabelsTDC.size (), 0 , binLabelsTDC.size ());
165- for (size_t bin = 0 ; bin < binLabelsTDC.size (); bin++) {
166- mSummaryTDCHisto ->GetXaxis ()->SetBinLabel (bin + 1 , binLabelsTDC[bin].c_str ());
167- }
168- publishHisto (mSummaryTDCHisto .get (), false , " E" , " " );
169155}
170156
171157// _________________________________________________________________________________________
172158
173159void ZDCRecDataPostProcessing::createSummaryADCHistos (Trigger t, repository::DatabaseInterface* qcdb)
174160{
161+ mSummaryADCHisto = std::make_unique<TH1F >(" h_summary_ADC" , " Summary ADC" , mBinLabelsADC .size (), 0 , mBinLabelsADC .size ());
162+ for (size_t bin = 0 ; bin < mBinLabelsADC .size (); bin++) {
163+ mSummaryADCHisto ->GetXaxis ()->SetBinLabel (bin + 1 , mBinLabelsADC [bin].c_str ());
164+ }
165+ publishHisto (mSummaryADCHisto .get (), false , " E" , " " );
175166}
176167
177168// _________________________________________________________________________________________
178169
179170void ZDCRecDataPostProcessing::createSummaryTDCHistos (Trigger t, repository::DatabaseInterface* qcdb)
180171{
172+ mSummaryTDCHisto = std::make_unique<TH1F >(" h_summary_TDC" , " Summary TDC" , mBinLabelsTDC .size (), 0 , mBinLabelsTDC .size ());
173+ for (size_t bin = 0 ; bin < mBinLabelsTDC .size (); bin++) {
174+ mSummaryTDCHisto ->GetXaxis ()->SetBinLabel (bin + 1 , mBinLabelsTDC [bin].c_str ());
175+ }
176+ publishHisto (mSummaryTDCHisto .get (), false , " E" , " " );
181177}
182178
183179// _________________________________________________________________________________________
@@ -187,7 +183,7 @@ void ZDCRecDataPostProcessing::initialize(Trigger t, framework::ServiceRegistryR
187183 auto & qcdb = services.get <repository::DatabaseInterface>();
188184
189185 createSummaryADCHistos (t, &qcdb);
190- createSummaryADCHistos (t, &qcdb);
186+ createSummaryTDCHistos (t, &qcdb);
191187}
192188
193189// _________________________________________________________________________________________
0 commit comments