23 #if !defined(__CINT__)
31 #include "WatcherClient.h"
32 #include "ADFWatchers.h"
34 #include "CrystalWatchers.h"
35 #include "PSAWatchers.h"
36 #include "TrackedWatchers.h"
37 #include "EventPSAWatchers.h"
38 #include "EventWatchers.h"
39 #include "MetaWatchers.h"
49 const char *
GetWN(
const char *name,
const char *ext)
51 return Form(
"%s%s",name,ext);
60 TIter next(top_task->GetListOfTasks());
61 while ( (task = (TTask *)next()) ) {
62 if ( task == collector )
66 TIter next_w(fd->GetListOfTasks());
67 while ( (task = (TTask *)next_w()) ) {
68 ts_rate =
dynamic_cast<TSRate *
> (task);
70 collector->
AddHook(ts_rate,fd->GetName());
92 Bool_t ok =
false; TString DFtype = df_type;
97 if ( DFtype.Contains(
"ADF") ) {
107 fd->
Add<
KeyWatcher>(
"AgataKey",
"AgataKeys Watcher using an universal trigger");
116 if ( DFtype.Contains(
"CRYSTAL") && ! DFtype.Contains(
"CCRYSTAL") ) {
124 fd->
Add<
CrystalSpectra>(
GetWN(
"Crystal_Spectra_",ext),Form(
"Display the data for the %s crystal at the producer level",ext));
126 fd->
Add<
KeyWatcher>(
GetWN(
"Crystal_Keys_",ext),Form(
"AgataKeys Watcher for the %s crystal at the producer level",ext));
134 if ( DFtype.Contains(
"CCRYSTAL") ) {
143 fd->
Add<
CCrystalSpectra>(
GetWN(
"CCrystal_Spectra_",ext),Form(
"Display the calibrated data for the %s crystal at the preprocessing level",ext));
145 fd->
Add<
KeyWatcher>(
GetWN(
"CCrystal_Keys_",ext),Form(
"AgataKeys Watcher for the %s crystal at the preprocessing level",ext));
151 if ( DFtype.Contains(
"PSA") ) {
161 fd->
Add<
KeyWatcher>(
GetWN(
"Psa_Keys_",ext),Form(
"AgataKeys Watcher for the %s crystal at psa level",ext));
168 if ( DFtype.Contains(
"RANC0") ) {
173 AgataFrameTrigger::Build(
"RANC0",
"data:ranc0");
180 VAMOSWatcher *vw = rootmaster->
Add<VAMOSWatcher>(
"GVWInterface",
"See Spectra in Out/VAMOS_Spectra.root");
181 vw->InitVAMOS(0,
"Out/VAMOS_Spectra.root");
183 fd->
Add<
KeyWatcher>(
"Vamos_Keys",
"AgataKeys Watcher for the ancilary level");
192 if ( DFtype.Contains(
"EB") ) {
195 AgataFrameTrigger *trig = AgataFrameTrigger::Build(
"EventPSA",
"event:data:psa" );
198 fd->
Add<
EBWatcher>(
GetWN(
"EventBuilder",ext),
"Display Agata spectra at the event builder level");
202 fd->
Add<
KeyWatcher>(
"EventBuilder_Keys",
"AgataKeys Watcher at the event builder level");
207 if ( DFtype.Contains(
"MERGER") ) {
209 AgataFrameTrigger *trig = AgataFrameTrigger::Build(
"Event",
"event:data event:data:psa data:ranc0");
218 rootmaster->
Add<
RawMFMTree>(
"RawMFMTree",
"Branch on Raw MFM");
220 VAMOSWatcher *vw = rootmaster->
Add<VAMOSWatcher>(
"GVWInterface",
"Branch managed by the VAMOS librarie");
221 vw->InitVAMOS(0,Form(
"Out/VAMOS_Spectra.root"));
225 fd->
Add<VAMOSVertexBuilder>(
"VAMOSVertexBuilder",
"Check Doppler as computed by VAMOS");
228 fVertexBuilder->SetVertex();
229 fd->
Add<
GlobalDC>(
"CheckGlobalDoppler",
"Check Doppler as computed by VAMOS");
231 fd->
Add<
AGATAVAMOSCoinc>(
"AGATAVAMOSCoinc",
"Check some coincidences spectra between VAMOS and AGATA");
234 fd->
Add<
KeyWatcher>(
"Merger_Keys",
"AgataKeys Watcher at the merger level",trig);
239 if ( DFtype.Contains(
"TRACKING") ) {
241 bool EventDataConfiguration =
true;
249 if(EventDataConfiguration)
251 TriggerTracking = AgataFrameTrigger::Build(
"TRACKING",
"event:data data:ranc0 event:data:psa data:tracked");
252 TriggerEventBuilder = TriggerTracking;
253 TriggerAncilary = TriggerTracking;
258 TriggerTracking= AgataFrameTrigger::Build(
"TRACKING",
"data:tracked");
259 TriggerEventBuilder = AgataFrameTrigger::Build(
"TRACKING",
"event:data:psa");
260 TriggerAncilary = AgataFrameTrigger::Build(
"TRACKING",
"data:ranc0");
265 fd->
Add<
EBWatcher>(
"EventBuilder",
"Display Agata spectra at the event builder level",TriggerEventBuilder);
272 fd->
Add<
AGATAVAMOSCoinc>(
"AGATAVAMOSCoinc",
"Check some coincidences spectra between VAMOS and AGATA");
275 fd->
Add<
TrackingWatcher>(
"Tracking",
"Display Agata spectra at the tracking level",TriggerTracking);
277 fd->
Add<
KeyWatcher>(
"Tracking_Keys_Univ",
"AgataKeys Watcher at the tracking level",UnivTrig);
278 AgataFrameTrigger *VamosOnly = AgataFrameTrigger::Build(
"TRACKING",
"event:data data:ranc0 !event:data:psa !data:tracked");
279 AgataFrameTrigger *AgataOnly = AgataFrameTrigger::Build(
"TRACKING",
"event:data !data:ranc0 event:data:psa data:tracked");
280 AgataFrameTrigger *Normal = AgataFrameTrigger::Build(
"TRACKING",
"event:data data:ranc0 event:data:psa data:tracked");
281 fd->
Add<
KeyWatcher>(
"Tracking_Keys_Normal",
"AgataKeys Watcher at the tracking level",Normal);
282 fd->
Add<
KeyWatcher>(
"Tracking_Keys_Vamos",
"AgataKeys Watcher at the tracking level",VamosOnly);
283 fd->
Add<
KeyWatcher>(
"Tracking_Keys_AGATA",
"AgataKeys Watcher at the tracking level",AgataOnly);
Interface for any watcher that is a VertexBuilder.
Watcher that built the spectra expected for a Vertex.
void AddHook(Watcher *, const char *)
Add a timestamp rate.
virtual SharedFP * Add(const FactoryItem &key_item, const FactoryItem &frame_item, bool iscons=true, const Char_t *option="")
Add a frame to the list of required frames.
Watcher to keep last TS values.
MFMWatcher, to check the structure of the MBS Frame.
Process a buffer, trigg and dispachs the work to sub-watchers.
Watcher_T * Add(const Char_t *name, const Char_t *title, Short_t do_spectra, Short_t do_tree)
Allocate a watcher in charge of filling one part of the tree ==> Should inherits from TreeBuilder...
virtual Bool_t SetTrigger(ADF::DFTrigger *)
This is the default trigger for any added watcher.
RawMFMTree, branches that contains value/label as written in the MFM Frame.
Watcher_T * Add(const Char_t *name, const Char_t *title, ADF::DFTrigger *t=0x0)
allocate a new watcher so that it creates corectly its directory under the dispatcher directory ...
AD ROOT TTree branches for the hit part.
header file for GANILWatchers.C
AgataFrameTrigger * GetUniversalTrigger()
Base class for version numbers.
Bool_t SetupWatchers(const char *df_type, FrameDispatcher *fd, const char *ext="")
It shows how to set up the watchers for different kind of data flow.
To be used for Agata Data Flow.
! Show rates (counts) per Crystal *!
To build some basic VAMOS Spectra and Coincidences with AGATA [Requires Event:data:psa].
void DoTSRateCollector(TTask *top_task, TSRateCollector *collector)
browse all dispatchers to look for TSRate Watcher and add them to the rate collector ...
Watcher to build a tree with branches processed in several watchers.
const char * GetWN(const char *name, const char *ext)
Build the Watcher name adding an extension.
Crystal spectra watcher class.
void Universal(Bool_t b=true)
Set this trigger as universal or not.
Base class that described an item in a Factory.
compute histograms for several TSRate
static VertexBuilder * theCurrentVertexBuilder()
to get the current VertexWatcher (for other watchers) i.e. the last one registered.