Specifying a busy managerTailoring the softwareTailoring the softwareSpecifying a trigger manager

Specifying a trigger manager

The trigger manager is responsible for determining when an event is ready to be read out. Specifying an alternate trigger is a matter of:

The functionality of checking a trigger is encapsulated in objects that are derived from the class CTrigger. Concrete classes derived from CTrigger must implement the function:

	 virtual bool  operator()();
      

This function is called to poll the trigger hardware and is expected to return true if a pending trigger is ready.

The following sample code shows a Test trigger class that claims the system always has a trigger to process:

        #include <CTrigger.h>
        class CTestTrigger : public CTrigger
	{
	  public:
	    virtual bool operator()() {
	       return true;
	    }
	};
      

Once coded, the new trigger object must be instantiated and installed in the experiment. This should be done in the users's SetupReadout function. The code fragment below shows how this is done:

      void
      MyReadout::SetupReadout(CExperiment& rExperiment)
      {
	 CReadoutMain::SetupReadout(rExperiment);
	 rExperiment.EstablishTrigger(new CTestTrigger);
	 
	 ...
	 
      

Report documentation errors to Ron Fox (fox@nscl.msu.edu)or NSCL's Bugzilla page

Specifying a busy managerTailoring the softwareTailoring the softwareSpecifying a trigger manager