+ if ( config.GetConfigurationMap()->GetValue("ForceLaserTriggerId") ) {
+ forceTriggerId=TMath::Nint(config.GetValue("ForceLaserTriggerId"));
+ printf("TPCCEda: Only processing triggers with Id: %d.\n",forceTriggerId);
+ }
+
+ if ( config.GetConfigurationMap()->GetValue("SaveOption") ) {
+ saveOption=TMath::Nint(config.GetValue("SaveOption"));
+ printf("TPCCEda: Saving option set to: %d.\n",saveOption);
+ }
+
+ //subsribe to laser triggers only in physics partition
+ //if the trigger class is not available the return value is -1
+ //in this case we are most probably running as a standalone
+ // laser run and should request all events
+ unsigned char classIdptr=0;
+ int retClassId=daqDA_getClassIdFromName(laserTriggerName.Data(),&classIdptr);
+ if (retClassId==0){
+ //interleaved laser in physics runs
+ //select proper trigger class id
+ char c[5];
+ snprintf(c,sizeof(c),"%u",(unsigned int)classIdptr);
+ char *table[5] = {"PHY",const_cast<char*>(monitoringType.Data()),"*",c,NULL};
+ monitorDeclareTableExtended(table);
+ printf("TPCCEda: Using monitoring table: (PHY, %s, *, %s)\n",monitoringType.Data(),c);
+ } else if (retClassId==-1){
+ //global partition without laser triggered events
+ //the DA should exit properly without processing
+ printf("TPCCEda: Laser trigger class '%s' was not found among trigger class names. Will stop processing.\n",laserTriggerName.Data());
+ return 0;
+ } else if (retClassId==-2){
+ //standalone case, accept all physics events
+ char *table[5] = {"PHY","Y","*","*",NULL};
+ monitorDeclareTableExtended(table);
+ printf("TPCCEda: Using all trigger class Ids\n");
+ } else {
+ printf("TPCCEda: Unknown return value of 'daqDA_getClassIdFromName': %d\n",retClassId);
+ return -2;
+ }