- make sure you have all the necessary software and a working mySetup.csh.
- If you start a new shell, source mySetup.csh to set up the paths and environment variables correctly.
Some of what follows is wrapped up in scripts like "start" but the principle that underlies such scripts goes like this:
- nothing much will work till you have an ipc partition called "initial" so start one with
- [localhost]$
- [localhost]$ ipc_server &
- [localhost]$
Now create for yourself a IpcRefFile
- thereafter "ipc_ls" will show you the contents of this partition, eg
- [localhost]$
- [localhost]$ ipc_ls
- initial
- [localhost]$
- still not much else will work till you create a "partition" called "SCT" within the one called "initial" that we just started. You can do this with:
- [localhost]$
- [localhost]$ ipc_server -p SCT &
- 3/6/04 18:16:47 :: ipc_server for partition "SCT" has been started.
- [localhost]$
- which you can check with:
- [localhost]$
- [localhost]$ ipc_ls
- initial
- partitions:
- SCT
- partitions:
- [localhost]$
- or
- [localhost]$
- [localhost]$ ipc_ls -p SCT
- SCT
- [localhost]$
- What uses the SCT partition we made above? One user is a "mrs_server":
- [localhost]$
- [localhost]$ mrs_server -p SCT &
- [localhost]$
- A mrs_server is a bit like a named pipe. Error messages from programs go there, but disappear unless you set up some listeners to report on the messages they hear arriving. Start a listener printing received messages to std::out with the following
- [localhost]$
- [localhost]$ mrs_receiver -p SCT
- messages appear here when they arrive ...
- Another important user (or should that be "group of users") of the SCT partition is the is_server. Start one which is capable of serving EventData, for example, as follows:
- [localhost]$
- [localhost]$ is_server -p SCT -n EventData &
- [localhost]$
- The FittingService requires that there be an is_server publishing event data. If you have already set one up, you can start the fitting service simply by
- [localhost]$
- [localhost]$ FittingService &
- [localhost]$
- There are a couple of handy utilities that put (fake) data into (for example) the EventData is_server. These are useful for testing purposes. For example
- [localhost]$
- [localhost]$ TestSubmit?
- Created hists
- Created scan
- Created module config
- Created RawScanResult
- [localhost]$
- [localhost]$
- [localhost]$ is_ls -p SCT &
- Partition "SCT" contains 1 IS server(s):
- Server "EventData" contains 3 object(s):
- EventData.SctData::RawScanResult.173.0.20220040200007 <1/7/04 14:19:18> <SctData::RawScanResult>
- EventData.SctData::RawScanResult.173.0.20220380200003 <1/7/04 14:20:31> <SctData::RawScanResult>
- EventData.SctData::RawScanResult.1000.100.TestSubmit? <1/7/04 14:13:00> <SctData::RawScanResult>
- Server "EventData" contains 3 object(s):
- [localhost]$
- In the above example, the last of these three items is the data inserted by TestSubmit?. The other two items were inserted by the following alternative mechanism which is useful if you have histograms or data saved from before. You can (re)insert these histograms into the is_server as follows. This might be a better test than using random data! [In the following example, the histograms come from Bruce's area]
- [localhost]$
- [localhost]$ FilePublisher? ~gallop/working3/SctApi/RawHistogram?_blah.bin
- AnalysisService scanResultCallback on EventData.SctData::RawScanResult.173.0.20220380200003
- This is call number 3 to this worker. Working on 173.0.20220380200003 Q = 0
- [localhost]$
- If you have some data in the EventService? of the form "EventData.SctData::RawScanResult.*" then you can do a non-trivial test of the fitting service as follows (without the data the test will still run, it's just that the test won't stretch things as much as one would like):
- [localhost]$
- [localhost]$ $SCT_DAQ_ROOT/FittingService/test/FittingServiceTest?
- FittingService test:
- ... looking in partition ...SCT ... getting a handle ...Got Handle... :Status is:Fitter Strategy=NagFitStrategy? Fit Options=Russel Using analytic fits=0
- Workers=1, (Busy=0), Fits Done=5, Errors=1, Scans Done=1
- Last scan: 173.0.20220380200003
- Timing. I/O time: 0.19 Scan time: 0.15 Approx average time/scan/thread: 0.34
- strategy is: NagFitStrategy?
- options are: Russel
- 5 fits done with 1 errors
- [localhost]$
- (bear in mind that the above is not an example of error free output!)
- Aledgedly, raw data fitted by the FittingService ends up in a FittedData? is_server which you can start with
- [localhost]$
- [localhost]$ is_server -p SCT -n FittedData? &
- [localhost]$
- ... but I haven't yet managed to spot the fits turning up here yet.