2 // $Id: AliHLTHOMERManager.cxx $
3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
8 //* for The ALICE HLT Project. *
10 //* Permission to use, copy, modify and distribute this software and its *
11 //* documentation strictly for non-commercial purposes is hereby granted *
12 //* without fee, provided that the above copyright notice appears in all *
13 //* copies and that both the copyright notice and this permission notice *
14 //* appear in the supporting documentation. The authors make no claims *
15 //* about the suitability of this software for any purpose. It is *
16 //* provided "as is" without express or implied warranty. *
17 //**************************************************************************
19 /** @file AliHLTHOMERManager.cxx
20 @author Jochen Thaeder
22 @brief Manger for HOMER in aliroot
25 // see header file for class documentation
27 // refer to README to build package
29 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
37 #include "AliHLTHOMERManager.h"
38 // -- -- -- -- -- -- --
39 #include "AliHLTHOMERLibManager.h"
40 #include "AliHLTHOMERSourceDesc.h"
41 #include "AliHLTHOMERBlockDesc.h"
42 // -- -- -- -- -- -- --
43 #include "AliHLTGlobalTriggerDecision.h"
44 #include "AliHLTTriggerDecision.h"
45 //---------------------------
47 ClassImp(AliHLTHOMERManager)
50 * ---------------------------------------------------------------------------------
51 * Constructor / Destructor
52 * ---------------------------------------------------------------------------------
55 //##################################################################################
56 AliHLTHOMERManager::AliHLTHOMERManager() :
57 fLibManager(new AliHLTHOMERLibManager),
58 fStateHasChanged(kTRUE),
66 fAsyncBlockList(NULL),
70 fCurrentBufferIdx(-1),
71 fNavigateBufferIdx(-1),
73 fTriggerString("ALL"),
74 fNEventsNotTriggered(0),
75 fRetryNextEvent(kFALSE) {
76 // see header file for class documentation
78 // refer to README to build package
80 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
84 //##################################################################################
85 AliHLTHOMERManager::~AliHLTHOMERManager() {
86 // see header file for class documentation
91 TIter next(fReaderList);
92 TObject * object = NULL;
93 while ( ( object = next()) )
94 fLibManager->DeleteReader(static_cast<AliHLTHOMERReader*>(object) );
105 if ( fProxyHandler != NULL )
106 delete fProxyHandler;
107 fProxyHandler = NULL;
109 if ( fSourceList != NULL )
113 if ( fEventBuffer ) {
114 fEventBuffer->Clear();
119 if ( fAsyncBlockList ) {
120 fAsyncBlockList->Clear();
121 delete fAsyncBlockList;
123 fAsyncBlockList = NULL;
126 //##################################################################################
127 Int_t AliHLTHOMERManager::Initialize() {
128 // see header file for class documentation
132 // -- Initialize ProxyHandler
133 if ( !fProxyHandler )
134 fProxyHandler = new AliHLTHOMERProxyHandler();
136 if ( fProxyHandler ) {
137 iResult = fProxyHandler->Initialize();
139 HLTError(Form("Initialize of ProxyHandler failed."));
143 HLTError(Form("Creating of ProxyHandler failed."));
146 // -- Initialize ReaderList
147 // List ist not owner, as reader have to be created/deleted by the LibManager
149 fReaderList = new TList();
151 // -- Initialize asynchronous BlockList
152 if( !fAsyncBlockList ) {
153 fAsyncBlockList = new TList();
154 fAsyncBlockList->SetOwner(kTRUE);
157 // -- Initialize Event Buffer and EventID array
158 if ( !fEventBuffer ) {
159 fEventBuffer = new TClonesArray( "TList", BUFFERSIZE );
162 for ( Int_t idx = 0; idx < BUFFERSIZE; ++idx ) {
163 new ((*fEventBuffer)[idx]) TList( );
164 (reinterpret_cast<TList*>((*fEventBuffer)[idx]))->SetOwner(kTRUE);
173 * ---------------------------------------------------------------------------------
175 * ---------------------------------------------------------------------------------
178 //##################################################################################
179 Int_t AliHLTHOMERManager::CreateSourcesList() {
180 // see header file for class documentation
184 if ( fSourceList != NULL )
188 fSourceList = new TList();
189 fSourceList->SetOwner( kTRUE );
191 iResult = fProxyHandler->FillSourceList( fSourceList );
193 HLTWarning(Form("There have been errors, while creating the sources list."));
195 else if ( iResult > 0 ) {
196 HLTWarning(Form("No active services found."));
198 else if ( fSourceList->IsEmpty() ) {
199 HLTWarning(Form("No active services in the list."));
203 HLTInfo(Form("New sources list created."));
205 // -- New SourceList has been created
206 // --> All Sources are new --> State has changed
207 fStateHasChanged = kTRUE;
213 //##################################################################################
214 void AliHLTHOMERManager::SetSourceState( AliHLTHOMERSourceDesc * source, Bool_t state ) {
215 // see header file for class documentation
217 if ( source->IsSelected() != state ) {
218 source->SetState( state );
219 fStateHasChanged = kTRUE;
226 * ---------------------------------------------------------------------------------
227 * Connection Handling - public
228 * ---------------------------------------------------------------------------------
231 //##################################################################################
232 Int_t AliHLTHOMERManager::ConnectHOMER( TString detector ){
233 // see header file for class documentation
241 // -- Check if LibManager is present
242 if ( ! fLibManager ) {
243 HLTError(Form("No LibManager present."));
247 // -- Check if already connected and state has not changed
248 if ( fStateHasChanged == kFALSE && IsConnected() ) {
249 HLTInfo(Form("No need for reconnection."));
253 // -- If already connected, disconnect before connect
254 // or if ReaderList already filled
255 if ( IsConnected() || fReaderList->GetSize() != 0 ) {
256 HLTInfo(Form("IsConnected: %d fReaderList.Size: %d", IsConnected(), fReaderList->GetSize()));
259 // -- Create the Readoutlist
260 UShort_t* sourcePorts = new UShort_t [fSourceList->GetEntries()];
261 const Char_t ** sourceHostnames = new const Char_t* [fSourceList->GetEntries()];
262 UInt_t sourceCount = 0;
264 CreateReadoutList( sourceHostnames, sourcePorts, sourceCount, detector );
265 if ( sourceCount == 0 ) {
266 HLTError(Form("No sources selected, aborting."));
271 // *** Connect to data sources
274 for (UInt_t idx = 0; idx < sourceCount; idx++) {
276 HLTInfo(Form("Adding source %d as %s : %d", idx, sourceHostnames[idx], sourcePorts[idx]));
278 fReaderList->Add(dynamic_cast<TObject*>(fLibManager->OpenReader(sourceHostnames[idx], sourcePorts[idx])));
279 AliHLTHOMERReader *reader = static_cast<AliHLTHOMERReader*>(fReaderList->Last());
281 HLTError(Form("Adding reader failed, aborting"));
285 if ( (iResult = reader->GetConnectionStatus()) ) {
287 // -- Connection to source failed
289 HLTError(Form("Error establishing connection to TCP source %s:%hu: %s (%d)",
290 sourceHostnames[idx], sourcePorts[idx], strerror(iResult), iResult));
292 if( !(TString(sourceHostnames[idx]).CompareTo("localhost")) ) {
293 HLTInfo("The failed connection is on localhost. is SSH tunnel up????? ");
294 HLTInfo(Form("Do: 'ssh -L %d:alihlt-vobox0.cern.ch:%d cernUser@lxplus.cern.ch -fN'",
295 sourcePorts[idx], sourcePorts[idx]));
299 fReaderList->RemoveLast();
302 fLibManager->DeleteReader( reader );
305 HLTInfo(Form("Removed source %d, %s : %d from sourceList", idx, sourceHostnames[idx], sourcePorts[idx]));
309 // -- Connection succeded
312 HLTInfo(Form("Connection established to source %s on port %d", sourceHostnames[idx], sourcePorts[idx]));
315 } // for (Int_t idx = 0; idx < sourceCount; idx++) {
317 delete[] sourceHostnames;
318 delete[] sourcePorts;
324 //##################################################################################
325 void AliHLTHOMERManager::DisconnectHOMER(){
326 // see header file for class documentation
328 HLTInfo("Disconnecting");
330 if ( fReaderList && fLibManager ) {
331 HLTInfo("Deleting readerlist and libmanager");
332 TIter next(fReaderList);
333 TObject * object = NULL;
334 while ( ( object = next()) )
335 fLibManager->DeleteReader(static_cast<AliHLTHOMERReader*>(object) );
338 HLTInfo(Form("fReaderList size %d", fReaderList->GetSize()));
339 fReaderList->Clear();
340 HLTInfo(Form("fReaderList size %d", fReaderList->GetSize()));
342 fReaderList = new TList ();
343 HLTInfo(Form("fReaderList size %d", fReaderList->GetSize()));
346 fStateHasChanged = kTRUE;
349 HLTInfo(Form("Connection closed."));
354 //##################################################################################
355 Int_t AliHLTHOMERManager::ReconnectHOMER( TString detector="" ){
356 // see header file for class documentation
363 iResult = ConnectHOMER(detector);
365 HLTError(Form("Error reconnecting."));
372 * ---------------------------------------------------------------------------------
373 * Event Handling - public
374 * ---------------------------------------------------------------------------------
377 //##################################################################################
378 Int_t AliHLTHOMERManager::NextEvent(){
380 // see header file for class documentation
383 Int_t iRetryCount = 0;
385 if ( !IsConnected() || fStateHasChanged ) {
386 HLTInfo("Not connected or state has changed, returning to AliEveHOMERManager, which will deal with this situation");
387 // cout << "connectecd " << IsConnected() << "haschanged "<<fStateHasChanged << endl;
388 return 55;//ConnectHOMER();
390 if ( !IsConnected() ) {
391 HLTWarning(Form( "Not connected yet." ));
395 // -- Reset asyncronous BlockList
396 fAsyncBlockList->Clear();
399 // *** Loop over all readers and get new event data
402 TIter next(fReaderList);
403 TObject * object = NULL;
405 while( (object = next()) ) {
407 fCurrentReader = static_cast<AliHLTHOMERReader*>(object);
409 // -- Read next event data and error handling for HOMER (error codes and empty blocks)
412 iResult = fCurrentReader->ReadNextEvent( 40000000 /*timeout in us*/);
414 if ( iResult == 111 || iResult == 32 || iResult == 6 ) {
415 HLTError(Form("No connection to source %d: %s (%d)",
416 fCurrentReader->GetErrorConnectionNdx(), strerror(iResult), iResult));
419 else if ( iResult == 110 ) {
420 HLTError(Form("Timeout occured, reading event from source %d: %s (%d)",
421 fCurrentReader->GetErrorConnectionNdx(), strerror(iResult), iResult));
424 else if ( iResult == 56 ) {
427 if ( iRetryCount >= 20 ) {
428 HLTError(Form("Retry Failed: Error reading event from source %d: %s (%d), returning",
429 fCurrentReader->GetErrorConnectionNdx(), strerror(iResult), iResult));
433 HLTError(Form("Retry: Error reading event from source %d: %s (%d), making another attempt (no %d out of 20)",
434 fCurrentReader->GetErrorConnectionNdx(), strerror(iResult), iResult, iRetryCount));
439 else if ( iResult ) {
440 HLTError(Form("General Error reading event from source %d: %s (%d), giving up",
441 fCurrentReader->GetErrorConnectionNdx(), strerror(iResult), iResult));
446 HLTDebug("Successfully read out event from source");
452 // -- Check if event could be read
454 HLTInfo("Reading event from source failed");
458 // -- Handle Blocks from current reader
459 iResult = HandleBlocks();
461 HLTError(Form("Handling of blocks failed."));
464 } // while( (object = next()) ) {
466 // -- Check if NextEvent should be recalled,
467 // to catch the next event with a trigger
468 if ( fRetryNextEvent ) {
470 fRetryNextEvent = kFALSE;
472 HLTInfo(Form("Checked trigger of %d events, without triggering", fNEventsNotTriggered));
479 /* ---------------------------------------------------------------------------------
480 * Buffer Handling - public
481 * ---------------------------------------------------------------------------------
484 //##################################################################################
485 Int_t AliHLTHOMERManager::NavigateEventBufferBack() {
486 // see header file for class documentation
488 // -- reached the end of the buffer
489 if ( fNavigateBufferIdx == fBufferLowIdx )
492 Int_t newIdx = fNavigateBufferIdx - 1;
494 newIdx = BUFFERSIZE-1;
496 fCurrentBufferIdx = fNavigateBufferIdx = newIdx;
501 //##################################################################################
502 Int_t AliHLTHOMERManager::NavigateEventBufferFwd() {
503 // see header file for class documentation
505 // -- reached the top of the buffer
506 if ( fNavigateBufferIdx == fBufferTopIdx )
509 Int_t newIdx = fNavigateBufferIdx + 1;
510 if ( newIdx == BUFFERSIZE )
513 fCurrentBufferIdx = fNavigateBufferIdx = newIdx;
518 ///////////////////////////////////////////////////////////////////////////////////
521 * ---------------------------------------------------------------------------------
522 * Connection Handling - private
523 * ---------------------------------------------------------------------------------
526 //##################################################################################
527 void AliHLTHOMERManager::CreateReadoutList( const char** sourceHostnames, UShort_t *sourcePorts,
528 UInt_t &sourceCount, TString detector ){
529 // see header file for class documentation
531 AliHLTHOMERSourceDesc * source= NULL;
533 // -- Read all sources and check if they should be read out
534 TIter next( fSourceList );
535 while ( ( source = dynamic_cast<AliHLTHOMERSourceDesc*>(next()) ) ) {
537 // -- If detector NO detector name given
538 if ( ! detector.CompareTo("ALL") ) {
539 // -- Continue if source is not selected
541 //if ( ! source->IsSelected() )
544 // -- DetectorName given
546 // -- Continue if detector name doesn't match
547 if ( detector.CompareTo(source->GetDetector()) )
553 Bool_t exists = kFALSE;
555 // -- Loop over existing entries and check if entry is already in readout list
556 for ( UInt_t ii = 0; ii < sourceCount; ii++ ){
557 if ( !strcmp( sourceHostnames[ii], source->GetHostname().Data() )
558 && sourcePorts[ii] == source->GetPort() ) {
564 // -- Add new entires to readout list
566 sourcePorts[sourceCount] = source->GetPort();
567 sourceHostnames[sourceCount] = source->GetHostname().Data();
571 } // while ( ( source = (AliHLTHOMERSourceDesc*)next() ) ) {
573 fStateHasChanged = kFALSE;
579 * ---------------------------------------------------------------------------------
580 * Buffer Handling - private
581 * ---------------------------------------------------------------------------------
584 //##################################################################################
585 void AliHLTHOMERManager::AddBlockListToBuffer() {
586 // see header file for class documentation
587 // -- Check if event is already in buffer
588 ULong_t eventID = static_cast<ULong64_t>(fCurrentReader->GetEventID());
590 if ( fEventID[fBufferTopIdx] == eventID ) {
591 HLTInfo(Form("Event 0x%016LX (%Lu) already in buffer.", eventID, eventID));
595 // -- Check if event should be selected on basis of trigger string
596 if( fTriggerString.CompareTo("ALL") ){
597 if ( !CheckTriggerDecision() ) {
598 HLTInfo("Event not triggered");
601 HLTInfo("Event triggered");
605 HLTDebug("No trigger selection.");
610 if ( fBufferTopIdx == BUFFERSIZE )
613 // -- Change the low mark if necessary
614 if ( fBufferLowIdx == -1 )
616 else if ( fBufferTopIdx == fBufferLowIdx ) {
618 if ( fBufferLowIdx == BUFFERSIZE )
622 fNavigateBufferIdx = fCurrentBufferIdx = fBufferTopIdx;
625 fEventID[fBufferTopIdx] = eventID;
627 // -- Clear Buffer slot
628 (reinterpret_cast<TList*>((*fEventBuffer)[fBufferTopIdx]))->Clear();
633 // -- Fill block list
636 // -- Create new block
637 AliHLTHOMERBlockDesc * block = new AliHLTHOMERBlockDesc();
638 block->SetBlock( GetBlk(), GetBlkSize(), GetBlkOrigin(),
639 GetBlkType(), GetBlkSpecification() );
641 // -- Check sources list if block is requested
642 if ( CheckIfRequested( block ) ) {
643 (reinterpret_cast<TList*>((*fEventBuffer)[fBufferTopIdx]))->Add( block );
647 (reinterpret_cast<TList*>((*fEventBuffer)[fBufferTopIdx]))->Add( block );
652 } while( GetNextBlk() );
657 //##################################################################################
658 void AliHLTHOMERManager::AddToAsyncBlockList() {
659 // see header file for class documentation
661 HLTInfo("Adding blocks to the asynchroneous block list");
665 // -- Fill block list
668 // -- Create new block
669 AliHLTHOMERBlockDesc * block = new AliHLTHOMERBlockDesc();
670 block->SetBlock( GetBlk(), GetBlkSize(), GetBlkOrigin(),
671 GetBlkType(), GetBlkSpecification() );
673 // -- Check sources list if block is requested
674 if ( CheckIfRequested( block ) )
675 fAsyncBlockList->Add( block );
678 fAsyncBlockList->Add( block );
683 } while( GetNextBlk() );
687 //##################################################################################
688 TList* AliHLTHOMERManager::GetBlockListEventBuffer( Int_t idx ) {
689 // see header file for class documentation
694 return reinterpret_cast<TList*>((*fEventBuffer)[idx]);
699 * ---------------------------------------------------------------------------------
700 * Block Handling - private
701 * ---------------------------------------------------------------------------------
704 //##################################################################################
705 Int_t AliHLTHOMERManager::HandleBlocks() {
706 // see header file for class documentation
710 // -- Get blockCnt and eventID
711 fNBlks = static_cast<ULong_t>(fCurrentReader->GetBlockCnt());
712 ULong_t eventID = static_cast<ULong64_t>(fCurrentReader->GetEventID());
715 // -- Check if blocks present
717 HLTWarning(Form("Event 0x%016LX (%Lu) with no blocks", eventID, eventID));
721 HLTInfo(Form("Event 0x%016LX (%Lu) with %lu blocks", eventID, eventID, fNBlks));
724 // Loop for Debug only
725 for ( ULong_t ii = 0; ii < fNBlks; ii++ ) {
726 Char_t tmp1[9], tmp2[5];
727 memset( tmp1, 0, 9 );
728 memset( tmp2, 0, 5 );
730 ULong64_t* tmp12 = static_cast<ULong64_t*>(tmp11);
731 *tmp12 = fCurrentReader->GetBlockDataType(ii);
733 ULong_t* tmp22 = static_cast<ULong_t*>(tmp21);
734 *tmp22 = fCurrentReader->GetBlockDataOrigin(ii);
735 HLTInfo(Form( "Block %lu length: %lu - type: %s - origin: %s - spec 0x%08X",
736 ii, fCurrentReader->GetBlockDataLength(ii), tmp1, tmp2, fCurrentReader->GetBlockDataSpec(ii) ));
737 } // end for ( ULong_t ii = 0; ii < fNBlks; ii++ ) {
740 // -- Check if blocks are from syncronous source
742 if ( IsSyncBlocks() )
743 AddBlockListToBuffer();
745 AddToAsyncBlockList();
750 //##################################################################################
751 Bool_t AliHLTHOMERManager::IsSyncBlocks() {
752 // see header file for class documentation
754 Bool_t bResult = kFALSE;
760 if ( !GetBlkType().CompareTo("ALIESDV0")) {
765 if ( !GetBlkType().CompareTo("ROOTTOBJ") ) {
766 AliHLTHOMERBlockDesc blockDesc;
768 blockDesc.SetBlock( GetBlk(), GetBlkSize(), GetBlkOrigin(),
769 GetBlkType(), GetBlkSpecification() );
770 if ( !blockDesc.GetClassName().CompareTo("AliHLTGlobalTriggerDecision") ) {
777 } while( GetNextBlk() );
783 //##################################################################################
784 void* AliHLTHOMERManager::GetBlk( Int_t ndx ) {
785 // see header file for class documentation
786 // Get pointer to current block in current event
788 if ( !fCurrentReader || !IsConnected() ) {
789 HLTError(Form("Not connected yet."));
792 if ( ndx < static_cast<Int_t>(fNBlks) )
793 return const_cast<void*> (fCurrentReader->GetBlockData(ndx));
798 //##################################################################################
799 ULong_t AliHLTHOMERManager::GetBlkSize( Int_t ndx ) {
800 // see header file for class documentation
802 if ( !fCurrentReader || !IsConnected() ) {
803 HLTError(Form("Not connected yet."));
807 if ( ndx < static_cast<Int_t>(fNBlks) )
808 return static_cast<ULong_t> (fCurrentReader->GetBlockDataLength(ndx));
813 //##################################################################################
814 TString AliHLTHOMERManager::GetBlkOrigin( Int_t ndx ) {
815 // see header file for class documentation
819 // -- Check for Connection
820 if ( !fCurrentReader || ! IsConnected() ) {
821 HLTError(Form("Not connected yet."));
825 // -- Check block index
826 if ( ndx >= static_cast<Int_t>(fNBlks) ) {
827 HLTError(Form("Block index %d out of range.", ndx ));
837 reverseOrigin.data = static_cast<UInt_t>(fCurrentReader->GetBlockDataOrigin(ndx));
839 // -- Reverse the order
840 for (Int_t ii = 3; ii >= 0; ii-- )
841 if ( reverseOrigin.array[ii] != ' ')
842 origin.Append( reverseOrigin.array[ii] );
844 origin.Remove( TString::kTrailing, ' ' );
849 //##################################################################################
850 TString AliHLTHOMERManager::GetBlkType( Int_t ndx ) {
851 // see header file for class documentation
855 // -- Check for Connection
856 if ( !fCurrentReader || ! IsConnected() ) {
857 HLTError(Form("Not connected yet."));
861 // -- Check block index
862 if ( ndx >= static_cast<Int_t>(fNBlks) ) {
863 HLTError(Form("Block index %d out of range.", ndx ));
873 reverseType.data = static_cast<ULong64_t> (fCurrentReader->GetBlockDataType(ndx));
875 // -- Reverse the order
876 for (Int_t ii = 7; ii >= 0; ii-- )
877 if ( reverseType.array[ii] != ' ')
878 type.Append( reverseType.array[ii] );
880 type.Remove( TString::kTrailing, ' ' );
885 //##################################################################################
886 ULong_t AliHLTHOMERManager::GetBlkSpecification( Int_t ndx ) {
887 // see header file for class documentation
889 // -- Check for Connection
890 if ( !fCurrentReader || ! IsConnected() ) {
891 HLTError(Form("Not connected yet."));
895 // -- Check block index
896 if ( ndx >= static_cast<Int_t>(fNBlks) ) {
897 HLTError(Form("Block index %d out of range.", ndx ));
901 return static_cast<ULong_t>(fCurrentReader->GetBlockDataSpec(ndx));
904 //##################################################################################
905 Bool_t AliHLTHOMERManager::CheckIfRequested( AliHLTHOMERBlockDesc * block ) {
906 // see header file for class documentation
908 Bool_t requested = kFALSE;
910 AliHLTHOMERSourceDesc * source= NULL;
912 // -- Read all sources and check if they should be read out
913 TIter next( fSourceList );
914 while ( ( source = dynamic_cast<AliHLTHOMERSourceDesc*>(next()) ) ) {
916 // -- Check if source is selected
917 if ( ! source->IsSelected() )
920 // -- Check if detector matches
921 if ( source->GetSourceName().CompareTo( block->GetBlockName() ) )
927 } // while ( ( source = dynamic_cast<AliHLTHOMERSourceDesc*>(next()) ) ) {
931 HLTInfo(Form("Block requested : %s", block->GetBlockName().Data()));
934 HLTInfo(Form("Block NOT requested : %s", block->GetBlockName().Data()));
941 /* ---------------------------------------------------------------------------------
942 * Trigger Handling - private
943 * ---------------------------------------------------------------------------------
946 //##################################################################################
947 Bool_t AliHLTHOMERManager::CheckTriggerDecision() {
948 // see header file for class documentation
950 Bool_t triggered = kFALSE;
952 if ( !fCurrentReader || !IsConnected() ) {
953 HLTError(Form("Not connected yet."));
957 AliHLTHOMERBlockDesc blockDesc;
961 // -- Fill block list
962 Bool_t foundTriggerBlock = kFALSE;
965 if ( (GetBlkType().CompareTo("ROOTTOBJ") == 0) ) {
966 blockDesc.SetBlock( GetBlk(), GetBlkSize(), GetBlkOrigin(),
967 GetBlkType(), GetBlkSpecification() );
969 if ( ! blockDesc.GetClassName().CompareTo("AliHLTGlobalTriggerDecision") ) {
971 foundTriggerBlock = kTRUE;
976 } while( GetNextBlk() );
978 if ( !foundTriggerBlock ) {
979 HLTError(Form("No trigger decision object found"));
983 // -- Get the global decision object
984 AliHLTGlobalTriggerDecision* globalDecision =
985 static_cast<AliHLTGlobalTriggerDecision*>(blockDesc.GetTObject());
987 if ( fTriggerString.CompareTo("HLTGlobalTrigger") == 0 ) {
988 triggered = globalDecision->EventTriggered();
992 for (Int_t idx = 0; idx < globalDecision->NumberOfInputObjects(); idx++) {
994 const AliHLTTriggerDecision* triggerDecision =
995 reinterpret_cast<const AliHLTTriggerDecision*>(globalDecision->InputObject(idx));
997 if ( !(fTriggerString.CompareTo(triggerDecision->Description())) ) {
998 triggered = triggerDecision->EventTriggered();
1001 } // for (Int_t idx = 0; idx < globalDecision->NumberOfInputObjects(); idx++) {
1007 fRetryNextEvent = kFALSE;
1008 fNEventsNotTriggered = 0;
1011 fRetryNextEvent = kTRUE;
1012 ++fNEventsNotTriggered;