Non interactive (batch) use

The program can be used in a non interactive mode. This rootlogon.C acquires data, stores them in a histogram and saves the histogram to a rootfile in a loop. Name and title are taken from the current date and time.

The following methods are useful for this purpose:

// find usb device, should return 1 Int_t OpenDevice(); // set the acquistion time (sec), 0 = no limit Bool_t SetPresetTime(Int_t ptime = 60); Bool_t SetLowThreshold(Int_t thresh = 100); // set number of channels used = number of bins in hist Bool_t SetNofBins(Int_t nofbins = 4096); // input voltage range: 0 - 10, 0 - 1 Bool_t SetInputVolt(Int_t volt = 10); Bool_t StartAcq(); Bool_t StopAcq(); // check if still in running state, return 0 if stopped // else time left Double_t IsRunning(); // Clear in MCA stored spectrum and status Bool_t ClearSpectrumAndStatus(); // book histogram with name and title TH1F * BookHistogram(const char * hname = NULL , const char * htitle = NULL); // read data from MAC and fill histogram, if no histogram was booked // it is done automatically Int_t FillHistogram(); // return pointer to last histogram booked TH1F *GetHistogram(){return fHist;};

15.3.2021 Otto.Schaile@lmu.de