@@ -59,7 +59,10 @@ void FRA_handler_ctrlc(int)
5959// _____________________________________________________________________________
6060FairRunAna* FairRunAna::fgRinstance = nullptr ;
6161// _____________________________________________________________________________
62- FairRunAna* FairRunAna::Instance () { return fgRinstance; }
62+ FairRunAna* FairRunAna::Instance ()
63+ {
64+ return fgRinstance;
65+ }
6366// _____________________________________________________________________________
6467FairRunAna::FairRunAna ()
6568 : FairRun()
@@ -273,7 +276,7 @@ void FairRunAna::Init()
273276// _____________________________________________________________________________
274277
275278// _____________________________________________________________________________
276- void FairRunAna::Run (Int_t Ev_start, Int_t Ev_end )
279+ void FairRunAna::Run (FairRoot::EntryID NEntry, int NStop )
277280{
278281 gFRAIsInterrupted = kFALSE ;
279282
@@ -282,35 +285,35 @@ void FairRunAna::Run(Int_t Ev_start, Int_t Ev_end)
282285 } else {
283286 // if (fInputFile==0) {
284287 if (!fInFileIsOpen ) {
285- DummyRun (Ev_start, Ev_end );
288+ DummyRun (NEntry, NStop );
286289 return ;
287290 }
288291
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;
294297 } 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;
298301 }
299- Ev_start = 0 ;
302+ NEntry = 0 ;
300303 }
301304 } else {
302- if (Ev_end > MaxAllowed) {
305+ if (NStop > MaxAllowed) {
303306 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;
308311 cout << " -----------------------------------------------------" << endl;
309- Ev_end = MaxAllowed;
312+ NStop = MaxAllowed;
310313 }
311314 }
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+ << " ." ;
314317 } else {
315318 LOG (info) << " FairRunAna::Run() continue running without stop" ;
316319 }
@@ -321,7 +324,7 @@ void FairRunAna::Run(Int_t Ev_start, Int_t Ev_end)
321324
322325 Int_t readEventReturn = 0 ;
323326
324- for (int i = Ev_start ; i < Ev_end || MaxAllowed == -1 ; i++) {
327+ for (FairRoot::EntryID i = NEntry ; i < NStop || MaxAllowed == -1 ; i++) {
325328
326329 gSystem ->IgnoreInterrupt ();
327330 // gFRAIsInterrupted = kFALSE;
@@ -377,34 +380,34 @@ void FairRunAna::Run(Int_t Ev_start, Int_t Ev_end)
377380// _____________________________________________________________________________
378381
379382// _____________________________________________________________________________
380- void FairRunAna::RunEventReco (Int_t Ev_start , Int_t Ev_end )
383+ void FairRunAna::RunEventReco (FairRoot::EntryID NEntry , Int_t NStop )
381384{
382385 UInt_t tmpId = 0 ;
383386
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;
389392 } 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;
393396 }
394- Ev_start = 0 ;
397+ NEntry = 0 ;
395398 }
396399 } else {
397- if (Ev_end > MaxAllowed) {
400+ if (NStop > MaxAllowed) {
398401 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;
403406 cout << " -----------------------------------------------------" << endl;
404- Ev_end = MaxAllowed;
407+ NStop = MaxAllowed;
405408 }
406409 }
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
408411 << " ." ;
409412 } else {
410413 LOG (info) << " FairRunAna::Run() continue running without stop" ;
@@ -414,7 +417,7 @@ void FairRunAna::RunEventReco(Int_t Ev_start, Int_t Ev_end)
414417 fRunInfo .Reset ();
415418 }
416419
417- for (int i = Ev_start ; i < Ev_end ; i++) {
420+ for (FairRoot::EntryID i = NEntry ; i < NStop ; i++) {
418421 fRootManager ->ReadEvent (i);
419422 /* *
420423 * 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)
475478// _____________________________________________________________________________
476479
477480// _____________________________________________________________________________
478- void FairRunAna::RunMQ (Long64_t entry)
481+ void FairRunAna::RunMQ (FairRoot::EntryID entry)
479482{
480483 /* *
481484 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
483486 */
484487 fRootManager ->ReadEvent (entry);
485488 auto const tmpId = GetEvtHeaderRunId ();
@@ -497,7 +500,7 @@ void FairRunAna::RunMQ(Long64_t entry)
497500// _____________________________________________________________________________
498501
499502// _____________________________________________________________________________
500- void FairRunAna::Run (Long64_t entry)
503+ void FairRunAna::RunSingle (FairRoot::EntryID entry)
501504{
502505 fRootManager ->ReadEvent (entry);
503506 auto const tmpId = GetEvtHeaderRunId ();
@@ -547,7 +550,7 @@ void FairRunAna::RunTSBuffers()
547550// _____________________________________________________________________________
548551// _____________________________________________________________________________
549552
550- void FairRunAna::RunOnLmdFiles (UInt_t NStart, UInt_t NStop)
553+ void FairRunAna::RunOnLmdFiles (FairRoot::EntryID NStart, FairRoot::EntryID NStop)
551554{
552555 if (NStart == 0 && NStop == 0 ) {
553556 NStart = 0 ;
@@ -582,10 +585,10 @@ void FairRunAna::RunOnTBData()
582585 fRootManager ->Write ();
583586}
584587// _____________________________________________________________________________
585- void FairRunAna::DummyRun (Int_t Ev_start, Int_t Ev_end )
588+ void FairRunAna::DummyRun (FairRoot::EntryID NStart, FairRoot::EntryID NStop )
586589{
587590 /* * 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++) {
589592 fTask ->ExecuteTask (" " );
590593 FillEventHeader ();
591594 Fill ();
0 commit comments