26 #include "NOMADFile.h"
27 #include "NOMADFilter.h"
28 #include "NOMADBuilder.h"
52 void CheckRawData(TFile *file = 0x0, TFile *file_tag = 0x0, Bool_t load_only =
false)
58 TDirectory *MainDir = file, *MainTagDir = file_tag;
60 MainDir =
new TFile(
"RawData.root",
"UPDATE");
62 if ( file_tag == 0 ) {
63 MainTagDir =
new TFile(
"RawDataTag.root",
"UPDATE");
72 emulator->
Add<NOMADFile>(
"-",
"Producer");
75 emulator->
Add<NOMADFilter>(
"Producer",
"Calib");
87 d->SetName(
"RawData");
96 gROOT->GetListOfTasks()->
Add(w);
117 void AnalyseData(TFile *file = 0x0, TFile *file_tag = 0x0, Bool_t load_only =
false)
123 TDirectory *MainDir = file, *MainTagDir = file_tag;
125 MainDir =
new TFile(
"Analysis.root",
"UPDATE");
127 if ( file_tag == 0 ) {
128 MainTagDir =
new TFile(
"AnalysisTag.root",
"UPDATE");
137 emulator->
Add<NOMADFile>(
"-",
"Producer");
141 emulator->
Add<NOMADBuilder>(
"Producer",
"Calib");
152 d->SetName(
"RawData");
163 gROOT->GetListOfTasks()->
Add(w);
166 gROOT->GetListOfTasks()->
Add(w);
168 std::ifstream in(
"GatedGG.conf"); std::string
tmp, file_with_gates;
169 if ( in.is_open() == true ) {
172 while ( in.good() && !in.eof() ) {
174 if ( tmp[0] ==
'#' ) {
179 std::istringstream decode(tmp); decode >> file_with_gates ;
180 w = d->
Add<
GatedGG>(file_with_gates.data(),
"Gated Gamma Gamma Matrix");
181 gROOT->GetListOfTasks()->
Add(w);
208 emulator->
Add<NOMADFile>(
"-",
"Producer");
210 emulator->
Add<NOMADBuilder>(
"Producer",
"Calib");
220 d->SetName(
"RawData");
229 rootmaster->
Add<
MyILLTree>(
"EXO",
"Branch on EXOGAM DATA");
244 TDirectory *MainDir = file;
246 MainDir =
new TFile(
"Offline.root",
"UPDATE");
254 emulator->
Add<NOMADFile>(
"-",
"Producer");
256 emulator->
Add<NOMADFilter>(
"Producer",
"Calib");
269 #if !defined(__CINT__)
273 TFile f(
"Offline.root",
"RECREATE");
void CheckReading(TFile *file=0x0)
virtual void Add(TTask *)
add only Watchers to the list of tasks to avoid problems.
virtual void SetGlobal(const ANamedItem &)
This method allows to modified some options of the emulator.
DLActor * Add(const Char_t *name_left, const Char_t *name_new_actor, const Char_t *name_right="-", const Char_t *conf_dir="./")
An general emulator, could run or not in multi-threading environement.
virtual void Run(Int_t max_loop=-1)
Run max loop.
Process a buffer, trigg and dispachs the work to sub-watchers.
static void SetDebug(short global_debug_level=0)
void AnalyseData(TFile *file=0x0, TFile *file_tag=0x0, Bool_t load_only=false)
This function shows how to do offline analysis using the 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.
void CheckRawData(TFile *file=0x0, TFile *file_tag=0x0, Bool_t load_only=false)
This function shows how to do offline analysis using the watchers.
Base class for a Watcher.
black hole. It consumes data and just counts the number of bytes consumed
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 ...
Base class for a generic frame trigger.
Base class for version numbers.
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.
virtual void Init(const NamedItem< std::string > &init_sequence=NamedItem< std::string >("InitSequence","config load init"))
Init the emulator. To be called before calling Run.
Base class for building control spectra and calibrate.
virtual UInt_t Snapshot(Option_t *="*")
change kind of Watcher
Built some correlation matrices.
header file for BlackHole.cpp
Watcher to build a tree with branches processed in several watchers.
Shows how to save data in a TTree.
void Universal(Bool_t b=true)
Set this trigger as universal or not.
header file for DEmulator.cpp
virtual NarvalInterface * GetActorByName(const Char_t *) const
search for an actor in the emulator
Base class that described an item in a Factory.
virtual void SetDirectory(TDirectory *mother_dir_of_watcher, TDirectory *mother_dir_for_tag, Bool_t load_objects=true)
change directories and Load objects if required