@@ -59,7 +59,10 @@ void FRA_handler_ctrlc(int)
59
59
// _____________________________________________________________________________
60
60
FairRunAna* FairRunAna::fgRinstance = nullptr ;
61
61
// _____________________________________________________________________________
62
- FairRunAna* FairRunAna::Instance () { return fgRinstance; }
62
+ FairRunAna* FairRunAna::Instance ()
63
+ {
64
+ return fgRinstance;
65
+ }
63
66
// _____________________________________________________________________________
64
67
FairRunAna::FairRunAna ()
65
68
: FairRun()
@@ -273,7 +276,7 @@ void FairRunAna::Init()
273
276
// _____________________________________________________________________________
274
277
275
278
// _____________________________________________________________________________
276
- void FairRunAna::Run (Int_t Ev_start, Int_t Ev_end )
279
+ void FairRunAna::Run (FairRoot::EntryID NEntry, int NStop )
277
280
{
278
281
gFRAIsInterrupted = kFALSE ;
279
282
@@ -282,35 +285,35 @@ void FairRunAna::Run(Int_t Ev_start, Int_t Ev_end)
282
285
} else {
283
286
// if (fInputFile==0) {
284
287
if (!fInFileIsOpen ) {
285
- DummyRun (Ev_start, Ev_end );
288
+ DummyRun (NEntry, NStop );
286
289
return ;
287
290
}
288
291
289
- Int_t MaxAllowed = fRootManager ->CheckMaxEventNo (Ev_end );
290
- if (MaxAllowed != - 1 ) {
291
- if (Ev_end == 0 ) {
292
- if (Ev_start == 0 ) {
293
- Ev_end = MaxAllowed;
292
+ FairRoot::EntryID MaxAllowed = fRootManager ->CheckMaxEventNo (NStop );
293
+ if (MaxAllowed != FairRoot::EntryID::None ) {
294
+ if (NStop == 0 ) {
295
+ if (NEntry == 0 ) {
296
+ NStop = MaxAllowed;
294
297
} else {
295
- Ev_end = Ev_start ;
296
- if (Ev_end > MaxAllowed) {
297
- Ev_end = MaxAllowed;
298
+ NStop = NEntry ;
299
+ if (NStop > MaxAllowed) {
300
+ NStop = MaxAllowed;
298
301
}
299
- Ev_start = 0 ;
302
+ NEntry = 0 ;
300
303
}
301
304
} else {
302
- if (Ev_end > MaxAllowed) {
305
+ if (NStop > MaxAllowed) {
303
306
cout << " -------------------Warning---------------------------" << endl;
304
- cout << " -W FairRunAna : File has less events than requested!!" << endl;
305
- cout << " File contains : " << MaxAllowed << " Events " << endl;
306
- cout << " Requested number of events = " << Ev_end << " Events " << endl;
307
- cout << " The number of events is set to " << MaxAllowed << " Events " << endl;
307
+ cout << " -W FairRunAna : File has less entries than requested!!" << endl;
308
+ cout << " File contains : " << MaxAllowed << " entries " << endl;
309
+ cout << " Requested number of entries = " << NStop << " entries " << endl;
310
+ cout << " The number of entries is set to " << MaxAllowed << " entries " << endl;
308
311
cout << " -----------------------------------------------------" << endl;
309
- Ev_end = MaxAllowed;
312
+ NStop = MaxAllowed;
310
313
}
311
314
}
312
- LOG (info) << " FairRunAna::Run() After checking, the run will run from event " << Ev_start << " to "
313
- << Ev_end << " ." ;
315
+ LOG (info) << " FairRunAna::Run() After checking, the run will run from entry " << NEntry << " to " << NStop
316
+ << " ." ;
314
317
} else {
315
318
LOG (info) << " FairRunAna::Run() continue running without stop" ;
316
319
}
@@ -321,7 +324,7 @@ void FairRunAna::Run(Int_t Ev_start, Int_t Ev_end)
321
324
322
325
Int_t readEventReturn = 0 ;
323
326
324
- for (int i = Ev_start ; i < Ev_end || MaxAllowed == -1 ; i++) {
327
+ for (FairRoot::EntryID i = NEntry ; i < NStop || MaxAllowed == -1 ; i++) {
325
328
326
329
gSystem ->IgnoreInterrupt ();
327
330
// gFRAIsInterrupted = kFALSE;
@@ -377,34 +380,34 @@ void FairRunAna::Run(Int_t Ev_start, Int_t Ev_end)
377
380
// _____________________________________________________________________________
378
381
379
382
// _____________________________________________________________________________
380
- void FairRunAna::RunEventReco (Int_t Ev_start , Int_t Ev_end )
383
+ void FairRunAna::RunEventReco (FairRoot::EntryID NEntry , Int_t NStop )
381
384
{
382
385
UInt_t tmpId = 0 ;
383
386
384
- Int_t MaxAllowed = fRootManager ->CheckMaxEventNo (Ev_end );
385
- if (MaxAllowed != - 1 ) {
386
- if (Ev_end == 0 ) {
387
- if (Ev_start == 0 ) {
388
- Ev_end = MaxAllowed;
387
+ Int_t MaxAllowed = fRootManager ->CheckMaxEventNo (NStop );
388
+ if (MaxAllowed != FairRoot::EntryID::None ) {
389
+ if (NStop == 0 ) {
390
+ if (NEntry == 0 ) {
391
+ NStop = MaxAllowed;
389
392
} else {
390
- Ev_end = Ev_start ;
391
- if (Ev_end > MaxAllowed) {
392
- Ev_end = MaxAllowed;
393
+ NStop = NEntry ;
394
+ if (NStop > MaxAllowed) {
395
+ NStop = MaxAllowed;
393
396
}
394
- Ev_start = 0 ;
397
+ NEntry = 0 ;
395
398
}
396
399
} else {
397
- if (Ev_end > MaxAllowed) {
400
+ if (NStop > MaxAllowed) {
398
401
cout << " -------------------Warning---------------------------" << endl;
399
- cout << " -W FairRunAna : File has less events than requested!!" << endl;
400
- cout << " File contains : " << MaxAllowed << " Events " << endl;
401
- cout << " Requested number of events = " << Ev_end << " Events " << endl;
402
- cout << " The number of events is set to " << MaxAllowed << " Events " << endl;
402
+ cout << " -W FairRunAna : File has less entries than requested!!" << endl;
403
+ cout << " File contains : " << MaxAllowed << " entries " << endl;
404
+ cout << " Requested number of entries = " << NStop << " entries " << endl;
405
+ cout << " The number of entries is set to " << MaxAllowed << " entries " << endl;
403
406
cout << " -----------------------------------------------------" << endl;
404
- Ev_end = MaxAllowed;
407
+ NStop = MaxAllowed;
405
408
}
406
409
}
407
- LOG (info) << " FairRunAna::Run() After checking, the run will run from event " << Ev_start << " to " << Ev_end
410
+ LOG (info) << " FairRunAna::Run() After checking, the run will run from entry " << NEntry << " to " << NStop
408
411
<< " ." ;
409
412
} else {
410
413
LOG (info) << " FairRunAna::Run() continue running without stop" ;
@@ -414,7 +417,7 @@ void FairRunAna::RunEventReco(Int_t Ev_start, Int_t Ev_end)
414
417
fRunInfo .Reset ();
415
418
}
416
419
417
- for (int i = Ev_start ; i < Ev_end ; i++) {
420
+ for (FairRoot::EntryID i = NEntry ; i < NStop ; i++) {
418
421
fRootManager ->ReadEvent (i);
419
422
/* *
420
423
* if we have simulation files then they have MC Event Header and the Run Id is in it, any way it
@@ -475,11 +478,11 @@ void FairRunAna::Run(Double_t delta_t)
475
478
// _____________________________________________________________________________
476
479
477
480
// _____________________________________________________________________________
478
- void FairRunAna::RunMQ (Long64_t entry)
481
+ void FairRunAna::RunMQ (FairRoot::EntryID entry)
479
482
{
480
483
/* *
481
484
This methode is only needed and used with ZeroMQ
482
- it read a certain event and call the task exec, but no output is written
485
+ it read a certain entry and call the task exec, but no output is written
483
486
*/
484
487
fRootManager ->ReadEvent (entry);
485
488
auto const tmpId = GetEvtHeaderRunId ();
@@ -497,7 +500,7 @@ void FairRunAna::RunMQ(Long64_t entry)
497
500
// _____________________________________________________________________________
498
501
499
502
// _____________________________________________________________________________
500
- void FairRunAna::Run (Long64_t entry)
503
+ void FairRunAna::RunSingle (FairRoot::EntryID entry)
501
504
{
502
505
fRootManager ->ReadEvent (entry);
503
506
auto const tmpId = GetEvtHeaderRunId ();
@@ -547,7 +550,7 @@ void FairRunAna::RunTSBuffers()
547
550
// _____________________________________________________________________________
548
551
// _____________________________________________________________________________
549
552
550
- void FairRunAna::RunOnLmdFiles (UInt_t NStart, UInt_t NStop)
553
+ void FairRunAna::RunOnLmdFiles (FairRoot::EntryID NStart, FairRoot::EntryID NStop)
551
554
{
552
555
if (NStart == 0 && NStop == 0 ) {
553
556
NStart = 0 ;
@@ -582,10 +585,10 @@ void FairRunAna::RunOnTBData()
582
585
fRootManager ->Write ();
583
586
}
584
587
// _____________________________________________________________________________
585
- void FairRunAna::DummyRun (Int_t Ev_start, Int_t Ev_end )
588
+ void FairRunAna::DummyRun (FairRoot::EntryID NStart, FairRoot::EntryID NStop )
586
589
{
587
590
/* * This methode is just for testing, if you are not sure about what you do, don't use it */
588
- for (int i = Ev_start ; i < Ev_end ; i++) {
591
+ for (FairRoot::EntryID i = NStart ; i < NStop ; i++) {
589
592
fTask ->ExecuteTask (" " );
590
593
FillEventHeader ();
591
594
Fill ();
0 commit comments