-
Notifications
You must be signed in to change notification settings - Fork 0
rootana_module_ExportPulses
ExportPulses is a module to save a histogrammed version of a TPulseIsland that you may find interesting in the process of looping through the data.
In the modules file (loaded in rootana via the -m
flag) all you need is
[ MODULES ]
...
export_module_instance = ExportPulse
...
If you find an interesting pulse island and want it to be drawn, in your code you just call:
if (ExportPulse::Instance()) {
ExportPulse::Instance()->AddToExportList(detector_name, tpi_index);
}
Where detector_name is a string corresponding to the detector name (SiL1-1-F, Ge-S, ScVe,...) and the tpi_index
is the position of the TPulseIsland* in the vector stored in the TGlobalData you're looking at.
If you want to have a TAP drawn, in your code you would call
if (ExportPulse::Instance()) {
ExportPulse::Instance()->AddToExportList(detector_name, a_TAP_to_draw);
}
where detector_name
is the name of the channel the pulse came from and a_TAP_to_draw
is a pointer to the TAnalysedPulse you want to draw. Using this method will draw both the TAP and the TPI that produced it. The TAP is drawn using either TAnalysedPulse::Draw or, if a specialised TAP is used that overloads this function, the TAP is drawn using that.
You can also specify a list of pulses to draw within the modules file itself. Use the channel to draw from as the option name and give a colon separated list of all the event and pulse numbers you want to draw. To draw pulse 1 from event 2 and pulse 5 from event 100 on channel Ge-F, the Modules file would look a bit like:
[ MODULES ]
...
export_module = ExportPulse
...
[export_module]
Ge-F = 2(1) : 100(5)
- Add ability to specify ranges from the config file