#include "daqDA.h"
#include "event.h"
#include "monitor.h"
+#include "signal.h"
#ifdef ALI_AMORE
#include <AmoreDA.h>
#endif
const char* OUTPUT_FILE = "mch.occupancy";
-const char* DAVERSION = "MUONTRKOCCda v1.2 ($Id$)";
+const char* DAVERSION = "MUONTRKOCCda v1.4 ($Id$)";
//______________________________________________________________________________
void Add(AliMUONVStore& destStore, const AliMUONVStore& srcStore)
/// were seen per manu, and the number of events.
///
+ signal(SIGSEGV,SIG_DFL); // to be able to get core dumps...
+
TStopwatch timers;
timers.Start(kTRUE);
for(;;)
{
- struct eventHeaderStruct *event;
+ struct eventHeaderStruct *event(0x0);
eventTypeType eventT;
status=monitorGetEventDynamic((void **)&event);
#ifdef ALI_AMORE
- // Send occupancy store (as a big string) to the AMORE DB
- amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender);
-
- ostringstream str;
-
- GenerateOutputFile(accumulatedData,str,runNumber,numberOfUsedEvents);
-
- TObjString occupancyAsString(str.str().c_str());
-
- Int_t status = amoreDA.Send("Occupancy",&occupancyAsString);
- if ( status )
+ if ( numberOfUsedEvents ) // do not update the AMORE pool with an empty object...
{
- cerr << "ERROR : Failed to write occupancies in the AMORE database : " << status << endl;
- }
+ // Send occupancy store (as a big string) to the AMORE DB
+ amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender);
+
+ ostringstream str;
+
+ GenerateOutputFile(accumulatedData,str,runNumber,numberOfUsedEvents);
+
+ TObjString occupancyAsString(str.str().c_str());
+
+ Int_t status = amoreDA.Send("Occupancy",&occupancyAsString);
+ if ( status )
+ {
+ cerr << "ERROR : Failed to write occupancies in the AMORE database : " << status << endl;
+ }
+ }
#endif