NSCL DDAS
12.1-001
Support for XIA DDAS at FRIB
|
daqsetup.bash
script from an appropriate NSCLDAQ installation (typically /usr/opt/daq/MM.mm-eee/daqsetup.bash
for NSCLDAQ major version MM, minor version mm, and edit level eee e.g. 12.0-005). Running the program from the command line via $DAQBIN/ddasdumper -h
will display the list of command-line options available:<genesis:~ >$DAQBIN/ddasdumper -h Usage: ddasdumper [OPTION]... Write NSCLDAQ PHYSICS_EVENT data obtained using DDAS to a ROOT TTree and perform a formatted dump of selected data items. -h, --help Print help and exit -V, --version Print version and exit -s, --source=STRING Data source URL. Note that only file and streaming data sources -f, --fileout=STRING Path of output file -c, --count=INT Number of items to dump before exiting. If no count value is provided, all items are dumped -k, --skip=INT Number of items to skip before dumping -e, --exclude=STRING List of item types to exclude from the dump (default=`') -w, --scaler-width=INT Scaler counter width in bits (default=`32') -F, --nscldaq-format=ENUM NSCLDAQ format version (possible values="12", "11", "10" default=`12')
--source
and --fileout
. The --fileout
option specifies a path to the ROOT file created by this program. The --source
option specifies where to read data from. This option is slightly more complicated, and for most applications must be formatted as a URL: protocol://host:port/path. The "file" protocol is used to read data from an event file data source. As an example, if you would like to convert data from /path/to/my/eventfile.evt, you would run:$DAQBIN/ddasdumper --source=file:///path/to/my/eventfile.evt --fileout=output.root
$DAQBIN/ringselector --source=tcp://localhost/myring | $DAQBIN/ddasdumper --source=- --fileout=output.root
--nscldaq-format
option, while not required, is important to consider. This option specifies which input data format is expected by ddasdumper. Three NSCLDAQ data formats exist: 10, 11, and 12. Each format version has its own set of class libraries for producing and handling data. The value passed to the --nscldaq-format
option specifies which major version of the NSCLDAQ software was used to initially acquire the data. If the wrong format version is supplied, the program will exit with an error, as it cannot properly decode the data.Option | Description |
---|---|
--skip, -k | The program will skip this number of ring items at the beginning of the event. |
--count, -c | The program will process on this number of items before exiting. |
--scaler-width, -w | Scaler width in bits. Most likely the default value is fine. |
--exclude, -e | Ring item types excluded from the dump. Can be types (BEGIN_RUN) or their corresponding integers (1). |
--fileout
option.DDASRootEvent.h
and DDASRootHit.h
are installed in the "usual" NSCLDAQ header path: /usr/opt/daq/MM.mm-eee/include for NSCLDAQ MM.mm-eee; after sourcing the appropriate daqsetup.bash
script, the environment variable DAQINC
will point to this directory. You must add the DAQINC
directory to the directories ROOT will search for header files:export ROOT_INCLUDE_PATH=${DAQINC}:${ROOT_INCLUDE_PATH}
libddasrootformat.so
containing code implementing the DDASRootEvent and DDASRootHit classes is installed in the "usual" library location: /usr/opt/daq/MM.mm-eee/lib for NSCLDAQ version MM.mm-eee; after sourcing the appropriate daqsetup.bash
script, the environment variable DAQLIB
will point to this directory. The library can be loaded into the ROOT interpreter on startup:TTree::Print()
to print a summary of the tree contents. Now we need to associate an object with the branch we care about. Because the "rawevents" branch is filled with DDASRootEvent objects, we need to create a such an object and associate it with the branch:TTree::GetEntry()
. As an example, consider the following ROOT macro which loops over the tree entries and histogram the multiplicity using the DDASRootEvent::GetNHits()
method to extract the number of channel hits per event:CXXFLAGS
specified in a GNU Makefile. Assuming the NSCLDAQ environment is set, something like:CXXFLAGS = -I${DAQINC}
libddasrootformat.so
library is also necessary. Most commonly this is accomplished by using the -lddasrootformat
flag during linking and doing one of the following:DAQLIB
to the LD_LIBRARY_PATH
environment variable during execution,DAQLIB
to the LD_RUN_PATH
environment variable during linking,-Wl,-rpath
linker flag.LDFLAGS
and LDLIBS
Makefile variables:LDFLAGS = -L${DAQLIB} -Wl,-rpath=${DAQLIB} LDLIBS = -lddasrootformat