1 ////////////////////////////////////////////////////////////////////////////////
3 // Author: Artur Szostak
4 // Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
6 ////////////////////////////////////////////////////////////////////////////////
8 #include "AliRoot/TriggerSource.hpp"
9 #include "AliRoot/Base.hpp"
10 #include "Tracking/Calculations.hpp"
12 #include "AliRunLoader.h"
13 #include "AliModule.h"
15 #include "AliMUONConstants.h"
16 #include "AliMUONHit.h"
17 #include "AliMUONLocalTrigger.h"
18 #include "AliMUONTriggerCircuit.h"
19 #include "AliMUONDataInterface.h"
20 #include "TDatabasePDG.h"
27 ClassImp(AliMUONHLT::TriggerSource);
28 ClassImp(AliMUONHLT::TriggerSource::EventData);
33 TriggerSource::TriggerSource()
34 : TObject(), fEventList(TriggerSource::EventData::Class())
36 fAreaToUse = FromWholePlane;
37 fDataToUse = FromLocalTriggers;
38 fMaxBlockSize = 0xFFFFFFFF;
39 fUseLookupTable = kTRUE;
43 fHadToLoadgAlice = kFALSE;
47 TriggerSource::TriggerSource(AliMUONDataInterface* data)
48 : TObject(), fEventList(TriggerSource::EventData::Class())
50 fAreaToUse = FromWholePlane;
51 fDataToUse = FromLocalTriggers;
52 fMaxBlockSize = 0xFFFFFFFF;
53 fUseLookupTable = kTRUE;
57 fHadToLoadgAlice = kFALSE;
62 TriggerSource::~TriggerSource()
64 fEventList.Clear("C");
68 void TriggerSource::FillFrom(AliMUONDataInterface* data)
70 DebugMsg(1, "FillFrom(AliMUONDataInterface*)");
72 if (FileAndFolderOk(data))
74 AliMUON* module = NULL;
75 if ( not FetchAliMUON(module) ) return;
77 for (Int_t i = 0; i < data->NumberOfEvents(); i++)
79 AddEventFrom(data, module, i);
82 FinishedWithAliMUON();
87 void TriggerSource::FillFrom(AliMUONDataInterface* data, const Int_t event)
89 DebugMsg(1, "FillFrom(AliMUONDataInterface*, Int_t)");
91 if (FileAndFolderOk(data))
93 AliMUON* module = NULL;
94 if ( not FetchAliMUON(module) ) return;
95 AddEventFrom(data, module, event);
96 FinishedWithAliMUON();
101 void TriggerSource::FillFrom(
102 AliMUONDataInterface* data,
103 const Int_t event, const Int_t trigger, const Bool_t newblock
106 DebugMsg(1, "FillFrom(AliMUONDataInterface*, Int_t, Int_t, Bool_t)");
108 if (FileAndFolderOk(data))
110 data->GetEvent(event);
111 AliMUON* module = NULL;
112 if ( not FetchAliMUON(module) ) return;
114 // Check if the current event corresponds to the event number we are
115 // attempting to add to. If they do not or no event is selected then
116 // try find the event or create a new one.
117 if ( fCurrentEvent == NULL )
119 Bool_t found = GetEvent(event);
120 if (not found) AddEvent(event);
124 if (fCurrentEvent->fEventNumber != event)
126 Bool_t found = GetEvent(event);
127 if (not found) AddEvent(event);
131 if ( fCurrentBlock != NULL )
133 Assert( fCurrentEvent != NULL );
134 // If the newblock flag is set then force a new block.
135 if (newblock) AddBlock();
138 AddBlock(); // No block selected so we need to create a new block.
140 AddTriggerFrom(data, module, trigger);
141 FinishedWithAliMUON();
146 void TriggerSource::Clear()
151 fEventList.Clear("C");
155 Bool_t TriggerSource::GetEvent(const Int_t eventnumber) const
157 DebugMsg(1, "TriggerSource::GetEvent(" << eventnumber << ")" );
159 // Try find the corresponding event in the list of events.
160 for (Int_t i = 0; i < fEventList.GetEntriesFast(); i++)
162 EventData* current = (EventData*) fEventList[i];
163 if (current->fEventNumber == eventnumber)
166 fCurrentEvent = current;
168 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
169 << " , fTriggerIndex = " << fTriggerIndex
178 Bool_t TriggerSource::GetFirstEvent() const
180 DebugMsg(1, "TriggerSource::GetFirstEvent()");
181 if (fEventList.GetEntriesFast() > 0)
184 fCurrentEvent = (EventData*) fEventList[0];
186 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
187 << " , fTriggerIndex = " << fTriggerIndex
193 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
194 << " , fTriggerIndex = " << fTriggerIndex
201 Bool_t TriggerSource::MoreEvents() const
203 return 0 <= fEventIndex and fEventIndex < fEventList.GetEntriesFast();
207 Bool_t TriggerSource::GetNextEvent() const
209 DebugMsg(1, "TriggerSource::GetNextEvent()");
210 if (fEventIndex < fEventList.GetEntriesFast() - 1)
212 fCurrentEvent = (EventData*) fEventList[ ++fEventIndex ];
214 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
215 << " , fTriggerIndex = " << fTriggerIndex
227 Int_t TriggerSource::CurrentEvent() const
229 if (fCurrentEvent != NULL)
230 return fCurrentEvent->fEventNumber;
236 Int_t TriggerSource::NumberOfBlocks() const
238 DebugMsg(1, "TriggerSource::NumberOfBlocks()");
239 if (fCurrentEvent == NULL)
241 Error("NumberOfBlocks", "No event selected.");
245 return fCurrentEvent->fBlocks.GetEntriesFast();
249 Bool_t TriggerSource::GetBlock(const Int_t index) const
251 DebugMsg(1, "TriggerSource::GetBlock(" << index << ")");
253 // Note NumberOfBlocks() also checks if the event was selected.
254 Int_t numberofblocks = NumberOfBlocks();
255 if (numberofblocks < 0) return kFALSE;
257 if ( 0 <= index and index < numberofblocks )
260 fCurrentBlock = (TClonesArray*) fCurrentEvent->fBlocks[index];
262 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
263 << " , fTriggerIndex = " << fTriggerIndex
269 // The index is out of bounds so inform the user.
270 if (numberofblocks > 0)
272 "The block index (%d) is out of bounds. Valid range is [0, %d]",
273 index, numberofblocks - 1
277 "The block index (%d) is out of bounds. No blocks found.",
285 Bool_t TriggerSource::GetFirstBlock() const
287 DebugMsg(1, "TriggerSource::GetFirstBlock()");
288 // Note: NumberOfBlocks() also checks if fCurrentEvent != NULL.
289 if (NumberOfBlocks() > 0)
292 fCurrentBlock = (TClonesArray*) fCurrentEvent->fBlocks[fBlockIndex];
294 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
295 << " , fTriggerIndex = " << fTriggerIndex
304 Bool_t TriggerSource::MoreBlocks() const
306 return 0 <= fBlockIndex and fBlockIndex < NumberOfBlocks();
310 Bool_t TriggerSource::GetNextBlock() const
312 DebugMsg(1, "TriggerSource::GetNextBlock()");
314 // Note: NumberOfBlocks() checks if fCurrentEvent != NULL. If it is then it returns -1
315 // and since fBlockIndex is always >= -1 the if statement must go to the else part.
316 if (fBlockIndex < NumberOfBlocks() - 1)
318 fCurrentBlock = (TClonesArray*) fCurrentEvent->fBlocks[ ++fBlockIndex ];
320 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
321 << " , fTriggerIndex = " << fTriggerIndex
327 ResetBlockPointers();
333 Int_t TriggerSource::NumberOfTriggers() const
335 DebugMsg(1, "TriggerSource::NumberOfTriggers()");
336 if (fCurrentBlock == NULL)
338 Error("NumberOfTriggers", "No block selected.");
342 return fCurrentBlock->GetEntriesFast();
346 const TriggerRecord* TriggerSource::GetTrigger(const Int_t triggernumber) const
348 DebugMsg(1, "TriggerSource::GetTrigger(" << triggernumber << ")");
350 if (fCurrentBlock == NULL)
352 Error("GetTrigger", "No block selected.");
356 // Try find the corresponding trigger record in the list of events.
357 for (Int_t i = 0; i < fCurrentBlock->GetEntriesFast(); i++)
359 TriggerRecord* current = (TriggerRecord*) fCurrentBlock->At(i);
360 if (current->TriggerNumber() == triggernumber)
363 fCurrentTrigger = current;
364 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
365 << " , fTriggerIndex = " << fTriggerIndex
374 const TriggerRecord* TriggerSource::GetFirstTrigger() const
376 DebugMsg(1, "TriggerSource::GetFirstTrigger()");
377 // Note: NumberOfTriggers() also checks if fCurrentBlock != NULL.
378 if (NumberOfTriggers() > 0)
381 fCurrentTrigger = (TriggerRecord*) fCurrentBlock->At(0);
382 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
383 << " , fTriggerIndex = " << fTriggerIndex
385 return fCurrentTrigger;
392 Bool_t TriggerSource::MoreTriggers() const
394 return 0 <= fTriggerIndex and fTriggerIndex < NumberOfTriggers();
398 const TriggerRecord* TriggerSource::GetNextTrigger() const
400 DebugMsg(1, "TriggerSource::GetNextTrigger()");
402 // Note: NumberOfTriggers() checks if fCurrentBlock != NULL. If it is then it returns -1
403 // and since fTriggerIndex is always >= -1 the if statement must go to the else part.
404 if (fTriggerIndex < NumberOfTriggers() - 1)
406 fCurrentTrigger = (TriggerRecord*) fCurrentBlock->At( ++fTriggerIndex );
407 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
408 << " , fTriggerIndex = " << fTriggerIndex
410 return fCurrentTrigger;
414 ResetTriggerPointers();
420 Int_t TriggerSource::CurrentTrigger() const
422 if (fCurrentTrigger != NULL)
424 return fCurrentTrigger->TriggerNumber();
428 Error("CurrentTrigger", "No trigger record selected.");
434 void TriggerSource::AddEvent(const Int_t eventnumber)
436 DebugMsg(1, "TriggerSource::AddEvent(" << eventnumber << ")");
437 Assert( eventnumber >= 0 );
439 // Assume the eventnumber does not already exist in the event list.
440 fEventIndex = fEventList.GetEntriesFast();
441 new ( fEventList[fEventIndex] ) EventData(eventnumber);
442 fCurrentEvent = (EventData*) fEventList[fEventIndex];
444 // Remember to reset the other pointers because the new event is empty.
445 ResetBlockPointers();
447 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
448 << " , fTriggerIndex = " << fTriggerIndex
453 void TriggerSource::AddBlock()
455 DebugMsg(1, "TriggerSource::AddBlock()");
457 if (fCurrentEvent == NULL)
459 Error("AddBlock", "No event selected.");
463 fBlockIndex = fCurrentEvent->fBlocks.GetEntriesFast();
464 new ( fCurrentEvent->fBlocks[fBlockIndex] ) TClonesArray(TriggerRecord::Class());
465 fCurrentBlock = (TClonesArray*) fCurrentEvent->fBlocks[fBlockIndex];
467 // Remember to reset the trigger pointer because the new block is empty.
468 ResetTriggerPointers();
470 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
471 << " , fTriggerIndex = " << fTriggerIndex
476 void TriggerSource::AddTrigger(const TriggerRecord& data)
478 DebugMsg(1, "TriggerSource::AddTrigger(" << (void*)&data << ")");
480 if (fCurrentBlock == NULL)
482 Error("AddTrigger", "No block selected.");
486 fTriggerIndex = fCurrentBlock->GetEntriesFast();
487 new ( (*fCurrentBlock)[fTriggerIndex] ) TriggerRecord(data);
488 fCurrentTrigger = (TriggerRecord*) (*fCurrentBlock)[fTriggerIndex];
490 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
491 << " , fTriggerIndex = " << fTriggerIndex
496 Bool_t TriggerSource::FileAndFolderOk(AliMUONDataInterface* data)
500 // Nothing filled yet so set the file and folder names.
501 fFilename = data->CurrentFile();
502 fFoldername = data->CurrentFolder();
506 if ( fFilename != data->CurrentFile() )
508 Error( "FileAndFolderOk",
509 "The Trigger source already contains data from file '%s', cannot add data from file '%s'",
510 fFilename.Data(), data->CurrentFile().Data()
515 if ( fFoldername != data->CurrentFolder() )
517 Error( "FileAndFolderOk",
518 "The Trigger source already contains data from folder '%s', cannot add data from folder '%s'",
519 fFoldername.Data(), data->CurrentFolder().Data()
528 void TriggerSource::AddEventFrom(AliMUONDataInterface* data, AliMUON* module, const Int_t event)
530 if ( data->GetEvent(event) )
535 UInt_t currentblocksize = 0;
536 TriggerRecord trigdata;
541 for (Int_t track = 0; track < data->NumberOfTracks(); track++)
543 if ( not FillTriggerFromHits(data, track, trigdata) )
544 continue; // Continue if unable to find hits.
546 if (InFillRegion(trigdata))
548 AddTrigger(trigdata);
550 // Create a new block if we reached the maximum block size.
551 if ( ++currentblocksize == fMaxBlockSize )
554 currentblocksize = 0;
560 case FromLocalTriggers:
561 Assert( module != NULL );
562 DebugMsg(4, "Taking FromLocalTriggers branch...");
563 for (Int_t i = 0; i < data->NumberOfLocalTriggers(); i++)
565 DebugMsg(4, "for loop: i = " << i);
566 AliMUONLocalTrigger* lt = data->LocalTrigger(i);
567 FillTriggerFromLocalTrigger(lt, module, trigdata);
568 trigdata.TriggerNumber(i);
570 if (InFillRegion(trigdata))
572 AddTrigger(trigdata);
574 // Create a new block if we reached the maximum block size.
575 if ( ++currentblocksize == fMaxBlockSize )
578 currentblocksize = 0;
585 Error("AddChamberFrom", "fDataToUse is not set to a valid value.");
587 }; // Loop on events.
591 void TriggerSource::AddTriggerFrom(AliMUONDataInterface* data, AliMUON* module, const Int_t trigger)
593 DebugMsg(1, "Entering AddTriggerFrom");
595 TriggerRecord trigdata;
601 // Note: in this case we treat the trigger parameter as a track number.
602 if ( not FillTriggerFromHits(data, trigger, trigdata) )
603 return; // Continue if unable to find hits.
607 case FromLocalTriggers:
609 Assert( module != NULL );
610 AliMUONLocalTrigger* lt = data->LocalTrigger(trigger);
611 FillTriggerFromLocalTrigger(lt, module, trigdata);
612 trigdata.TriggerNumber(trigger);
617 Error("AddTriggerFrom", "fDataToUse is not set to a valid value.");
621 AddTrigger(trigdata);
623 DebugMsg(1, "Leaving AddTriggerFrom");
627 Bool_t TriggerSource::InFillRegion(const TriggerRecord& data)
631 case FromWholePlane: return kTRUE;
632 case FromLeftHalfPlane: return data.Station1Point().fX <= 0;
633 case FromRightHalfPlane: return data.Station1Point().fX > 0;
636 Error("InFillRegion", "fAreaToUse is not set to a valid value.");
642 void TriggerSource::FillTriggerFromLocalTrigger(
643 AliMUONLocalTrigger* trigger, AliMUON* module, TriggerRecord& record
646 DebugMsg(2, "Creating TriggerRecord from AliMUONLocalTrigger object: " << (void*)trigger );
647 AliMUONTriggerCircuit& circuit = module->TriggerCircuit(trigger->LoCircuit());
649 // Get the sign of the particle the sign of the muon.
650 if (trigger->LoLpt() == 1 || trigger->LoHpt() == 1 || trigger->LoApt() == 1)
652 record.ParticleSign(-1);
655 if (trigger->LoLpt() == 2 || trigger->LoHpt() == 2 || trigger->LoApt() == 2)
657 record.ParticleSign(+1);
661 record.ParticleSign(0);
663 DebugMsg(2, "Particle sign = " << record.ParticleSign() );
665 // Compute the transverse momentum.
668 // TODO: implement use of the L0 lookup table.
669 Error("FillTriggerFromLocalTrigger", "Use of L0 lookup table is not yet implemented!");
673 Float_t pt = circuit.PtCal( trigger->LoStripX(), trigger->LoDev(), trigger->LoStripY() );
676 DebugMsg(2, "Pt = " << record.Pt() );
678 // Build the impact points.
679 record.Station1Point().fX = circuit.GetX11Pos(trigger->LoStripY());
680 record.Station1Point().fY = circuit.GetY11Pos(trigger->LoStripX());
681 record.Station2Point().fY = circuit.GetY21Pos(trigger->LoStripX() + trigger->LoDev() + 1); // Why + 1?
682 record.Station2Point().fX = module->Chamber(12).Z() * record.Station1Point().fX / module->Chamber(10).Z();
683 DebugMsg(2, "fStation1x = " << record.Station1Point().fX);
684 DebugMsg(2, "fStation1y = " << record.Station1Point().fY);
685 DebugMsg(2, "fStation2x = " << record.Station2Point().fX);
686 DebugMsg(2, "fStation2y = " << record.Station2Point().fY);
690 Bool_t TriggerSource::FillTriggerFromHits(AliMUONDataInterface* data, const Int_t track, TriggerRecord& record)
692 DebugMsg(2, "Creating TriggerRecord from hits on track: " << track );
694 Float_t x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4;
696 x1 = y1 = z1 = x2 = y2 = z2 = x3 = y3 = z3 = x4 = y4 = z4 = NAN;
698 x1 = y1 = z1 = x2 = y2 = z2 = x3 = y3 = z3 = x4 = y4 = z4 = FLT_QNAN;
700 // Find the hit that corresponds to chambers. 11 to 14. We can ignore any
701 // hits above the first 14. If there are that many it means the particle
702 // is cycling in the detector.
703 for (Int_t i = 0; i < data->NumberOfHits(track) and i < 14; i++)
705 AliMUONHit* h = data->Hit(track, i);
707 // Note AliMUONHit::Chamber() returns a value in the range 1..14
708 // It is also important to have positive Z coordinates and under the
709 // new version of Aliroot we use GEANT coordinates which return
710 // negatives. So we use the fabs routine.
711 switch ( h->Chamber() )
713 case 11: x1 = h->X(); y1 = h->Y(); z1 = (Float_t)fabs(h->Z()); break;
714 case 12: x2 = h->X(); y2 = h->Y(); z2 = (Float_t)fabs(h->Z()); break;
715 case 13: x3 = h->X(); y3 = h->Y(); z3 = (Float_t)fabs(h->Z()); break;
716 case 14: x4 = h->X(); y4 = h->Y(); z4 = (Float_t)fabs(h->Z()); break;
719 DebugMsg(4, "Found: x1 = " << x1 << ", y1 = " << y1 << ", z1 = " << z1);
720 DebugMsg(4, "Found: x2 = " << x2 << ", y2 = " << y2 << ", z2 = " << z2);
721 DebugMsg(4, "Found: x3 = " << x3 << ", y3 = " << y3 << ", z3 = " << z3);
722 DebugMsg(4, "Found: x4 = " << x4 << ", y4 = " << y4 << ", z4 = " << z4);
724 // Get a coordinate for station 1, perferably from chamber 11 otherwise
725 // use hits from chamber 12.
726 if (not TMath::IsNaN(x1))
728 record.Station1Point().fX = x1;
729 record.Station1Point().fY = y1;
730 DebugMsg(3, "Using value from chamber 11: x1 = " << x1 << ", y1 = " << y1 << ", z1 = " << z1 );
732 else if (not TMath::IsNaN(x2))
734 record.Station1Point().fX = x2;
735 record.Station1Point().fY = y2;
737 DebugMsg(3, "Using value from chamber 12: x2 = " << x2 << ", y2 = " << y2 << ", z2 = " << z2 );
741 // Return false if we could not find any hits on chambers 11 or 12.
742 Warning("FillTriggerFromHits", "Could not find any hits on chambers 11 and 12.");
746 // Get a coordinate for station 2, perferably from chamber 13 otherwise
747 // use hits from chamber 14.
748 if (not TMath::IsNaN(x3))
750 record.Station2Point().fX = x3;
751 record.Station2Point().fY = y3;
753 DebugMsg(3, "Using value from chamber 13: x3 = " << x3 << ", y3 = " << y3 << ", z3 = " << z3 );
755 else if (not TMath::IsNaN(x4))
757 record.Station2Point().fX = x4;
758 record.Station2Point().fY = y4;
760 DebugMsg(3, "Using value from chamber 14: x4 = " << x4 << ", y4 = " << y4 << ", z4 = " << z4 );
764 // Return false if we could not find any hits on chambers 13 or 14.
765 Warning("FillTriggerFromHits", "Could not find any hits on chambers 13 and 14.");
769 record.TriggerNumber(track);
771 // Get the sign of the particle.
772 Int_t particlecode = (Int_t) data->Hit(track, 0)->Particle();
773 DebugMsg(3, "particle code = " << particlecode);
774 TDatabasePDG* pdb = TDatabasePDG::Instance();
775 TParticlePDG* pdata = pdb->GetParticle(particlecode);
776 if (pdata->Charge() < 0)
777 record.ParticleSign(-1);
778 else if (pdata->Charge() > 0)
779 record.ParticleSign(+1);
781 record.ParticleSign(0);
782 DebugMsg(3, "Particle sign = " << record.ParticleSign());
784 DebugMsg(3, "Calculating Pt: x1 = " << record.Station1Point().fX
785 << ", y1 = " << record.Station1Point().fY
786 << ", y2 = " << record.Station2Point().fY
790 // Calculate and assign the transverse momentum.
791 Float_t pt = dHLT::Tracking::CalculatePt(
792 record.Station1Point().fX,
793 record.Station1Point().fY, record.Station2Point().fY,
798 DebugMsg(3, "Pt = " << record.Pt());
804 Bool_t TriggerSource::FetchAliMUON(AliMUON*& module)
806 // Check if we even need the MUON module. Not having to load it will
807 // save a lot of loading time for AliRoot.
808 if (fDataToUse == FromHits)
810 // Make sure we do not attempt to unload gAlice in FinishedWithAliMUON,
811 // by setting the fHadToLoadgAlice to false.
812 fHadToLoadgAlice = kFALSE;
816 AliRunLoader* runloader = AliRunLoader::GetRunLoader();
817 if ( runloader == NULL )
819 Error("FetchAliMUON", "AliRunLoader not initialised!");
823 // Try fetch the AliRun object. If it is not found then try load it using
825 AliRun* alirun = runloader->GetAliRun();
828 if (runloader->LoadgAlice() != 0)
831 DebugMsg(1, "Leaving FillFrom(AliMUONDataInterface*)");
834 fHadToLoadgAlice = kTRUE;
835 alirun = runloader->GetAliRun();
838 fHadToLoadgAlice = kFALSE;
840 // Get the MUON module pointer and return it.
841 module = dynamic_cast<AliMUON*>( alirun->GetModule("MUON") );
846 void TriggerSource::FinishedWithAliMUON()
848 // Only unload the gAlice object if we had to load it ourselves.
849 if (fHadToLoadgAlice)
850 AliRunLoader::GetRunLoader()->UnloadgAlice();
854 void TriggerSource::ResetAllPointers() const
857 fCurrentEvent = NULL;
859 fCurrentBlock = NULL;
861 fCurrentTrigger = NULL;
862 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
863 << " , fTriggerIndex = " << fTriggerIndex
868 void TriggerSource::ResetBlockPointers() const
871 fCurrentBlock = NULL;
873 fCurrentTrigger = NULL;
874 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
875 << " , fTriggerIndex = " << fTriggerIndex
880 void TriggerSource::ResetTriggerPointers() const
883 fCurrentTrigger = NULL;
884 DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
885 << " , fTriggerIndex = " << fTriggerIndex
890 TriggerSource::EventData::EventData() : fBlocks(TClonesArray::Class())
896 TriggerSource::EventData::EventData(const Int_t eventnumber)
897 : fBlocks(TClonesArray::Class())
899 fEventNumber = eventnumber;
901 // If the following is not set then we do not write the fBlocks properly.
902 fBlocks.BypassStreamer(kFALSE);
906 TriggerSource::EventData::~EventData()