CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
bak_ReadCosmicRayData-00-00-07/src/ReadCosmicRayData.cxx
Go to the documentation of this file.
1/**************************************************************************
2 * CgemBOSS (BESIII Offline Software System) *
3 * *
4 * Author: The BESII Collaboration *
5 * Contributors: Aiqiang Guo, Liangliang Wang *
6 * Date: Dec 10 2018 *
7 * *
8 **************************************************************************/
9/**************************************************************************
10 * Note for 01
11 * Change the reading method for vectorized data
12 * By: Aiqiang Guo
13 * Date: Dec 17 2018
14 **************************************************************************/
15/**************************************************************************
16 * Note for 02
17 * Add CC and mTPC for cluster object
18 * By: Aiqiang Guo
19 * Date: Dec 27 2018
20 **************************************************************************/
21
22// include system lib
23#include <iostream>
24#include <iomanip>
25#include <string>
26#include <cmath>
27
28// Include files
29#include "GaudiKernel/AlgFactory.h"
30#include "GaudiKernel/DataObject.h"
31#include "GaudiKernel/IEventProcessor.h"
32
33#include "GaudiKernel/Incident.h"
34#include "GaudiKernel/IIncidentSvc.h"
35#include "GaudiKernel/Memory.h"
36
37#include <csignal>
38
39// for save digit & cluster
40#include "GaudiKernel/ISvcLocator.h"
41#include "GaudiKernel/IDataProviderSvc.h"
42#include "GaudiKernel/Bootstrap.h"
43#include "GaudiKernel/RegistryEntry.h"
44#include "GaudiKernel/MsgStream.h"
45
46#include "CgemRawEvent/CgemDigi.h"
47#include "CgemRecEvent/RecCgemCluster.h"
48
49#include "Identifier/CgemID.h"
50
51#include "RawEvent/RawDataUtil.h"
52#include "RawEvent/DigiEvent.h"
53#include "ReconEvent/ReconEvent.h"
54#include "EventModel/EventHeader.h"
55#include "GaudiKernel/SmartDataPtr.h"
56
57#include "ReadCosmicRayData/ReadCosmicRayData.h"
58
59//using namespace std;
60ReadCosmicRayData::ReadCosmicRayData(const std::string& name, ISvcLocator* pSvcLocator):
61 Algorithm(name,pSvcLocator){
62
63 declareProperty("Dir_file", Dir_file = "Cosmic_data_01.root");
64 declareProperty("TreeDigi", TreeDigi = "t1");
65 declareProperty("TreeCluster", TreeCluster = "t1");
66 declareProperty("ReadDigi", ReadDigi = true);
67 declareProperty("ReadCluster", ReadCluster = true);
68 declareProperty("DigiSheetID", DigiSheetID = 0);
69 declareProperty("Cut_on_tpc", Cut_on_tpc = false);
70 declareProperty("ClusterSheetID", ClusterSheetID = 0);
71 declareProperty("ClusterRecZ", ClusterRecZ = 0);
72 declareProperty("R_Cluster", R_Cluster = 1.0);
73 declareProperty("Shift_DigitLayerID", Shift_DigitLayerID = 0);
74 declareProperty("Shift_DigitSheetID", Shift_DigitSheetID = 0);
75 declareProperty("Shift_DigitXStripID", Shift_DigitXStripID = 0);
76 declareProperty("Shift_DigitVStripID", Shift_DigitVStripID = 0);
77 declareProperty("Shift_ClusterLayerID", Shift_ClusterLayerID = 0);
78 declareProperty("Shift_ClusterSheetID", Shift_ClusterSheetID = 0);
79 declareProperty("Shift_RecPhi", Shift_RecPhi = 0);
80 declareProperty("Shift_RecV", Shift_RecV = 0);
81 declareProperty("Shift_RecZ", Shift_RecZ = 0);
82 declareProperty("CosmicRayDataSetID", CosmicRayDataSetID = "CR201909");
83 declareProperty("runNo", m_runNo = 1);
84
85}
86
88}
89
91 MsgStream log(msgSvc(), name());
92 log << MSG::INFO << "ReadCosmicRayData initialize()" << endreq;
93
94 TString TDir_file(Dir_file);
95 f = new TFile(TDir_file);
96 if(ReadDigi)
97 {
98 TString TTreeDigi(TreeDigi);
99 Tdigi = (TTree*)f->Get(TTreeDigi);
100
101 // Get Cgem digi tree
102 Tdigi->SetBranchAddress("Event", &m_Event_D); // event ID
103 Tdigi->SetBranchAddress("nGemHit", &m_nGemHit); // nof GEM hits
104 // Tdigi->SetBranchAddress("GemHit_nHit", &m_nGemHit); // nof GEM hits it is the same thing as before
105
106 // information on the IDs
107 Tdigi->SetBranchAddress("GemHit_channel", m_channel); // channel no. [0, 63]
108 Tdigi->SetBranchAddress("GemHit_ROC", m_ROC); // ROC no.
109 Tdigi->SetBranchAddress("GemHit_chip", m_chip); // chip no.
110 Tdigi->SetBranchAddress("GemHit_FEB", m_FEB); // FEB no.
111 Tdigi->SetBranchAddress("GemHit_plane", m_plane); // plane
112 Tdigi->SetBranchAddress("GemHit_view", m_view); // view (axial or stereo strips)
113 Tdigi->SetBranchAddress("GemHit_strip", m_strip); // strip no.
114
115 // physical information
116 Tdigi->SetBranchAddress("GemHit_saturated", m_saturated); // is the ASIC channel saturated
117 Tdigi->SetBranchAddress("GemHit_q", m_charge); // charge (fC)
118 Tdigi->SetBranchAddress("GemHit_time", m_time); // time (ns)
119 // Tdigi->SetBranchAddress("GemHit_is_tpc", m_GemHit_is_tpc);
120
121 No_Entries_D = Tdigi->GetEntries();
122 Ind_Entry_D = 0;
123 }
124
125 /**
126 if(ReadCluster)
127 {
128 //Get Cgem cluster tree
129 TString TTreeCluster(TreeCluster);
130 Tcluster = (TTree*)f->Get(TTreeCluster);
131
132 Tcluster->SetBranchAddress("Event", &m_Event_C);
133 Tcluster->SetBranchAddress("GemCluster1d_nCluster", &m_nGemCluster);
134 Tcluster->SetBranchAddress("GemCluster1d_nHit", m_ClusternHit);
135 Tcluster->SetBranchAddress("GemCluster1d_HitIndex", m_ClusterHitIndex);
136 Tcluster->SetBranchAddress("GemCluster1d_plane", m_ClusterLayerID);
137 Tcluster->SetBranchAddress("GemCluster1d_view", m_Flag);
138 Tcluster->SetBranchAddress("GemCluster1d_q", m_EnergyDeposit);
139 Tcluster->SetBranchAddress("GemCluster1d_x", m_Cluster_x);
140 Tcluster->SetBranchAddress("GemCluster1d_z", m_Cluster_z);
141 Tcluster->SetBranchAddress("GemCluster1d_x_cc", m_Cluster_x_cc);
142 Tcluster->SetBranchAddress("GemCluster1d_x_tpc", m_Cluster_x_tpc);
143 Tcluster->SetBranchAddress("GemCluster1d_z_cc", m_Cluster_z_cc);
144 Tcluster->SetBranchAddress("GemCluster1d_z_tpc", m_Cluster_z_tpc);
145 //Tcluster->SetBranchAddress("ClusterSheetID", m_ClusterSheetID);
146 //Tcluster->SetBranchAddress("ClusterFlagB", m_ClusterFlagB);
147 //Tcluster->SetBranchAddress("ClusterFlagE", m_ClusterFlagE);
148 //Tcluster->SetBranchAddress("RecV", m_RecV);
149 //Tcluster->SetBranchAddress("RecZ", m_RecZ);
150
151 No_Entries_C = Tcluster->GetEntries();
152 Ind_Entry_C = 0;
153 }
154 **/
155
156 return StatusCode::SUCCESS;
157}
158
159
160int ReadCosmicRayData::TranslateDigitLayerID(int Input_LayerID)
161{
162 int ShiftValue = Shift_DigitLayerID;
163 return Input_LayerID+ShiftValue;
164}
165
166int ReadCosmicRayData::TranslateDigitSheetID(int Input_SheetID)
167{
168 int ShiftValue = Shift_DigitSheetID;
169 return Input_SheetID+ShiftValue;
170}
171
172int ReadCosmicRayData::TranslateDigitXStripID(int Input_StripID)
173{
174 int ShiftValue = Shift_DigitXStripID;
175 return Input_StripID+ShiftValue;
176}
177
178int ReadCosmicRayData::TranslateDigitVStripID(int Input_StripID)
179{
180 int ShiftValue = Shift_DigitVStripID;
181 return Input_StripID+ShiftValue;
182}
183
184int ReadCosmicRayData::TranslateDigitStripID(int Input_StripID, int StripType)
185{
186 int Output_StripID = -1;
187 if(StripType==0) Output_StripID = TranslateDigitXStripID(Input_StripID);
188 if(StripType==1) Output_StripID = TranslateDigitVStripID(Input_StripID);
189 return Output_StripID;
190}
191
192int ReadCosmicRayData::TranslateDigitStripType(int Input_StripType)
193{
194 return Input_StripType;
195}
196
197int ReadCosmicRayData::TranslateClusterLayerID(int Input_LayerID)
198{
199 int ShiftValue = Shift_ClusterLayerID;
200 return Input_LayerID+ShiftValue;
201}
202
203int ReadCosmicRayData::TranslateClusterSheetID(int Input_SheetID)
204{
205 int ShiftValue = Shift_ClusterSheetID;
206 return Input_SheetID+ShiftValue;
207}
208
209int ReadCosmicRayData::TranslateClusterFlag(int Input_Flag)
210{
211 return Input_Flag-2;
212}
213
214double ReadCosmicRayData::TranslateRecPhi(double Input_RecPhi)
215{
216 double ShiftValue = Shift_RecPhi;
217 return Input_RecPhi+ShiftValue;
218}
219
220double ReadCosmicRayData::TranslateRecV(double Input_RecV)
221{
222 double ShiftValue = Shift_RecV;
223 return Input_RecV+ShiftValue;
224}
225
226double ReadCosmicRayData::TranslateRecZ(double Input_RecZ)
227{
228 double ShiftValue = Shift_RecZ;
229 return Input_RecZ+ShiftValue;
230}
231
232void ReadCosmicRayData::ReadCgemDigits()
233{
234 //cout<<"Start to read the CgemDigits"<<endl;
235 Tdigi->GetEntry(Ind_Entry_D);
236 Ind_Entry_D++;
237}
238
239void ReadCosmicRayData::ReadCgemClusters()
240{
241 //cout<<"Start to read the CgemClusters"<<endl;
242 Tcluster->GetEntry(Ind_Entry_C);
243 Ind_Entry_C++;
244}
245
246bool ReadCosmicRayData::ConvertHitToDigi(int ihit, unsigned int &charge_channel, unsigned int &time_channel)
247{
248
249 if(CosmicRayDataSetID == "CR201909") {
250 // cout << "ReadCosmicRayData::ConvertGRAALToCgemBoss(), converting set " << CosmicRayDataSetID << endl;
251
252 // if(!m_GemHit_is_tpc[i]&&Cut_on_tpc) return false; // ??
253 charge_channel = 1;
254 time_channel = 1;
255
256 // from plane to LayerID
257 if(m_plane[ihit] == 0) m_LayerID[ihit] = 0; // LAYER1
258 else if(m_plane[ihit] == 1) m_LayerID[ihit] = 1; // LAYER2
259 else if(m_plane[ihit] == 2) m_LayerID[ihit] = 1; // LAYER2
260 else {
261 cout<<"ReadCosmicRayData::ConvertHitToDigi: unknown plane "<<m_plane[ihit]<<endl;
262 return false;
263 }
264
265 // from view to StripType
266 if(m_view[ihit] == 2) m_StripType[ihit] = 0; // x strip (phi)
267 else if(m_view[ihit] == 3) m_StripType[ihit] = 1; // v strip (stereo)
268 else {
269 cout<<"ReadCosmicRayData::ConvertHitToDigi: unknown view "<<m_view[ihit]<<endl;
270 return false;
271 }
272
273 // sheet ID/strip ID
274 m_SheetID[ihit] = 0; // LAYER 1, or sheet 1 of layer 2
275 m_StripID[ihit] = m_strip[ihit]-1;// strip ID starts from 0
276 if(m_LayerID[ihit] == 1) { // LAYER 2
277 if(m_StripType[ihit] == 0) // X strip
278 {
279 if(m_strip[ihit] > CgemID::getXSTRIP_MAX(m_LayerID[ihit])) // sheet 2
280 {
281 m_SheetID[ihit] = 1;
282 m_StripID[ihit] = m_strip[ihit] - 1 - CgemID::getXSTRIP_MAX(m_LayerID[ihit]);// strip ID starts from 0
283 }
284 }
285 else if(m_StripType[ihit] == 1)// V strip
286 {
287 if( m_strip[ihit] >= 539 && m_strip[ihit]-1<=CgemID::getVSTRIP_MAX(m_LayerID[ihit]) )
288 {
289 m_StripID[ihit] = m_strip[ihit] - 2; // correction for the wrong mapping at strip 539 in integration
290 }
291 else if( m_strip[ihit]-1 > CgemID::getVSTRIP_MAX(m_LayerID[ihit]) ) // sheet 2
292 {
293 m_SheetID[ihit] = 1;
294 m_StripID[ihit] = m_strip[ihit] - 2 - CgemID::getVSTRIP_MAX(m_LayerID[ihit]);
295 if(m_strip[ihit] >= 1617) m_StripID[ihit] = m_strip[ihit] - 3 - CgemID::getVSTRIP_MAX(m_LayerID[ihit]);// correction for the wrong mapping at strip 1617 in integration
296 }
297 }
298 }
299
300 // cout << "GRAAL " << m_strip[ihit] << " view " << m_view[ihit] << " plane " << m_plane[ihit] << endl;
301 // cout << "CGEMB " << m_StripID[ihit] << " view " << m_StripType[ihit] << " plane " << m_LayerID[ihit] << " sheet " << m_SheetID[ihit] << endl;
302
303
304 return true;
305 }
306
307 cout << "ERROR : ReadCosmicRayData::ConvertGRAALToCgemBoss(), the data set " << CosmicRayDataSetID << " is unknown! " << endl;
308 return false;
309
310}
311
312void ReadCosmicRayData::SaveCgemDigits()
313{
314
315 bool printFlag=false;
316 //cout<<"Start to save CgemDigi"<<endl;
317 // cgem digis collection defined in BOSS
318 CgemDigiCol* aCgemDigiCol = new CgemDigiCol;
319
320 //cout<<"nDigi : "<<m_nGemHit<<endl;
321 if (m_nGemHit > 0)
322 {
323 // push back cgem digits to CgemDigiCol in BOSS
324 for(int i=0;i<m_nGemHit;i++)
325 {
326 unsigned int charge_channel;
327 unsigned int time_channel;
328 bool is_converted = ConvertHitToDigi(i, charge_channel, time_channel);
329 if(!is_converted) {
330 cout<<"ReadCosmicRayData::SaveCgemDigits failed to convert hit "<<i<<" to digi in event "<<m_Event_D<<endl;
331 continue;
332 }
333 const Identifier ident = CgemID::strip_id(
334 TranslateDigitLayerID(m_LayerID[i]),
335 TranslateDigitSheetID(m_SheetID[i]),
336 TranslateDigitStripType(m_StripType[i]),
337 TranslateDigitStripID(m_StripID[i],TranslateDigitStripType(m_StripType[i])));
338
339 /**
340 cout << "graal strip " << m_strip[i]
341 << " graal view " << m_view[i]
342 << " stripid " << m_StripID[i]
343 << " striptype " << m_StripType[i]
344 << " strip " << TranslateDigitStripID(m_StripID[i],TranslateDigitStripType(m_StripType[i]))
345 << " identifier " << CgemID::getIntID(TranslateDigitLayerID(m_LayerID[i]),
346 TranslateDigitSheetID(m_SheetID[i]),
347 TranslateDigitStripType(m_StripType[i]),
348 TranslateDigitStripID(m_StripID[i],TranslateDigitStripType(m_StripType[i]))) << endl;;
349 **/
350
351 int layerid = CgemID::layer(ident);
352 int stripid = CgemID::strip(ident);
353 int sheetid = CgemID::sheet(ident);
354 bool is_xstrip = CgemID::is_xstrip(ident);
355
356 if(printFlag)
357 {
358 cout
359 << " digiID=" << ident.get_value()
360 << " layerID=" << CgemID::layer(ident)
361 << " sheetID=" << CgemID::sheet(ident)
362 << " isXstrip="<< CgemID::is_xstrip(ident)
363 << " stripID=" << CgemID::strip(ident)
364 << " time channel=" << time_channel
365 << " charge channel=" << charge_channel << endl;
366 }
367
368 CgemDigi* aCgemDigi = new CgemDigi(ident, time_channel, charge_channel);
369 aCgemDigi->setTime_ns(m_time[i]);
370 aCgemDigi->setCharge_fc(m_charge[i]);
371 aCgemDigiCol->push_back(aCgemDigi);
372
373 } // End of 'for(int i=0;i<nDigi;i++)'
374 } // End of 'if (nDigi > 0)'
375
376 // register CGEM digits collection to TDS
377 StatusCode scCgem = m_evtSvc->registerObject("/Event/Digi/CgemDigiCol", aCgemDigiCol);
378 if(scCgem!=StatusCode::SUCCESS)
379 {
380 cout << "ERROR : ReadCosmicRayData::SaveCgemDigits(), Could not register CGEM digi collection! " << endl;
381 }
382
383 //retrieve CGEM digits from TDS
384 /**
385 SmartDataPtr<CgemDigiCol> aDigiCol(m_evtSvc,"/Event/Digi/CgemDigiCol");
386 if(!aDigiCol)
387 cout<<"Could not retrieve CGEM digi collection"<<endl;
388
389 CgemDigiCol::iterator iDigiCol;
390 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++)
391 {
392 const Identifier ident = (*iDigiCol)->identify();
393 cout<<" layer: "<<CgemID::layer(ident)
394 <<" sheet: "<<CgemID::sheet(ident)
395 <<" strip: "<<CgemID::strip(ident)
396 <<" charge: "<<(*iDigiCol)->getCharge_fc()
397 <<" time: "<<(*iDigiCol)->getTime_ns()<<endl;
398 }
399 cout<<"end of retrieve CGEM digi collection"<<endl;
400 **/
401}
402
403
404
405void ReadCosmicRayData::SaveCgemClusters()
406{
407
408 bool printFlag=false;
409 //cout<<"Start to save CgemCluster"<<endl;
410
411 // cgem digis collection defined in BOSS
412 RecCgemClusterCol* aRecCgemClusterCol = new RecCgemClusterCol;
413
414 int nCluster = m_nGemCluster; // the number of Clusters in one event
415 if (nCluster > 0)
416 {
417 // push back cgem clusters to RecCgemClusterCol in BOSS
418 for(int i=0;i<nCluster;i++)
419 {
420 RecCgemCluster* aRecCgemCluster = new RecCgemCluster();
421
422 aRecCgemCluster->setclusterid(i);
423 aRecCgemCluster->setlayerid(TranslateClusterLayerID(m_ClusterLayerID[i]));
424 aRecCgemCluster->setsheetid(ClusterSheetID);
425 aRecCgemCluster->setflag(TranslateClusterFlag(m_Flag[i]));
426 aRecCgemCluster->setenergydeposit(m_EnergyDeposit[i]);
427 if(TranslateClusterFlag(m_Flag[i])==0)
428 {
429 aRecCgemCluster->setrecphi(m_Cluster_x[i]);
430 aRecCgemCluster->setrecphi_CC(m_Cluster_x_cc[i]);
431 aRecCgemCluster->setrecphi_mTPC(m_Cluster_x_tpc[i]);
432 }
433 if(TranslateClusterFlag(m_Flag[i])==1)
434 {
435 aRecCgemCluster->setrecv(m_Cluster_x[i]);
436 aRecCgemCluster->setrecv_CC(m_Cluster_x_cc[i]);
437 aRecCgemCluster->setrecv_mTPC(m_Cluster_x_tpc[i]);
438 }
439 aRecCgemCluster->setRecZ(ClusterRecZ); //currently, no Z information is available
440 aRecCgemCluster->setRecZ_CC(ClusterRecZ);
441 aRecCgemCluster->setRecZ_mTPC(ClusterRecZ);
442 //aRecCgemCluster->setRecZ(m_Cluster_z[i]);
443 //aRecCgemCluster->setRecZ_CC(m_Cluster_z_cc[i]);
444 //aRecCgemCluster->setRecZ_mTPC(m_Cluster_z_tpc[i]);
445 aRecCgemCluster->setclusterflag(m_ClusterHitIndex[i][0],m_ClusterHitIndex[i][m_ClusternHit[i]-1]);
446
447 if(printFlag)
448 {
449 cout
450 << " clusterID=" << aRecCgemCluster->getclusterid()
451 << " clusterlayerID=" << aRecCgemCluster->getlayerid()
452 << " clustersheetID=" << aRecCgemCluster->getsheetid()
453 << " flag=" << aRecCgemCluster->getflag()
454 << " energydeposit=" << aRecCgemCluster->getenergydeposit()
455 << " recphi=" << aRecCgemCluster->getrecphi()
456 << " recv=" << aRecCgemCluster->getrecv()
457 << " recZ=" << aRecCgemCluster->getRecZ()
458 << " clusterflagb=" << aRecCgemCluster->getclusterflagb()
459 << " clusterflage=" << aRecCgemCluster->getclusterflage()<< endl;
460 }
461
462 aRecCgemClusterCol->push_back(aRecCgemCluster);
463
464 }
465 }
466
467
468 // register CGEM clusters collection to TDS
469 StatusCode scCgem = m_evtSvc->registerObject("/Event/Recon/RecCgemClusterCol", aRecCgemClusterCol); //Where should I put the vector?
470 if(scCgem!=StatusCode::SUCCESS)
471 {
472 cout << "ERROR : ReadCosmicRayData:::SaveCgemClusters(), Could not register CGEM cluster collection! " << endl;
473 }
474
475}
476
477
478StatusCode ReadCosmicRayData::execute(){
479
480 MsgStream log(msgSvc(), name());
481 if(ReadDigi&&!ReadCluster) log << MSG::INFO << "ReadCosmicRayData execute(): "<<Ind_Entry_D+1<<"/"<<No_Entries_D<<" events are finished !" << endreq;
482 if(!ReadDigi&&ReadCluster) log << MSG::INFO << "ReadCosmicRayData execute(): "<<Ind_Entry_C+1<<"/"<<No_Entries_C<<" events are finished !" << endreq;
483 if(ReadDigi&&ReadCluster) log << MSG::INFO << "ReadCosmicRayData execute(): "<<Ind_Entry_C+1<<"/"<<No_Entries_C<<" events are finished !" << endreq;
484
485 //interface to event data service
486 ISvcLocator* svcLocator = Gaudi::svcLocator();
487 StatusCode sc=svcLocator->service("EventDataSvc", m_evtSvc);
488 if (sc.isFailure())
489 cout<<"Could not accesss EventDataSvc!"<<endl;
490
491 // set /Event/EventHeader
492 SmartDataPtr<Event::EventHeader> eventHeader(m_evtSvc,"/Event/EventHeader");
493 if (!eventHeader) {
494 Event::EventHeader *eventHeader = new Event::EventHeader;
495 StatusCode sc = m_evtSvc->registerObject("/Event/EventHeader",eventHeader);
496 }
497 eventHeader->setEventNumber(Ind_Entry_D);
498 eventHeader->setRunNumber( m_runNo);
499
500
501 if(ReadDigi)
502 {
503 DigiEvent* aDigiEvent = new DigiEvent;
504 sc = m_evtSvc->registerObject("/Event/Digi",aDigiEvent);
505 if(sc!=StatusCode::SUCCESS) {
506 cout<< "Could not register DigiEvent" <<endl;
507 }
508
509 ReadCgemDigits();
510 SaveCgemDigits();
511 //cout<<"Ind_Entry_D "<<Ind_Entry_D<<", Max_Ind_Entry_D "<<No_Entries_D<<endl;
512
513 if(Ind_Entry_D==No_Entries_D)
514 {
515 log << MSG::INFO << "scheduling a event processing stop...." << endreq;
516 SmartIF<IEventProcessor> ep(serviceLocator());
517 if (ep) ep->stopRun();
518 }
519
520 }
521 if(ReadCluster)
522 {
523 ReconEvent* aReconEvent = new ReconEvent;
524 sc = m_evtSvc->registerObject("/Event/Recon",aReconEvent);
525 if(sc!=StatusCode::SUCCESS) {
526 cout<< "Could not register ReconEvent" <<endl;
527 }
528
529 ReadCgemClusters();
530 SaveCgemClusters();
531 //cout<<"Ind_Entry_C "<<Ind_Entry_C<<", Max_Ind_Entry_C "<<No_Entries_C<<endl;
532 if(Ind_Entry_C==No_Entries_C)
533 {
534 log << MSG::INFO << "scheduling a event processing stop...." << endreq;
535 SmartIF<IEventProcessor> ep(serviceLocator());
536 if (ep) ep->stopRun();
537 }
538 }
539 return StatusCode::SUCCESS;
540}
541
542StatusCode ReadCosmicRayData::finalize(){
543 MsgStream log(msgSvc(),name());
544 log << MSG::INFO << "ReadCosmicRayData finalize()" << endreq;
545
546 return StatusCode::SUCCESS;
547}
548
549
550
ObjectVector< RecCgemCluster > RecCgemClusterCol
static int strip(const Identifier &id)
static int sheet(const Identifier &id)
static value_type getXSTRIP_MAX(unsigned int f_layer)
static int layer(const Identifier &id)
static value_type getVSTRIP_MAX(unsigned int f_layer)
static bool is_xstrip(const Identifier &id)
static Identifier strip_id(int f_layer, int f_sheet, int f_strip_type, int f_strip)
ReadCosmicRayData(const std::string &name, ISvcLocator *pSvcLocator)